author | Clipperz <info@clipperz.com> | 2013-01-10 08:37:28 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-10 08:37:28 (UTC) |
commit | fac609cf1507ae82e7069b21724e089a9ac93869 (patch) (unidiff) | |
tree | 89267c7c02b4cf56e261cfcdcb9290014ff7879d /frontend/beta | |
parent | 6642b868f781e8e6689db630877a092472ff0f0b (diff) | |
download | clipperz-fac609cf1507ae82e7069b21724e089a9ac93869.zip clipperz-fac609cf1507ae82e7069b21724e089a9ac93869.tar.gz clipperz-fac609cf1507ae82e7069b21724e089a9ac93869.tar.bz2 |
Fixed account preference saving
Saving preferences was still invoking an old method removed since the unification of the backend
-rw-r--r-- | frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js b/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js index 9e80b3a..919289d 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js | |||
@@ -134,61 +134,62 @@ Clipperz.PM.DataModel.UserPreferences.prototype = MochiKit.Base.update(null, { | |||
134 | 134 | ||
135 | 'shouldShowDonationPanel': function() { | 135 | 'shouldShowDonationPanel': function() { |
136 | return this.configValue('shouldShowDonationPanel', true); | 136 | return this.configValue('shouldShowDonationPanel', true); |
137 | }, | 137 | }, |
138 | 138 | ||
139 | 'setShouldShowDonationPanel': function(aValue) { | 139 | 'setShouldShowDonationPanel': function(aValue) { |
140 | this.setConfigValue('shouldShowDonationPanel', aValue); | 140 | this.setConfigValue('shouldShowDonationPanel', aValue); |
141 | }, | 141 | }, |
142 | 142 | ||
143 | //------------------------------------------------------------------------- | 143 | //------------------------------------------------------------------------- |
144 | 144 | ||
145 | 'disableUnsecureFaviconLoadingForIE': function() { | 145 | 'disableUnsecureFaviconLoadingForIE': function() { |
146 | return this.configValue('disableUnsecureFaviconLoadingForIE', false); | 146 | return this.configValue('disableUnsecureFaviconLoadingForIE', false); |
147 | }, | 147 | }, |
148 | 148 | ||
149 | 'setDisableUnsecureFaviconLoadingForIE': function(aValue) { | 149 | 'setDisableUnsecureFaviconLoadingForIE': function(aValue) { |
150 | this.setConfigValue('disableUnsecureFaviconLoadingForIE', aValue); | 150 | this.setConfigValue('disableUnsecureFaviconLoadingForIE', aValue); |
151 | }, | 151 | }, |
152 | 152 | ||
153 | //------------------------------------------------------------------------- | 153 | //------------------------------------------------------------------------- |
154 | 154 | ||
155 | 'serializedData': function() { | 155 | 'serializedData': function() { |
156 | return this.config(); | 156 | return this.config(); |
157 | }, | 157 | }, |
158 | 158 | ||
159 | //------------------------------------------------------------------------- | 159 | //------------------------------------------------------------------------- |
160 | 160 | ||
161 | 'saveChanges': function(aReferenceElement) { | 161 | 'saveChanges': function(aReferenceElement) { |
162 | vardeferredResult; | 162 | vardeferredResult; |
163 | 163 | ||
164 | deferredResult = new MochiKit.Async.Deferred(); | 164 | deferredResult = new MochiKit.Async.Deferred(); |
165 | 165 | ||
166 | deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), | 166 | deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), |
167 | { | 167 | { |
168 | title:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'], | 168 | title:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'], |
169 | text:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'], | 169 | text:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'], |
170 | width:240, | 170 | width:240, |
171 | showProgressBar:true, | 171 | showProgressBar:true, |
172 | showCloseButton:false | 172 | showCloseButton:false |
173 | }, | 173 | }, |
174 | aReferenceElement | 174 | aReferenceElement |
175 | ); | 175 | ); |
176 | deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_1'); | 176 | deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_1'); |
177 | deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); | 177 | deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); |
178 | deferredResult.addCallback(function(res) { | 178 | deferredResult.addCallback(function(res) { |
179 | return {user:res}; | 179 | return {user:res}; |
180 | }) | 180 | }) |
181 | deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_2'); | 181 | deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_2'); |
182 | deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateData'); | 182 | // deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateData'); |
183 | deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'saveChanges'); | ||
183 | deferredResult.addCallback(Clipperz.PM.Components.MessageBox().hide, YAHOO.ext.Element.get('main')); | 184 | deferredResult.addCallback(Clipperz.PM.Components.MessageBox().hide, YAHOO.ext.Element.get('main')); |
184 | deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedPreferences', null); | 185 | deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedPreferences', null); |
185 | 186 | ||
186 | deferredResult.callback(); | 187 | deferredResult.callback(); |
187 | 188 | ||
188 | return deferredResult; | 189 | return deferredResult; |
189 | }, | 190 | }, |
190 | 191 | ||
191 | //------------------------------------------------------------------------- | 192 | //------------------------------------------------------------------------- |
192 | __syntaxFix__: "syntax fix" | 193 | __syntaxFix__: "syntax fix" |
193 | }); | 194 | }); |
194 | 195 | ||