From 6b05ee31ab76e7cc53bd99c315bb0b34cfd98a94 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Fri, 12 May 2017 13:11:28 -0400 Subject: [PATCH] Working on incorporating the API into the page --- admin/manage_custom_nav_elements.php | 128 ++++-------------- api/Controllers/InternalApiController.php | 7 + .../Navigation/CustomNavElementController.php | 2 +- internal-api/js/manage-custom-nav-elements.js | 50 +++++++ 4 files changed, 82 insertions(+), 105 deletions(-) create mode 100644 internal-api/js/manage-custom-nav-elements.js diff --git a/admin/manage_custom_nav_elements.php b/admin/manage_custom_nav_elements.php index d1d78ae5..7d06e59c 100644 --- a/admin/manage_custom_nav_elements.php +++ b/admin/manage_custom_nav_elements.php @@ -4,6 +4,7 @@ define('IN_SCRIPT', 1); define('HESK_PATH', '../'); define('PAGE_TITLE', 'ADMIN_CUSTOM_NAV_ELEMENTS'); define('MFH_PAGE_LAYOUT', 'TOP_ONLY'); +define('EXTRA_JS', ''); /* Get all the required files and functions */ require(HESK_PATH . 'hesk_settings.inc.php'); @@ -18,12 +19,6 @@ hesk_isLoggedIn(); //hesk_checkPermission('can_man_custom_nav'); -// Are we saving? -if (isset($_POST['action'])) { - if ($_POST['action'] == 'save') { - save(); - } -} /* Print header */ require_once(HESK_PATH . 'inc/headerAdmin.inc.php'); @@ -68,113 +63,38 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); Actions - - No custom navigation elements'; - } + - while ($row = hesk_dbFetchAssoc($customElementsRs)): - $localizedTextRs = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "custom_nav_element_to_text` - WHERE `nav_element_id` = " . intval($row['id'])); - $languageText = array(); - while ($textRow = hesk_dbFetchAssoc($localizedTextRs)) { - $languageText[$textRow['language']] = $textRow; - } ?> - - - - - - - - - - '; - } ?> - - - - - - - - - - - - - - - -
-
-

- Edit Custom Navigation Menu Element -

-
- -
-
-
-
-
-
-
- -