Implemented timeline selection.

* Added personal VIM ide extension.
* Implemented timeline selection (resolves D0007)
* Slightly restyled the new timeline button and timeline list menu.
This commit is contained in:
Jonathan Bernard 2011-06-10 11:49:45 -05:00
parent b5eadd6fc4
commit 99d04935cb
21 changed files with 389 additions and 20 deletions

26
.ide/change_workspace.pl Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/perl -w
my @files=`ls vim-views/ | grep view`;
my $cwd=`pwd`;
chomp($cwd);
$cwd=~s!(.*?)/VBS!$1!;
print $cwd;
chdir("vim-views");
foreach my $file (@files) {
chomp($file);
system("mv", "$file", "$file.bak");
open(IN,"<$file.bak");
open(OUT, ">$file");
while(<IN>) {
s!(edit\s).*?(/VBS.*)!$1$cwd$2!;
print OUT;
}
close(IN);
close(OUT);
}

View File

@ -0,0 +1,9 @@
#!/bin/bash
perl -pi -e 's/[\t\r\f ]+$//g' $@
for file in $@
do
rm "$file.bak"
echo "$file done!"
done

20
.ide/line-count.pl Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/perl -w
my $lc=0;
my $flc;
my $filename;
while(<>) {
$filename=$_;
chomp($filename);
open(IN,"<$filename");
$flc=0;
while(<IN>) {
$flc++;
$lc++;
}
print "$filename: $flc\n";
}
print "Total: $lc\n";

8
.ide/vim-ide.vim Executable file
View File

@ -0,0 +1,8 @@
set viewoptions=cursor,folds,options,slash,unix
let ideHome = $PWD
augroup ide
au BufWinEnter *.java,*.xml,*.scss,*.yaws,*.html,*.js execute "source ".ideHome."/.ide/vim-views/".strpart(bufname("%"), strridx(bufname("%"), "/") + 1).".view"
au BufWinLeave *.java,*.xml,*.scss,*.yaws,*.html,*.js execute "mkview! ".ideHome."/.ide/vim-views/".strpart(bufname("%"), strridx(bufname("%"), "/") + 1).".view"
au BufWinLeave *.java,*.xml,*.scss,*.yaws,*.html,*.js execute "silent !echo 'syntax on' >> ".ideHome."/.ide/vim-views/".strpart(bufname("%"), strridx(bufname("%"), "/") + 1).".view"
augroup END

View File

@ -0,0 +1,107 @@
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0
argglobal
edit ~/projects/jdb-labs/timestamper/web-app/www/css/ts-screen.scss
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal balloonexpr=
setlocal nobinary
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
setlocal commentstring=/*%s*/
setlocal complete=.,w,b,u,t,i
setlocal completefunc=
setlocal nocopyindent
setlocal nocursorcolumn
setlocal nocursorline
setlocal define=
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal expandtab
if &filetype != 'scss'
setlocal filetype=scss
endif
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=0
setlocal foldmarker={{{,}}}
setlocal foldmethod=manual
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=tcq
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal grepprg=
setlocal iminsert=2
setlocal imsearch=2
setlocal include=
setlocal includeexpr=
setlocal indentexpr=
setlocal indentkeys=0{,0},:,0#,!^F,o,O,e
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=
setlocal nolinebreak
setlocal nolisp
setlocal nolist
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal nomodeline
setlocal modifiable
setlocal nrformats=octal,hex
setlocal number
setlocal numberwidth=4
setlocal omnifunc=
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal shiftwidth=4
setlocal noshortname
setlocal nosmartindent
setlocal softtabstop=0
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=
setlocal swapfile
setlocal synmaxcol=3000
if &syntax != 'scss'
setlocal syntax=scss
endif
setlocal tabstop=4
setlocal tags=
setlocal textwidth=80
setlocal thesaurus=
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
silent! normal! zE
let s:l = 120 - ((39 * winheight(0) + 23) / 46)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
120
normal! 012l
let &so = s:so_save | let &siso = s:siso_save
doautoall SessionLoadPost
" vim: set ft=vim :
syntax on

143
.ide/vim-views/ts.js.view Normal file
View File

