summaryrefslogtreecommitdiff
path: root/frontend/beta
authorClipperz <info@clipperz.com>2013-01-10 08:37:28 (UTC)
committer Clipperz <info@clipperz.com>2013-01-10 08:37:28 (UTC)
commitfac609cf1507ae82e7069b21724e089a9ac93869 (patch) (side-by-side diff)
tree89267c7c02b4cf56e261cfcdcb9290014ff7879d /frontend/beta
parent6642b868f781e8e6689db630877a092472ff0f0b (diff)
downloadclipperz-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
Diffstat (limited to 'frontend/beta') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js3
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
@@ -86,109 +86,110 @@ Clipperz.PM.DataModel.UserPreferences.prototype = MochiKit.Base.update(null, {
//MochiKit.Logging.logDebug("<<< UserPreferences.configValue");
return result;
},
'setConfigValue': function(aConfigName, aValue) {
var result;
if (aValue != this.configValue(aConfigName)) {
if (aValue == null) {
delete this.config()[aConfigName]
} else {
this.config()[aConfigName] = aValue;
}
Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'preferences', true);
result = true;
} else {
result = false;
}
return result;
},
//-------------------------------------------------------------------------
'useSafeEditMode': function() {
return this.configValue('useSafeEditMode', true);
},
'setUseSafeEditMode': function(aValue) {
this.setConfigValue('useSafeEditMode', aValue);
},
//-------------------------------------------------------------------------
'preferredLanguage': function() {
return this.configValue('preferredLanguage', null);
},
'setPreferredLanguage': function(aValue) {
if (this.setConfigValue('preferredLanguage', aValue)) {
Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage());
}
},
//-------------------------------------------------------------------------
'shouldShowDonationPanel': function() {
return this.configValue('shouldShowDonationPanel', true);
},
'setShouldShowDonationPanel': function(aValue) {
this.setConfigValue('shouldShowDonationPanel', aValue);
},
//-------------------------------------------------------------------------
'disableUnsecureFaviconLoadingForIE': function() {
return this.configValue('disableUnsecureFaviconLoadingForIE', false);
},
'setDisableUnsecureFaviconLoadingForIE': function(aValue) {
this.setConfigValue('disableUnsecureFaviconLoadingForIE', aValue);
},
//-------------------------------------------------------------------------
'serializedData': function() {
return this.config();
},
//-------------------------------------------------------------------------
'saveChanges': function(aReferenceElement) {
var deferredResult;
deferredResult = new MochiKit.Async.Deferred();
deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
{
title:"", // Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'],
text:"", // Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'],
width:240,
showProgressBar:true,
showCloseButton:false
},
aReferenceElement
);
deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_1');
deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData'));
deferredResult.addCallback(function(res) {
return {user:res};
})
deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_2');
- deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateData');
+// deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateData');
+ deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'saveChanges');
deferredResult.addCallback(Clipperz.PM.Components.MessageBox().hide, YAHOO.ext.Element.get('main'));
deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedPreferences', null);
deferredResult.callback();
return deferredResult;
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});