15 $monLibrary= dirname(__FILE__) .
"/../library";
16 $sharedLibrary= dirname(__FILE__) .
"/../../shared/library";
17 require_once(
"$monLibrary/cu_top.i");
18 require_once(
"$monLibrary/ck_hticket.i");
19 require_once(
"$monLibrary/cu_pass.i");
20 require_once(
"$monLibrary/monitorView.i");
21 require_once(
"$sharedLibrary/cu_flagconst.i");
23 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
26 header(
"Location: /hcuadm/hcu_noperm.prg");
34 FROM ars_audio_message 36 $title=
"Home Banking IVR Message Codes";
37 printMonitorPageTop($title, $homecuKendoVersion, $cloudfrontDomainName);
45 padding: .2em .6em .2em .6em;
50 var msgLevels = [ {
'value':
'',
'text':
'...Choose...'}, {
'value':
'1',
'text':
'Primary'}, {
'value':
'2',
'text':
'Digits'}, {
'value':
'3',
'text':
'Letters'}];
53 $(document).ready(
function() {
54 var popupNotification = $(
"#popupNotification").kendoNotification().data(
"kendoNotification");
55 popupNotification.setOptions({
63 var crudServiceBaseUrl =
"ivr_mntc_msg.data",
64 dataSource =
new kendo.data.DataSource({
67 serverFiltering:
false,
75 url: crudServiceBaseUrl +
"?action=read",
80 url: crudServiceBaseUrl +
"?action=update",
85 url: crudServiceBaseUrl +
"?action=delete",
90 url: crudServiceBaseUrl +
"?action=new",
93 parameterMap:
function(options, operation) {
94 if (operation !==
"read" && options.models) {
95 return {models: kendo.stringify(options.models)};
96 }
else if (operation ===
'create' || operation ===
'update' || operation ===
'destroy') {
103 data:
function(response) {
105 var returnData = Array();
107 if (response.homecuInfo) {
108 if (response.homecuInfo.length > 0) {
109 responseInfo = response.homecuInfo;
110 popupNotification.show(responseInfo,
"info");
115 if (response.homecuErrors !== undefined) {
116 if (response.homecuErrors.length > 0) {
118 for (var i = 0; i < response.homecuErrors.length; i++) {
119 errMsg += (errMsg.length > 0 ?
'<br/>' :
'') + response.homecuErrors[i];
124 if (response.homecuData !== undefined) {
125 if (response.homecuData) {
126 returnData = response.homecuData;
129 throw "Error occurred while parsing the data.";
133 popupNotification.show(err,
"error");
139 total:
function(response) {
140 return response.homecuData.length;
142 parse:
function(response) {
143 var responsePass =
false;
148 returnData = response.Results[0];
150 returnData = [{homecuErrors:
"Error parsing server"}];
157 msg_code: { type:
'string', validation: {required:
true}},
158 msg_desc: { type:
'string', validation: { required:
true } },
159 msg_filename: { type:
'string', validation: { required:
true} },
160 msg_level: { type:
"string", validation: {required:
true} }
165 $(
"#gridMsg").kendoGrid({
166 dataSource: dataSource,
168 pageSizes: [15, 30, 45],
172 display:
"Showing {0}-{1} from {2} data items" 180 { field:
"msg_code", title:
"Code", width:
"120px"},
181 { field:
"msg_desc", title:
"Message", width:
"350px" },
182 { field:
"msg_filename", title:
"File Name", width:
"120px" },
183 { field:
"msg_level", title:
"Level", values: msgLevels, width:
"120px" },
184 { command: [
"edit",
"destroy"], title:
" ", width:
"200px" }],
190 $(
'input[name *= "msg_code"]').attr(
'disabled',
true);
194 $(
'.k-grid-add').on(
'click',
function(e) {
196 $(
'input[name *= "msg_code"]').attr(
'disabled',
false);
200 <?php printMonitorPageMiddle($title); ?>
201 <span
id=
"popupNotification"></span>
202 <div
id=
'gridMsg'></div>
203 <?php printMonitorPageBottom(); ?>