1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 15:49:44 +02:00

Fix Ember lint issues and print view

This commit is contained in:
McMatts 2019-05-31 11:48:16 +01:00
parent 40237344e2
commit 715c31a1da
15 changed files with 53 additions and 37 deletions

View file

@ -9,6 +9,7 @@
//
// https://documize.com
import $ from 'jquery';
import { computed } from '@ember/object';
import { empty } from '@ember/object/computed';
import { set } from '@ember/object';
@ -169,27 +170,27 @@ export default Component.extend(ModalMixin, Notifier, {
case constants.AuthProvider.Keycloak:
if (this.get('KeycloakUrlError')) {
this.$("#keycloak-url").focus();
$("#keycloak-url").focus();
return;
}
if (this.get('KeycloakRealmError')) {
this.$("#keycloak-realm").focus();
$("#keycloak-realm").focus();
return;
}
if (this.get('KeycloakClientIdError')) {
this.$("#keycloak-clientId").focus();
$("#keycloak-clientId").focus();
return;
}
if (this.get('KeycloakPublicKeyError')) {
this.$("#keycloak-publicKey").focus();
$("#keycloak-publicKey").focus();
return;
}
if (this.get('KeycloakAdminUserError')) {
this.$("#keycloak-admin-user").focus();
$("#keycloak-admin-user").focus();
return;
}
if (this.get('KeycloakAdminPasswordError')) {
this.$("#keycloak-admin-password").focus();
$("#keycloak-admin-password").focus();
return;
}
@ -213,11 +214,11 @@ export default Component.extend(ModalMixin, Notifier, {
case constants.AuthProvider.LDAP:
if (this.get('ldapErrorServerHost')) {
this.$("#ldap-host").focus();
$("#ldap-host").focus();
return;
}
if (this.get('ldapErrorServerPort')) {
this.$("#ldap-port").focus();
$("#ldap-port").focus();
return;
}
@ -226,7 +227,7 @@ export default Component.extend(ModalMixin, Notifier, {
config.serverPort = parseInt(this.get('ldapConfig.serverPort'));
if (!_.isEmpty(config.groupFilter) && _.isEmpty(config.attributeGroupMember)) {
this.$('#ldap-attributeGroupMember').focus();
$('#ldap-attributeGroupMember').focus();
return;
}

View file

@ -53,7 +53,7 @@ export default Component.extend(Notifier, Modal, {
didInsertElement() {
this._super(...arguments);
this.$('#restore-file').on('change', function(){
$('#restore-file').on('change', function(){
var fileName = document.getElementById("restore-file").files[0].name;
$(this).next('.custom-file-label').html(fileName);
});

View file

@ -84,7 +84,7 @@ export default Component.extend(Notifier, {
actions: {
change() {
const selectEl = this.$('#maxTags')[0];
const selectEl = $('#maxTags')[0];
const selection = selectEl.selectedOptions[0].value;
this.set('maxTags', parseInt(selection));

View file

@ -63,9 +63,9 @@ export default Component.extend(AuthProvider, ModalMixin, Notifier, {
this.set('showPermExplain', !this.get('showPermExplain'));
if (this.showPermExplain) {
this.$(".perms").show();
$(".perms").show();
} else {
this.$(".perms").hide();
$(".perms").hide();
}
},