1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.AdminEnumImages = {
10 '0c81971f67c0bd4b33799c5365ec2bf5' :"No Images found",
11 '5b94af0908e765fe39e4d0e8f9c99ef8' :"Add / Edit Images",
12 'fff0d600f8a0b5e19e88bfb821dd1157' :"Images",
13 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
14 '0eceeb45861f9585dd7a97a3e36f85c6' :"Created",
15 '7dce122004969d56ae2e0245cb754d35' :"Edit",
16 'be53a0541a6d36f6ecb879fa2c584b08' :"Image",
17 'b78a3223503896721cca1303f776159b' :"Title",
18 'd3d2e617335f08df83599665eef8a418' :"Close",
19 'c0ed345ec857c06b31f7e88745c9bc40' :"Displaying Images {0} - {1} of {2}",
20 'f2a6c498fb90ee345d997f888fce3b18' :"Delete"
26 show : function(data, cb)
34 this.dialog.show(this.data._el);
37 this.form.setValues(data);
38 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
46 this.dialog = Roo.factory({
47 xtype : 'LayoutDialog',
50 title : _this._strings['5b94af0908e765fe39e4d0e8f9c99ef8'] /* Add / Edit Images */,
53 show : function (_self)
55 _this.grid.footer.onClick('first');
61 xtype : 'LayoutRegion',
68 text : _this._strings['d3d2e617335f08df83599665eef8a418'] /* Close */,
70 click : function (_self, e)
88 title : _this._strings['fff0d600f8a0b5e19e88bfb821dd1157'] /* Images */,
90 activate : function() {
93 _this.grid.footer.onClick('first');
101 autoExpandColumn : 'title',
104 render : function() {
106 //_this.dialog = Pman.Dialog.FILL_IN
107 //if (_this.panel.active) {
108 // this.footer.onClick('first');
111 rowdblclick : function (_self, rowIndex, e)
114 var s = _self.getDataSource().getAt(rowIndex);
115 Pman.Dialog.Image.show(s.data, function() {
116 _this.grid.footer.onClick('first');
123 xtype : 'PagingToolbar',
125 displayMsg : _this._strings['c0ed345ec857c06b31f7e88745c9bc40'] /* Displaying Images {0} - {1} of {2} */,
126 emptyMsg : _this._strings['0c81971f67c0bd4b33799c5365ec2bf5'] /* No Images found */,
138 cls : 'x-btn-text-icon',
139 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
140 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
145 //var sel = Pman.Tab.PressReleaseCompanies ? Pman.Tab.PressReleaseCompanies.grid.getSelectionModel().getSelected() : false
147 Pman.Dialog.Image.show({
149 ontable: 'core_enum',
150 onid: _this.data.onid,
153 if (!data) { return; }
154 _this.grid.footer.onClick('first');
160 '|xns' : 'Roo.Toolbar'
164 cls : 'x-btn-text-icon',
165 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
166 text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
170 var s = _this.grid.getSelectionModel().getSelections();
171 if (!s || s.length != 1) {
172 Roo.MessageBox.alert("Error", "Select a single image to edit");
175 var data = _this.grid.getDataSource().getById(s[0].data.id).data;
177 Pman.Dialog.Image.show(data, function() {
178 _this.grid.footer.onClick('first');
188 cls : 'x-btn-text-icon',
189 icon : rootURL + '/Pman/templates/images/trash.gif',
190 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
194 Pman.genericDelete(_this, 'Images');
198 '|xns' : 'Roo.Toolbar'
205 sortInfo : { field: 'created' , direction: 'DESC' },
207 beforeload : function (_self, o)
209 //o.params.ontable = 'Companies';
211 // o.params.imgtype = 'PressRelease';
213 o.params = o.params || {};
214 o.params.onid = _this.data.onid;
215 o.params.ontable = 'core_enum';
219 load : function (_self, records, options)
221 _this.panel.el.unmask();
229 url : baseURL + '/Roo/Images.php',
234 xtype : 'JsonReader',
269 'name': 'displayorder',
277 'name': 'parent_image_id',
283 'dateFormat' : 'Y-m-d H:i:s'
304 totalProperty : 'total',
311 xtype : 'ColumnModel',
312 dataIndex : 'created',
313 header : _this._strings['0eceeb45861f9585dd7a97a3e36f85c6'] /* Created */,
314 renderer : function(v,x,r) {
315 return String.format('{0}<br/><i>{1}</i><br/>{2}<br/><i>{3}x{4}</i>',
316 v.format('d/M/Y'), r.data.mimetype, r.data.filename,
317 r.data.width, r.data.height
326 xtype : 'ColumnModel',
328 header : _this._strings['be53a0541a6d36f6ecb879fa2c584b08'] /* Image */,
329 renderer : function(v,x,r) { return String.format('<img src="{0}/Images/Thumb/100/{1}/{2}" width="100">', baseURL, v, r.data.filename); },
335 xtype : 'ColumnModel',
337 header : _this._strings['b78a3223503896721cca1303f776159b'] /* Title */,
338 renderer : function(v,x,r) {
339 // var surl = r.json.url.replace(/\/release.php\/Images\//, '/i/').replace(/\/([0-9]+)\/.*$/, '/$1');;
340 // var svurl = r.json.url_view.replace(/\/release.php\/Images\//, '/i/').replace(/\/([0-9]+)\/.*$/, '/$1');;
341 // return String.format(
342 // 'Download Url : <a href="http://{0}{1}" target="_new">http://{0}{1}</a>' +
343 // '<br/>View Url : <a href="http://{0}{2}" target="_new">http://{0}{2}</a>' +
344 //'<br/><b>{3}</b><br/>{4}</i>',
345 // window.location.host, surl, svurl,
346 // v, r.json.descript);