aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Duran2012-02-06 13:30:49 -0800
committerJonathan Duran2012-02-06 13:30:49 -0800
commita39bad832722a10f6556f91e94c3301a41f59bd5 (patch)
treee436e919f9f67c56e8bce462aab95ff3804813cc
parent671a27069db6a121507c2b342653aede685cff67 (diff)
downloadninja-a39bad832722a10f6556f91e94c3301a41f59bd5.tar.gz
merge new timeline
Signed-off-by: Jonathan Duran <jduran@motorola.com>
-rw-r--r--js/components/editable.reel/editable.js250
-rw-r--r--js/components/hintable.reel/hintable.js360
-rw-r--r--js/ninja.reel/ninja.html3
-rw-r--r--js/panels/Timeline/Collapser.js319
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.html27
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js147
-rw-r--r--js/panels/Timeline/Keyframe.reel/css/Keyframe.css11
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.html158
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js511
-rw-r--r--js/panels/Timeline/Layer.reel/css/Layer.css322
-rw-r--r--js/panels/Timeline/Layer.reel/images/eye.pngbin0 -> 1331 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/images/icon-collapsed.pngbin0 -> 325 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/images/icon-eye.pngbin0 -> 550 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/images/icon-lock.pngbin0 -> 475 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/images/icon-minus.pngbin0 -> 161 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/images/icon-open.pngbin0 -> 323 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/images/icon-plus.pngbin0 -> 230 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/images/lock_closed.pngbin0 -> 1208 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/images/lock_open.pngbin0 -> 1186 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/images/panelDisclosureIcon.pngbin0 -> 3028 bytes
-rw-r--r--js/panels/Timeline/Layer.reel/scss/Layer.scss220
-rw-r--r--js/panels/Timeline/Layer.reel/scss/config.rb9
-rw-r--r--js/panels/Timeline/Span.reel/Span.html27
-rw-r--r--js/panels/Timeline/Span.reel/Span.js35
-rw-r--r--js/panels/Timeline/Span.reel/css/Span.css6
-rw-r--r--js/panels/Timeline/Style.reel/Style.html91
-rw-r--r--js/panels/Timeline/Style.reel/Style.js603
-rw-r--r--js/panels/Timeline/Style.reel/css/Style.css133
-rw-r--r--js/panels/Timeline/Style.reel/scss/Style.scss70
-rw-r--r--js/panels/Timeline/Style.reel/scss/config.rb9
-rw-r--r--js/panels/Timeline/TimelineController.js13
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.css6
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html230
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js615
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css249
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/images/pause.pngbin0 -> 1076 bytes
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/images/play.pngbin0 -> 1190 bytes
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/images/play_next.pngbin0 -> 1185 bytes
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/images/play_prev.pngbin0 -> 1199 bytes
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/images/plus.pngbin0 -> 1133 bytes
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/images/timetick.jpgbin0 -> 737 bytes
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/images/trash.pngbin0 -> 1154 bytes
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html112
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js414
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css117
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/images/gridline.jpgbin0 -> 724 bytes
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/scss/TimelineTrack.scss65
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/scss/config.rb9
-rw-r--r--js/panels/Timeline/Track.reel/Track.html61
-rw-r--r--js/panels/Timeline/Track.reel/Track.js186
-rw-r--r--js/panels/Timeline/Track.reel/css/Track.css26
-rw-r--r--js/panels/Timeline/Track.reel/images/gridline.jpgbin0 -> 724 bytes
-rw-r--r--js/panels/Timeline/TrackSpacer.reel/TrackSpacer.html26
-rw-r--r--js/panels/Timeline/TrackSpacer.reel/TrackSpacer.js15
-rw-r--r--js/panels/Timeline/TrackSpacer.reel/css/TrackSpacer.css5
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.html47
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js109
-rw-r--r--js/panels/Timeline/Tween.reel/css/Tween.css4
58 files changed, 5353 insertions, 267 deletions
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js
new file mode 100644
index 00000000..1d0ad776
--- /dev/null
+++ b/js/components/editable.reel/editable.js
@@ -0,0 +1,250 @@
1/* ComputedStyleSubPanel.js */
2var Montage = require("montage").Montage,
3 Component = require("montage/ui/component").Component;
4
5
6/*
7
8EDITABLE - Methods
9- startEdit
10- stopEdit
11- value
12-
13- _suggest
14- _suggestNext
15- _suggestPrev
16- _clearSuggest
17- _accept
18- _revert
19- _setCaret
20
21*/
22
23
24exports.Editable = Montage.create(Component, {
25 hasTemplate: { value: false },
26
27 _element : { value : null },
28 element : {
29 get : function() {
30 return this._element;
31 },
32 set : function(el) {
33 this._element = el;
34 this._element.addEventListener('keydown', this, false);
35 this._element.addEventListener('input', this, false);
36
37 if(this.startOnEvent) {
38 this._element.addEventListener(this.startOnEvent, this, false);
39 }
40
41 }
42 },
43 _readOnly : {
44 value: false
45 },
46 readOnly : {
47 get : function() { return this._readOnly; },
48 set : function(makeReadOnly) {
49 var action = makeReadOnly ? 'add' : 'remove';
50
51 this._element.classList[action](this.readOnlyClass);
52
53 if(this.isEditable) {
54 this.stop();
55 }
56 this._readOnly = makeReadOnly;
57 }
58 },
59 _isEditable : {
60 value : false
61 },
62 isEditable : {
63 get : function() {
64 return this._isEditable;
65 },
66 set: function(makeEditable) {
67 if(this._readOnly && makeEditable) { return false; }
68 this._isEditable = makeEditable;
69 }
70 },
71 _isDirty : {
72 value: false
73 },
74 isDirty : {
75 get : function() {
76 return this._isDirty;
77 },
78 set : function(setDirty) {
79 if(setDirty) {
80 this._isDirty = true;
81 this._sendEvent('dirty');
82 } else {
83 this._isDirty = false;
84 }
85 }
86 },
87 value : {
88 get: function() {
89 return this._element.textContent;
90 },
91 set: function(str) {
92 this._element.textContent = str;
93 }
94 },
95
96 ///// Pre Edit Value
97 ///// Value stored when editing starts
98 ///// Useful for reverting to previous value
99
100 _preEditValue : {
101 value : null
102 },
103 start : {
104 value: function() {
105 if(!this._readOnly) {
106 this._isEditable = this._element.contentEditable = true;
107 this._element.classList.add(this.editingClass);
108
109 ///// Save the preEditValue
110 this._preEditValue = this.value;
111
112 if(this.selectOnStart) {
113 this.selectAll();
114 }
115
116 if(this.stopOnBlur) {
117 console.log('adding mousedown event listener');
118 ///// Simulate blur on editable node by listening to the doc
119 document.addEventListener('mouseup', this, false);
120 }
121
122 this._sendEvent('start');
123 }
124
125 }
126 },
127 stop : {
128 value: function() {
129 this._isEditable = this._element.contentEditable = false;
130 this._element.classList.remove(this.editingClass);
131
132 this._sendEvent('stop');
133
134 ///// if value is different than pre-edit val, call onchange method
135 if(this._preEditValue !== this.value) {
136 this._sendEvent('change');
137 }
138 }
139 },
140 selectAll : {
141 value : function() {
142 var range = document.createRange(),
143 sel = window.getSelection();
144
145 sel.removeAllRanges();
146 range.selectNodeContents(this._element);
147 sel.addRange(range);