mirror of
https://github.com/documize/community.git
synced 2025-08-05 05:25:27 +02:00
upgraded Ember and Bootstrap, merged changes
This commit is contained in:
parent
b4fd42da38
commit
5dd7d9c181
114 changed files with 9814 additions and 1361 deletions
|
@ -9,6 +9,7 @@
|
|||
//
|
||||
// https://documize.com
|
||||
|
||||
import $ from 'jquery';
|
||||
import Component from '@ember/component';
|
||||
import stringUtil from '../../utils/string';
|
||||
|
||||
|
@ -56,7 +57,8 @@ export default Component.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
let result = this.attrs.onAction();
|
||||
let cb = this.get('onAction');
|
||||
let result = cb();
|
||||
if (result) {
|
||||
this.set('show', false);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import { computed } from '@ember/object';
|
|||
export default Component.extend({
|
||||
nameField: 'category',
|
||||
singleSelect: false,
|
||||
items: [],
|
||||
maxHeight: 0,
|
||||
onSelect: null,
|
||||
styleCss: computed('maxHeight', function () {
|
||||
|
@ -29,13 +28,19 @@ export default Component.extend({
|
|||
}
|
||||
}),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.items = [];
|
||||
},
|
||||
|
||||
actions: {
|
||||
onToggle(item) {
|
||||
// callback takes precedence
|
||||
// caller sets item to 'selected'
|
||||
let cb = this.get('onSelect');
|
||||
if (cb !== null) {
|
||||
this.attrs.onSelect(item);
|
||||
let cb = this.get('onSelect');
|
||||
cb(item);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ export default Component.extend({
|
|||
actions: {
|
||||
onCheck() {
|
||||
if (this.get('onClick') !== null) {
|
||||
this.attrs.onClick(this.get('value'));
|
||||
let cb = this.get('onClick');
|
||||
cb(this.get('value'));
|
||||
} else {
|
||||
this.set('selected', !this.get('selected'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue