diff options
Diffstat (limited to 'js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js')
-rwxr-xr-x | js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js | 292 |
1 files changed, 146 insertions, 146 deletions
diff --git a/js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js b/js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js index 759c5861..84b24022 100755 --- a/js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js +++ b/js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js | |||
@@ -40,7 +40,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
40 | numerable: false, | 40 | numerable: false, |
41 | value: false | 41 | value: false |
42 | }, | 42 | }, |
43 | 43 | ||
44 | /* The current project that we have in memory */ | 44 | /* The current project that we have in memory */ |
45 | _activeProject: { | 45 | _activeProject: { |
46 | value: false | 46 | value: false |
@@ -53,7 +53,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
53 | this._activeProject = objNewProject; | 53 | this._activeProject = objNewProject; |
54 | } | 54 | } |
55 | }, | 55 | }, |
56 | 56 | ||
57 | /* Is the panel initialized? Helps keep us from re-initializing things when a project switches */ | 57 | /* Is the panel initialized? Helps keep us from re-initializing things when a project switches */ |
58 | _isPanelInitialized: { | 58 | _isPanelInitialized: { |
59 | value: false | 59 | value: false |
@@ -66,7 +66,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
66 | this._isPanelInitialized = boolValue; | 66 | this._isPanelInitialized = boolValue; |
67 | } | 67 | } |
68 | }, | 68 | }, |
69 | 69 | ||
70 | /* Project models: is there an active project, did the user just swap the project, etc. */ | 70 | /* Project models: is there an active project, did the user just swap the project, etc. */ |
71 | _swapProject: { | 71 | _swapProject: { |
72 | value: false | 72 | value: false |
@@ -122,7 +122,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
122 | this.hasActiveProject = myVal; | 122 | this.hasActiveProject = myVal; |
123 | } | 123 | } |
124 | }, | 124 | }, |
125 | 125 | ||
126 | /* Focus monitor: needed to modify keyboard navigation through panels. */ | 126 | /* Focus monitor: needed to modify keyboard navigation through panels. */ |
127 | _hasFocus: { | 127 | _hasFocus: { |
128 | value: false | 128 | value: false |
@@ -168,7 +168,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
168 | } | 168 | } |
169 | } | 169 | } |
170 | } | 170 | } |
171 | }, | 171 | }, |
172 | 172 | ||
173 | /* resizeColumn: Method to resize a column */ | 173 | /* resizeColumn: Method to resize a column */ |
174 | resizeColumn: { | 174 | resizeColumn: { |
@@ -186,7 +186,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
186 | strNewWidth = "", | 186 | strNewWidth = "", |
187 | boolProjectView = true, | 187 | boolProjectView = true, |
188 | arrStoredWidths = this.panelState.projectColumnWidths; | 188 | arrStoredWidths = this.panelState.projectColumnWidths; |
189 | 189 | ||
190 | if (strSelectorBase.indexOf("assets") > -1) { | 190 | if (strSelectorBase.indexOf("assets") > -1) { |
191 | boolProjectView = false; | 191 | boolProjectView = false; |
192 | arrStoredWidths = this.panelState.assetColumnWidths; | 192 | arrStoredWidths = this.panelState.assetColumnWidths; |
@@ -211,12 +211,12 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
211 | if ((this.activeColumn === 3) && boolProjectView) { | 211 | if ((this.activeColumn === 3) && boolProjectView) { |
212 | return; | 212 | return; |
213 | } | 213 | } |
214 | 214 | ||
215 | // Adjust intAdjust: for the asset view it needs to be 0. | 215 | // Adjust intAdjust: for the asset view it needs to be 0. |
216 | if (strSelectorBase.indexOf("assets") >0) { | 216 | if (strSelectorBase.indexOf("assets") >0) { |
217 | intAdjust = 0; | 217 | intAdjust = 0; |
218 | } | 218 | } |
219 | 219 | ||
220 | // Get the total width of the headers and set the container to that width. | 220 | // Get the total width of the headers and set the container to that width. |
221 | for (i = 0; i < arrHeadersLength; i++) { | 221 | for (i = 0; i < arrHeadersLength; i++) { |
222 | intTotalWidth = intTotalWidth + parseInt(arrHeaders[i].offsetWidth); | 222 | intTotalWidth = intTotalWidth + parseInt(arrHeaders[i].offsetWidth); |
@@ -235,14 +235,14 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
235 | intNewWidth = arrStoredWidths[this.activeColumn]; | 235 | intNewWidth = arrStoredWidths[this.activeColumn]; |
236 | } | 236 | } |
237 | strNewWidth = (intNewWidth - intAdjust) + "px"; | 237 | strNewWidth = (intNewWidth - intAdjust) + "px"; |
238 | 238 | ||
239 | // Get the array of column elements to change, and change them | 239 | // Get the array of column elements to change, and change them |
240 | arrToChange = document.querySelectorAll(strSelector); | 240 | arrToChange = document.querySelectorAll(strSelector); |
241 | arrToChangeLength = arrToChange.length; | 241 | arrToChangeLength = arrToChange.length; |
242 | for (i = 0; i < arrToChangeLength; i++) { | 242 | for (i = 0; i < arrToChangeLength; i++) { |
243 | arrToChange[i].style.width = strNewWidth; | 243 | arrToChange[i].style.width = strNewWidth; |
244 | } | 244 | } |
245 | 245 | ||
246 | // Once resize has been completed, we need to update the panelState object: | 246 | // Once resize has been completed, we need to update the panelState object: |
247 | if (!boolProjectView) { | 247 | if (!boolProjectView) { |
248 | this.panelState.assetColumnWidths[this.activeColumn] = intNewWidth; | 248 | this.panelState.assetColumnWidths[this.activeColumn] = intNewWidth; |
@@ -254,13 +254,13 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
254 | 254 | ||
255 | /* checkForResize: Check if the columns in the active view are being resized */ | 255 | /* checkForResize: Check if the columns in the active view are being resized */ |
256 | checkForResize: { | 256 | checkForResize: { |
257 | value: function() { | 257 | value: function() { |
258 | var arrHeaders = document.querySelectorAll("#pp-view-" + this.panelState.activeView + " .pp-header"), | 258 | var arrHeaders = document.querySelectorAll("#pp-view-" + this.panelState.activeView + " .pp-header"), |
259 | arrHeadersLength = arrHeaders.length, | 259 | arrHeadersLength = arrHeaders.length, |
260 | i=0, | 260 | i=0, |
261 | colWidth = 0, | 261 | colWidth = 0, |
262 | arrCols = this.panelState.projectColumnWidths; | 262 | arrCols = this.panelState.projectColumnWidths; |
263 | 263 | ||
264 | if (this.panelState.activeView === "assets") { | 264 | if (this.panelState.activeView === "assets") { |
265 | arrCols = this.panelState.assetColumnWidths; | 265 | arrCols = this.panelState.assetColumnWidths; |
266 | } | 266 | } |
@@ -274,7 +274,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
274 | } | 274 | } |
275 | } | 275 | } |
276 | }, | 276 | }, |
277 | 277 | ||
278 | /* Shift key status: is the shift key pressed (used for keyboard navigation and multiselect) */ | 278 | /* Shift key status: is the shift key pressed (used for keyboard navigation and multiselect) */ |
279 | _isShiftKeyDown: { | 279 | _isShiftKeyDown: { |
280 | value: false | 280 | value: false |
@@ -287,7 +287,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
287 | this._isShiftKeyDown = boolValue; | 287 | this._isShiftKeyDown = boolValue; |
288 | } | 288 | } |
289 | }, | 289 | }, |
290 | 290 | ||
291 | /* Inline editor models: is the inline editor active, and a pointer to the current one */ | 291 | /* Inline editor models: is the inline editor active, and a pointer to the current one */ |
292 | _activeInlineEditor: { | 292 | _activeInlineEditor: { |
293 | value: false | 293 | value: false |
@@ -327,7 +327,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
327 | } | 327 | } |
328 | } | 328 | } |
329 | }, | 329 | }, |
330 | 330 | ||
331 | /* Active filter: If the user is actively filtering the asset view */ | 331 | /* Active filter: If the user is actively filtering the asset view */ |
332 | _isFilterActive: { | 332 | _isFilterActive: { |
333 | value: false | 333 | value: false |
@@ -379,7 +379,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
379 | i =0, | 379 | i =0, |
380 | cssProp = ""; | 380 | cssProp = ""; |
381 | for (i = 0; i < arrAssetsLength; i++) { | 381 | for (i = 0; i < arrAssetsLength; i++) { |
382 | cssProp = window.getComputedStyle(arrAssets[i],null).getPropertyValue("display"); | 382 | cssProp = window.getComputedStyle(arrAssets[i],null).getPropertyValue("display"); |
383 | if (cssProp == "block") { | 383 | if (cssProp == "block") { |
384 | return arrAssets[i]; | 384 | return arrAssets[i]; |
385 | } | 385 | } |
@@ -394,7 +394,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
394 | cssProp = ""; | 394 | cssProp = ""; |
395 | for (i = arrAssetsLength; i >0; i--) { | 395 | for (i = arrAssetsLength; i >0; i--) { |
396 | if (arrAssets[i] != null) { | 396 | if (arrAssets[i] != null) { |
397 | cssProp = window.getComputedStyle(arrAssets[i],null).getPropertyValue("display"); | 397 | cssProp = window.getComputedStyle(arrAssets[i],null).getPropertyValue("display"); |
398 | } | 398 | } |
399 | if (cssProp == "block") { | 399 | if (cssProp == "block") { |
400 | return arrAssets[i]; | 400 | return arrAssets[i]; |
@@ -415,7 +415,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
415 | boolContinue = true; | 415 | boolContinue = true; |
416 | } | 416 | } |
417 | } else { | 417 | } else { |
418 | cssProp = window.getComputedStyle(arrAssets[i],null).getPropertyValue("display"); | 418 | cssProp = window.getComputedStyle(arrAssets[i],null).getPropertyValue("display"); |
419 | if (cssProp == "block") { | 419 | if (cssProp == "block") { |
420 | return arrAssets[i]; | 420 | return arrAssets[i]; |
421 | } | 421 | } |
@@ -438,7 +438,7 @@ exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require | |||
438 | boolContinue = true; | 438 | boolContinue = true; |
439 | } | 439 | } |
440 | } else { | 440 | } else { |
441< |