X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..c930e9176a5a85509c5b0230e2bff5c22a591432:/docs/source/ImagePanel.html diff --git a/docs/source/ImagePanel.html b/docs/source/ImagePanel.html new file mode 100644 index 00000000..bd381f7c --- /dev/null +++ b/docs/source/ImagePanel.html @@ -0,0 +1,76 @@ + +
+Imgorg.ImagePanel = Ext.extend(Ext.Panel,{ + closable: true, + border: false, + tagTpl: new Ext.XTemplate( + '+ + \ No newline at end of fileTags
', + '', + ' ' + ), + albumTpl: new Ext.XTemplate( + '{text}', + 'Album
', + '', + ' ' + ), + infoTpl: new Ext.XTemplate( + '{text}', + 'File Info
', + 'Filename: {FileName}', + 'Size: {FileSize:fileSize}', + 'Height: {[values["COMPUTED"].Height]}', + 'Width: {[values["COMPUTED"].Width]}' + ), + initComponent: function() { + Ext.apply(this,{ + layout: 'border', + items: [{ + border: false, + region: 'center', + html: '', + autoScroll: true + },{ + border: false, + region: 'east', + itemId: 'image-properties', + width: 250, + title: 'Properties', + collapsible: true, + style: 'border-left: 1px solid #99BBE8' + }] + }); + Imgorg.ImagePanel.superclass.initComponent.call(this); + }, + + afterRender: function() { + Imgorg.ImagePanel.superclass.afterRender.call(this); + Imgorg.ss.Images.getInfo({image: this.imageData.id}, this.onGetInfo, this); + Imgorg.ss.Albums.getAlbums({image: this.imageData.id}, this.onGetAlbums,this); + Imgorg.ss.Tags.getTags({image: this.imageData.id}, this.onGetTags, this); + }, + + onGetInfo: function(data, resp) { + var prop = this.getComponent('image-properties'); + this.infoTpl.append(prop.body, data) + }, + + onGetTags: function(data, resp) { + var prop = this.getComponent('image-properties'); + this.tagTpl.append(prop.body, data); + }, + + onGetAlbums: function(data, resp) { + var prop = this.getComponent('image-properties'); + this.albumTpl.append(prop.body, data); + } +}); +Ext.reg('img-panel',Imgorg.ImagePanel); +