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:
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
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