summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-11-05 13:43:50 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-11-05 16:32:07 +0100
commitd9d8f7e569c11d5e31f8113519a6ff8a94130ffa (patch)
tree10eff3e99e81715890133ef00d996192d2734dea /apps/user_ldap/js
parent8bffc847665a4f4891a5594896420e2be8c37394 (diff)
downloadnextcloud-server-d9d8f7e569c11d5e31f8113519a6ff8a94130ffa.tar.gz
nextcloud-server-d9d8f7e569c11d5e31f8113519a6ff8a94130ffa.zip
make all the buttons beautiful
Diffstat (limited to 'apps/user_ldap/js')
-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
3 files changed, 18 insertions, 4 deletions
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);
+ }
}
});