mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
demo shell (ng2)
basic angular2-based demo shell
This commit is contained in:
22
demo-shell-ng2/app/widgets/widgets-container.js
Normal file
22
demo-shell-ng2/app/widgets/widgets-container.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var widgets = (function (widgets, utils) {
|
||||
widgets.container = {
|
||||
create: createComponent,
|
||||
name: 'container',
|
||||
iconClass: 'fa fa-puzzle-piece'
|
||||
};
|
||||
|
||||
function createComponent() {
|
||||
var widget = document.createElement('div');
|
||||
widget.className = 'container widget widget-container';
|
||||
widget.dataset.widgetId = utils.uid();
|
||||
//widget.style.borderColor = utils.getRandomColor();
|
||||
|
||||
var dropPlaceholder = document.createElement('div');
|
||||
dropPlaceholder.className = 'drop-zone';
|
||||
widget.appendChild(dropPlaceholder);
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
return widgets;
|
||||
})(widgets || {}, widgetUtils);
|
Reference in New Issue
Block a user