dojox.image.ThumbnailPicker.postCreate
dojo.require("dojox.image.ThumbnailPicker");
defined in dojox/image/ThumbnailPicker.js
Initializes styles and listeners
Usage
function () (view source)
this.widgetid = this.id; this.inherited(arguments); this.pageSize = Number(this.pageSize); this._scrollerSize = this.size - (51 * 2); var sizeProp = this._sizeProperty = this.isHorizontal ? "width" : "height"; // FIXME: do this via css? calculate the correct width for the widget dojo.style(this.outerNode, "textAlign","center"); dojo.style(this.outerNode, sizeProp, this.size+"px"); dojo.style(this.thumbScroller, sizeProp, this._scrollerSize + "px"); //If useHyperlink is true, then listen for a click on a thumbnail, and //open the link if(this.useHyperlink){ dojo.subscribe(this.getClickTopicName(), this, function(packet){ var index = packet.index; var url = this.imageStore.getValue(packet.data,this.linkAttr); //If the data item doesn't contain a URL, do nothing if(!url){return;} if(this.hyperlinkTarget == "new"){ window.open(url); }else{ window.location = url; } }); } if(this.isScrollable) { // FIXME: does this break builds or anything? dojo.require("dojox.fx.scroll"); dojo.require("dojox.fx.easing"); } if(this.isClickable){ dojo.addClass(this.thumbsNode, "thumbClickable"); } this._totalSize = 0; this.init();