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

Only select the first date of every months for topups

Better topup icons
parent ba604506
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ function showAdminUserTopupsWindow(userID) { ...@@ -24,7 +24,7 @@ function showAdminUserTopupsWindow(userID) {
// Window config // Window config
{ {
title: "User Topups", title: "User Topups",
iconCls: 'silk-building', iconCls: 'silk-chart_bar',
width: 500, width: 500,
height: 335, height: 335,
...@@ -38,7 +38,7 @@ function showAdminUserTopupsWindow(userID) { ...@@ -38,7 +38,7 @@ function showAdminUserTopupsWindow(userID) {
{ {
text:'Add', text:'Add',
tooltip:'Add topup', tooltip:'Add topup',
iconCls:'silk-building_add', iconCls:'silk-chart_bar_add',
handler: function() { handler: function() {
showAdminUserTopupAddEditWindow(userID,0); showAdminUserTopupAddEditWindow(userID,0);
} }
...@@ -47,7 +47,7 @@ function showAdminUserTopupsWindow(userID) { ...@@ -47,7 +47,7 @@ function showAdminUserTopupsWindow(userID) {
{ {
text:'Edit', text:'Edit',
tooltip:'Edit topup', tooltip:'Edit topup',
iconCls:'silk-building_edit', iconCls:'silk-chart_bar_edit',
handler: function() { handler: function() {
var selectedItem = Ext.getCmp(adminUserTopupsWindow.gridPanelID).getSelectionModel().getSelected(); var selectedItem = Ext.getCmp(adminUserTopupsWindow.gridPanelID).getSelectionModel().getSelected();
// Check if we have selected item // Check if we have selected item
...@@ -75,7 +75,7 @@ function showAdminUserTopupsWindow(userID) { ...@@ -75,7 +75,7 @@ function showAdminUserTopupsWindow(userID) {
{ {
text:'Remove', text:'Remove',
tooltip:'Remove topup', tooltip:'Remove topup',
iconCls:'silk-building_delete', iconCls:'silk-chart_bar_delete',
handler: function() { handler: function() {
var selectedItem = Ext.getCmp(adminUserTopupsWindow.gridPanelID).getSelectionModel().getSelected(); var selectedItem = Ext.getCmp(adminUserTopupsWindow.gridPanelID).getSelectionModel().getSelected();
// Check if we have selected item // Check if we have selected item
...@@ -176,7 +176,7 @@ function showAdminUserTopupAddEditWindow(userID,topupID) { ...@@ -176,7 +176,7 @@ function showAdminUserTopupAddEditWindow(userID,topupID) {
// We doing an update // We doing an update
if (topupID) { if (topupID) {
icon = 'silk-building_edit'; icon = 'silk-chart_bar_edit';
submitAjaxConfig = { submitAjaxConfig = {
ID: topupID, ID: topupID,
SOAPFunction: 'updateAdminUserTopup', SOAPFunction: 'updateAdminUserTopup',
...@@ -186,7 +186,7 @@ function showAdminUserTopupAddEditWindow(userID,topupID) { ...@@ -186,7 +186,7 @@ function showAdminUserTopupAddEditWindow(userID,topupID) {
}; };
// We doing an Add // We doing an Add
} else { } else {
icon = 'silk-building_add'; icon = 'silk-chart_bar_add';
submitAjaxConfig = { submitAjaxConfig = {
UserID: userID, UserID: userID,
SOAPFunction: 'createAdminUserTopup', SOAPFunction: 'createAdminUserTopup',
...@@ -248,6 +248,7 @@ function showAdminUserTopupAddEditWindow(userID,topupID) { ...@@ -248,6 +248,7 @@ function showAdminUserTopupAddEditWindow(userID,topupID) {
name: 'ValidFrom', name: 'ValidFrom',
id: 'ValidFrom', id: 'ValidFrom',
vtype: 'daterange', vtype: 'daterange',
disabledDates: ["(0(2|3|4|5|6|7|8|9)|1[0-9]|2[0-9]|3[0-1])$"],
value: firstOfMonth, value: firstOfMonth,
format: 'Y-m-d', format: 'Y-m-d',
endDateField: 'ValidTo' endDateField: 'ValidTo'
...@@ -258,6 +259,7 @@ function showAdminUserTopupAddEditWindow(userID,topupID) { ...@@ -258,6 +259,7 @@ function showAdminUserTopupAddEditWindow(userID,topupID) {
name: 'ValidTo', name: 'ValidTo',
id: 'ValidTo', id: 'ValidTo',
vtype: 'daterange', vtype: 'daterange',
disabledDates: ["(0(2|3|4|5|6|7|8|9)|1[0-9]|2[0-9]|3[0-1])$"],
value: firstOfNext, value: firstOfNext,
format: 'Y-m-d', format: 'Y-m-d',
startDateField: 'ValidFrom' startDateField: 'ValidFrom'
......
...@@ -188,7 +188,7 @@ function showAdminUserWindow() { ...@@ -188,7 +188,7 @@ function showAdminUserWindow() {
{ {
text:'Topups', text:'Topups',
tooltip:'User topups', tooltip:'User topups',
iconCls:'silk-building', iconCls:'silk-chart_bar',
handler: function() { handler: function() {
var selectedItem = Ext.getCmp(AdminUserWindow.gridPanelID).getSelectionModel().getSelected(); var selectedItem = Ext.getCmp(AdminUserWindow.gridPanelID).getSelectionModel().getSelected();
// Check if we have selected item // Check if we have selected item
......
...@@ -24,7 +24,7 @@ function showWiSPUserTopupsWindow(userID) { ...@@ -24,7 +24,7 @@ function showWiSPUserTopupsWindow(userID) {
// Window config // Window config
{ {
title: "User Topups", title: "User Topups",
iconCls: 'silk-building', iconCls: 'silk-chart_bar',
width: 500, width: 500,
height: 335, height: 335,
...@@ -38,7 +38,7 @@ function showWiSPUserTopupsWindow(userID) { ...@@ -38,7 +38,7 @@ function showWiSPUserTopupsWindow(userID) {
{ {
text:'Add', text:'Add',
tooltip:'Add topup', tooltip:'Add topup',
iconCls:'silk-building_add', iconCls:'silk-chart_bar_add',
handler: function() { handler: function() {
showWiSPUserTopupAddEditWindow(userID,0); showWiSPUserTopupAddEditWindow(userID,0);
} }
...@@ -47,7 +47,7 @@ function showWiSPUserTopupsWindow(userID) { ...@@ -47,7 +47,7 @@ function showWiSPUserTopupsWindow(userID) {
{ {
text:'Edit', text:'Edit',
tooltip:'Edit topup', tooltip:'Edit topup',
iconCls:'silk-building_edit', iconCls:'silk-chart_bar_edit',
handler: function() { handler: function() {
var selectedItem = Ext.getCmp(wispUserTopupsWindow.gridPanelID).getSelectionModel().getSelected(); var selectedItem = Ext.getCmp(wispUserTopupsWindow.gridPanelID).getSelectionModel().getSelected();
// Check if we have selected item // Check if we have selected item
...@@ -75,7 +75,7 @@ function showWiSPUserTopupsWindow(userID) { ...@@ -75,7 +75,7 @@ function showWiSPUserTopupsWindow(userID) {
{ {
text:'Remove', text:'Remove',
tooltip:'Remove topup', tooltip:'Remove topup',
iconCls:'silk-building_delete', iconCls:'silk-chart_bar_delete',
handler: function() { handler: function() {
var selectedItem = Ext.getCmp(wispUserTopupsWindow.gridPanelID).getSelectionModel().getSelected(); var selectedItem = Ext.getCmp(wispUserTopupsWindow.gridPanelID).getSelectionModel().getSelected();
// Check if we have selected item // Check if we have selected item
...@@ -176,7 +176,7 @@ function showWiSPUserTopupAddEditWindow(userID,topupID) { ...@@ -176,7 +176,7 @@ function showWiSPUserTopupAddEditWindow(userID,topupID) {
// We doing an update // We doing an update
if (topupID) { if (topupID) {
icon = 'silk-building_edit'; icon = 'silk-chart_bar_edit';
submitAjaxConfig = { submitAjaxConfig = {
ID: topupID, ID: topupID,
SOAPFunction: 'updateWiSPUserTopup', SOAPFunction: 'updateWiSPUserTopup',
...@@ -186,7 +186,7 @@ function showWiSPUserTopupAddEditWindow(userID,topupID) { ...@@ -186,7 +186,7 @@ function showWiSPUserTopupAddEditWindow(userID,topupID) {
}; };
// We doing an Add // We doing an Add
} else { } else {
icon = 'silk-building_add'; icon = 'silk-chart_bar_add';
submitAjaxConfig = { submitAjaxConfig = {
UserID: userID, UserID: userID,
SOAPFunction: 'createWiSPUserTopup', SOAPFunction: 'createWiSPUserTopup',
...@@ -248,6 +248,7 @@ function showWiSPUserTopupAddEditWindow(userID,topupID) { ...@@ -248,6 +248,7 @@ function showWiSPUserTopupAddEditWindow(userID,topupID) {
name: 'ValidFrom', name: 'ValidFrom',
id: 'ValidFrom', id: 'ValidFrom',
vtype: 'daterange', vtype: 'daterange',
disabledDates: ["(0(2|3|4|5|6|7|8|9)|1[0-9]|2[0-9]|3[0-1])$"],
value: firstOfMonth, value: firstOfMonth,
format: 'Y-m-d', format: 'Y-m-d',
endDateField: 'ValidTo' endDateField: 'ValidTo'
...@@ -258,6 +259,7 @@ function showWiSPUserTopupAddEditWindow(userID,topupID) { ...@@ -258,6 +259,7 @@ function showWiSPUserTopupAddEditWindow(userID,topupID) {
name: 'ValidTo', name: 'ValidTo',
id: 'ValidTo', id: 'ValidTo',
vtype: 'daterange', vtype: 'daterange',
disabledDates: ["(0(2|3|4|5|6|7|8|9)|1[0-9]|2[0-9]|3[0-1])$"],
value: firstOfNext, value: firstOfNext,
format: 'Y-m-d', format: 'Y-m-d',
startDateField: 'ValidFrom' startDateField: 'ValidFrom'
......
...@@ -132,7 +132,7 @@ function showWiSPUserWindow() { ...@@ -132,7 +132,7 @@ function showWiSPUserWindow() {
{ {
text:'Topups', text:'Topups',
tooltip:'User topups', tooltip:'User topups',
iconCls:'silk-building', iconCls:'silk-chart_bar',
handler: function() { handler: function() {
var selectedItem = Ext.getCmp(WiSPUserWindow.gridPanelID).getSelectionModel().getSelected(); var selectedItem = Ext.getCmp(WiSPUserWindow.gridPanelID).getSelectionModel().getSelected();
// Check if we have selected item // Check if we have selected item
......
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