summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-10 00:27:54 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-10 00:27:54 +0100
commitbaacb2cd3035c3b749a65cac752ef5d3633033f3 (patch)
treeb07a1393229c8cff6ef035796612866b2dcedbfe /apps
parentf8e020ff87df46520fce0d8847e1a5c55c11ca3f (diff)
parentd9d8f7e569c11d5e31f8113519a6ff8a94130ffa (diff)
downloadnextcloud-server-baacb2cd3035c3b749a65cac752ef5d3633033f3.tar.gz
nextcloud-server-baacb2cd3035c3b749a65cac752ef5d3633033f3.zip
Merge pull request #20333 from owncloud/fix-18956
[LDAP Wizard] make all the buttons beautiful
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/css/settings.css6
-rw-r--r--apps/user_ldap/js/wizard/view.js3
-rw-r--r--apps/user_ldap/js/wizard/wizardTabGeneric.js13
-rw-r--r--apps/user_ldap/js/wizard/wizardTabLoginFilter.js6
-rw-r--r--apps/user_ldap/templates/part.wizard-groupfilter.php2
-rw-r--r--apps/user_ldap/templates/part.wizard-server.php6
-rw-r--r--apps/user_ldap/templates/part.wizard-userfilter.php2
7 files changed, 26 insertions, 12 deletions
diff --git a/apps/user_ldap/css/settings.css b/apps/user_ldap/css/settings.css
index 8648246247d..db24588f761 100644
--- a/apps/user_ldap/css/settings.css
+++ b/apps/user_ldap/css/settings.css
@@ -56,7 +56,7 @@
display: table;
}
-#ldapWizard1 .hostPortCombinator div span {
+#ldapWizard1 .hostPortCombinatorSpan {
width: 14.5%;
display: inline-block;
text-align: right;
@@ -114,13 +114,13 @@
width: auto;
}
-.ldapManyGroupsSupport span {
+.ldapManyGroupsSupport .buttonSpan {
display: inline-block;
vertical-align: top;
height: 150px;
}
-.ldapManyGroupsSupport span button {
+.ldapManyGroupsSupport .buttonSpan button {
margin-top: 35px;
}
diff --git a/apps/user_ldap/js/wizard/view.js b/apps/user_ldap/js/wizard/view.js
index 3d994af652d..39133554121 100644
--- a/apps/user_ldap/js/wizard/view.js
+++ b/apps/user_ldap/js/wizard/view.js
@@ -349,8 +349,7 @@ OCA = OCA || {};
render: function () {
$('#ldapAdvancedAccordion').accordion({ heightStyle: 'content', animate: 'easeInOutCirc'});
this.$settings.tabs({});
- $('.ldap_submit').button();
- $('.ldap_action_test_connection').button();
+ $('#ldapSettings button:not(.icon-default-style):not(.ui-multiselect)').button();
$('#ldapSettings').tabs({ beforeActivate: this.onTabChange });
$('#ldapSettings :input').tooltip({placement: "right", container: "body", trigger: "hover"});
diff --git a/apps/user_ldap/js/wizard/wizardTabGeneric.js b/apps/user_ldap/js/wizard/wizardTabGeneric.js
index b755f3ca060..60e7cd2ad9e 100644
--- a/apps/user_ldap/js/wizard/wizardTabGeneric.js
+++ b/apps/user_ldap/js/wizard/wizardTabGeneric.js
@@ -22,6 +22,12 @@ OCA = OCA || {};
*/
multiSelectPluginClass: 'multiSelectPlugin',
+ /**
+ * @property {string} - class that identifies a multiselect-plugin
+ * control.
+ */
+ bjQuiButtonClass: 'ui-button',
+
/** @inheritdoc */
init: function(tabIndex, tabID) {
this.tabIndex = tabIndex;
@@ -233,7 +239,10 @@ OCA = OCA || {};
if($element.hasClass(this.multiSelectPluginClass) && hasOptions) {
$element.multiselect("enable");
- } else if(!isMS || (isMS && hasOptions)) {
+ } else if ($element.hasClass(this.bjQuiButtonClass)) {
+ $element.button("enable");
+ }
+ else if(!isMS || (isMS && hasOptions)) {
$element.prop('disabled', false);
}
},
@@ -246,6 +255,8 @@ OCA = OCA || {};
disableElement: function($element) {
if($element.hasClass(this.multiSelectPluginClass)) {
$element.multiselect("disable");
+ } else if ($element.hasClass(this.bjQuiButtonClass)) {
+ $element.button("disable");
} else {
$element.prop('disabled', 'disabled');
}
diff --git a/apps/user_ldap/js/wizard/wizardTabLoginFilter.js b/apps/user_ldap/js/wizard/wizardTabLoginFilter.js
index 0316db5b61c..691ddb5ac9a 100644
--- a/apps/user_ldap/js/wizard/wizardTabLoginFilter.js
+++ b/apps/user_ldap/js/wizard/wizardTabLoginFilter.js
@@ -241,7 +241,11 @@ OCA = OCA || {};
onTestLoginnameChange: function() {
var loginName = this.managedItems.ldap_test_loginname.$element.val();
var beDisabled = !_.isString(loginName) || !loginName.trim();
- this.managedItems.ldap_test_loginname.$relatedElements.prop('disabled', beDisabled);
+ if(beDisabled) {
+ this.disableElement(this.managedItems.ldap_test_loginname.$relatedElements);
+ } else {
+ this.enableElement(this.managedItems.ldap_test_loginname.$relatedElements);
+ }
}
});
diff --git a/apps/user_ldap/templates/part.wizard-groupfilter.php b/apps/user_ldap/templates/part.wizard-groupfilter.php
index 2f663b858e2..5c406450f6f 100644
--- a/apps/user_ldap/templates/part.wizard-groupfilter.php
+++ b/apps/user_ldap/templates/part.wizard-groupfilter.php
@@ -28,7 +28,7 @@
<label></label>
<select class="ldapGroupList ldapGroupListAvailable" multiple="multiple"
title="<?php p($l->t('Available groups'));?>"></select>
- <span>
+ <span class="buttonSpan">
<button class="ldapGroupListSelect" type="button">&gt;</button><br/>
<button class="ldapGroupListDeselect" type="button">&lt;</button>
</span>
diff --git a/apps/user_ldap/templates/part.wizard-server.php b/apps/user_ldap/templates/part.wizard-server.php
index a16ac1f50dc..56d351eb10b 100644
--- a/apps/user_ldap/templates/part.wizard-server.php
+++ b/apps/user_ldap/templates/part.wizard-server.php
@@ -24,14 +24,14 @@
?>
</select>
<button type="button" id="ldap_action_add_configuration"
- name="ldap_action_add_configuration" class="icon-add"
+ name="ldap_action_add_configuration" class="icon-add icon-default-style"
title="<?php p($l->t('Add a new and blank configuration'));?>">&nbsp;</button>
<button type="button" id="ldap_action_copy_configuration"
name="ldap_action_copy_configuration"
class="ldapIconCopy icon-default-style"
title="<?php p($l->t('Copy current configuration into new directory binding'));?>">&nbsp;</button>
<button type="button" id="ldap_action_delete_configuration"
- name="ldap_action_delete_configuration" class="icon-delete"
+ name="ldap_action_delete_configuration" class="icon-delete icon-default-style"
title="<?php p($l->t('Delete the current configuration'));?>">&nbsp;</button>
</p>
@@ -44,7 +44,7 @@
placeholder="<?php p($l->t('Host'));?>"
title="<?php p($l->t('You can omit the protocol, except you require SSL. Then start with ldaps://'));?>"
/>
- <span>
+ <span class="hostPortCombinatorSpan">
<input type="number" id="ldap_port" name="ldap_port"
placeholder="<?php p($l->t('Port'));?>" />
<button class="ldapDetectPort" name="ldapDetectPort" type="button">
diff --git a/apps/user_ldap/templates/part.wizard-userfilter.php b/apps/user_ldap/templates/part.wizard-userfilter.php
index 691c41a66a6..4c04d4372f7 100644
--- a/apps/user_ldap/templates/part.wizard-userfilter.php
+++ b/apps/user_ldap/templates/part.wizard-userfilter.php
@@ -31,7 +31,7 @@
<label></label>
<select class="ldapGroupList ldapGroupListAvailable" multiple="multiple"
title="<?php p($l->t('Available groups'));?>"></select>
- <span>
+ <span class="buttonSpan">
<button class="ldapGroupListSelect" type="button">&gt;</button><br/>
<button class="ldapGroupListDeselect" type="button">&lt;</button>
</span>