|
@@ -146,24 +146,28 @@ function init_components_dashboard(input){
|
|
|
widgetData.id = widget.id;
|
|
|
var form = $('#configure-style-table').toJson();
|
|
|
|
|
|
- widgetData.headerBackground = form['widget-header-background'];
|
|
|
- widgetData.bodyBackground = form['widget-body-background'];
|
|
|
- widgetData.bodyColor= form['widget-body-color'];
|
|
|
- widgetData.iconColor = form['widget-header-icon-color'];
|
|
|
- widgetData.titleColor = form['widget-header-title-color'];
|
|
|
- widgetData.icon = form['widget-header-icon'];
|
|
|
+ widget.headerBackground = form['widget-header-background'];
|
|
|
+ widget.bodyBackground = form['widget-body-background'];
|
|
|
+ widget.bodyColor= form['widget-body-color'];
|
|
|
+ widget.iconColor = form['widget-header-icon-color'];
|
|
|
+ widget.titleColor = form['widget-header-title-color'];
|
|
|
+ widget.icon = form['widget-header-icon'];
|
|
|
+
|
|
|
+
|
|
|
|
|
|
var customiser = $('.dashboard-widget-customizer');
|
|
|
- $('.dashboard-widget-header',customiser).css('backgroundColor',widgetData.headerBackground+'!important');
|
|
|
- $('.widget-header-title',customiser).css('color',widgetData.titleColor+'!important');
|
|
|
+ $('.dashboard-widget-header',customiser).css('backgroundColor',widget.headerBackground+'!important');
|
|
|
+ $('.widget-header-title',customiser).css('color',widget.titleColor+'!important');
|
|
|
$('.dashboard-widget-content',customiser).css({
|
|
|
- backgroundColor : widgetData.bodyBackground+'!important',
|
|
|
- color : widgetData.bodyColor+'!important'
|
|
|
+ backgroundColor : widget.bodyBackground+'!important',
|
|
|
+ color : widget.bodyColor+'!important'
|
|
|
});
|
|
|
- $('.widget-header-icon i',customiser).css('color',widgetData.iconColor+'!important');
|
|
|
- $('.widget-header-icon i',customiser).attr('class',widgetData.icon);
|
|
|
+ $('.widget-header-icon i',customiser).css('color',widget.iconColor+'!important');
|
|
|
+ $('.widget-header-icon i',customiser).attr('class',widget.icon);
|
|
|
|
|
|
+ widgetData = $.extend(widgetData,widget);
|
|
|
|
|
|
+ component.widgets[widget.id] = widget;
|
|
|
component.renderContent(widget.id);
|
|
|
|
|
|
$.action(widgetData);
|