Opened 13 years ago
Closed 12 years ago
#7047 closed defect (fixed)
[patch] [cla] ImageGallery (ThumbinalPicker) bug on firefox 3
Reported by: | guest | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | DojoX Widgets | Version: | 1.1.1 |
Keywords: | Image Gallery Thumbinal | Cc: | |
Blocked By: | Blocking: |
Description
Image gallery don't work propely whit firefox 3..
The Tumhinbinal's imgContainer is not resized to img width...
I've developed a patch for this bug, see the line after "/* This is the patch: */":
dojo.extend(dojox.image.ThumbnailPicker? , {
_loadImage: function(data, index, callback){
var url = this.imageStore.getValue(data,this.imageThumbAttr); var img = document.createElement("img"); var imgContainer = document.createElement("div"); imgContainer.setAttribute("id","img_" + this.widgetid+"_"+index); imgContainer.appendChild(img); img._index = index; img._data = data;
this._thumbs[index] = imgContainer; var loadingDiv; if(this.useLoadNotifier){
loadingDiv = document.createElement("div"); loadingDiv.setAttribute("id","loadingDiv_" + this.widgetid+"_"+index);
If this widget was previously told that the main image for this thumb has been loaded, make the loading indicator transparent. this._setThumbClass(loadingDiv,
this._loadedImages[index] ? "thumbLoaded":"thumbNotifier");
imgContainer.appendChild(loadingDiv);
} var size = dojo.marginBox(this.thumbsNode); var defaultSize; var sizeParam; if(this.isHorizontal){
defaultSize = this.thumbWidth; sizeParam = 'w';
} else{
defaultSize = this.thumbHeight; sizeParam = 'h';
} size = size[sizeParam]; var sl = this.thumbScroller.scrollLeft, st = this.thumbScroller.scrollTop; dojo.style(this.thumbsNode, this._sizeProperty, (size + defaultSize + 20) + "px"); Remember the scroll values, as changing the size can alter them this.thumbScroller.scrollLeft = sl; this.thumbScroller.scrollTop = st; this.thumbsNode.appendChild(imgContainer);
dojo.connect(img, "onload", this, function(){
var realSize = dojo.marginBox(img)[sizeParam]; this._totalSize += (Number(realSize) + 4); dojo.style(this.thumbsNode, this._sizeProperty, this._totalSize + "px");
if(this.useLoadNotifier){dojo.style(loadingDiv, "width", (img.width - 4) + "px"); } callback(); return false;
});
dojo.connect(img, "onclick", this, function(evt){
dojo.publish(this.getClickTopicName(), [{
index: evt.target._index, data: evt.target._data, url: img.getAttribute("src"), largeUrl: this.imageStore.getValue(data,this.imageLargeAttr), title: this.imageStore.getValue(data,this.titleAttr), link: this.imageStore.getValue(data,this.linkAttr)
}]); return false;
}); dojo.addClass(img, "imageGalleryThumb"); img.setAttribute("src", url);
/* This is the patch: */
imgContainer.style.width=img.width+"px";
/* Patched by Stefano Gargiulo */
var title = this.imageStore.getValue(data, this.titleAttr); if(title){ img.setAttribute("title",title); } this._updateNavControls();
}
});
Attachments (1)
Change History (8)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Owner: | changed from dante to Shane O'Sullivan |
---|
Changed 13 years ago by
Attachment: | ThumbnailPicker_FF3.patch added |
---|
Patch to fix this issue, similar to the fix suggested in the ticket
comment:3 Changed 13 years ago by
Milestone: | → tbd |
---|
mark all (open) tickets w/blank milestones to be "tbd"; their milestones need to be set to a version number or to "future"
comment:4 Changed 12 years ago by
Summary: | ImageGallery (ThumbinalPicker) bug on firefox 3 → [patch] [cla] ImageGallery (ThumbinalPicker) bug on firefox 3 |
---|
comment:5 Changed 12 years ago by
I previously attached a patch that potentially resolved this issue. Can someone please confirm and merge it?
comment:6 Changed 12 years ago by
Milestone: | tbd → 1.2 |
---|---|
Owner: | changed from Shane O'Sullivan to dante |
Status: | new → assigned |
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
my e-mail address is [email protected]…