Project

General

Profile

bug #6614

cdm_taxontree: plus/minus/loading gifs not correctly loaded

Added by Saskia Gennrich over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Priority14
Category:
cdm-dataportal
Target version:
Start date:
05/03/2017
Due date:
% Done:

0%

Severity:
normal
Found in Version:

Description

When navigating the taxontree the small icons to close/expand the subtree disappear. The regex misses to match a ".

cdm_taxontree.js
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);

This is actually not a bug in mozilla.

bg_img_tmp: url("http://portal.cybertaxonomy.org/flora-guianas/sites/flora-guianas/modules/cdm_dataportal/cdm_taxontree/plus.png")
bg_image_new: url("http://portal.cybertaxonomy.org/flora-guianas/sites/flora-guianas/modules/cdm_dataportal/cdm_taxontree/loading_subtree.gif)

bg_image_new actually misses a " before the closing parenthesis, because it's matched in group $2. The "fix" removes enough from the string that firefox can autofix it.
Chrome throws something like this:
GET http://portal.cybertaxonomy.org/flora-guianas/sites/flora-guianas/modules/cdm_dataportal/cdm_taxontree/minus.png) 404 (Not Found)

Notice the closing bracket in the end.

Associated revisions

Revision 5af28d20 (diff)
Added by Saskia Gennrich over 1 year 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.

Revision 46273e37
Added by Andreas Kohlbecker over 1 year ago

Merge remote-tracking branch 'origin/6614_cdm_taxontree' into develop

History

#1 Updated by Saskia Gennrich over 1 year ago

  • Assignee changed from Saskia Gennrich to Andreas Kohlbecker

#2 Updated by Andreas Kohlbecker over 1 year ago

  • Status changed from New to Feedback
  • Assignee changed from Andreas Kohlbecker to Saskia Gennrich
  • Priority changed from New to Priority14
  • Target version changed from Unassigned CDM tickets to Release 4.7

Hi Saskia,

thank you for the bugfix. The commit looks good, please merge the changes into the develop branch.

Andreas

#3 Updated by Andreas Kohlbecker over 1 year ago

I finally merged the branch into develop

#4 Updated by Andreas Müller over 1 year ago

So can we close the ticket?

And can you please adapt the "Subject" in a way that it is easier to read for standard users?

#5 Updated by Saskia Gennrich over 1 year ago

  • Status changed from Feedback to Closed

Sorry, forgot that I was supposed to merge it in develop.

What would be a more appropriate Subject line?

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)