13 $monLibrary= dirname(__FILE__) .
"/../library";
14 $sharedLibrary= dirname(__FILE__) .
"/../../shared/library";
15 require_once(
"$monLibrary/cu_top.i");
16 require_once(
"$monLibrary/ck_hticket.i");
18 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
21 header(
"Location: /hcuadm/hcu_noperm.prg");
25 $dms_ok = array(
'edress'=>
'string',
'generate'=>
'string');
30 header (
"Pragma: no-cache");
31 header (
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") .
" GMT");
32 header (
"Cache-Control: no-cache, no-store, must-revalidate, max_age=0");
33 header (
"Expires: 0");
35 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" 36 "http://www.w3.org/TR/html4/loose.dtd">
37 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:lang=
"en" lang=
"en">
39 <title>HomeCU Product Feature Status</title>
41 <!--<link href=
"/monitor/hcudocs/HomeCU/examples-offline.css" rel=
"stylesheet">-->
42 <link href=
"/monitor/css/jquery/css/KendoUI/kendo.common.min.css" rel=
"stylesheet">
43 <link href=
"/monitor/css/jquery/css/KendoUI/kendo.<?php echo GetMonitorDefaultKendoStyle(); ?>.min.css" rel=
"stylesheet">
45 <script src=
"/monitor/css/jquery/js/jquery-1.8.2.js"></script>
46 <script src=
"/monitor/css/jquery/js/KendoUI/kendo.web.js"></script>
47 <!--<script src=
"console.js"></script> -->
50 .floatWrap:after,#prodGrid:after{content:
"";display:block;clear:both}
51 .floatWrap,#prodGrid{display:
inline-block}
52 .floatWrap,#prodGrid{display:block}
58 font:75%
'Lucida Sans Unicode',
'Lucida Grande',arial,helvetica,sans-serif;
59 background-color:#e2e2e2;
73 <h2>HomeCU Product Feature Status</h2>
75 <div
id=
"prodGrid" class=
"k-content">
78 <script
id=
"toolbarTemplate" type=
"text/x-kendo-template">
79 <a
class=
"k-button k-button-icontent k-grid-add" id=
"addRecord" onclick=
"return AddRecord();"><span
class=
"k-icon k-add"></span>Add New Record</a>
80 <a
class=
"k-button" id=
"filterToggle" onclick=
"return CheckShowFiltered()">Remove Filter</a>
81 <a
class=
"k-button" id=
"pageToggle" onclick=
"return CheckShowAll()">Show All</a>
82 <a
class=
"k-button" onclick=
"return CheckReload()">Reload Page</a>
84 <a
class=
"k-button" id=
"backExit" onclick=
"return CheckExit()">Credit Union List</a>
85 <span
id=
"displayStatus"></span>
89 var initialFilter = { logic:
"and", filters: [{ field:
"impStatus",
operator:
"neq", value:
"Complete" }] };
93 var filterDeveloper = { logic:
"or", filters: [
94 { field:
"developer",
operator:
"eq", value:
"Unassigned" }
102 if ( $Hu ==
"jan" ) {
104 print
"filterDeveloper = { logic: \"or\", filters: [ { field: \"impStatus\", operator: \"eq\", value: \"Published\" } ] );";
105 }
else if ( $Hu ==
"cerise" ) {
107 print
"filterDeveloper = { logic: \"or\", filters: [ { field: \"impStatus\", operator: \"eq\", value: \"Bill Setup\" }, { field: \"impStatus\", operator: \"eq\", value: \"Bill Month\" } ] );";
108 }
else if ( $Hu ==
"Mike" || $Hu ==
"Mark" || $Hu ==
"Kim" | $Hu ==
"miki" ) {
110 print
"filterDeveloper.filters.push( { field: \"developer\", operator: \"eq\", value: \"$Hu\" } );";
111 }
else if ( $Hu ==
"jayme" || $Hu ==
"Elaine" ) {
113 print
"filterDeveloper.filters.push( { field: \"developer\", operator: \"eq\", value: \"jayme\" } );";
114 print
"filterDeveloper.filters.push( { field: \"developer\", operator: \"eq\", value: \"Elaine\" } );";
119 initialFilter.filters.push( filterDeveloper );
121 var filteredNow =
true;
122 function CheckShowFiltered() {
124 $(
"#grid").data(
"kendoGrid").dataSource.filter( {} );
126 $(
"#filterToggle").html(
"Filter For Me");
128 $(
"#grid").data(
"kendoGrid").dataSource.filter( initialFilter );
130 $(
"#filterToggle").html(
"Remove Filters");
134 function AddRecord() {
136 $(
"#grid").data(
"kendoGrid").dataSource.filter( {} );
137 $(
"#grid").data(
"kendoGrid").addRow();
140 var showingPages =
true;
141 function CheckShowAll() {
143 if ( showingPages ) {
144 $(
"#grid").data(
"kendoGrid").pageable =
false;
145 pageSize = $(
"#grid").data(
"kendoGrid").dataSource.total();
147 showingPages =
false;
148 $(
"#pageToggle").html(
"Show Pages");
150 $(
"#grid").data(
"kendoGrid").pageable =
true;
153 $(
"#pageToggle").html(
"Show All");
156 $(
"#grid").data(
"kendoGrid").dataSource.pageSize(pageSize);
160 function CheckExit() {
161 if(doesDataSourceHaveChanges($(
"#grid").data(
"kendoGrid").dataSource)) {
162 if ( !confirm(
"Abandon Changes?") ) {
167 location.href =
"/monitor/mindex.html";
170 function CheckReload() {
171 if(doesDataSourceHaveChanges($(
"#grid").data(
"kendoGrid").dataSource)) {
172 if ( !confirm(
"Abandon Changes?") ) {
177 location.reload(
true);
180 function doesDataSourceHaveChanges(ds)
184 $.each(ds._data, function ()
186 if (this.dirty ==
true)
192 if (ds._destroyed.length > 0)
200 $(document).ready(
function() {
202 var cuCodeSource =
new kendo.data.DataSource({
207 url:
"ProdImpStat.data",
216 requestEnd:
function( e ) {
217 var test = this.data;
218 if ( e.type ===
"read" ) {
225 cuCode: {type:
"string"},
226 cuName: {type:
"string"}
231 error:
function (e) {
232 alert(
"cuCodeSource: " + e.errors);
236 var cuEmployeeSource =
new kendo.data.DataSource({
241 url:
"ProdImpStat.data",
244 action:
"reademployees" 250 requestEnd:
function( e ) {
251 var test = this.data;
252 if ( e.type ===
"read" ) {
259 cuEmployee: {type:
"string"}
264 error:
function (e) {
265 alert(
"cuEmployeeSource: " + e.errors);
269 var dataSource =
new kendo.data.DataSource({
275 url:
"ProdImpStat.data",
277 contentType:
"application/json",
285 url:
"ProdImpStat.data",
286 contentType:
"application/x-www-form-urlencoded",
294 url:
"ProdImpStat.data",
295 contentType:
"application/x-www-form-urlencoded",
302 parameterMap:
function (options, operation) {
304 if ( operation ===
"create" || operation ===
"update" ) {
307 if ( options.eneteredOn && options.enteredOn.toString().length > 0 ) {
308 var d =
new Date(options.enteredOn);
309 options.enteredOn = kendo.toString(
new Date(d),
"MM/dd/yyyy");
311 if ( options.targetDate && options.targetDate.toString().length > 0 ) {
312 var d =
new Date(options.targetDate);
313 options.targetDate = kendo.toString(
new Date(d),
"MM/dd/yyyy");
315 if ( options.startOn && options.startOn.toString().length > 0 ) {
316 var d =
new Date(options.startOn);
317 options.startOn = kendo.toString(
new Date(d),
"MM/dd/yyyy");
319 if ( options.finishOn && options.finishOn.toString().length > 0 ) {
320 var d =
new Date(options.finishOn);
321 options.finishOn = kendo.toString(
new Date(d),
"MM/dd/yyyy");
323 if ( options.billedSetup && options.billedSetup.toString().length > 0 ) {
324 var d =
new Date(options.billedSetup);
325 options.billedSetup = kendo.toString(
new Date(d),
"MM/dd/yyyy");
327 if ( options.billedMonthly && options.billedMonthly.toString().length > 0 ) {
328 var d =
new Date(options.billedMonthly);
329 options.billedMonthly = kendo.toString(
new Date(d),
"MM/dd/yyyy");
337 requestEnd:
function( e ) {
340 if ( e.response && e.response.error )
341 error = e.response.error;
343 if ( error && error.length > 0 ) {
347 if ( e.type ===
"update" || e.type ===
"create" )
351 if ( e.type ===
"update" ) {
352 showStatus(
"Data Saved Successfully" );
355 else if ( e.type ===
"read" ) {
358 else if ( e.type ===
"create" ) {
360 showStatus(
"Data Added Successfully" );
362 else if ( e.type ===
"destroy" ) {
369 error:
function( e ) {
370 alert(
"Sorry, update had a problem! Status: " + e.status );
377 impid: {type:
"number"},
378 md5hash: {type:
"string"},
379 cuCode: {nullable:
false, validation: {required:
true}},
380 impStatus: {type:
"string", validation: {required:
true}, defaultValue:
"New"},
381 cuName: {type:
"string", editable:
false },
382 author: {type:
"string", validation: {required:
true}, defaultValue:
"Unassigned"},
383 cuProduct: {type:
"string", validation: {required:
true}, defaultValue:
"Unassigned"},
384 enteredOn: {type:
"date", parseFormats: [
"yyyy-MM-dd"]},
385 developer: {type:
"string", defaultValue:
"Unassigned"},
386 targetDate: {type:
"date", defaultValue:
null},
387 startOn: {type:
"date", defaultValue:
null},
388 finishOn: {type:
"date", defaultValue:
null},
389 billedSetup: {type:
"date", defaultValue:
null},
390 billedMonthly: {type:
"date", defaultValue:
null},
391 vendor: {type:
"string", defaultValue:
"N/A"}
398 function showStatus( status ) {
399 var el = $(
"#displayStatus");
401 el.css(
'background-color',
'greenyellow');
402 el.css(
"visibility",
"visible");
403 var effect = kendo.fx(el).fadeOut().duration(10000);
405 effect.play().then(
function() {
406 $(
"#displayStatus").text(
"" );
410 var cuVendorSource =
new kendo.data.DataSource({
415 url:
"ProdImpStat.data",
424 requestEnd:
function( e ) {
425 var test = this.data;
426 if ( e.type ===
"read" ) {
433 cuVendor: {type:
"string"}
438 error:
function (e) {
439 alert(
"cuVendorSource: " + e.errors);
443 var nextStatusDS =
new kendo.data.DataSource({
446 url:
"ProdImpStat.data",
448 contentType:
"application/json",
456 requestEnd:
function( e ) {
459 if ( e.response && e.response.error )
460 error = e.response.error;
462 if ( error && error.length > 0 ) {
466 else if ( e.type ===
"read" ) {
474 error:
function( e ) {
475 alert(
"Error occurred. Please refresh! Status: " + e.status );
482 { text:
"Unassigned", value:
"Unassigned" },
483 { text:
"Bill Pay", value:
"BP" },
484 { text:
"IVR Product", value:
"IVR" },
485 { text:
"Loan App", value:
"LNAPP" },
486 { text:
"Mobile Android App", value:
"MBLADA" },
487 { text:
"Mobile Bill Pay", value:
"MBLBP" },
488 { text:
"Mobile iPhone App", value:
"MBLAPP" },
489 { text:
"Mobile Text Banking", value:
"MBLTXT" },
490 { text:
"Mobile Web Classic", value:
"MBLCLS" },
491 { text:
"Mobile Web (New)", value:
"MBLWEB" },
492 { text:
"Remote Deposit Capture", value:
"RDC" },
493 { text:
"Website Devel", value:
"WEBS" }
497 { text:
"New", value:
"New" },
498 { text:
"In Devel", value:
"In Devel" },
499 { text:
"In Review", value:
"In Review" },
500 { text:
"Published", value:
"Published" },
501 { text:
"Billing Setup", value:
"Bill Setup" },
502 { text:
"Billing Monthly", value:
"Bill Month" },
503 { text:
"Complete", value:
"Complete" }
506 dataSource.filter(initialFilter);
512 var grid = $(
"#grid").kendoGrid({
514 dataSource: dataSource,
516 {
template: kendo.template($(
"#toolbarTemplate").html()) }
531 refresh:
"Refreshment, please" 538 click: onClickNextStatus
544 title:
"", width:
"170px"},
545 { field:
"cuCode", title:
"CU Code", width:
"80px", groupable:
false, editor: cuCodeEditor, filterable: { ui: cuListFilter } },
546 { field:
"impStatus", title:
"Status", width:
"70px", values: statusList },
547 { field:
"cuName", title:
"Name", width:
"150px", resizeable:
true, readonly:
true,
548 template:
function(dataItem) {
549 if ( !dataItem.cuName ) {
550 dataItem.cuName =
"Available after update";
553 return dataItem.cuName;
556 { field:
"author", title:
"Author", width:
"90px", editor: cuEmpEditor, filterable: { ui: cuEmpFilter } },
557 { field:
"cuProduct", title:
"Product", width:
"140px", values: productList },
558 { field:
"enteredOn", title:
"Entered On", format:
"{0:MM/dd/yyyy}", parseFormat:
"{0:MM/dd/yyyy}", width:
"110px"},
559 { field:
"billedSetup", title:
"Billed Setup", format:
"{0:MM/dd/yyyy}", width:
"110px" },
560 { field:
"billedMonthly", title:
"Billed Monthly", format:
"{0:MM/dd/yyyy}", width:
"120px" },
561 { field:
"developer", title:
"Developer", width:
"100px", editor: cuEmpEditor, filterable: { ui: cuEmpFilter } },
562 { field:
"targetDate", title:
"Target Date", format:
"{0:MM/dd/yyyy}", width:
"110px" },
563 { field:
"startOn", title:
"Start Date", format:
"{0:MM/dd/yyyy}", width:
"110px" },
564 { field:
"finishOn", title:
"Finish Date", format:
"{0:MM/dd/yyyy}", width:
"110px" },
565 { field:
"vendor", title:
"Vendor", width:
"70px", editor: cuVendorEditor, filterable: { ui: cuVendorFilter } }
567 dataBound:
function() {
568 var data = this._data;
569 for(var x = 0; x< data.length; x++)
571 var dataItem = data[x];
572 var tr = $(
"#grid").find(
"[data-uid='" + dataItem.uid +
"']");
573 var cell = $(
"td:nth-child(3)", tr);
575 if ( dataItem.impStatus ===
"New" ) color =
"yellow";
576 else if ( dataItem.impStatus ===
"In Devel" ) color =
"orange";
577 else if ( dataItem.impStatus ===
"In Review" ) color =
"cyan";
578 else if ( dataItem.impStatus ===
"Published" ) color =
"lightblue";
579 else if ( dataItem.impStatus ===
"Bill Setup" ) color =
"lightgreen";
580 else if ( dataItem.impStatus ===
"Bill Month" ) color =
"greenyellow";
581 else if ( dataItem.impStatus ===
"Complete" ) color =
"green";
583 cell.css(
"background-color", color);
586 saveChanges:
function(e) {
619 function cuListFilter(element) {
620 element.kendoDropDownList({
621 dataTextField:
"cuName",
622 dataValueField:
"cuCode",
623 dataSource: cuCodeSource,
624 optionLabel:
"--Select Value--" 628 function cuEmpFilter(element) {
629 element.kendoDropDownList({
630 dataTextField:
"cuEmployee",
631 dataValueField:
"cuEmployee",
632 dataSource: cuEmployeeSource,
633 optionLabel:
"--Select Value--" 637 function cuVendorFilter(element) {
638 element.kendoDropDownList({
639 dataTextField:
"cuVendor",
640 dataValueField:
"cuVendor",
641 dataSource: cuVendorSource,
642 optionLabel:
"--Select Value--" 646 function cuCodeEditor(container, options) {
647 $(
'<input data-bind="value:' + options.field +
'"/>')
650 dataTextField:
"cuName",
651 dataValueField:
"cuCode",
653 optionLabel:
"--Select Value--",
654 dataSource: cuCodeSource,
655 change:
function(e) {
656 var value = this.dataItem();
657 if ( value.cuName ) {
658 currEdit.cuName = value.cuName;
664 function cuEmpEditor(container, options) {
665 $(
'<input data-bind="value:' + options.field +
'"/>')
668 dataTextField:
"cuEmployee",
669 dataValueField:
"cuEmployee",
671 optionLabel:
"--Select--",
672 dataSource: cuEmployeeSource
676 function cuVendorEditor(container, options) {
677 $(
'<input data-bind="value:' + options.field +
'"/>')
680 dataTextField:
"cuVendor",
681 dataValueField:
"cuVendor",
683 optionLabel:
"--Select Vendor--",
684 dataSource: cuVendorSource
689 function onClickNextStatus(e) {
690 var dataItem = this.dataItem($(e.currentTarget).closest(
"tr"));
692 var request = { action:
"nextstatus", impid: dataItem.impid };
694 nextStatusDS.read( request );