|
@@ -74,6 +74,19 @@ function init_components_dashboard(input){
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ component.on('placeholder-click',function(placeholder){
|
|
|
|
+ $.action({
|
|
|
|
+ action : data.onAdd,
|
|
|
|
+ scope : data.scope,
|
|
|
|
+ uid : data.uid,
|
|
|
|
+ row : placeholder.row,
|
|
|
|
+ column : placeholder.column
|
|
|
|
+ },function(widget){
|
|
|
|
+
|
|
|
|
+ component.addWidgets([widget]);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
component.on('move',function(widget){
|
|
component.on('move',function(widget){
|
|
console.log('Widget has moved',widget);
|
|
console.log('Widget has moved',widget);
|
|
$.action({
|
|
$.action({
|
|
@@ -88,6 +101,7 @@ function init_components_dashboard(input){
|
|
widget : widget
|
|
widget : widget
|
|
});
|
|
});
|
|
}).on('delete',function(widget){
|
|
}).on('delete',function(widget){
|
|
|
|
+ if(!confirm('Êtes-vous sûr de vouloir supprimer cet item?')) return true;
|
|
console.log('Widget has removed',widget);
|
|
console.log('Widget has removed',widget);
|
|
$.action({
|
|
$.action({
|
|
action : data.onRemove,
|
|
action : data.onRemove,
|