comparison app/controller/OrtGrid.js @ 567:fa52f383daf8

Added Todos. More specific 'are your sure?' question on delete
author Dustin Demuth <dustin@intevation.de>
date Tue, 10 Mar 2015 11:56:25 +0100
parents d5ad2f43658a
children
comparison
equal deleted inserted replaced
566:8ebe4cfca4b8 567:fa52f383daf8
44 } 44 }
45 }); 45 });
46 }, 46 },
47 47
48 open: function() { 48 open: function() {
49 // todo
49 console.log('open'); 50 console.log('open');
50 }, 51 },
51 52
52 add: function() { 53 add: function() {
54 // todo
53 console.log('add'); 55 console.log('add');
54 }, 56 },
55 57
56 remove: function(button) { 58 remove: function(button) {
57 var grid = button.up('grid'); 59 var grid = button.up('grid');
58 var selection = grid.getView().getSelectionModel().getSelection()[0]; 60 var selection = grid.getView().getSelectionModel().getSelection()[0];
59 Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn) { 61 Ext.MessageBox.confirm('Ortsangabe löschen', 'Sind Sie sicher?', function(btn) {
60 if (btn === 'yes') { 62 if (btn === 'yes') {
61 selection.destroy({ 63 selection.destroy({
62 success: function() { 64 success: function() {
63 button.up('window').initData(); 65 button.up('window').initData();
64 }, 66 },

http://lada.wald.intevation.org