فهرست منبع

Dashboard : wip style

idleman 1 سال پیش
والد
کامیت
b04c820806
2فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 3 0
      plugin/dashboard/js/component.js
  2. 1 1
      plugin/dashboard/js/dashboard.js

+ 3 - 0
plugin/dashboard/js/component.js

@@ -163,6 +163,9 @@ function init_components_dashboard(input){
 			 					$('.widget-header-icon i',customiser).css('color',widgetData.iconColor+'!important');
 			 					$('.widget-header-icon i',customiser).attr('class',widgetData.icon);
 
+
+			 					component.renderContent(widget.id);
+
 			 					$.action(widgetData);
 			 			});
 

+ 1 - 1
plugin/dashboard/js/dashboard.js

@@ -290,6 +290,7 @@ class Dashboard {
 	//Render d'un widget en fonction de ses paramètres
 	//Gère le refresh du widget si l'élément est déjà existant
 	renderContent(id) {
+		
 		var widget = this.widgets[id];
 		var widgetElement = widget.element!=null ? widget.element : $(Mustache.render(this.widgetTemplate, widget));
 
@@ -336,7 +337,6 @@ class Dashboard {
 	renderPositions(){
 		var placeholderWidth = this.placeHolders.initialWidth;
 		var placeholderHeight = this.placeHolders.initialHeight;
-
 		for(var k in this.widgets){
 			var widget = this.widgets[k];
 			var cell = $('[data-row="'+widget.row+'"][data-column="'+widget.column+'"]').position();