Skip to content
Snippets Groups Projects
Commit 0b3b3b5f authored by Robert Anderson's avatar Robert Anderson
Browse files

Added edit group menu item

parent 1ea228a4
No related branches found
No related tags found
No related merge requests found
...@@ -18,14 +18,42 @@ function showAdminGroupWindow() { ...@@ -18,14 +18,42 @@ function showAdminGroupWindow() {
// Inline toolbars // Inline toolbars
tbar: [ tbar: [
{ {
text:'Add/Edit', text:'Add',
tooltip:'Add or edit group', tooltip:'Add group',
iconCls:'add', iconCls:'add',
handler: function() { handler: function() {
showAdminGroupEditWindow(); showAdminGroupAddEditWindow();
} }
}, },
'-', '-',
{
text:'Edit',
tooltip:'Edit group',
iconCls:'edit',
handler: function() {
var selectedItem = AdminGroupWindow.getComponent('gridpanel').getSelectionModel().getSelected();
// Check if we have selected item
if (selectedItem) {
// If so display window
showAdminGroupAddEditWindow(selectedItem.data.ID);
} else {
AdminGroupWindow.getEl().mask();
// Display error
Ext.Msg.show({
title: "Nothing selected",
msg: "No group selected",
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.CANCEL,
modal: false,
fn: function() {
AdminGroupWindow.getEl().unmask();
}
});
}
}
},
'-',
{ {
text:'Remove', text:'Remove',
tooltip:'Remove group', tooltip:'Remove group',
...@@ -169,7 +197,7 @@ function showAdminGroupWindow() { ...@@ -169,7 +197,7 @@ function showAdminGroupWindow() {
// Display edit/add form // Display edit/add form
function showAdminGroupEditWindow(id) { function showAdminGroupAddEditWindow(id) {
var submitAjaxConfig; var submitAjaxConfig;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment