|
@@ -101,7 +101,7 @@ function init_components_dashboard(input){
|
|
id : id
|
|
id : id
|
|
},function(response){
|
|
},function(response){
|
|
var widget = response.item;
|
|
var widget = response.item;
|
|
- $('#dashboard-configure-menu li').off().click(function(){
|
|
|
|
|
|
+ $('#dashboard-configure-menu li').off('click').click(function(){
|
|
|
|
|
|
var li = $(this);
|
|
var li = $(this);
|
|
var menu = li.attr('data-menu');
|
|
var menu = li.attr('data-menu');
|
|
@@ -137,13 +137,8 @@ function init_components_dashboard(input){
|
|
action : 'dashboard_widget_by_id',
|
|
action : 'dashboard_widget_by_id',
|
|
id : widget.id
|
|
id : widget.id
|
|
},function(response){
|
|
},function(response){
|
|
- $('#configure-style-table').fromJson(response.item).change(function(){
|
|
|
|
|
|
+ $('#configure-style-table').fromJson(response.item).off('change').change(function(){
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- var widgetData = {action:data.onConfigure};
|
|
|
|
-
|
|
|
|
- widgetData.id = widget.id;
|
|
|
|
var form = $('#configure-style-table').toJson();
|
|
var form = $('#configure-style-table').toJson();
|
|
|
|
|
|
widget.headerBackground = form['widget-header-background'];
|
|
widget.headerBackground = form['widget-header-background'];
|
|
@@ -153,8 +148,6 @@ function init_components_dashboard(input){
|
|
widget.titleColor = form['widget-header-title-color'];
|
|
widget.titleColor = form['widget-header-title-color'];
|
|
widget.icon = form['widget-header-icon'];
|
|
widget.icon = form['widget-header-icon'];
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
var customiser = $('.dashboard-widget-customizer');
|
|
var customiser = $('.dashboard-widget-customizer');
|
|
$('.dashboard-widget-header',customiser).css('backgroundColor',widget.headerBackground+'!important');
|
|
$('.dashboard-widget-header',customiser).css('backgroundColor',widget.headerBackground+'!important');
|
|
$('.widget-header-title',customiser).css('color',widget.titleColor+'!important');
|
|
$('.widget-header-title',customiser).css('color',widget.titleColor+'!important');
|
|
@@ -165,12 +158,20 @@ function init_components_dashboard(input){
|
|
$('.widget-header-icon i',customiser).css('color',widget.iconColor+'!important');
|
|
$('.widget-header-icon i',customiser).css('color',widget.iconColor+'!important');
|
|
$('.widget-header-icon i',customiser).attr('class',widget.icon);
|
|
$('.widget-header-icon i',customiser).attr('class',widget.icon);
|
|
|
|
|
|
- widgetData = $.extend(widgetData,widget);
|
|
|
|
|
|
|
|
component.widgets[widget.id] = widget;
|
|
component.widgets[widget.id] = widget;
|
|
component.renderContent(widget.id);
|
|
component.renderContent(widget.id);
|
|
|
|
|
|
- $.action(widgetData);
|
|
|
|
|
|
+ $.action({
|
|
|
|
+ action : data.onConfigure,
|
|
|
|
+ id : widget.id,
|
|
|
|
+ headerBackground : widget.headerBackground,
|
|
|
|
+ bodyBackground : widget.bodyBackground,
|
|
|
|
+ bodyColor : widget.bodyColor,
|
|
|
|
+ iconColor : widget.iconColor,
|
|
|
|
+ titleColor : widget.titleColor,
|
|
|
|
+ icon : widget.icon
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
});
|
|
});
|