From 950a892e446526be8ab2be13721f5bf5c6508450 Mon Sep 17 00:00:00 2001 From: secretr Date: Wed, 7 Oct 2009 10:52:53 +0000 Subject: [PATCH] decorate JS - omit decoration for elements with class name 'no-decorate' --- e107_files/jslib/core/decorate.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/e107_files/jslib/core/decorate.js b/e107_files/jslib/core/decorate.js index 6a8f656ec..483666740 100644 --- a/e107_files/jslib/core/decorate.js +++ b/e107_files/jslib/core/decorate.js @@ -9,8 +9,8 @@ * Inspired by Magento' decorate JS functions (www.magentocommerce.com) * * $Source: /cvs_backup/e107_0.8/e107_files/jslib/core/decorate.js,v $ - * $Revision: 1.3 $ - * $Date: 2008-11-17 17:43:57 $ + * $Revision: 1.4 $ + * $Date: 2009-10-07 10:52:53 $ * $Author: secretr $ * */ @@ -42,17 +42,17 @@ e107Utils.Decorate = { this._decorate(table.select('tbody'), this._options['tbody']); } if (this._options['tbody_tr']) { - this._decorate(table.select('tbody tr'), this._options['tbody_tr']); + this._decorate(table.select('tbody tr:not(.no-decorate)'), this._options['tbody_tr']); } if (this._options['thead_tr']) { - this._decorate(table.select('thead tr'), this._options['thead_tr']); + this._decorate(table.select('thead tr:not(.no-decorate)'), this._options['thead_tr']); } if (this._options['tfoot_tr']) { - this._decorate(table.select('tfoot tr'), this._options['tfoot_tr']); + this._decorate(table.select('tfoot tr:not(.no-decorate)'), this._options['tfoot_tr']); } if (this._options['tr_td']) { - table.select('tr').each( function(tr) { - this._decorate(tr.select('td'), this._options['tr_td']); + table.select('tr:not(.no-decorate)').each( function(tr) { + this._decorate(tr.select('td:not(.no-decorate)'), this._options['tr_td']); }.bind(this)); } }, @@ -73,7 +73,7 @@ e107Utils.Decorate = { list = $(list); if (list) { if (!varset(arguments[2])) { - var items = list.select('li'); + var items = list.select('li:not(.no-decorate)'); } else { var items = list.childElements(); } @@ -94,8 +94,8 @@ e107Utils.Decorate = { dataList: function(list) { list = $(list); if (list) { - this._decorate(list.select('dt'), (arguments[1] || 'odd even last')); - this._decorate(list.select('dd'), (arguments[2] || 'odd even last')); + this._decorate(list.select('dt:not(.no-decorate)'), (arguments[1] || 'odd even last')); + this._decorate(list.select('dd:not(.no-decorate)'), (arguments[2] || 'odd even last')); } },