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:
24
www/js/ts.js
24
www/js/ts.js
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user