click : function()
{
var s = _this.grid.getSelectionModel().getSelections();
+
if (!s || s.length != 1) {
Roo.MessageBox.alert("Error", "Select a single image to edit");
return;
}
var data = _this.grid.getDataSource().getById(s[0].data.id).data;
-
- Pman.Dialog.Image.show(data, function() {
- _this.grid.footer.onClick('first');
- });
+
+ Pman.Dialog.Image.show(data, function() {
+ _this.grid.footer.onClick('first');
+ });
- }
+ }
},
xns : Roo,
'|xns' : 'Roo'
var ids = [];
var sc = _this.grid.getSelectionModel().getSelections();
- console.log(sc);
+
if (!sc.length) {
Roo.MessageBox.alert("Error", "Select rows by clicking the row");
return;