author | Clipperz <info@clipperz.com> | 2013-01-08 15:21:04 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-08 15:21:04 (UTC) |
commit | 816fc35420a434b1d54ae5833d617608f7456048 (patch) (unidiff) | |
tree | 95b8caf354083593d7775e4dda6f4c556b44a2d9 /frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js | |
parent | 267603e3aa3cf0029411e67ae14018b52344c296 (diff) | |
download | clipperz-816fc35420a434b1d54ae5833d617608f7456048.zip clipperz-816fc35420a434b1d54ae5833d617608f7456048.tar.gz clipperz-816fc35420a434b1d54ae5833d617608f7456048.tar.bz2 |
Updated version of /gamma
Tons of changes, included a new draft of the mobile version (still VERY rough)
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js index 5d082b5..26506e7 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js | |||
@@ -37,116 +37,120 @@ Clipperz.PM.UI.Web.Components.LoginProgress = function(args) { | |||
37 | 37 | ||
38 | //============================================================================= | 38 | //============================================================================= |
39 | 39 | ||
40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI.Common.Components.BaseComponent, { |
41 | 41 | ||
42 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
43 | 43 | ||
44 | 'toString': function () { | 44 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.LoginProgress component"; | 45 | return "Clipperz.PM.UI.Web.Components.LoginProgress component"; |
46 | }, | 46 | }, |
47 | 47 | ||
48 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
49 | 49 | ||
50 | 'deferred': function() { | 50 | 'deferred': function() { |
51 | return this._deferred; | 51 | return this._deferred; |
52 | }, | 52 | }, |
53 | 53 | ||
54 | 'setDeferred': function(aValue) { | 54 | 'setDeferred': function(aValue) { |
55 | this._deferred = aValue; | 55 | this._deferred = aValue; |
56 | }, | 56 | }, |
57 | 57 | ||
58 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
59 | 59 | ||
60 | 'renderSelf': function() { | 60 | 'renderSelf': function() { |
61 | // var loginProgressElement; | 61 | // var loginProgressElement; |
62 | // | 62 | // |
63 | // loginProgressElement = MochiKit.DOM.getElement('loginProgress'); | 63 | // loginProgressElement = MochiKit.DOM.getElement('loginProgress'); |
64 | // | 64 | // |
65 | // if (loginProgressElement == null) { | 65 | // if (loginProgressElement == null) { |
66 | // loginProgressElement = this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress'}, true); | 66 | // loginProgressElement = this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress'}, true); |
67 | // } | 67 | // } |
68 | 68 | ||
69 | //console.log(">> LoginProgress.renderSelf", this.element()); | 69 | //console.log(">> LoginProgress.renderSelf", this.element()); |
70 | this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress', children: [ | 70 | this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress', children: [ |
71 | // this.append(loginProgressElement, [ | 71 | // this.append(loginProgressElement, [ |
72 | {tag:'div', cls:'header', children:[ | 72 | {tag:'div', cls:'header', children:[ |
73 | {tag:'h3', id:this.getId('title'), html:"login progress"} | 73 | {tag:'h3', id:this.getId('title'), html:"login progress"} |
74 | ]}, | 74 | ]}, |
75 | {tag:'div', cls:'body', children:[ | 75 | {tag:'div', cls:'body', children:[ |
76 | {tag:'div', id:this.getId('progressBar')}, | 76 | {tag:'div', id:this.getId('progressBar')}, |
77 | {tag:'div', id:this.getId('errorBox'), cls:'errorBox', children:[ | 77 | {tag:'div', id:this.getId('errorBox'), cls:'errorBox', children:[ |
78 | // {tag:'div',cls:'img ALERT', children:[{tag:'div'}]}, | 78 | // {tag:'div',cls:'img ALERT', children:[{tag:'div'}]}, |
79 | {tag:'div',cls:'img ALERT', children:[{tag:'canvas', id:this.getId('canvas')}]}, | 79 | {tag:'div',cls:'img ALERT', children:[{tag:'canvas', id:this.getId('canvas')}]}, |
80 | {tag:'p', html:"Login failed"} | 80 | {tag:'p', html:"Login failed"} |
81 | ]} | 81 | ]} |
82 | ]}, | 82 | ]}, |
83 | {tag:'div', cls:'footer', children:[ | 83 | {tag:'div', cls:'footer', children:[ |
84 | {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ | 84 | {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ |
85 | {tag:'div', cls:'button', id:this.getId('button'), children:[ | 85 | // {tag:'div', cls:'button', id:this.getId('button'), children:[ |
86 | {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} | 86 | // {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} |
87 | ]} | 87 | // ]} |
88 | {tag:'a', cls:'button', id:this.getId('button'), html:"cancel"} | ||
88 | ]} | 89 | ]} |
89 | ]} | 90 | ]} |
90 | ]}); | 91 | ]}); |
91 | // ]); | 92 | // ]); |
92 | 93 | ||
93 | Clipperz.PM.UI.Canvas.marks['!'](this.getElement('canvas'), "#ffffff"); | 94 | Clipperz.PM.UI.Canvas.marks['!'](this.getElement('canvas'), "#ffffff"); |
94 | 95 | ||
95 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); | 96 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); |
96 | MochiKit.Style.hideElement(this.getElement('errorBox')); | 97 | MochiKit.Style.hideElement(this.getElement('errorBox')); |
97 | 98 | ||
98 | MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); | 99 | // MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); |
100 | MochiKit.Signal.connect(this.getId('button'), 'onclick', this, 'cancelEventHandler'); | ||
99 | }, | 101 | }, |
100 | 102 | ||
101 | //------------------------------------------------------------------------- | 103 | //------------------------------------------------------------------------- |
102 | 104 | ||
103 | 'displayElement': function() { | 105 | 'displayElement': function() { |
104 | return MochiKit.DOM.getElement('loginProgress'); | 106 | return MochiKit.DOM.getElement('loginProgress'); |
105 | }, | 107 | }, |
106 | 108 | ||
107 | //------------------------------------------------------------------------- | 109 | //------------------------------------------------------------------------- |
108 | 110 | ||
109 | 'cancelEventHandler': function(anEvent) { | 111 | 'cancelEventHandler': function(anEvent) { |
110 | anEvent.preventDefault(); | 112 | anEvent.preventDefault(); |
111 | 113 | ||
112 | MochiKit.Signal.signal(this, 'cancelEvent'); | 114 | MochiKit.Signal.signal(this, 'cancelEvent'); |
113 | }, | 115 | }, |
114 | 116 | ||
115 | //------------------------------------------------------------------------- | 117 | //------------------------------------------------------------------------- |
116 | 118 | ||
117 | 'disableCancel': function() { | 119 | 'disableCancel': function() { |
118 | MochiKit.Style.hideElement(this.getElement('buttonArea')); | 120 | MochiKit.Style.hideElement(this.getElement('buttonArea')); |
119 | }, | 121 | }, |
120 | 122 | ||
121 | //------------------------------------------------------------------------- | 123 | //------------------------------------------------------------------------- |
122 | 124 | ||
123 | 'showErrorMessage': function() { | 125 | 'showErrorMessage': function() { |
124 | this.getElement('buttonLink').innerHTML = "close"; | 126 | // this.getElement('buttonLink').innerHTML = "close"; |
127 | this.getElement('button').innerHTML = "close"; | ||
128 | MochiKit.DOM.addElementClass(this.getElement('button'), 'default'); | ||
125 | 129 | ||
126 | MochiKit.Style.hideElement(this.getElement('progressBar')); | 130 | MochiKit.Style.hideElement(this.getElement('progressBar')); |
127 | 131 | ||
128 | this.getElement('title').innerHTML = "Error"; | 132 | this.getElement('title').innerHTML = "Error"; |
129 | MochiKit.Style.showElement(this.getElement('errorBox')); | 133 | MochiKit.Style.showElement(this.getElement('errorBox')); |
130 | MochiKit.Style.showElement(this.getElement('buttonArea')); | 134 | MochiKit.Style.showElement(this.getElement('buttonArea')); |
131 | }, | 135 | }, |
132 | 136 | ||
133 | //------------------------------------------------------------------------- | 137 | //------------------------------------------------------------------------- |
134 | 138 | ||
135 | 'deferredHideModalAndRemove': function(someParameters, aResult) { | 139 | 'deferredHideModalAndRemove': function(someParameters, aResult) { |
136 | vardeferredResult; | 140 | vardeferredResult; |
137 | 141 | ||
138 | deferredResult = new Clipperz.Async.Deferred("LoginProgress.deferredHideModalAndRemove", {trace:false}); | 142 | deferredResult = new Clipperz.Async.Deferred("LoginProgress.deferredHideModalAndRemove", {trace:false}); |
139 | deferredResult.addMethod(this, 'deferredHideModal'); | 143 | deferredResult.addMethod(this, 'deferredHideModal'); |
140 | deferredResult.addMethod(this, 'remove'); | 144 | deferredResult.addMethod(this, 'remove'); |
141 | deferredResult.addCallback(function () { | 145 | deferredResult.addCallback(function () { |
142 | return aResult; | 146 | return aResult; |
143 | }); | 147 | }); |
144 | deferredResult.callback(someParameters); | 148 | deferredResult.callback(someParameters); |
145 | 149 | ||
146 | return deferredResult; | 150 | return deferredResult; |
147 | }, | 151 | }, |
148 | 152 | ||
149 | //------------------------------------------------------------------------- | 153 | //------------------------------------------------------------------------- |
150 | 154 | ||
151 | __syntaxFix__: "syntax fix" | 155 | __syntaxFix__: "syntax fix" |
152 | }); | 156 | }); |