X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..c930e9176a5a85509c5b0230e2bff5c22a591432:/docs/source/TagWin.html diff --git a/docs/source/TagWin.html b/docs/source/TagWin.html new file mode 100644 index 00000000..e5450d31 --- /dev/null +++ b/docs/source/TagWin.html @@ -0,0 +1,75 @@ + +
+Imgorg.TagWindow = Ext.extend(Ext.Window, { + title: 'Choose Tag', + layout: 'fit', + closeAction: 'hide', + width: 300, + modal: true, + + initComponent: function() { + Ext.apply(this, { + items: [{ + autoHeight: true, + xtype: 'form', + id: 'tag-select', + bodyStyle: 'padding:15px', + labelWidth: 50, + items: [{ + anchor: '95%', + fieldLabel: 'Tag', + xtype: 'img-tagcombo', + name: 'tag', + allowBlank: false + }] + }], + buttons: [{ + text: 'Tag Images', + handler: this.tagImages, + scope: this + },{ + text: 'Cancel', + handler: function() { + this.hide(); + }, + scope: this + }] + }); + Imgorg.TagWindow.superclass.initComponent.call(this); + }, + + + tagImages: function() { + var af = this.getComponent('tag-select').getForm(); + if (af.isValid()) { + if (this.selectedRecords) { + var imageIds = []; + for (var i = 0; i < this.selectedRecords.length; i++) { + var r = this.selectedRecords[i]; + imageIds.push(r.data.dbid || r.data.id); + } + var fld = af.findField('tag'); + var tag = fld.getRawValue(); + var idx = fld.store.find('text', tag); + if (idx != -1) { + rec = fld.store.getAt(idx); + tag = rec.data.id; + } + Imgorg.ss.Images.tagImage({ + images: imageIds, + tag: tag + }); + } + this.hide(); + } + } +}); + ++ + \ No newline at end of file