This commit is contained in:
@@ -18,7 +18,7 @@ app.ravLicense = (function () {
|
||||
var
|
||||
|
||||
stateMap = {},
|
||||
configModule, initModule, onGenerate, onSelectAllAddOns;
|
||||
configModule, initModule, onGenerate;
|
||||
//----------------- END MODULE SCOPE VARIABLES ---------------
|
||||
|
||||
//------------------- BEGIN UTILITY METHODS ------------------
|
||||
@@ -31,6 +31,7 @@ app.ravLicense = (function () {
|
||||
[Required]
|
||||
public Guid DbId { get; set; }
|
||||
[Required]
|
||||
public bool licenseExipres (rental type)
|
||||
public long LicenseExpiration { get; set; }
|
||||
[Required]
|
||||
public long MaintenanceExpiration { get; set; }
|
||||
@@ -65,37 +66,41 @@ app.ravLicense = (function () {
|
||||
|
||||
var submitData = app.utilB.objectifyFormDataArray(formData);
|
||||
|
||||
app.api.createRavLicense(submitData, function (res) {
|
||||
if (res.error) {
|
||||
$.gevent.publish('app-show-error', res.msg);
|
||||
} else {
|
||||
$('#key').val(res);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
//clean up the data before submit
|
||||
|
||||
//submit
|
||||
alert("STUB submit");
|
||||
// app.api.createRavLicense(submitData, function (res) {
|
||||
// if (res.error) {
|
||||
// $.gevent.publish('app-show-error', res.msg);
|
||||
// } else {
|
||||
// $('#key').val(res);
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
|
||||
return false; //prevent default
|
||||
};
|
||||
|
||||
|
||||
onSelectAllAddOns = function (event) {
|
||||
event.preventDefault();
|
||||
$('#wbi').prop('checked', true);
|
||||
$('#mbi').prop('checked', true);
|
||||
$('#ri').prop('checked', true);
|
||||
$('#qbi').prop('checked', true);
|
||||
$('#qboi').prop('checked', true);
|
||||
$('#pti').prop('checked', true);
|
||||
$('#quickNotification').prop('checked', true);
|
||||
$('#exportToXls').prop('checked', true);
|
||||
$('#outlookSchedule').prop('checked', true);
|
||||
$('#oli').prop('checked', true);
|
||||
$('#importExportCSVDuplicate').prop('checked', true);
|
||||
// onSelectAllAddOns = function (event) {
|
||||
// event.preventDefault();
|
||||
// $('#wbi').prop('checked', true);
|
||||
// $('#mbi').prop('checked', true);
|
||||
// $('#ri').prop('checked', true);
|
||||
// $('#qbi').prop('checked', true);
|
||||
// $('#qboi').prop('checked', true);
|
||||
// $('#pti').prop('checked', true);
|
||||
// $('#quickNotification').prop('checked', true);
|
||||
// $('#exportToXls').prop('checked', true);
|
||||
// $('#outlookSchedule').prop('checked', true);
|
||||
// $('#oli').prop('checked', true);
|
||||
// $('#importExportCSVDuplicate').prop('checked', true);
|
||||
|
||||
|
||||
|
||||
return false; //prevent default
|
||||
};
|
||||
// return false; //prevent default
|
||||
// };
|
||||
|
||||
// onTemplates = function(event) {
|
||||
// event.preventDefault();
|
||||
@@ -129,24 +134,24 @@ app.ravLicense = (function () {
|
||||
|
||||
//case 3233 customer list
|
||||
//Fill customer list combo
|
||||
var customerList = {};
|
||||
// var customerList = {};
|
||||
|
||||
|
||||
//get customers
|
||||
app.api.get('customer/list', function (res) {
|
||||
if (res.error) {
|
||||
$.gevent.publish('app-show-error', res.msg);
|
||||
} else {
|
||||
// //get customers
|
||||
// app.api.get('customer/list', function (res) {
|
||||
// if (res.error) {
|
||||
// $.gevent.publish('app-show-error', res.msg);
|
||||
// } else {
|
||||
|
||||
var html = '<option value="0"><TRIAL></option>';
|
||||
// var html = '<option value="0"><TRIAL></option>';
|
||||
|
||||
for (var i = 0, len = res.length; i < len; ++i) {
|
||||
html += ('<option value="' + res[i]['id'] + '">' + res[i]['name'] + '</option>');
|
||||
customerList[res[i]['id']] = res[i]['name'];
|
||||
}
|
||||
$('#customerId').append(html);
|
||||
}
|
||||
});
|
||||
// for (var i = 0, len = res.length; i < len; ++i) {
|
||||
// html += ('<option value="' + res[i]['id'] + '">' + res[i]['name'] + '</option>');
|
||||
// customerList[res[i]['id']] = res[i]['name'];
|
||||
// }
|
||||
// $('#customerId').append(html);
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
//Context menu
|
||||
@@ -159,19 +164,20 @@ app.ravLicense = (function () {
|
||||
|
||||
//Context menu
|
||||
app.nav.contextClear();
|
||||
app.nav.contextAddButton('btn-generate', 'Make', 'key', onGenerate);
|
||||
app.nav.contextAddButton('btn-select-all-addons', 'All', 'check-all', onSelectAllAddOns);
|
||||
app.nav.contextAddButton('btn-generate', 'Generate and Send', 'key', onGenerate);
|
||||
// app.nav.contextAddButton('btn-select-all-addons', 'All', 'check-all', onSelectAllAddOns);
|
||||
// app.nav.contextAddLink("licenseRequests/", "Requests", "voice");
|
||||
app.nav.contextAddLink("licenseTemplates/", "", "layers");
|
||||
// app.nav.contextAddLink("licenseTemplates/", "", "layers");
|
||||
//case 3233
|
||||
app.nav.contextAddLink("licenses/", "List", "");
|
||||
|
||||
|
||||
//set all date inputs to today plus one year
|
||||
var oneYearFromNow = moment().add(1, 'years').toISOString().substring(0, 10);
|
||||
var oneMonthFromNow = moment().add(1, 'months').toISOString().substring(0, 10);
|
||||
$('input[type="date"]').val(oneYearFromNow);
|
||||
$('#lockoutDate').val(oneMonthFromNow);
|
||||
|
||||
//var oneMonthFromNow = moment().add(1, 'months').toISOString().substring(0, 10);
|
||||
//$('#lockoutDate').val(oneMonthFromNow);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user