Pman.Dialog.AdminEnumImages.js
"show" : "function (_self)\n{\n _this.grid.footer.onClick('first');\n}"
},
"modal" : true,
"show" : "function (_self)\n{\n _this.grid.footer.onClick('first');\n}"
},
"modal" : true,
- "xtype" : "LayoutDialog",
"title" : "Add / Edit Images",
"title" : "Add / Edit Images",
+ "xtype" : "LayoutDialog",
"width" : 900,
"$ xns" : "Roo",
"height" : 500,
"width" : 900,
"$ xns" : "Roo",
"height" : 500,
"listeners" : {
"|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
},
"listeners" : {
"|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
},
"fitToframe" : true,
"background" : false,
"fitToframe" : true,
"background" : false,
"title" : "Images",
"xtype" : "GridPanel",
"fitContainer" : true,
"title" : "Images",
"xtype" : "GridPanel",
"fitContainer" : true,
},
{
"$ url" : "baseURL + '/Roo/Images.php'",
},
{
"$ url" : "baseURL + '/Roo/Images.php'",
"$ xns" : "Roo.data",
"* prop" : "proxy"
}
"$ xns" : "Roo.data",
"* prop" : "proxy"
}
- "|click" : "function()\n{\n var ids = [];\n _this.grid.dataSource.each(function(rr) {\n console.log(_this.grid.dataSource);\n if (rr.selected) {\n \n ids.push(rr.data.id);\n }\n }); \n if (!ids.length) {\n Roo.MessageBox.alert(\"Error\", \"Select rows by clicking the row\");\n return;\n }\n \n Roo.MessageBox.confirm(\n \"Confirm\", \n \"Confirm Deletion of selected rows (some rows can not be deleted if they are referenced elsewhere\", \n function(res) {\n if(res != 'yes') {\n return;\n }\n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/Core_enum',\n params : {\n _delete : ids.join(',')\n },\n success : function() {\n _this.grid.footer.onClick('refresh');\n }\n });\n }\n );\n}\n "
+ "|click" : "function()\n{\n var ids = [];\n \n _\n \n if (!ids.length) {\n Roo.MessageBox.alert(\"Error\", \"Select rows by clicking the row\");\n return;\n }\n \n Roo.MessageBox.confirm(\n \"Confirm\", \n \"Confirm Deletion of selected rows (some rows can not be deleted if they are referenced elsewhere\", \n function(res) {\n if(res != 'yes') {\n return;\n }\n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/Core_enum',\n params : {\n _delete : ids.join(',')\n },\n success : function() {\n _this.grid.footer.onClick('refresh');\n }\n });\n }\n );\n}\n "
},
"text" : "Delete",
"xtype" : "Button",
},
"text" : "Delete",
"xtype" : "Button",
},
{
"xtype" : "ColumnModel",
},
{
"xtype" : "ColumnModel",
"$ renderer" : "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\" width=\"100\">', baseURL, v, r.data.filename); }",
"$ xns" : "Roo.grid",
"* prop" : "colModel[]",
"$ renderer" : "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\" width=\"100\">', baseURL, v, r.data.filename); }",
"$ xns" : "Roo.grid",
"* prop" : "colModel[]",
},
{
"xtype" : "ColumnModel",
},
{
"xtype" : "ColumnModel",
"$ renderer" : "function(v,x,r) {\n// var surl = r.json.url.replace(/\\/release.php\\/Images\\//, '/i/').replace(/\\/([0-9]+)\\/.*$/, '/$1');;\n // var svurl = r.json.url_view.replace(/\\/release.php\\/Images\\//, '/i/').replace(/\\/([0-9]+)\\/.*$/, '/$1');;\n // return String.format(\n // 'Download Url : <a href=\"http://{0}{1}\" target=\"_new\">http://{0}{1}</a>' + \n // '<br/>View Url : <a href=\"http://{0}{2}\" target=\"_new\">http://{0}{2}</a>' + \n //'<br/><b>{3}</b><br/>{4}</i>', \n // window.location.host, surl, svurl,\n // v, r.json.descript); \n \n }",
"$ xns" : "Roo.grid",
"* prop" : "colModel[]",
"$ renderer" : "function(v,x,r) {\n// var surl = r.json.url.replace(/\\/release.php\\/Images\\//, '/i/').replace(/\\/([0-9]+)\\/.*$/, '/$1');;\n // var svurl = r.json.url_view.replace(/\\/release.php\\/Images\\//, '/i/').replace(/\\/([0-9]+)\\/.*$/, '/$1');;\n // return String.format(\n // 'Download Url : <a href=\"http://{0}{1}\" target=\"_new\">http://{0}{1}</a>' + \n // '<br/>View Url : <a href=\"http://{0}{2}\" target=\"_new\">http://{0}{2}</a>' + \n //'<br/><b>{3}</b><br/>{4}</i>', \n // window.location.host, surl, svurl,\n // v, r.json.descript); \n \n }",
"$ xns" : "Roo.grid",
"* prop" : "colModel[]",
click : function()
{
var ids = [];
click : function()
{
var ids = [];
- _this.grid.dataSource.each(function(rr) {
- console.log(_this.grid.dataSource);
- if (rr.selected) {
-
- ids.push(rr.data.id);
- }
- });
if (!ids.length) {
Roo.MessageBox.alert("Error", "Select rows by clicking the row");
return;
if (!ids.length) {
Roo.MessageBox.alert("Error", "Select rows by clicking the row");
return;