mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Introduce modular UI framework
1. Modals wrapped 2. Toolbar icon actions: click and link-to navigation 3. Moved components into sub-folders 4. Replaced Bootstrap Tooltip and Dropdown libs with Ember specific add-ons And more. Co-Authored-By: Saul S <sauls8t@users.noreply.github.com> Co-Authored-By: McMatts <matt@documize.com>
This commit is contained in:
parent
f140e7ef77
commit
6eb68f84e0
48 changed files with 330 additions and 240 deletions
|
@ -16,12 +16,14 @@ export default Component.extend({
|
|||
tagName: 'button',
|
||||
classNames: [],
|
||||
classNameBindings: ['calcClass'],
|
||||
attributeBindings: ['calcAttrs:data-dismiss'],
|
||||
|
||||
label: '',
|
||||
icon: '',
|
||||
color: '',
|
||||
light: false,
|
||||
themed: false,
|
||||
dismiss: false,
|
||||
|
||||
iconClass: '',
|
||||
hasIcon: computed('iconClass', function() {
|
||||
|
@ -30,15 +32,7 @@ export default Component.extend({
|
|||
|
||||
calcClass: computed(function() {
|
||||
// Prepare icon class name
|
||||
let ic = '';
|
||||
let icon = this.icon;
|
||||
|
||||
if (icon === 'delete') ic = 'dicon-bin';
|
||||
if (icon === 'print') ic = 'dicon-print';
|
||||
if (icon === 'settings') ic = 'dicon-settings-gear';
|
||||
if (icon === 'plus') ic = 'dicon-e-add';
|
||||
if (icon === 'person') ic = 'dicon-single-01';
|
||||
this.iconClass = ic;
|
||||
this.iconClass = this.icon;
|
||||
|
||||
// Prepare button class name
|
||||
let bc = 'dmz-button';
|
||||
|
@ -55,7 +49,17 @@ export default Component.extend({
|
|||
return bc;
|
||||
}),
|
||||
|
||||
click() {
|
||||
this.onClick();
|
||||
calcAttrs: computed(function() {
|
||||
if (this.dismiss) {
|
||||
return 'modal';
|
||||
}
|
||||
|
||||
return null;
|
||||
}),
|
||||
|
||||
click(e) {
|
||||
if (is.not.undefined(this.onClick)) {
|
||||
this.onClick(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue