aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/js/settings-admin.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-05-17 21:16:03 +0200
committerGitHub <noreply@github.com>2018-05-17 21:16:03 +0200
commit9236c20a28dd9558d1577ebfd7c7ea9202ca70bb (patch)
treee6d84fdcbbde8af5bae264db7f58a5a833c7c78e /apps/theming/js/settings-admin.js
parent8696651cfb0370bc6b1e4bcc70ffd4fa1d2b65bd (diff)
parentfeff9f5bd1f776ade18ec8e196553730ef408a54 (diff)
downloadnextcloud-server-9236c20a28dd9558d1577ebfd7c7ea9202ca70bb.tar.gz
nextcloud-server-9236c20a28dd9558d1577ebfd7c7ea9202ca70bb.zip
Merge pull request #9437 from nextcloud/feature/noid/imprint
allow to specify a link to a legal notice
Diffstat (limited to 'apps/theming/js/settings-admin.js')
-rw-r--r--apps/theming/js/settings-admin.js26
1 files changed, 15 insertions, 11 deletions
diff --git a/apps/theming/js/settings-admin.js b/apps/theming/js/settings-admin.js
index 25ac092a964..76d9fb965ca 100644
--- a/apps/theming/js/settings-admin.js
+++ b/apps/theming/js/settings-admin.js
@@ -83,7 +83,8 @@ function hideUndoButton(setting, value) {
url: 'https://nextcloud.com',
color: '#0082c9',
logoMime: '',
- backgroundMime: ''
+ backgroundMime: '',
+ imprintUrl: ''
};
if (value === themingDefaults[setting] || value === '') {
@@ -175,7 +176,7 @@ $(document).ready(function () {
var el = $(this);
});
- $('#theming input[type=text]').change(function(e) {
+ function onChange(e) {
var el = $(this);
var setting = el.parent().find('div[data-setting]').data('setting');
var value = $(this).val();
@@ -186,14 +187,14 @@ $(document).ready(function () {
}
}
if(setting === 'name') {
- if(checkName()){
- $.when(el.focusout()).then(function() {
- setThemingValue('name', value);
- });
- if (e.keyCode == 13) {
- setThemingValue('name', value);
- }
- }
+ if(checkName()){
+ $.when(el.focusout()).then(function() {
+ setThemingValue('name', value);
+ });
+ if (e.keyCode == 13) {
+ setThemingValue('name', value);
+ }
+ }
}
$.when(el.focusout()).then(function() {
@@ -202,7 +203,10 @@ $(document).ready(function () {
if (e.keyCode == 13) {
setThemingValue(setting, value);
}
- });
+ };
+
+ $('#theming input[type="text"]').change(onChange);
+ $('#theming input[type="url"]').change(onChange);
$('.theme-undo').click(function (e) {
var setting = $(this).data('setting');