Diffstat (limited to 'frontend/delta/js/Clipperz/PM/UI/Components/Overlay.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/delta/js/Clipperz/PM/UI/Components/Overlay.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/delta/js/Clipperz/PM/UI/Components/Overlay.js b/frontend/delta/js/Clipperz/PM/UI/Components/Overlay.js index cc4a06c..cb5f81a 100644 --- a/frontend/delta/js/Clipperz/PM/UI/Components/Overlay.js +++ b/frontend/delta/js/Clipperz/PM/UI/Components/Overlay.js | |||
@@ -65,58 +65,59 @@ Clipperz.Base.extend(Clipperz.PM.UI.Components.Overlay, Object, { | |||
65 | }, | 65 | }, |
66 | 66 | ||
67 | 'failed': function (aMessage, aDelayBeforeHiding) { | 67 | 'failed': function (aMessage, aDelayBeforeHiding) { |
68 | this.completed(this.showFailIcon, aMessage, aDelayBeforeHiding); | 68 | this.completed(this.showFailIcon, aMessage, aDelayBeforeHiding); |
69 | }, | 69 | }, |
70 | 70 | ||
71 | //------------------------------------------------------------------------- | 71 | //------------------------------------------------------------------------- |
72 | 72 | ||
73 | 'resetStatus': function () { | 73 | 'resetStatus': function () { |
74 | MochiKit.Style.showElement(this.element()); | 74 | MochiKit.Style.showElement(this.element()); |
75 | MochiKit.Style.showElement(this.getElement('spinner')); | 75 | MochiKit.Style.showElement(this.getElement('spinner')); |
76 | MochiKit.Style.hideElement(this.getElement('done')); | 76 | MochiKit.Style.hideElement(this.getElement('done')); |
77 | MochiKit.Style.hideElement(this.getElement('failed')); | 77 | MochiKit.Style.hideElement(this.getElement('failed')); |
78 | }, | 78 | }, |
79 | 79 | ||
80 | 'setMessage': function (aMessage) { | 80 | 'setMessage': function (aMessage) { |
81 | if (typeof(aMessage) != 'undefined') { | 81 | if (typeof(aMessage) != 'undefined') { |
82 | this.getElement('title').innerHTML = aMessage; | 82 | this.getElement('title').innerHTML = aMessage; |
83 | } | 83 | } |
84 | }, | 84 | }, |
85 | 85 | ||
86 | 'completed': function (aFunctionToShowResult, aMessage, aDelayBeforeHiding) { | 86 | 'completed': function (aFunctionToShowResult, aMessage, aDelayBeforeHiding) { |
87 | var delay = aDelayBeforeHiding || this.defaultDelay(); | 87 | var delay = aDelayBeforeHiding || this.defaultDelay(); |
88 | 88 | ||
89 | this.hideSpinner(); | 89 | this.hideSpinner(); |
90 | MochiKit.Base.bind(aFunctionToShowResult, this)(); | 90 | MochiKit.Base.bind(aFunctionToShowResult, this)(); |
91 | this.setMessage(aMessage); | 91 | this.setMessage(aMessage); |
92 | 92 | ||
93 | MochiKit.Async.callLater(delay, MochiKit.Base.bind(this.hide, this)) | 93 | MochiKit.Async.callLater(delay, MochiKit.Base.bind(this.hide, this)) |
94 | }, | 94 | }, |
95 | 95 | ||
96 | 'hide': function () { | 96 | 'hide': function () { |
97 | MochiKit.DOM.removeElementClass(this.element(), 'ios-overlay-show'); | 97 | var element = this.element(); |
98 | MochiKit.DOM.addElementClass(this.element(), 'ios-overlay-hide'); | 98 | MochiKit.DOM.removeElementClass(element, 'ios-overlay-show'); |
99 | MochiKit.Async.callLater(1, MochiKit.Style.hideElement, this.element()); | 99 | MochiKit.DOM.addElementClass(element, 'ios-overlay-hide'); |
100 | MochiKit.Async.callLater(1, MochiKit.Style.hideElement, element); | ||
100 | }, | 101 | }, |
101 | 102 | ||
102 | 'hideSpinner': function () { | 103 | 'hideSpinner': function () { |
103 | MochiKit.Style.hideElement(this.getElement('spinner')); | 104 | MochiKit.Style.hideElement(this.getElement('spinner')); |
104 | }, | 105 | }, |
105 | 106 | ||
106 | 'showDoneIcon': function () { | 107 | 'showDoneIcon': function () { |
107 | MochiKit.Style.showElement(this.getElement('done')); | 108 | MochiKit.Style.showElement(this.getElement('done')); |
108 | }, | 109 | }, |
109 | 110 | ||
110 | 'showFailIcon': function () { | 111 | 'showFailIcon': function () { |
111 | MochiKit.Style.showElement(this.getElement('failed')); | 112 | MochiKit.Style.showElement(this.getElement('failed')); |
112 | }, | 113 | }, |
113 | 114 | ||
114 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
115 | 116 | ||
116 | 'defaultDelay': function () { | 117 | 'defaultDelay': function () { |
117 | return this._defaultDelay; | 118 | return this._defaultDelay; |
118 | }, | 119 | }, |
119 | 120 | ||
120 | //------------------------------------------------------------------------- | 121 | //------------------------------------------------------------------------- |
121 | __syntaxFix__: "syntax fix" | 122 | __syntaxFix__: "syntax fix" |
122 | }); | 123 | }); |