mirror of
https://github.com/documize/community.git
synced 2025-08-04 21:15:24 +02:00
Upgrade UI framework to Ember v3.10.0
This commit is contained in:
parent
49bf4eeaa0
commit
479508e436
22 changed files with 68656 additions and 1745 deletions
|
@ -85,11 +85,12 @@ export default Component.extend(ModalMixin, Notifier, {
|
|||
this.set('ldapPreview', {isError: true, message: 'Unable to connect'});
|
||||
|
||||
switch (provider) {
|
||||
case constants.AuthProvider.Documize:
|
||||
case constants.AuthProvider.Documize: {
|
||||
// nothing to do
|
||||
break;
|
||||
}
|
||||
|
||||
case constants.AuthProvider.Keycloak: // eslint-disable-line no-case-declarations
|
||||
case constants.AuthProvider.Keycloak: {
|
||||
let config = this.get('authConfig');
|
||||
|
||||
if (_.isUndefined(config) || _.isNull(config) || _.isEmpty(config) ) {
|
||||
|
@ -103,8 +104,9 @@ export default Component.extend(ModalMixin, Notifier, {
|
|||
|
||||
this.set('keycloakConfig', config);
|
||||
break;
|
||||
}
|
||||
|
||||
case constants.AuthProvider.LDAP: // eslint-disable-line no-case-declarations
|
||||
case constants.AuthProvider.LDAP: {
|
||||
let ldapConfig = this.get('authConfig');
|
||||
|
||||
if (_.isUndefined(ldapConfig) || _.isNull(ldapConfig) || _.isEmpty(ldapConfig) ) {
|
||||
|
@ -118,6 +120,7 @@ export default Component.extend(ModalMixin, Notifier, {
|
|||
|
||||
this.set('ldapConfig', ldapConfig);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
// https://documize.com
|
||||
|
||||
import $ from 'jquery';
|
||||
import { observer } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { schedule, debounce } from '@ember/runloop';
|
||||
import AuthProvider from '../../mixins/auth';
|
||||
|
@ -51,15 +50,15 @@ export default Component.extend(AuthProvider, ModalMixin, Notifier, {
|
|||
this.set('users', users);
|
||||
},
|
||||
|
||||
onKeywordChange: observer('filter', function() {
|
||||
debounce(this, this.filterUsers, 350);
|
||||
}),
|
||||
|
||||
filterUsers() {
|
||||
this.get('onFilter')(this.get('filter'));
|
||||
},
|
||||
|
||||
actions: {
|
||||
onFilterChange() {
|
||||
debounce(this, this.filterUsers, 350);
|
||||
},
|
||||
|
||||
togglePerms() {
|
||||
this.set('showPermExplain', !this.get('showPermExplain'));
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ export default Component.extend(Notifier, Modals, {
|
|||
return this.get('blocks.length') > 0;
|
||||
}),
|
||||
|
||||
// eslint-disable-next-line ember/no-observers
|
||||
onModalToggle: observer('show', function() {
|
||||
let modalId = this.get('modalId');
|
||||
|
||||
|
|
|
@ -28,9 +28,12 @@ export default Component.extend(ModalMixin, {
|
|||
canDelete: false,
|
||||
canMove: false,
|
||||
docSearchFilter: '',
|
||||
|
||||
// eslint-disable-next-line ember/no-observers
|
||||
onKeywordChange: observer('docSearchFilter', function() {
|
||||
debounce(this, this.searchDocs, 750);
|
||||
}),
|
||||
|
||||
emptySearch: computed('docSearchResults', function() {
|
||||
return this.get('docSearchResults.length') === 0;
|
||||
}),
|
||||
|
|
|
@ -130,6 +130,7 @@ export default Component.extend({
|
|||
), '*');
|
||||
},
|
||||
|
||||
// eslint-disable-next-line ember/no-observers
|
||||
goSave: observer('readyToSave', function() {
|
||||
if (this.get('readyToSave')) {
|
||||
let page = this.get('page');
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
{{ui/ui-spacer size=300}}
|
||||
|
||||
<div class="form-group">
|
||||
{{focus-input type="text" class="form-control" placeholder="filter users" value=filter}}
|
||||
{{focus-input type="text" class="form-control" placeholder="filter users" value=filter key-up=(action "onFilterChange")}}
|
||||
<small class="form-text text-muted">search firstname, lastname, email</small>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="document-sidebar-attachment">
|
||||
<ul class="files">
|
||||
{{#each files key="id" as |file|}}
|
||||
{{#if (eq file.pageId '')}}
|
||||
{{#if (eq file.pageId "")}}
|
||||
<li class="file">
|
||||
<a href="{{appMeta.endpoint}}/public/attachment/{{appMeta.orgId}}/{{file.id}}{{downloadQuery}}">
|
||||
{{file.filename}}
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<div class="form-group">
|
||||
<label for="new-space-name">Sidebar</label>
|
||||
<select onchange={{action "onSetSidebar" value="target.value"}} class="form-control">
|
||||
<option value="none" selected={{is-equal pdfOption.sidebar 'none'}}>
|
||||
<option value="none" selected={{is-equal pdfOption.sidebar "none"}}>
|
||||
None
|
||||
</option>
|
||||
<option value="bookmarks" selected={{is-equal pdfOption.sidebar 'bookmarks'}}>
|
||||
<option value="bookmarks" selected={{is-equal pdfOption.sidebar "bookmarks"}}>
|
||||
Bookmarks
|
||||
</option>
|
||||
<option value="thumbs" selected={{is-equal pdfOption.sidebar 'thumbs'}}>
|
||||
<option value="thumbs" selected={{is-equal pdfOption.sidebar "thumbs"}}>
|
||||
Thumbnails
|
||||
</option>
|
||||
</select>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable no-useless-escape */
|
||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||
//
|
||||
// This software (Documize Community Edition) is licensed under
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue