diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-04-20 12:19:39 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-21 11:29:10 +0100 |
commit | c42d977185648fcc34c8e0135973ebc1c4776512 (patch) | |
tree | a35e6884341bab334a1973515987c4df8106297b /settings/js/personal.js | |
parent | ba9b17c9069c5d9fe8595ffd306647f33067c927 (diff) | |
download | nextcloud-server-c42d977185648fcc34c8e0135973ebc1c4776512.tar.gz nextcloud-server-c42d977185648fcc34c8e0135973ebc1c4776512.zip |
Add more personal information fields to the settings page for enhanced federated sharing
fix layout
Add generic way of handling input change events
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r-- | settings/js/personal.js | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index c2cb437bd13..7a8d43d1475 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -1,10 +1,15 @@ +/* global OC */ + /** * Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com> * 2013, Morris Jobke <morris.jobke@gmail.com> + * 2016, Christoph Wurst <christoph@owncloud.com> * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ +OC.Settings = OC.Settings || {}; + /** * The callback will be fired as soon as enter is pressed by the * user or 1 second after the last data entry @@ -21,21 +26,21 @@ jQuery.fn.keyUpDelayedOrEnter = function (callback, allowEmptyValue) { return; } if (allowEmptyValue || that.val() !== '') { - cb(); + cb(event); } }, 1000)); this.keypress(function (event) { if (event.keyCode === 13 && (allowEmptyValue || that.val() !== '')) { event.preventDefault(); - cb(); + cb(event); } }); - this.bind('paste', null, function (e) { - if(!e.keyCode){ + this.bind('paste', null, function (event) { + if(!event.keyCode){ if (allowEmptyValue || that.val() !== '') { - cb(); + cb(event); } } }); @@ -265,8 +270,10 @@ $(document).ready(function () { } }); - $('#displayName').keyUpDelayedOrEnter(changeDisplayName); - $('#email').keyUpDelayedOrEnter(changeEmailAddress, true); + var federationSettingsView = new OC.Settings.FederationSettingsView({ + el: '#personal-settings-container' + }); + federationSettingsView.render(); $("#languageinput").change(function () { // Serialize the data @@ -452,3 +459,5 @@ OC.Encryption.msg = { } } }; + +OC.Settings.updateAvatar = updateAvatar; |