You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/08/30 10:49:22 UTC

svn commit: r1378854 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js

Author: lofwyr
Date: Thu Aug 30 08:49:21 2012
New Revision: 1378854

URL: http://svn.apache.org/viewvc?rev=1378854&view=rev
Log:
using data() instead of attr()

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=1378854&r1=1378853&r2=1378854&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Thu Aug 30 08:49:21 2012
@@ -89,15 +89,10 @@ Tobago.Sheet.init = function(elements) {
     if (frequencyStr != undefined) {
       frequency = parseInt(frequencyStr);
     }
-    var selectionMode = sheet.attr("data-tobago-selectionmode");
-    var commandStr = sheet.attr("data-tobago-rowaction");
-    var click;
-    var dblclick;
-    if (commandStr != undefined) {
-      var commands = jQuery.parseJSON(commandStr);
-      click = commands.click;
-      dblclick = commands.dblclick;
-    }
+    var selectionMode = sheet.data("tobago-selectionmode");
+    var commands = sheet.data("tobago-rowaction");
+    var click = commands.click;
+    var dblclick = commands.dblclick;
     var columnSelectorIndex;
     var selectorMenu = sheet.find(".tobago-sheet-headerDiv > .tobago-sheet-header > .tobago-sheet-selectorMenu");
     if (selectorMenu) {
@@ -108,6 +103,7 @@ Tobago.Sheet.init = function(elements) {
         click != undefined ? click.partially : undefined,
         dblclick != undefined ? dblclick.actionId : undefined,
         dblclick != undefined ? dblclick.partially: undefined,
+        // todo: use sheet.data("data-tobago-partially"). What is the type? Array? Test it.
         sheet.attr("data-tobago-partially"));
   });
 };