diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-20 20:38:38 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-20 20:38:38 +0200 |
commit | 1ab27ddd4aba5cc74a7264b053378f057bacb8b6 (patch) | |
tree | d11c2dc58a8e4d8e3926789130f01984d473d8e9 /settings | |
parent | 1ef92621ab02d94af776a0fa4cd2cffec48589ef (diff) | |
parent | e4a8456d0176555e2f27f21b64ac9cbab9ec940a (diff) | |
download | nextcloud-server-1ab27ddd4aba5cc74a7264b053378f057bacb8b6.tar.gz nextcloud-server-1ab27ddd4aba5cc74a7264b053378f057bacb8b6.zip |
Merge pull request #24081 from owncloud/migrate-deprecated-jquery-v1-functions
migrate deprecated jQuery 1.x functions
Diffstat (limited to 'settings')
-rw-r--r-- | settings/admin.php | 1 | ||||
-rw-r--r-- | settings/js/admin.js | 4 | ||||
-rw-r--r-- | settings/js/apps.js | 8 | ||||
-rw-r--r-- | settings/js/certificates.js | 4 | ||||
-rw-r--r-- | settings/js/personal.js | 6 | ||||
-rw-r--r-- | settings/personal.php | 1 |
6 files changed, 11 insertions, 13 deletions
diff --git a/settings/admin.php b/settings/admin.php index cfb7eb5c541..b67331b22eb 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -38,7 +38,6 @@ $template = new OC_Template('settings', 'admin', 'user'); $l = \OC::$server->getL10N('settings'); OC_Util::addScript('settings', 'certificates'); -OC_Util::addScript('files', 'jquery.iframe-transport'); OC_Util::addScript('files', 'jquery.fileupload'); \OC::$server->getEventDispatcher()->dispatch('OC\Settings\Admin::loadAdditionalScripts'); diff --git a/settings/js/admin.js b/settings/js/admin.js index 1bbb20efa00..34e258065ce 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -38,7 +38,7 @@ $(document).ready(function(){ $('#backgroundjobs span.crondate').tipsy({gravity: 's', live: true}); $('#backgroundjobs input').change(function(){ - if($(this).attr('checked')){ + if($(this).is(':checked')){ var mode = $(this).val(); if (mode === 'ajax' || mode === 'webcron' || mode === 'cron') { OC.AppConfig.setValue('core', 'backgroundjobs_mode', mode); @@ -131,7 +131,7 @@ $(document).ready(function(){ $('#setting_smtphost').removeClass('hidden'); $('#mail_smtpsecure_label').removeClass('hidden'); $('#mail_smtpsecure').removeClass('hidden'); - if ($('#mail_smtpauth').attr('checked')) { + if ($('#mail_smtpauth').is(':checked')) { $('#mail_credentials').removeClass('hidden'); } } diff --git a/settings/js/apps.js b/settings/js/apps.js index 1b687012815..015236f957d 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -193,15 +193,15 @@ OC.Settings.Apps = OC.Settings.Apps || { OC.Settings.Apps.isType(app, 'authentication') || OC.Settings.Apps.isType(app, 'logging') || OC.Settings.Apps.isType(app, 'prevent_group_restriction')) { page.find(".groups-enable").hide(); - page.find(".groups-enable__checkbox").attr('checked', null); + page.find(".groups-enable__checkbox").prop('checked', false); } else { page.find('#group_select').val((app.groups || []).join('|')); if (app.active) { if (app.groups.length) { OC.Settings.Apps.setupGroupsSelect(page.find('#group_select')); - page.find(".groups-enable__checkbox").attr('checked','checked'); + page.find(".groups-enable__checkbox").prop('checked', true); } else { - page.find(".groups-enable__checkbox").attr('checked', null); + page.find(".groups-enable__checkbox").prop('checked', false); } page.find(".groups-enable").show(); } else { @@ -289,7 +289,7 @@ OC.Settings.Apps = OC.Settings.Apps || { if (OC.Settings.Apps.isType(app, 'filesystem') || OC.Settings.Apps.isType(app, 'prelogin') || OC.Settings.Apps.isType(app, 'authentication') || OC.Settings.Apps.isType(app, 'logging')) { - element.parent().find(".groups-enable").attr('checked', null); + element.parent().find(".groups-enable").prop('checked', true); element.parent().find(".groups-enable").hide(); element.parent().find('#group_select').hide().val(null); } else { diff --git a/settings/js/certificates.js b/settings/js/certificates.js index f2a8e6b0afb..7e62a4f5157 100644 --- a/settings/js/certificates.js +++ b/settings/js/certificates.js @@ -24,10 +24,10 @@ $(document).ready(function () { }, success: function (data) { if (typeof data === 'string') { - data = $.parseJSON(data); + data = JSON.parse(data); } else if (data && data.length) { // fetch response from iframe - data = $.parseJSON(data[0].body.innerText); + data = JSON.parse(data[0].body.innerText); } if (!data || typeof(data) === 'string') { // IE8 iframe workaround comes here instead of fail() diff --git a/settings/js/personal.js b/settings/js/personal.js index bd13b7fd251..b6e8e2ff508 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -166,7 +166,7 @@ function cleanCropper () { function avatarResponseHandler (data) { if (typeof data === 'string') { - data = $.parseJSON(data); + data = JSON.parse(data); } var $warning = $('#avatar .warning'); $warning.hide(); @@ -248,10 +248,10 @@ $(document).ready(function () { done: function (e, data) { var response = data; if (typeof data.result === 'string') { - response = $.parseJSON(data.result); + response = JSON.parse(data.result); } else if (data.result && data.result.length) { // fetch response from iframe - response = $.parseJSON(data.result[0].body.innerText); + response = JSON.parse(data.result[0].body.innerText); } else { response = data.result; } diff --git a/settings/personal.php b/settings/personal.php index 90b8bb2fbbb..6c2fccbec9b 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -47,7 +47,6 @@ OC_Util::addScript('settings', 'certificates'); OC_Util::addStyle( 'settings', 'settings' ); \OC_Util::addVendorScript('strengthify/jquery.strengthify'); \OC_Util::addVendorStyle('strengthify/strengthify'); -\OC_Util::addScript('files', 'jquery.iframe-transport'); \OC_Util::addScript('files', 'jquery.fileupload'); if ($config->getSystemValue('enable_avatars', true) === true) { \OC_Util::addVendorScript('jcrop/js/jquery.Jcrop'); |