You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by id...@apache.org on 2008/07/02 15:30:58 UTC
svn commit: r673386 -
/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
Author: idus
Date: Wed Jul 2 06:30:57 2008
New Revision: 673386
URL: http://svn.apache.org/viewvc?rev=673386&view=rev
Log:
TOBAGO-630: Made access to image source attributes safer
Modified:
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
Modified: myfaces/tobago/trunk/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/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=673386&r1=673385&r2=673386&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Wed Jul 2 06:30:57 2008
@@ -593,7 +593,7 @@
Tobago.removeCssClass(row, "tobago-sheet-row-selected");
- if (image && !image.src.match(/Disabled/)) {
+ if (image && image.src && !image.src.match(/Disabled/)) {
image.src = this.uncheckedImage;
}
@@ -601,7 +601,7 @@
if (classes.search(/tobago-sheet-row-selected/) == -1) {
Tobago.addCssClass(row, "tobago-sheet-row-selected");
}
- if (image && !image.src.match(/Disabled/)) {
+ if (image && image.src && !image.src.match(/Disabled/)) {
image.src = this.checkedImage;
}
}
@@ -617,7 +617,7 @@
Tobago.Sheet.prototype.toggleSelection = function(rowIndex) {
this.tobagoLastClickedRowId = Tobago.element(this.id + "_data_tr_" + rowIndex).id;
var selector = Tobago.element(this.id + "_data_row_selector_" + rowIndex);
- if (!selector || !selector.src.match(/Disabled/)) {
+ if (!selector || !selector.src || !selector.src.match(/Disabled/)) {
var re = new RegExp("," + rowIndex + ",");
var selected = Tobago.element(this.selectedId);
if (selected.value.search(re) != -1) {
@@ -648,7 +648,7 @@
var re = new RegExp("," + i + ",");
if (selected.value.search(re) == -1) {
var selector = Tobago.element(this.id + "_data_row_selector_" + i);
- if (!selector || !selector.src.match(/Disabled/)) {
+ if (!selector || !selector.src || !selector.src.match(/Disabled/)) {
selected.value = selected.value + i + ",";
}
}
@@ -837,7 +837,7 @@
var selected = Tobago.element(this.selectedId);
while (row) {
var image = this.getSelectionElementForRow(row);
- if (!image || !image.src.match(/Disabled/)) {
+ if (!image || !image.src || !image.src.match(/Disabled/)) {
var re = new RegExp("," + i + ",");
if (selected.value.search(re) == -1) {
selected.value = selected.value + i + ",";
@@ -858,7 +858,7 @@
var j = 0;
while (row) {
image = this.getSelectionElementForRow(row);
- if (!image || !image.src.match(/Disabled/)) {
+ if (!image || !image.src || !image.src.match(/Disabled/)) {
var re = new RegExp("," + i + ",", 'g');
selected.value = selected.value.replace(re, ",");
}