Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gendl
gendl
Commits
b70045eb
Commit
b70045eb
authored
Jun 25, 2015
by
Cherie Yang
Browse files
Modified timer journal
parent
7f194bfb
Changes
5
Hide whitespace changes
Inline
Side-by-side
apps/timer/db/Name
View file @
b70045eb
((("20" "00") ("Test description")) (("20" "00") ("Description of task")) (("20" "00") ("Description of task")) (("20" "00") ("Description of task")) (("20" "00") ("Description of task")) (("20" "00") ("Description of task")) (("20" "00") ("Description of task")) (("0" "3") ("Description of task")) (("0" "3") ("Description of task")) (("0" "3") ("Description of task")))
\ No newline at end of file
apps/timer/db/Test name
0 → 100644
View file @
b70045eb
((("20" "00") ("Test")) (("20" "00") ("Test")) (("20" "00") ("Test")))
\ No newline at end of file
apps/timer/source/assembly.lisp
View file @
b70045eb
...
...
@@ -15,6 +15,7 @@
(
main-sheet-body
(
with-cl-who-string
()
(
:div
:id
"content"
(
:script
:src
"https://code.jquery.com/jquery-2.1.4.min.js"
)
(
:script
:src
"/timer-static/scripts.js"
)
(
str
(
the
timer-header
main-div
))
(
str
(
the
timer-section
main-div
))
...
...
@@ -84,14 +85,17 @@ function reportToMother (seconds, minutes)
;; Form for the name and description (journal)
;; FLAG -- make these into lookup items (menu-form-control or combo box).
(
journal-form-name
:type
'text-form-control
:id
"journal-name"
:default
"Name"
)
(
journal-form-descr
:type
'text-form-control
:id
"journal-descr"
:default
"Description of task"
)
; Button that says "START"
(
journal-button
:type
'button-form-control
:id
"journal-button"
:onclick
(
the
(
gdl-ajax-call
:form-controls
(
list
(
the
timer-form-min
)
(
the
timer-form-sec
)
...
...
@@ -104,7 +108,7 @@ function reportToMother (seconds, minutes)
(
journal-entries-display
:type
'sheet-section
:inner-html
(
progn
(
the
force-update-flag
)
(
with-cl-who-string
()
(
fmt
"Previous entries: ~{<
p>~a</p
>~}"
(
fmt
"Previous entries: ~{<
div class='journal-entry'>~{<div class='journal-time'>~{~a min ~a secs~}</div>~%<div class='journal-descr'>~{~a ~}</div>~%~}</div
>~}"
(
the
read-journal-entry
))))))
:functions
...
...
apps/timer/static/scripts.js
View file @
b70045eb
...
...
@@ -5,6 +5,7 @@ var timerStarted = false;
var
start_min
,
start_sec
;
var
min_id
,
sec_id
;
function
timerPause
()
{
clearInterval
(
interval
);
timerStarted
=
false
;}
function
timerStart
(
minid
,
secid
)
{
...
...
@@ -54,3 +55,24 @@ function countDown() {
document
.
getElementById
(
sec_id
).
value
=
seconds
;
}
// Code for allowing journal entries to be repeated easily.
// Journal entry changes color on hover,
// contents get placed into the form on click.
$
(
document
).
ready
(
function
(){
$
(
document
).
on
(
"
mouseenter
"
,
"
.journal-entry
"
,
function
(){
$
(
this
).
css
(
'
color
'
,
'
blue
'
);
$
(
this
).
css
(
'
cursor
'
,
'
pointer
'
);
});
$
(
document
).
on
(
"
mouseleave
"
,
"
.journal-entry
"
,
function
(){
$
(
this
).
css
(
'
color
'
,
'
#000
'
);
});
$
(
document
).
on
(
"
click
"
,
"
.journal-entry
"
,
function
(){
alert
(
$
(
"
#journal-descr
"
).
val
());
$
(
"
#journal-descr
"
).
val
(
$
(
this
).
find
(
"
.journal-descr
"
).
html
());
});
});
\ No newline at end of file
apps/timer/static/style/styles.css
View file @
b70045eb
body
{
padding
:
0
;
margin
:
0
;
margin-left
:
10%
;
margin-right
:
10%
;
font-family
:
"Arial"
;
}
#content
{
text-align
:
center
;
width
:
400px
;
margin-left
:
auto
;
margin-right
:
auto
;
}
input
{
...
...
@@ -25,4 +29,21 @@ button {
}
button
:hover
{
background-color
:
#ccc
;
}
.journal-entry
{
padding
:
10px
;
border-radius
:
15px
;
border
:
2px
solid
#eee
;
background-color
:
#eee
;
margin
:
5px
;
}
.journal-time
{
font-weight
:
bold
;
margin-left
:
auto
;
margin-right
:
auto
;
}
.journal-descr
{
margin-left
:
auto
;
margin-right
:
auto
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment