Project

General

Profile

« Previous | Next » 

Revision 5af28d20

Added by Saskia Gennrich almost 7 years ago

ref #6614: icons to travers taxontree appear correctly.

fixes the regex so $3 correctly includes the double-quote rather than $2.
The distinction for mozilla is therefore no longer needed.

View differences:

modules/cdm_dataportal/cdm_taxontree/js/cdm_taxontree.js
193 193
 */
194 194
jQuery.fn.set_background_image = function(imageFile) {
195 195
  var bg_image_tmp = jQuery(this).css('background-image');
196
  var bg_image_new = bg_image_tmp.replace(/^(.*)(\/.*)(\))$/, '$1/' + imageFile + '$3');
197
  if (jQuery.browser.mozilla) {
198
    // Special bug handling for mozilla: strip of last closing bracket.
199
    bg_image_new = bg_image_new.substr(0, bg_image_new.length - 1);
200
  }
196
  var bg_image_new = bg_image_tmp.replace(/^(.*)(\/.*)("\))$/, '$1/' + imageFile + '$3');
201 197
  jQuery(this).css('background-image', bg_image_new);
202 198
};
203 199

  

Also available in: Unified diff