Re: [xwiki-devs] [xwiki-notifications] r29813 - platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table
On 06/30/2010 10:28 AM, vmassol (SVN) wrote:
Author: vmassol Date: 2010-06-30 10:28:11 +0200 (Wed, 30 Jun 2010) New Revision: 29813
Modified: platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js Log: XWIKI-5316: Send a livetable event when the livetable has finished displaying/updating the rows
Modified: platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js =================================================================== --- platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js 2010-06-30 00:07:16 UTC (rev 29812) +++ platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js 2010-06-30 08:28:11 UTC (rev 29813) @@ -285,6 +285,14 @@ } } if (this.paginator) this.paginator.refreshPagination(); + + // Let code know displaying is finished + // 1. Named event (for code interested by that table only) + document.fire("xwiki:livetable:" + self.domNodeName + ":displayComplete") + // 2. Generic event (for code potentially interested in any livetable) + document.fire("xwiki:livetable:displayComplete", { + "tableId" : self.domNodeName + });
You should also send an event on the livetable root element as well.
},
/** @@ -386,6 +394,14 @@ }
if (this.paginator) this.paginator.refreshPagination(); + + // Let code know displaying is finished + // 1. Named event (for code interested by that table only) + document.fire("xwiki:livetable:" + self.domNodeName + ":displayComplete") + // 2. Generic event (for code potentially interested in any livetable) + document.fire("xwiki:livetable:displayComplete", { + "tableId" : self.domNodeName + }); },
/**
-- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (1)
-
Sergiu Dumitriu