aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-09 13:35:15 -0800
committerValerio Virgillito2012-02-09 13:35:15 -0800
commitcebd27bd649d01c8b8713651df3878da14b5e9a8 (patch)
tree3d20d838f2f6892a07cf16c4c959e234f96ee60b /js
parent666ae3e9119410cbf7fa974274d95336aaff091c (diff)
parent2092acf520e3f346f15e42c76c2f616e7d094c97 (diff)
downloadninja-cebd27bd649d01c8b8713651df3878da14b5e9a8.tar.gz
Merge branch 'Timeline' of https://github.com/imix23ways/ninja-internal into feature-branch
Conflicts: js/helper-classes/RDGE/Materials/FlatMaterial.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js')
-rw-r--r--js/components/editable.reel/editable.js250
-rw-r--r--js/components/hintable.reel/hintable.js360
-rw-r--r--js/components/layout/bread-crumb.reel/bread-crumb.js108
-rw-r--r--js/controllers/styles-controller.js4
-rw-r--r--js/mediators/element-mediator.js19
-rw-r--r--js/ninja.reel/ninja.html12
-rw-r--r--js/panels/Resizer.js4
-rw-r--r--js/panels/Timeline/Collapser.js320
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.html27
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js154
-rw-r--r--js/panels/Timeline/Keyframe.reel/css/Keyframe.css15
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.html168
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js626
-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.js41
-rw-r--r--js/panels/Timeline/Span.reel/css/Span.css11
-rw-r--r--js/panels/Timeline/Style.reel/Style.html91
-rw-r--r--js/panels/Timeline/Style.reel/Style.js648
-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.html242
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js1027
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css251
-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.js433
-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.html48
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js109
-rw-r--r--js/panels/Timeline/Tween.reel/css/Tween.css4
62 files changed, 6110 insertions, 293 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<