17 $homecuSharedLibrary = dirname(__FILE__) .
"/../../shared/library";
19 $homecuMonitorLibrary = dirname(__FILE__) .
"/../../monitor/library";
20 $homecuMonitorScripts = dirname(__FILE__) .
"/../../monitor/scripts";
22 $importValues = Array();
25 $pageTitle =
'Build CU Menu';
30 require_once(
"$homecuMonitorLibrary/cu_top.i");
31 require_once(
"$homecuMonitorLibrary/ck_hticket.i");
32 require_once(
"$homecuMonitorLibrary/monitorView.i");
33 require_once(
"$homecuMonitorLibrary/cu_pass.i");
34 require_once(
"$homecuSharedLibrary/dms_imp_val.i");
35 require_once(
"$homecuSharedLibrary/cu_flagconst.i");
36 require_once(
"$homecuSharedLibrary/dms_imp_val.i");
40 $importFieldAry = Array (
41 "user_name" => array(
'filter' => FILTER_SANITIZE_STRING)
43 HCU_ImportVars($importValues,
'', $importFieldAry);
46 $importValues[
'cu'] = strtoupper($importValues[
'user_name']);
49 if (!CheckPerm($dbh, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
52 throw new ErrorException(
'permissions failed', 900);
56 $sql =
"SELECT count(*) as count FROM cuadmin WHERE cu = '" . prep_save($importValues[
'cu'], 10) .
"'; ";
57 $cntRs = db_query($sql, $dbh);
58 $cntRow = db_fetch_all($cntRs);
60 if ($cntRow[0][
'count'] == 0) {
62 throw new ErrorException(
'Unknown Credit Union', 901);
67 printMonitorPageTop($pageTitle, $homecuKendoVersion, $cloudfrontDomainName, $bootstrapVersion, $fontawesomeVersion,
true);
79 input[type=
"checkbox"] {
87 .local-indent .checkbox,
88 .local-indent .radio-
inline,
89 .local-indent .checkbox-
inline {
96 display:
inline-block;
100 color: rgba(0, 90, 210, 1);
103 color: rgba(22, 123, 57, .85);
106 text-overflow: unset !important;
109 display:
inline-block;
112 display:
inline-block;
119 .form-horizontal .radio,
120 .form-horizontal .checkbox,
121 .form-horizontal .radio-
inline,
122 .form-horizontal .checkbox-
inline {
125 .local-k-
template .local-k-edit-buttons {
128 border-width: 1px 0 0;
141 #local-menu-readonly { 142 color: rgba(224, 1, 1, .84);
149 display:
inline-block;
153 .local-error-text ul {
156 .local-error-text ul li {
160 display:
inline-block;
164 #localHideSubmitWait { 176 .local-menu-action.local-show {
184 div.h4 .local-tooltip,
185 label.h4 .local-tooltip {
201 @media (max-width: 991px) {
207 @media (min-width: 991px) {
208 .localSaveMenuDiv div {
215 printMonitorPageMiddle($pageTitle);
220 <div
id=
'localHideSubmitWait'>
221 <div
id=
'localSubmitWait' class=
'k-block' >
222 <div
class=
'k-loading-image'></div>
225 <div
id=
"page-contents">
226 <!-- Main Container -->
230 <div
class=
"container">
233 <div
class=
"local-menu-action localSaveMenuDiv"><div>
234 <a
class=
"" href=
"javascript:CancelMenuChanges();" >Cancel</a>
236 <button
class=
"k-button k-primary " type=
"submit" onclick=
"SaveMenu();"><span
class=
"fa fa-floppy-o"></span> Save Menu</button>
239 <!-- Action buttons -->
240 <div
class=
"row hcu-form-group-spacer">
241 <div
class=
"col-sm-7 col-md-8">
242 <div
id=
"formStatus" class=
"homecu-formStatus k-block k-error-colored" style=
"display:none;"></div>
247 <!-- Data Table / Properties -->
250 <div
class=
"col-xs-12">
254 <div
class=
"hcu-no-td-border" id=
"menu-grid"></div>
257 </div> <!-- container -->
258 </div> <!-- page-contents -->
262 printMonitorPageBottom();
268 var window_stack = [];
270 var dataSettingsPlatforms = [],
271 dataSettingsIcons = [],
272 dataSettingsFeatures = [],
273 dataSettingsScripts = [],
274 dataSettingsLang = [{en_US:
true}],
286 displayLangCode =
'en_US',
290 $(document).ready(
function() {
292 $(
".local-menu-action").appendTo(
"body");
298 var dsSettings =
new kendo.data.DataSource({
302 url:
'mFeatureMnu.data',
304 contentType:
'application/json',
306 api_action:
'settings',
307 cu:
'<?php echo $importValues['cu
']; ?>' 314 parse:
function(response) {
315 responsePass =
false;
320 returnData = response.Results[0];
322 returnData = [{homecuErrors:
"Error Parsing Result From Server"}];
326 errors:
function (response) {
327 responsePass =
false;
331 if (response.homecuErrors) {
332 if (response.homecuErrors.length > 0) {
333 return response.homecuErrors;
337 if (!response.homecuData) {
338 throw "Error Parsing Result From Server";
345 requestStart:
function(response) {
348 requestEnd:
function(response) {
351 data:
function (response) {
353 var returnData = Array();
356 if (response.homecuData) {
358 dataSettingsPlatforms = (response.homecuData.menuplatforms ? response.homecuData.menuplatforms : []);
359 dsPlatforms.data(dataSettingsPlatforms);
362 dataSettingsIcons = (response.homecuData.menuicons ? response.homecuData.menuicons : []);
363 dsIcons.data(dataSettingsIcons);
366 dataSettingsFeatures = (response.homecuData.features ? response.homecuData.features : []);
367 dsFeatureList.data(dataSettingsFeatures);
370 dataSettingsScripts = (response.homecuData.scripts ? response.homecuData.scripts : []);
371 dsScriptList.data(dataSettingsScripts);
373 dataSettingsLang = (response.homecuData.lang ? response.homecuData.lang : dataSettingsLang);
377 returnData = response.homecuData;
380 throw "Error Parsing Result From Server";
394 error:
function(error) {
401 dsFeatureMenu =
new kendo.data.DataSource({
407 url:
'mFeatureMnu.data',
409 contentType:
'application/json',
412 cu:
'<?php echo $importValues['cu
']; ?>' 416 url:
'mFeatureMnu.data?cu=<?php echo $importValues['cu
']; ?>',
417 contentType:
"application/x-www-form-urlencoded",
419 api_action:
'update',
420 cu:
'<?php echo $importValues['cu
']; ?>',
429 url:
'mFeatureMnu.data?cu=<?php echo $importValues['cu
']; ?>',
431 api_action:
'ignore',
432 cu:
'<?php echo $importValues['cu
']; ?>' 440 parameterMap:
function(data, type) {
443 if (type ==
'update') {
444 var setData = {cu: data.cu, api_action: data.api_action, data_deleted: kendo.stringify(dsFeatureMenu.destroyed()), data_updated: kendo.stringify(data.models)};
446 }
else if (type ==
'read') {
448 }
else if (type ==
'destroy') {
449 return {cu: data.cu, api_action: data.api_action};
458 requestStart:
function(e) {
459 if (e.type !=
'read' && e.type !=
'update') {
466 requestEnd:
function(response) {
471 parse:
function(response) {
472 responsePass =
false;
477 returnData = response.Results[0];
484 returnData = [{homecuErrors:
"Error Parsing Result From Server"}];
488 errors:
function(response) {
489 responsePass =
false;
493 if (response.homecuErrors) {
494 if (response.homecuErrors.length > 0) {
496 return response.homecuErrors;
500 if (!response.homecuData) {
501 throw "Error Parsing Result From Server";
508 data:
function(response) {
510 var returnData = Array();
513 if (response.homecuData) {
514 if (response.homecuData.featuremenu) {
516 returnData = response.homecuData.featuremenu;
517 }
else if (response.homecuData.featuresave) {
524 $.homecuValidator.displayMessage(response.homecuData.status, $.homecuValidator.settings.statusInfo);
526 if (response.homecuData.featuresave.updateId) {
527 UpdateRecordId(response.homecuData.featuresave.updateId);
530 }
else if (response.homecuData.featureignore) {
537 throw "Error Parsing Result From Server";
551 parentId:
"ParentId",
554 MenuItemId: { type:
"number", nullable:
false },
555 GridOrder: { type:
"number", nullable:
false },
556 Cu: { type:
"string"},
557 DisplayOrder: { type:
"number" },
558 FeatureCode: { type:
"string" },
559 FeatureDesc: { type:
"string" },
560 ParentId: { nullable:
true, type:
"number" },
561 MenuItemType: { type:
"string" },
562 MenuItemAttr: { type:
"string" },
563 details_platform_dsk: { type:
"boolean" },
564 details_platform_mbl: { type:
"boolean" },
565 details_platform_app: { type:
"boolean" },
566 details_display_en_US: { type:
"string" },
567 details_display_es_US: { type:
"string" },
568 details_display_pl_US: { type:
"string" },
569 details_fa_icon: { type:
"string" },
570 details_href: { type:
"string" },
571 details_hrefUrlQuery: { type:
"number" },
572 details_target: { type:
"number" },
573 details_message: { type:
"number" },
574 details_hrefExtraParam: { type:
"string" },
575 details_collapse_group: { type:
"boolean" },
576 details_memacct_filter: { type:
"string"}
580 change:
function(e) {
581 if (!this.dataLoading) {
586 dsFeatureMenu.dataLoading =
false;
589 error:
function(error) {
592 $.homecuValidator.displayMessage(error.errors, $.homecuValidator.settings.statusError);
595 $.homecuValidator.displayMessage(
"Unknown Error", $.homecuValidator.settings.statusError);
598 sort: { field:
"GridOrder", dir:
"asc" },
604 dsFeatureList =
new kendo.data.DataSource({
605 data: dataSettingsFeatures,
606 sort: {field:
'description', dir:
'asc'}
608 dsScriptList =
new kendo.data.DataSource({
609 data: dataSettingsScripts,
610 sort: {field:
'description', dir:
'asc'}
612 dsPlatforms =
new kendo.data.DataSource({
613 data: dataSettingsPlatforms
615 dsIcons =
new kendo.data.DataSource({
616 data: dataSettingsIcons
624 menuItemGrid = $(
'#menu-grid').kendoGrid({
626 dataSource: dsFeatureMenu,
628 toolbar: kendo.template($(
'#header-treelist').html()),
631 template: kendo.template($(
'#edit-detail-row').html())
633 rowTemplate: kendo.template($(
"#menu-row").html()),
634 change:
function(e) {
637 saveChanges:
function(e) {
644 { title:
'', width:10 },
645 { title:
'', width:20 },
646 { field:
'details_display_en_US', title:
"Display", width:
"25%" },
647 { field:
'FeatureCode', title:
"Applied Feature", width:
"25%" },
648 { field:
'Cu', title:
"Link Detail" }
650 }).data(
'kendoGrid');
658 $(
'#menu-grid').kendoSortable({
659 filterDONOTUSE:
"tbody>tr.local-tr-grab",
666 var dataItem = menuItemGrid.dataSource.getByUid(e[0].dataset.uid);
667 if (dataItem.MenuItemType !== undefined) {
668 itemType = dataItem.MenuItemType;
678 itemHint =
"Menu Group";
681 itemHint =
"Top Link";
688 itemHint =
"<span style='font-weight: 700; color: blue;margin-right :20px;'>" + itemHint +
"</span>";
690 return $(
"<span></span>")
691 .html(itemHint +
" <i class='fa fa-ellipsis-v'></i> " + $(e).children(
'td')[2].innerHTML)
692 .css(
"color",
"rgba(0, 0, 0, .8)")
693 .css(
'margin-left',
'-60px');
696 placeholder:
function(element) {
697 return element.clone().css({
699 "border":
"1px dashed #000000" 707 var dataItem = menuItemGrid.dataSource.getByUid(e.item.data(
"uid"));
710 if (dataItem.MenuItemId === -9999 || dsFeatureMenu.filter() !== undefined) {
720 menuView = dsFeatureMenu.view(),
725 oldIndex = e.oldIndex,
726 newIndex = e.newIndex,
727 data = menuItemGrid.dataSource.data(),
728 dataItem = menuItemGrid.dataSource.getByUid(e.item.data(
"uid"));
730 var moveParentId = dataItem.MenuItemId;
740 if (dataItem.ParentId ===
null && dataItem.MenuItemType ===
'H') {
748 if (newIndex === (menuView.length - 1)) {
753 if (oldIndex < newIndex) {
755 childDataItem = menuView[newIndex + 1];
758 childDataItem = menuView[newIndex ];
761 if (childDataItem.ParentId !==
null) {
770 for (childLoopIdx = oldIndex + 1; oldIndex < menuView.length - 1; childLoopIdx++) {
772 childDataItem = menuView[childLoopIdx];
774 if (childIdxStart === undefined && childDataItem.ParentId === moveParentId) {
776 childIdxStart = childLoopIdx;
777 }
else if (childDataItem.ParentId !== moveParentId) {
783 if (childIdxStart !== undefined) {
786 childIdxEnd = childLoopIdx - 1;
790 if (oldIndex < newIndex) {
794 for ( childLoopIdx = childIdxEnd; childLoopIdx >= childIdxStart; childLoopIdx--) {
796 childDataItem = menuView[childLoopIdx];
797 alterIdx = newIndex - (childIdxEnd - childLoopIdx);
799 childDataItem.GridOrder = alterIdx;
800 childDataItem.dirty =
true;
804 dataItem.GridOrder = newIndex - (childIdxEnd - childIdxStart) - 1;
808 var lastMoveChild = oldIndex + (childIdxEnd - childIdxStart + 1);
809 for (childLoopIdx = newIndex; childLoopIdx > lastMoveChild; childLoopIdx--) {
810 childDataItem = menuView[childLoopIdx];
811 alterIdx = childLoopIdx - (childIdxEnd - childIdxStart);
813 childDataItem.GridOrder = childDataItem.GridOrder - (newIndex - dataItem.GridOrder + 1);
814 childDataItem.dirty =
true;
822 for (childLoopIdx = childIdxStart; childLoopIdx <= childIdxEnd; childLoopIdx++) {
823 childDataItem = menuView[childLoopIdx];
824 alterIdx = newIndex + (childLoopIdx - childIdxStart) + 1;
826 childDataItem.GridOrder = alterIdx;
827 childDataItem.dirty =
true;
830 dataItem.GridOrder = newIndex;
833 var alterListEnd = oldIndex + (childIdxEnd - childIdxStart) + 1;
834 alterListEnd = (alterListEnd > menuView.length - 1 ? menuView.length - 1: alterListEnd);
835 alterListEnd = oldIndex;
837 for (childLoopIdx = newIndex; childLoopIdx < alterListEnd; childLoopIdx++) {
839 childDataItem = menuView[childLoopIdx];
842 alterIdx = (childIdxEnd - childIdxStart) + 2;
843 childDataItem.GridOrder = childDataItem.GridOrder + alterIdx;
844 childDataItem.dirty =
true;
857 }
else if (dataItem.ParentId ===
null && dataItem.MenuItemType ===
'S') {
866 if (newIndex === (menuView.length - 1)) {
871 if (oldIndex < newIndex) {
873 childDataItem = menuView[newIndex + 1];
876 childDataItem = menuView[newIndex ];
879 if (childDataItem.ParentId !==
null) {
888 dataItem.GridOrder = newIndex;
889 dataItem.dirty =
true;
891 if (newIndex > oldIndex) {
893 for (childLoopIdx = newIndex; childLoopIdx > oldIndex; childLoopIdx--) {
894 childDataItem = menuView[childLoopIdx];
895 childDataItem.GridOrder = childDataItem.GridOrder - 1;
896 childDataItem.dirty =
true;
900 for (childLoopIdx = newIndex; childLoopIdx < oldIndex; childLoopIdx++) {
901 childDataItem = menuView[childLoopIdx];
902 childDataItem.GridOrder = childDataItem.GridOrder + 1;
903 childDataItem.dirty =
true;
912 if (newIndex === (menuView.length - 1)) {
917 if (oldIndex < newIndex) {
919 childDataItem = menuView[newIndex + 1];
922 childDataItem = menuView[newIndex ];
925 if (childDataItem.ParentId ===
null) {
930 groupParentId = childDataItem.ParentId;
936 dataItem.GridOrder = newIndex;
937 dataItem.ParentId = groupParentId;
938 dataItem.dirty =
true;
940 if (newIndex > oldIndex) {
942 for (childLoopIdx = newIndex; childLoopIdx > oldIndex; childLoopIdx--) {
943 childDataItem = menuView[childLoopIdx];
944 childDataItem.GridOrder = childDataItem.GridOrder - 1;
945 childDataItem.dirty =
true;
949 for (childLoopIdx = newIndex; childLoopIdx < oldIndex; childLoopIdx++) {
950 childDataItem = menuView[childLoopIdx];
951 childDataItem.GridOrder = childDataItem.GridOrder + 1;
952 childDataItem.dirty =
true;
960 menuItemGrid.dataSource.sort({field:
"GridOrder", dir:
"asc"});
962 menuItemGrid.refresh();
964 RenumberDisplayOrder();
965 menuItemGrid.refresh();
970 kendo.alert(err,
'Unable to complete request');
979 editMenuItem = kendo.observable({
981 localdsIcons: dsIcons,
982 localdataSettingsLang: dataSettingsLang,
983 localdsFeatureList: dsFeatureList,
984 localdsScriptList: dsScriptList,
985 sourceMenu: dsFeatureMenu,
991 checkMenuGroupItem:
false,
993 setSelectedItem:
function(newSelectedItem) {
995 var cloneItem = JSON.parse(JSON.stringify(newSelectedItem));
997 this.
set(
'sourceMenu', dsFeatureMenu);
999 this.
set(
'sourceItem', newSelectedItem);
1000 this.
set(
'data', cloneItem);
1002 this.
set(
'localdataSettingsLang', dataSettingsLang);
1005 this.
set(
'isUpdate', (newSelectedItem.MenuItemId > 0));
1006 this.
set(
'hasChanges',
false);
1007 this._UpdateBtnText();
1011 if ($(
'#menu-platforms').val() ==
'D' || $(
'#menu-platforms').val() ==
'M') {
1012 $(
'#lnkDelete').hide();
1014 $(
'#lnkDelete').show();
1018 if (newSelectedItem.details_target === 1) {
1019 $(
'#detailsExtMsg').removeAttr(
"disabled");
1021 $(
'#detailsExtMsg').attr(
"disabled",
true);
1025 _UpdateBtnText:
function () {
1026 retHtml =
'<span class="fa fa-check"></span> Update';
1028 this.
set(
'updateBtnText', retHtml);
1030 change:
function() {
1031 this.
set(
'hasChanges',
true);
1032 this._UpdateBtnText();
1034 if (this.hasChanges) {
1038 changeIcon:
function() {
1046 return !this.isUpdate;
1050 ShowLang:
function(langCodes) {
1052 switch (langCodes) {
1056 return this.localdataSettingsLang.es_US;
1058 return this.localdataSettingsLang.pl_US;
1064 setShowIcon:
function() {
1065 $(
'#showIcon').removeClass();
1067 $(
'#showIcon').addClass(
'fa');
1068 $(
'#showIcon').addClass(
'fa-' + this.data.details_fa_icon);
1069 $(
'#showIcon').addClass(
'fa-2x');
1074 MenuType:
function() {
1075 var showSection = (this.data.MenuItemType ===
'S');
1077 $(
'#detailsUrlSetup').show();
1079 $(
'#detailsUrlSetup').hide();
1089 $.homecuValidator.setup({formStatusField:
'formStatus'});
1091 windowTemplate.close();
1093 itemSave:
function(e) {
1100 if (!this.hasChanges) {
1110 if ($.homecuValidator.homecuValidate) {
1113 if (errors.length > 0) {
1116 $.homecuValidator.homecuResetMessage = $.homecuValidator.homecuValidate;
1117 $.homecuValidator.displayMessage(errors, $.homecuValidator.settings.statusError);
1118 $.homecuValidator.homecuResetMessage =
true;
1119 $.homecuValidator.homecuValidate =
false;
1125 this.sourceItem.details_platform_dsk = this.data.details_platform_dsk;
1126 this.sourceItem.details_platform_mbl = this.data.details_platform_mbl;
1127 this.sourceItem.details_platform_app = this.data.details_platform_app;
1129 this.sourceItem.details_collapse_group = this.data.details_collapse_group;
1132 this.sourceItem.details_display_en_US = this.data.details_display_en_US;
1133 if (this.data.details_display_es_US) {
1134 this.sourceItem.details_display_es_US = this.data.details_display_es_US;
1136 if (this.data.details_display_pl_US) {
1137 this.sourceItem.details_display_pl_US = this.data.details_display_pl_US;
1139 this.sourceItem.FeatureCode = this.data.FeatureCode;
1140 this.sourceItem.details_target = (this.data.details_target ? 1 : 0);
1141 this.sourceItem.details_message = (this.data.details_message ? 1 : 0);
1144 this.sourceItem.details_href = this.data.details_href;
1146 this.sourceItem.details_hrefUrlQuery = (this.data.details_hrefUrlQuery ? 1 : 0);
1147 this.sourceItem.details_hrefExtraParam = this.data.details_hrefExtraParam;
1148 this.sourceItem.details_fa_icon = this.data.details_fa_icon;
1150 this.sourceItem.details_memacct_filter = this.data.details_memacct_filter;
1152 this.sourceItem.dirty =
true;
1155 menuItemGrid.refresh();
1161 itemCancel:
function(e) {
1164 if (this.hasChanges) {
1168 var cancelMsg =
"Changes have been made to the menu item.</br>Do you wish to discard your changes?";
1169 actionDialog = $(
"<div id='confirmDialog'></div>")
1173 title:
"Discard Changes?",
1174 close:
function(e) {
1179 action:
function(e) {
1185 action:
function(e) {
1189 menuItemGrid.refresh();
1192 editMenuItem.CloseMe();
1195 }).data(
"kendoDialog");
1198 window_stack.push(
function(e) {
1199 actionDialog.close(e);
1209 itemDelete:
function(e) {
1213 if (this.data.MenuItemType ===
'H') {
1214 deleteMsg =
"Deleting this menu group will also delete all links in the group.<br/>Are you sure you wish to continue?";
1216 deleteMsg =
"Deleting this menu item can not be undone.<br/>Are you sure you wish to continue?";
1222 actionDialog = $(
"<div id='confirmDialog'></div>")
1226 title:
"Delete Menu Option?",
1229 close:
function(e) {
1234 action:
function(e) {
1241 action:
function(e) {
1245 childId = editMenuItem.data.GridOrder,
1247 removeParentId = editMenuItem.data.MenuItemId,
1251 if (editMenuItem.data.MenuItemType ===
'H') {
1255 for (childLoopIdx = dsFeatureMenu.view().length - 1; childLoopIdx >= childId; childLoopIdx--) {
1256 childDataItem = dsFeatureMenu.view()[childLoopIdx];
1257 if (childDataItem.ParentId === removeParentId || childDataItem.MenuItemId === removeParentId) {
1259 dsFeatureMenu.remove(childDataItem);
1268 dsFeatureMenu.remove(editMenuItem.sourceItem);
1272 for (childLoopIdx = childId; childLoopIdx < dsFeatureMenu.view().length; childLoopIdx++) {
1273 childDataItem = dsFeatureMenu.view()[childLoopIdx];
1274 childDataItem.GridOrder = childDataItem.GridOrder - childItemCount;
1275 childDataItem.DisplayOrder = (childDataItem.DisplayOrder ===
null ? childDataItem.DisplayOrder : childDataItem.DisplayOrder - childItemCount);
1276 childDataItem.dirty =
true;
1280 menuItemGrid.refresh();
1283 editMenuItem.CloseMe();
1286 $.homecuValidator.setup({formStatusField:
'formStatus'});
1291 }).data(
'kendoDialog');
1292 window_stack.push(
function(e) {
1293 actionDialog.close(e);
1297 showEditForm:
function() {
1303 $(
"#menu-platforms").kendoDropDownList({
1304 dataSource: dsPlatforms,
1305 dataTextField:
'display',
1306 dataValueField:
'code',
1307 change:
function(e) {
1309 var curValue = this.value();
1312 dsFeatureMenu.filter({field:
'details_platform_dsk',
operator:
'eq', value:
true});
1313 $(
'#local-menu-readonly').show();
1316 dsFeatureMenu.filter({field:
'details_platform_mbl',
operator:
'eq', value:
true});
1317 $(
'#local-menu-readonly').show();
1320 dsFeatureMenu.filter({field:
'details_platform_app',
operator:
'eq', value:
true});
1321 $(
'#local-menu-readonly').show();
1324 dsFeatureMenu.filter({});
1325 $(
'#local-menu-readonly').hide();
1330 $(
'#x-featureList').kendoDropDownList({
1331 dataSource: dsFeatureList,
1332 dataTextField:
'description',
1333 dataValueField:
'featurecode',
1334 optionLabel:
'Select Related Feature...' 1336 $(
'#x-scriptList').kendoComboBox({
1337 dataSource: dsScriptList,
1338 dataTextField:
'screenname',
1339 dataValueField:
'screenname',
1340 template:
'<span class="k-state-default">#: data.description #</span>',
1344 $(
'#menu-grid').on(
'click',
'tbody>tr td.local-add-menu-item .local-add-link',
function() {
1346 newUid = AddNewMenuItem(0,
null,
null);
1348 if (newUid !== undefined) {
1349 ShowEditDialog(newUid);
1352 $(
'#menu-grid').on(
'click',
'tbody>tr td.local-add-menu-item .local-add-group',
function() {
1355 newUid = AddNewMenuItem(2,
null,
null);
1357 if (newUid !== undefined) {
1358 ShowEditDialog(newUid);
1362 $(
'#menu-grid').on(
'click',
'tbody>tr td.local-add-item',
function() {
1363 var dataUid = $(
this).parent().data(
'uid'),
1364 dataItem = dsFeatureMenu.getByUid(dataUid),
1367 newUid = AddNewMenuItem(1, dataItem.GridOrder, dataItem.ParentId);
1370 if (newUid !== undefined) {
1371 ShowEditDialog(newUid);
1375 $(
'#menu-grid').on(
'dblclick',
'tbody>tr.local-tr-grab td:nth-child(1n+2)',
function(e) {
1379 var dataUid = $(
this).parent().data(
'uid');
1381 ShowEditDialog(dataUid);
1386 editTemplate = kendo.template($(
'#edit-detail-row').html());
1388 windowTemplate = $(
'#windowTemplate').kendoWindow({
1399 }).data(
'kendoWindow');
1404 dsSettings.fetch(
function() {
1407 dsFeatureMenu.dataLoading =
true;
1409 dsFeatureMenu.fetch(
function () {
1410 if (CheckDirtyFlag()) {
1413 dsFeatureMenu.dataLoading =
false;
1417 $.homecuValidator.setup({formStatusField:
'formStatus'});
1421 $(
'#detailsNewWin').change(
function() {
1423 $(
'#detailsExtMsg').removeAttr(
"disabled");
1425 $(
'#detailsExtMsg').attr(
"disabled",
true);
1426 $(
'#detailsExtMsg').prop(
"checked",
false);
1427 $(
'#detailsExtMsg').trigger(
"change");
1435 $(document).on(
"click",
".k-overlay",
function (e) {
1436 if(window_stack.length > 0) {
1438 fN = window_stack[window_stack.length - 1];
1444 function ShowEditDialog(dataUid) {
1447 var dataItem = dsFeatureMenu.getByUid(dataUid);
1449 editMenuItem.setSelectedItem(dataItem);
1461 function AddNewMenuItem(menuType, GridOrder, menuParentId) {
1471 if (menuType === 0) {
1476 newGridOrder = dsFeatureMenu.view().length - 1;
1479 newDisplayOrder = FetchLastDisplayOrder() + 1;
1481 }
else if (menuType === 2) {
1486 newGridOrder = dsFeatureMenu.view().length - 1;
1489 newDisplayOrder = FetchLastDisplayOrder() + 1;
1490 newIcon =
'sitemap';
1493 }
else if (menuType === 3) {
1497 newGridOrder = GridOrder;
1503 newGridOrder = GridOrder;
1505 newDisplayOrder = dsFeatureMenu.view()[GridOrder-1].DisplayOrder + 1;
1510 if (menuType === 3) {
1511 newDefaultRow = {GridOrder : newGridOrder, DisplayOrder:
null, MenuItemId : -9999, ParentId : menuParentId};
1514 switch (newItemType) {
1516 defaultDisplay =
'New Menu Group';
1519 defaultDisplay =
'New Menu Item';
1522 defaultDisplay =
'New Child Item';
1524 newDefaultRow = {GridOrder : newGridOrder,
1525 MenuItemId : dsFeatureMenu.options.newItemId--,
1526 ParentId : menuParentId,
1527 Cu :
'<?php echo $importValues['cu
']; ?>',
1528 DisplayOrder : newDisplayOrder,
1530 MenuItemType : newItemType,
1531 details_platform_dsk:
true,
1532 details_platform_mbl:
true,
1533 details_platform_app:
false,
1534 details_collapse_group:
false,
1535 MenuItemPlatform : [
"M",
"D"],
1536 details_display_en_US : defaultDisplay,
1537 details_display_es_US :
'',
1538 details_display_pl_US :
'',
1539 details_fa_icon: newIcon,
1541 details_hrefUrlQuery : 0,
1543 details_message : 0,
1544 details_hrefExtraParam:
'' 1552 for (childLoopIdx = newGridOrder; childLoopIdx < dsFeatureMenu.view().length; childLoopIdx++) {
1553 childDataItem = dsFeatureMenu.view()[childLoopIdx];
1554 childDataItem.GridOrder = childDataItem.GridOrder + 1;
1555 childDataItem.DisplayOrder = (childDataItem.DisplayOrder ===
null ? childDataItem.DisplayOrder : childDataItem.DisplayOrder + 1);
1556 childDataItem.dirty =
true;
1560 menuItemGrid.dataSource.add(newDefaultRow).set(
'dirty',
true);
1563 if (menuItemGrid.dataSource.data()[menuItemGrid.dataSource.data().length - 1].uid) {
1564 newUid = menuItemGrid.dataSource.data()[menuItemGrid.dataSource.data().length - 1].uid;
1569 if (menuType === 2) {
1570 AddNewMenuItem(3, newGridOrder + 1, newDefaultRow.MenuItemId);
1575 menuItemGrid.refresh();
1581 function FetchLastDisplayOrder() {
1583 for (var idx = dsFeatureMenu.view().length -1; idx >= 0; idx--) {
1584 if (dsFeatureMenu.view()[idx].DisplayOrder !==
null) {
1586 return dsFeatureMenu.view()[idx].DisplayOrder;
1593 function DisplayUrlDetails(showSection) {
1595 $(
'#detailsUrlSetup').show();
1597 $(
'#detailsUrlSetup').hide();
1602 function OpenEditWindow() {
1604 $.homecuValidator.settings.formStatusField =
"formStatus";
1605 $.homecuValidator.hideMessage();
1606 $.homecuValidator.setup({formValidate:
"form-edit-template",
1607 validateOnClick:
'btnUpdate',
1608 formErrorTitle:
"Fix the following item(s):",
1609 formStatusField:
"editErrors",
1610 homecuCustomRules: {
1611 memfilter:
function(input) {
1612 if (!$(input).is(
"[name='acctFilter']"))
1615 var value= $(input).val().trim();
1619 if (!value.match(/^\S*$/)) <?php
1626 kendo.bind($(
'#windowTemplate'), editMenuItem);
1628 windowTemplate.center().open();
1630 window_stack.push(
function(e) {
1631 editMenuItem.itemCancel(e);
1634 function GetFeatureDesc(pFeatureCode) {
1636 var retFeatureDesc = pFeatureCode;
1638 $.each(dataSettingsFeatures,
function(idx, record) {
1639 if (record.featurecode === pFeatureCode) {
1640 retFeatureDesc = record.description;
1645 return retFeatureDesc;
1647 function SetLangOptions() {
1649 $.each(dataSettingsLang,
function(key, value) {
1651 if ($(
'#flag_link_' + key)) {
1652 $(
'#flag_link_' + key).show();
1656 function FilterLanguage(pLangCode) {
1659 $.each($(
'.local-table-flags .flag_icons'),
function() {
1660 $(
this).removeClass(
'active');
1663 $(
'.flag_icons_' + pLangCode).addClass(
'active');
1665 displayLangCode = pLangCode;
1667 menuItemGrid.refresh();
1670 function SaveMenu() {
1672 dsFeatureMenu.dataLoading =
true;
1673 dsFeatureMenu.sync();
1676 function RenumberDisplayOrder() {
1678 var lastDisplayOrder = 0;
1679 for (var childLoopIdx = 0; childLoopIdx < dsFeatureMenu.view().length; childLoopIdx++) {
1680 childDataItem = dsFeatureMenu.view()[childLoopIdx];
1682 if (childDataItem.MenuItemId !== -9999) {
1684 if (childDataItem.DisplayOrder !== lastDisplayOrder) {
1686 childDataItem.DisplayOrder = lastDisplayOrder;
1687 childDataItem.dirty =
true;
1693 function ShowWaitWindow(pMsg) {
1695 if (!submitWaitWindow) {
1696 $(
'#localSubmitWait').kendoWindow({
1707 submitWaitWindow = $(
"#localSubmitWait").data(
'kendoWindow');
1710 submitWaitWindow.center().open();
1712 function CloseWaitWindow() {
1713 if (submitWaitWindow) {
1714 submitWaitWindow.close();
1717 function CancelMenuChanges() {
1719 var cancelMsg =
"Changes have been made to the menu layout.</br>Do you wish to discard your changes?";
1720 actionDialog = $(
"<div id='confirmDialog'></div>")
1724 title:
"Discard Changes?",
1725 close:
function(e) {
1730 action:
function(e) {
1736 action:
function(e) {
1738 dsFeatureMenu.cancelChanges();
1740 menuItemGrid.refresh();
1744 }).data(
'kendoDialog');
1745 window_stack.push(
function(e) {
1746 actionDialog.close(e);
1750 function CheckDirtyFlag() {
1751 var dirtFound =
false;
1753 for (var childLoopIdx = 0; childLoopIdx < dsFeatureMenu.view().length; childLoopIdx++) {
1754 childDataItem = dsFeatureMenu.view()[childLoopIdx];
1756 if (childDataItem.MenuItemId < 0 && childDataItem.MenuItemId !== -9999) {
1757 childDataItem.dirty =
true;
1764 function UpdateRecordId(pIdList) {
1766 if (pIdList instanceof Object) {
1769 for (var childLoopIdx = 0; childLoopIdx < dsFeatureMenu.view().length; childLoopIdx++) {
1770 childDataItem = dsFeatureMenu.view()[childLoopIdx];
1772 if (pIdList[childDataItem.MenuItemId]) {
1774 childDataItem.MenuItemId = pIdList[childDataItem.MenuItemId];
1776 if (pIdList[childDataItem.ParentId]) {
1778 childDataItem.ParentId = pIdList[childDataItem.ParentId];
1780 childDataItem.dirty =
false;
1787 function ClearErrorMsgs() {
1788 var $dispMsgField = $(
'#local-error');
1790 $(
'#local-error-text').html(
'');
1792 $dispMsgField.hide();
1794 function ShowActionButton() {
1796 $(
'.local-menu-action').addClass(
'local-show');
1798 function HideActionButton() {
1800 $(
'.local-menu-action').removeClass(
'local-show');
1802 function ShowErrorMsgs(messages) {
1805 var $dispMsgField = $(
'#local-error');
1806 var objP = $(
'<p>Please Fix the following issue(s):<br/></p>');
1807 var objUl = $(
'<ul></ul>');
1809 if (typeof(messages) ===
'string') {
1811 if (messages !==
'') {
1812 var objLi = $(
'<li></li>');
1813 objLi.append(messages);
1814 objUl.append(objLi);
1816 }
else if (messages instanceof Object) {
1818 $.each(messages,
function(index, value) {
1821 var objLi = $(
'<li></li>');
1822 objLi.append(value);
1823 objUl.append(objLi);
1827 }
else if (messages instanceof Array) {
1829 $.each(messages,
function(index, value) {
1831 var objLi = $(
'<li></li>');
1832 objLi.append(value);
1833 objUl.append(objLi);
1838 $(
'#local-error-text').append(objP);
1839 $(
'#local-error-text').append(objUl);
1841 if (objUl.children().length > 0) {
1842 $dispMsgField.show();
1849 window.onbeforeunload =
function(e) {
1852 return "The menu has not been saved. Are you sure you want to leave the page?";
1857 <script
id=
"header-treelist" type=
"text/x-kendo-template">
1858 <input
id=
"menu-platforms" />
1859 <span
id=
"local-menu-readonly"><span
class=
"fa fa-ban"> Menu Locked</span></span>
1860 <div
class=
"local-table-flags">
1861 <a
id=
"flag_link_en_US" style=
"display:none;" href=
"javascript:FilterLanguage('en_US');" title=
"Display English Text"><div
class=
"flag_icons flag_icons_en_US active"></div></a>
1862 <a
id=
"flag_link_es_US" style=
"display:none;" href=
"javascript:FilterLanguage('es_US');" title=
"Display Spanish Text"><div
class=
"flag_icons flag_icons_es_US"></div></a>
1863 <a
id=
"flag_link_pl_US" style=
"display:none;" href=
"javascript:FilterLanguage('pl_US');" title=
"Display Polish Text"><div
class=
"flag_icons flag_icons_pl_US"></div></a>
1866 <script
id=
"href-template" type=
"text/x-kendo-template">
1867 <span
class=
"k-state-default">#: data.description #</span>
1869 <script
id=
"menu-row" type=
"text/x-kendo-template">
1870 <tr
class=
"# if (MenuItemId !== -9999) { # local-tr-grab # } #" data-local-parentid=
"#: data.ParentId #" data-uid=
"#: uid #">
1871 # if (data.MenuItemId) { # 1872 # if (MenuItemId === -9999) { # 1873 <td
class=
"local-td-col-1"><!--#: data.GridOrder # : #: data.DisplayOrder #--></td>
1874 # if (ParentId === null) { # 1875 <td role=
"gridcell" colspan=
"5" class=
"local-add-td-row local-add-menu-item" data-local-parentid=
"root"><span
class=
"local-add-group"><i
class=
"fa fa-plus"></i> New Menu Group</span> <span
class=
"local-add-link"><i
class=
"fa fa-plus"></i> New Menu Link</span></td>
1877 <td role=
"gridcell" colspan=
"5" class=
"local-add-td-row local-add-item" data-local-parentid=
"#: data.ParentId #"><span
class=
"local-no-icon"></span><i
class=
"fa fa-plus"></i> New Child Item</td>
1880 <td
class=
'local-td-col-1 local-td-grab'><!-- #: data.GridOrder # : #: data.DisplayOrder #--><i
class=
"fa fa-ellipsis-v"></i></td>
1881 <td
class=
'local-td-col-1 local-td-grab'><a href=
"javascript:ShowEditDialog('#= data.uid #')"><i
class=
"fa fa-pencil-square-o"></i></a></td>
1884 var displayValue =
'';
1885 switch (displayLangCode) {
1887 if (data.details_display_es_US) {
1888 displayValue = data.details_display_es_US;
1892 if (data.details_display_pl_US) {
1893 displayValue = data.details_display_pl_US;
1900 if (displayValue ===
'') {
1901 displayValue = data.details_display_en_US;
1904 # if (data.details_fa_icon) { # 1905 <td role=
"gridcell" class=
"local-menu-root"><i
class=
"fa fa-#: data.details_fa_icon # fa-fw"></i> #: displayValue #</td>
1907 <td role=
"gridcell"><span
class=
"local-no-icon"> #: displayValue #</span></td>
1909 <td role=
"gridcell">#: GetFeatureDesc(data.FeatureCode)
#</td> 1911 var lDetailLink =
'';
1913 if (data.MenuItemType !==
'H') {
1915 if (data.details_target) {
1917 lDetailLink = (data.details_target === 1 ?
'<span class="fa fa-external-link"></span> ' :
'') + lDetailLink;
1919 if (data.details_href) {
1920 lDetailLink += data.details_href;
1923 if (data.details_hrefUrlQuery) {
1924 lDetailLink += (data.details_hrefUrlQuery === 1 ?
"?cu=<?php echo $importValues['cu']; ?>" :
"");
1927 if (data.details_hrefExtraParam) {
1928 lDetailLink += (data.details_hrefExtraParam !==
'' ? paramSep + data.details_hrefExtraParam :
'');
1932 <td colspan=
"2" role=
"gridcell">#= lDetailLink #</td>
1935 <td colspan=6>No records</td>
1940 <script type=
"text/x-kendo-template" id=
"cboIcon-template">
1941 <span
class=
"k-state-default"><i
class=
"fa fa-#: data.icon_name # fa-fw"></i> #: data.icon_name #</span>
1943 <div
id=
'edit-detail-row'></div>
1944 <div
id=
"windowTemplate" style=
"display: none;" class=
"hcu-template" x-type=
"text/x-kendo-template">
1945 <div
id=
'editErrors' style=
"display: none"></div>
1946 <form
id=
"form-edit-template" name=
"form-edit-template">
1948 <div
id=
"local-detail-list" class=
" ">
1949 <div data-bind=
"visible: data.MenuItemType === 'H'">
1950 <div
class=
"h4">Menu Group</div>
1952 <div data-bind=
"visible: data.MenuItemType === 'D'">
1953 <div
class=
"h4">Menu Group Link</div>
1955 <div data-bind=
"visible: data.MenuItemType === 'S'">
1956 <div
class=
"h4">Menu Link</div>
1959 <!-- Properties Well -->
1960 <div
class=
"form-horizontal well well-sm">
1962 <div
class=
"h4">View On <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"local-tooltip" title=
"Select the platforms that will show this menu item."><i
class=
"fa fa-question-circle-o"></i></span></div>
1963 <div
class=
"form-group hcu-form-group-spacer">
1964 <div
class=
"local-indent">
1965 <label
class=
"checkbox-inline">
1966 <input type=
"checkbox" id=
"platformDsk" name=
"platformDsk" value=
"1" data-bind=
"checked: data.details_platform_dsk, events: {change: change}"> Desktop
1968 <label
class=
"checkbox-inline">
1969 <input type=
"checkbox" id=
"platformMbl" name=
"platformMbl" value=
"1" data-bind=
"checked: data.details_platform_mbl, events: {change: change}"> Mobile Web
1971 <label
class=
"checkbox-inline">
1972 <input type=
"checkbox" id=
"platformApp" name=
"platformApp" value=
"1" data-bind=
"checked: data.details_platform_app, events: {change: change}"> App
1975 </div> <!-- form-group checkboxes -->
1977 <div
class=
"h4">Display</div>
1978 <div data-bind=
"visible: data.MenuItemType !== 'D'">
1979 <div
class=
"form-group hcu-form-group-spacer">
1980 <div
class=
"local-indent">
1981 <label
class=
"col-xs-12" for=
"scriptList">Menu Icon <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"Select the icon name from the list, or enter the font-awesome icon name."><i
class=
"fa fa-question-circle-o"></i></span></label>
1982 <div
class=
"col-xs-12">
1985 data-role=
'combobox' 1986 data-
template=
"cboIcon-template" 1987 data-text-field=
"icon_name" 1988 data-value-field=
"icon_name" 1989 data-placeholder=
"Select Icon..." 1991 source: localdsIcons, 1992 value: data.details_fa_icon, 1993 events: {change: changeIcon} 1996 <span
id=
'showIcon' class=
"fa fw" ></span>
1999 </div> <!-- ICON -->
2001 <div data-bind=
"visible: data.MenuItemType === 'H'">
2002 <div
class=
"form-group hcu-form-group-spacer">
2003 <div
class=
"local-indent">
2004 <label
class=
"checkbox-inline">
2005 <input type=
"checkbox" id=
"platformCollapseGroup" name=
"platformCollapseGroup" value=
"1" data-bind=
"checked: data.details_collapse_group, events: {change: change}">
2007 <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"By default the menu group will be expanded on the banking side. Select this option to collapse the group instead."><i
class=
"fa fa-question-circle-o"></i></span>
2010 </div> <!-- collapse group checkbox -->
2012 <div data-bind=
"visible: ShowLang('en_US')">
2013 <div
class=
"form-group hcu-form-group-spacer">
2014 <div
class=
"local-indent">
2015 <label
class=
"col-xs-12" for=
"en_US">English <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"Enter the text to display for the English language."><i
class=
"fa fa-question-circle-o"></i></span></label>
2016 <div
class=
"col-xs-12">
2017 <input
id=
"en_US" name=
"en_US" data-bind=
"value: data.details_display_en_US, events: {change: change}" data-placeholder=
"English Display Value" type=
"text" class=
"k-textbox k-autocomplete hcu-all-100" required validationMessage=
"Enter English Display" autocomplete=
"off"/>
2020 </div> <!-- Language Entry -->
2022 <div
id=
'lang_es_US' style-x=
"display:none;" data-bind=
"visible: ShowLang('es_US')">
2023 <div
class=
"form-group hcu-form-group-spacer">
2024 <div
class=
"local-indent">
2025 <label
class=
"col-xs-12" for=
"es_US">Spanish <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"Enter the text to display for the Spanish language."><i
class=
"fa fa-question-circle-o"></i></span></label>
2026 <div
class=
"col-xs-12">
2027 <input
id=
"es_US" name=
"es_US" data-bind=
"value: data.details_display_es_US, events: {change: change}" data-placeholder=
"Spanish Display Value" type=
"text" class=
"k-textbox k-autocomplete hcu-all-100" validationMessage=
"Enter Spanish Display" autocomplete=
"off"/>
2030 </div> <!-- Language Entry -->
2032 <div
id=
'lang_pl_US' style-x=
"display:none;" data-bind=
"visible: ShowLang('pl_US')">
2033 <div
class=
"form-group hcu-form-group-spacer">
2034 <div
class=
"local-indent">
2035 <label
class=
"col-xs-12" for=
"pl_US">Polish <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"Enter the text to display for the Polish language."><i
class=
"fa fa-question-circle-o"></i></span></label>
2036 <div
class=
"col-xs-12">
2037 <input
id=
"pl_US" name=
"pl_US" data-bind=
"value: data.details_display_pl_US, events: {change: change}" data-placeholder=
"Polish Display Value" type=
"text" class=
"k-textbox k-autocomplete hcu-all-100" validationMessage=
"Enter Polish Display" autocomplete=
"off"/>
2040 </div> <!-- Language Entry -->
2042 <div
id=
'detailsUrlSetup' data-bind=
"visible: data.MenuItemType !== 'H'">
2043 <div
class=
"form-group hcu-form-group-spacer">
2044 <div
class=
"local-indent">
2045 <label
class=
"h4" for=
"featureList">Applied Feature <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"local-tooltip" title=
"Select the feature in which the user must have permission to see this item. Not selecting a feature will result in the menu item always being available."><i
class=
"fa fa-question-circle-o"></i></span></label>
2046 <div
class=
"col-xs-12">
2047 <input
id=
"featureList" 2050 data-role=
"dropdownlist" 2051 data-text-field=
"description" 2052 data-value-field=
"featurecode" 2053 data-option-label=
"Select Related Feature..." 2055 source: localdsFeatureList, 2056 value: data.FeatureCode, 2057 events: {change: change} 2062 </div> <!-- Applied Feature -->
2063 <div
class=
"h4">Details</div>
2064 <div
class=
"form-group hcu-form-group-spacer">
2065 <div
class=
"local-indent">
2066 <label
class=
"checkbox-inline">
2067 <input type=
"checkbox" id=
"detailsNewWin" name=
"detailsNewWin" data-bind=
"checked: data.details_target, events: {change: change}" value=
"1">
2068 Open in New Window <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"Select this option to open a new window to display the content."><i
class=
"fa fa-question-circle-o"></i></span>
2071 <div
class=
"local-indent">
2072 <label
class=
"checkbox-inline">
2073 <input type=
"checkbox" id=
"detailsExtMsg" name=
"detailsExtMsg" data-bind=
"checked: data.details_message, events: {change: change}" value=
"1" >
2074 Show External Message <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"Select this option to display the external message when opening in a new window: 2075 ''Please be aware that by clicking this link, your current Digital Banking session will end and you will be viewing content from another website. We encourage you to be aware of all privacy practices before giving information about yourself.''"><i
class=
"fa fa-question-circle-o"></i></span>
2078 </div> <!-- form-group menu group -->
2079 <div
class=
"form-group hcu-form-group-spacer">
2080 <div
class=
"local-indent">
2081 <label
class=
"col-xs-12" for=
"scriptList">URL Address <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"Select the Home Banking script or enter a URL for this item."><i
class=
"fa fa-question-circle-o"></i></span></label>
2082 <div
class=
"col-xs-12">
2083 <input
id=
"scriptList" 2084 name=
"scriptList" class=
"hcu-all-100" 2085 data-role=
"combobox" 2086 data-text-field=
"screenname" 2087 data-value-field=
"screenname" 2088 data-
template=
'href-template' 2090 source: localdsScriptList, 2091 value: data.details_href, 2092 events: {change: change} 2096 </div> <!-- Screen Address -->
2098 <div
class=
"form-group">
2099 <div
class=
"local-indent">
2100 <label
class=
"checkbox-inline">
2101 <input type=
"checkbox" id=
"details_auth" name=
"details_auth" data-bind=
"checked: data.details_hrefUrlQuery, events: {change: change}" value=
"1">
2102 Append CU Info <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"Select this option to append the CU information on the URL address. ie cu=XYZ"><i
class=
"fa fa-question-circle-o"></i></span>
2105 </div> <!-- form-group menu group -->
2106 <div
class=
"form-group hcu-form-group-spacer">
2107 <div
class=
"local-indent">
2108 <label
class=
"col-xs-12" for=
"addtlParam">Additional URL Query <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" class=
"" title=
"Add any extra parameters to the URL here. ie one=sampe&two=fields"><i
class=
"fa fa-question-circle-o"></i></span></label>
2109 <div
class=
"col-xs-12">
2110 <input
id=
"addtlParam" name=
"addtlParam" placeholder=
"key=value&key=value" type=
"text" class=
"k-textbox k-autocomplete hcu-all-100" data-bind=
"value: data.details_hrefExtraParam, events: {change: change}" validationMessage=
"Additional URL Query Parameters" autocomplete=
"off"/>
2115 <div
class=
"form-group hcu-form-group-spacer">
2116 <div
class=
"local-indent">
2117 <label
class=
"col-xs-12" for=
"acctFilter">Username Filter <span data-role=
"tooltip" data-position=
"top" data-
auto-hide=
"true" 2118 title=
"App Menu Link Options. Leave blank to allow for all, or enter a comma separated list of usernames (no spaces)."><i
class=
"fa fa-question-circle-o"></i></span></label>
2119 <div
class=
"col-xs-12">
2120 <input
id=
"acctFilter" name=
"acctFilter" placeholder=
"name1,name2,etc." type=
"text" class=
"k-textbox k-autocomplete hcu-all-100" 2121 data-bind=
"value: data.details_memacct_filter, events: {change: change}" validationMessage=
"Invalid Username filter" autocomplete=
"off"/>
2127 </div> <!-- form-
inline -->
2128 </div> <!-- well -->
2131 <div
class=
"hcu-edit-buttons k-state-default">
2132 <span
class=
"hcu-icon-delete">
2133 <a
id=
'lnkDelete' class=
"" href=
"##" data-bind=
"events: { click: itemDelete }" ><i
class=
"fa fa-trash-o fa-lg"></i></a>
2135 <a
id=
'lnkCancel' class=
"" href=
"##" data-bind=
"events: { click: itemCancel }">Cancel</a>
2137 <a
id=
"btnUpdate" class=
"k-button k-primary " href=
"" data-bind=
"html: updateBtnText, events: {click: itemSave }"></a>
2146 }
catch (ErrorException $e) {
2148 switch ($e->getCode()) {
2150 header(
"Location: /hcuadm/hcu_noperm.prg");
2154 $url =
"/hcuadm/cuinfoedit.prg?user_name=" . filter_var($importValues[
'cu'], FILTER_UNSAFE_RAW);
2155 echo
"<p>Exception encountered, code: {$e->getCode()}, message: {$e->getMessage()} 2156 (Did you <a href=\"$url\">fully run CU set?</a>)</p>";
2159 echo
"<p>Unidentified exception encountered, message: {$e->getMessage()}</p>";