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 2011/06/29 08:28:10 UTC
svn commit: r1140973 - in /myfaces/tobago/trunk/tobago-theme:
tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/st...
Author: lofwyr
Date: Wed Jun 29 06:28:10 2011
New Revision: 1140973
URL: http://svn.apache.org/viewvc?rev=1140973&view=rev
Log:
TOBAGO-1003: Clean up javascript for sheet
- data-tobago-disabled should be rendered like other boolean attributes like disabled="disabled" (can be optimized later)
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
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-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?rev=1140973&r1=1140972&r2=1140973&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Wed Jun 29 06:28:10 2011
@@ -711,9 +711,7 @@ public class SheetRenderer extends Layou
writer.writeAttribute(HtmlAttributes.SRC, image, false);
writer.writeAttribute(HtmlAttributes.TITLE, tip, true);
writer.writeAttribute(HtmlAttributes.ALT, "", false);
- if (disabled) {
- writer.writeAttribute(DataAttributes.DISABLED, Boolean.TRUE.toString(), false);
- }
+ writer.writeAttribute(DataAttributes.DISABLED, disabled);
writer.endElement(HtmlElements.IMG);
}
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=1140973&r1=1140972&r2=1140973&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 Wed Jun 29 06:28:10 2011
@@ -117,7 +117,7 @@ Tobago.Sheet.prototype.setupPagePaging =
var child = linkBox.childNodes[i];
if (child.nodeType == 1 && child.tagName.toUpperCase() == "IMG") {
// first, prev, next and last commands
- if ("true" != jQuery(child).attr("data-tobago-disabled")) {
+ if (undefined == jQuery(child).attr("data-tobago-disabled")) {
Tobago.addBindEventListener(child, "click", this, "doPaging");
}
} else if (child.nodeType == 1 && child.tagName.toUpperCase() == "SPAN") {