@ -0,0 +1,143 @@
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0
argglobal
edit ~/projects/jdb-labs/timestamper/web-app/www/js/ts.js
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal balloonexpr=
setlocal nobinary
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
setlocal commentstring=/*%s*/
setlocal complete=.,w,b,u,t,i
setlocal completefunc=
setlocal nocopyindent
setlocal nocursorcolumn
setlocal nocursorline
setlocal define=
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal expandtab
if &filetype != 'javascript'
setlocal filetype=javascript
endif
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=0
setlocal foldmarker={{{,}}}
setlocal foldmethod=manual
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=tcq
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal grepprg=
setlocal iminsert=2
setlocal imsearch=2
setlocal include=
setlocal includeexpr=
setlocal indentexpr=
setlocal indentkeys=0{,0},:,0#,!^F,o,O,e
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=
setlocal nolinebreak
setlocal nolisp
setlocal nolist
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal nomodeline
setlocal modifiable
setlocal nrformats=octal,hex
setlocal number
setlocal numberwidth=4
setlocal omnifunc=
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal shiftwidth=4
setlocal noshortname
setlocal nosmartindent
setlocal softtabstop=0
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=
setlocal swapfile
setlocal synmaxcol=3000
if &syntax != 'javascript'
setlocal syntax=javascript
endif
setlocal tabstop=4
setlocal tags=
setlocal textwidth=80
setlocal thesaurus=
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
silent! normal! zE
9,18fold
20,28fold
30,43fold
45,61fold
63,81fold
86,288fold
290,348fold
350,418fold
420,457fold
459,557fold
559,618fold
620,656fold
9
normal zc
20
normal zc
30
normal zc
45
normal zc
63
normal zc
86
normal zc
290
normal zc
350
normal zc
420
normal zc
459
normal zc
559
normal zc
620
normal zc
let s:l = 3 - ((2 * winheight(0) + 23) / 47)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
3
normal! 0
let &so = s:so_save | let &siso = s:siso_save
doautoall SessionLoadPost
" vim: set ft=vim :
syntax on

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
db/test/id_counter.DCL Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -5,5 +5,5 @@ Allow the user to change timelines.
========= ==========
Created: 2011-05-15
Resolved: YYYY-MM-DD
Resolved: 2011-06-08
========= ==========

View File

@ -1,7 +1,7 @@
Implement a date-picker for start time.
=======================================
Implement correct start time editor.
====================================
Use a custom jQuery UI theme?
The start time input field needs to look the same as the start time view.
========= ==========
Created: 2011-05-15

View File

@ -1,9 +0,0 @@
Error in UI when creating or selecting a timeline.
==================================================
Brief description.
========= ==========
Created: 2011-06-07
Resolved: YYYY-MM-DD
========= ==========

View File

@ -0,0 +1,15 @@
Error in UI when creating or selecting a timeline.
==================================================
A type error is occurring whenever a timeline link is clicked.
Resolution
----------
The problem was an event registered on the AppView class, linked
to 'selectTimeline' function, which was not defined.
========= ==========
Created: 2011-06-07
Resolved: 2011-06-08
========= ==========

View File

@ -0,0 +1,16 @@
API calls fail silently after session timeout.
==============================================
API starts failing with a 500 error after session time-out.
Steps to Reproduce
------------------
1. Login
2. Wait until session times out (5 min?)
3. Try to create a new entry.
========= ==========
Created: 2011-06-08
Resolved: YYYY-MM-DD
========= ==========

View File

@ -74,13 +74,19 @@ input {
text-align: right;
right: 0;
width: 172.41%; }
#timeline .drop-menu .drop-menu-items .new-timeline-link, #timeline .drop-menu .drop-menu-items .timeline-link {
padding-left: 0.5em;
#timeline .drop-menu .drop-menu-items .new-timeline-link {
padding-right: 0.5em;
font-size: medium; }
#timeline .drop-menu .drop-menu-items .new-timeline-link img, #timeline .drop-menu .drop-menu-items .timeline-link img {
#timeline .drop-menu .drop-menu-items .new-timeline-link a {
text-decoration: underline; }
#timeline .drop-menu .drop-menu-items .new-timeline-link img {
position: relative;
top: 4px;
left: -4px; }
#timeline .drop-menu .drop-menu-items .timeline-link {
padding: 0 0.5em;
font-size: medium;
border-left: thin solid white; }
.dialog {
background: white;

View File

@ -100,9 +100,11 @@ input {
right: 0;
width: 172.41%;
.new-timeline-link, .timeline-link {
padding-left: 0.5em;
.new-timeline-link {
padding-right: 0.5em;
font-size: medium;
a { text-decoration: underline; }
img {
position: relative;
@ -110,6 +112,12 @@ input {
left: -4px;
}
}
.timeline-link {
padding: 0 0.5em;
font-size: medium;
border-left: thin solid white
}
}
}
}

View File

@ -362,7 +362,7 @@ $(document).ready(function(){
initialize: function(options) {
_.bindAll(this, 'render', 'renderOne', 'editId',
'editDesc', 'updateOnEnter');
'editDesc', 'updateOnEnter', 'close');
if (options.initialTimelineId == undefined) {
throw "Can not create a TimelineListView without an initial timeline."
@ -466,7 +466,8 @@ $(document).ready(function(){
initialize: function() {
_.bindAll(this, 'initializeViews', 'loadInitialData');
_.bindAll(this, 'initializeViews', 'loadInitialData',
'selectTimeline');
appThis = this;
@ -541,6 +542,25 @@ $(document).ready(function(){
async: false}).responseText);
return data;
},
selectTimeline: function(e) {
if (e) {
// get the timeline model
var tl = this.timelines.collection.get(e.srcElement.text);
// set the on the timeline view
this.timelines.view.selected = tl;
// set the timeline on the EntryList
this.entries.collection.timeline = tl;
// refresh TimelineListView
this.timelines.view.render();
// refresh EntryList records
this.entries.collection.fetch()
}
}
});