[CalendarServer-changes] [12806] CalendarServer/trunk/calendarserver/webadmin/work.xhtml

source_changes at macosforge.org source_changes at macosforge.org
Tue Mar 4 18:32:24 PST 2014


Revision: 12806
          http://trac.calendarserver.org//changeset/12806
Author:   wsanchez at apple.com
Date:     2014-03-04 18:32:24 -0800 (Tue, 04 Mar 2014)
Log Message:
-----------
Add onclick handler to bars

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/webadmin/work.xhtml

Modified: CalendarServer/trunk/calendarserver/webadmin/work.xhtml
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/work.xhtml	2014-03-05 02:21:54 UTC (rev 12805)
+++ CalendarServer/trunk/calendarserver/webadmin/work.xhtml	2014-03-05 02:32:24 UTC (rev 12806)
@@ -209,6 +209,7 @@
             "transform",
             function(i) { return "translate(" + xInset + "," + yLocation(i.description) + ")"; }
           )
+          .attr("onclick", function(i) { return 'showDetails("' + i.name + '");'; })
         ;
 
         // Exit bars selection
@@ -229,11 +230,12 @@
           .attr("x", function(i) { return xLocationWithZero(i.count) + 4; })
           .attr("y", function(i) { return yLocation(i.description) + (yLocation.rangeBand() / 2); })
           .attr("dy", "0.32em")
-          .attr("onclick", function(i) { return "showDetails(" + i.name + ");"; })
-          .text(function(i) {
-            if (i.count < 1) { return ""; }
-            return i.count;
-          })
+          .text(
+            function(i) {
+              if (i.count < 1) { return ""; }
+              return i.count;
+            }
+          )
         ;
 
         // Exit labels selection
@@ -263,7 +265,12 @@
         );
       }
 
+      function showDetails(workItemType) {
+        container = document.getElementById("work_item_details");
 
+        container.innerHTML = workItemType;
+      }
+
       window.onload = function() {
         initChart();
         registerForEvents();
@@ -280,6 +287,8 @@
 
     <svg id="work_queue_chart" />
 
+    <div id="work_item_details" />
+
   </body>
 
 </html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140304/47469801/attachment-0001.html>


More information about the calendarserver-changes mailing list