[Piwik-svn] r325 - in trunk: libs/jquery plugins/Dashboard/templates

svnmaster at piwik.org svnmaster at piwik.org
Sat Mar 8 17:31:19 CET 2008


Author: julien
Date: 2008-03-08 17:31:19 +0100 (Sat, 08 Mar 2008)
New Revision: 325

Modified:
   trunk/libs/jquery/ui.sortable_modif.js
   trunk/plugins/Dashboard/templates/Dashboard.js
Log:
-Corrected bug #118 in trac (2 widgets have same action name in dashboard)

Modified: trunk/libs/jquery/ui.sortable_modif.js
===================================================================
--- trunk/libs/jquery/ui.sortable_modif.js	2008-03-08 16:27:51 UTC (rev 324)
+++ trunk/libs/jquery/ui.sortable_modif.js	2008-03-08 16:31:19 UTC (rev 325)
@@ -159,7 +159,7 @@
 			//JU: added a variable for a ugly hack
 			this.occurCount = 0;
 			
-			//JU: reset offset cache
+			//JU: reset offset cache (that's the time consumming operation under opera)
 			that.offset = [];
 			for(var i=0;i<that.set.length;i++)
 			{

Modified: trunk/plugins/Dashboard/templates/Dashboard.js
===================================================================
--- trunk/plugins/Dashboard/templates/Dashboard.js	2008-03-08 16:27:51 UTC (rev 324)
+++ trunk/plugins/Dashboard/templates/Dashboard.js	2008-03-08 16:31:19 UTC (rev 325)
@@ -185,7 +185,7 @@
 		
 		addEmptyWidget(1, plugin, action, true);
 		
-		var parDiv = $('.col#1 .widgetDiv#'+action);
+		var parDiv = $('.col#1 .widgetDiv[plugin='+plugin+']'+'#'+action);
 		parDiv.show();
 		parDiv.siblings('.widgetLoading').hide();
 		
@@ -272,7 +272,7 @@
 	var title = getWidgetTitle(plugin, action);
 	
 	//add an handle to each items
-	var widget = $('.col#'+colNumber+' .widgetDiv#'+action).parents('.widget');
+	var widget = $('.col#'+colNumber+' .widgetDiv#'+action+'[plugin='+plugin+']').parents('.widget');
 	addHandleToWidget(widget, title);
 	
     var button = $('.button#close', widget);
@@ -324,7 +324,7 @@
 function addWidgetAndLoad(colNumber, plugin, action, onTop)
 {
 	addEmptyWidget(colNumber, plugin, action, onTop);
-    loadItem($('.items #'+action).parents('.items'));
+    loadItem($('.items [plugin='+plugin+']#'+action).parents('.items'));
 }
 
 function loadItem(domElem)
@@ -460,7 +460,7 @@
 	// When ajax replied, we replace the right div with the response
 	function onLoaded(response)
 	{
-		var parDiv = $('.widgetDiv#'+actionId);
+		var parDiv = $('.widgetDiv#'+actionId+'[plugin='+pluginId+']');
 		parDiv.siblings('.widgetLoading').hide();
 		parDiv.html($(response)).show();
 		if(typeof callbackAfterLoaded != 'undefined')



More information about the Piwik-svn mailing list