diff --git a/e107_admin/menus.php b/e107_admin/menus.php index 37ff2bac7..f101e4613 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -31,6 +31,14 @@ if (!getperms("2")) e107::coreLan('menus', true); e107::coreLan('admin', true); +e107::css('inline'," + +.menu-manager-items { padding-right:15px} +.menu-manager-items div.item { padding:5px; margin:5px 0; border:1px solid rgba(255,255,255,0.3); border-radius:3px; cursor: move } + +"); + + if(strpos(e_QUERY, 'configure') !== FALSE || vartrue($_GET['enc'])) @@ -383,7 +391,10 @@ TEMPL; .regularMenu { cursor:move; border-bottom:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px; padding-top:10px; padding-bottom:10px;background-color: #E0EBF1; border-radius: 5px; } .regularMenu span {padding:3px; font-weight:bold; color:#2F2F2F;text-align:left; } .ui-draggable { background-color: rgb(245, 245, 245); min-width:100px;} - + + .regularMenu:hover { background-color: #B1D7EA; } + + ",'jquery'); @@ -1397,11 +1408,12 @@ if($_POST) { // $men->menuScanMenus(); // - Runs 2x - Is already called by menuModify() in menumanager_class.php $text = $men->menuRenderMessage(); - $text .= $men->menuSelectLayout(); + // $text .= $men->menuSelectLayout(); $text .= $men->menuVisibilityOptions(); $text .= $men->menuInstanceParameters(); $text .= $men->menuRenderIframe(); - $ns -> tablerender(ADLAN_6.SEP.LAN_MENULAYOUT, e107::getMessage()->render(). $text, 'menus_config'); + echo $text; + // $ns -> tablerender(ADLAN_6.SEP.LAN_MENULAYOUT, e107::getMessage()->render(). $text, 'menus_config'); } else // Within the IFrame. { diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 15f02b145..be86817e7 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -1814,10 +1814,90 @@ Inverse 10 10 function sc_admin_menumanager() // List all menu-configs for easy-navigation { - global $pref; - $action = ""; + if(strpos(e_REQUEST_URI,e_ADMIN_ABS."menus.php")===false) + { + return false; + } - return ; + + $pref = e107::getPref(); + + + + $search = array("_","legacyDefault","legacyCustom"); + $replace = array(" ",MENLAN_31,MENLAN_33); + + $var = array(); + + foreach($pref['sitetheme_layouts'] as $key=>$val) + { + $layoutName = str_replace($search,$replace,$key); + $layoutName .=($key==$pref['sitetheme_deflayout']) ? " (".LAN_DEFAULT.")" : ""; + // $selected = ($this->curLayout == $key || ($key==$pref['sitetheme_deflayout'] && $this->curLayout=='')) ? "selected='selected'" : FALSE; + + + //$url = e_SELF."?configure=".$key; + $url = e_SELF."?configure=".$key; + + // $text .= ""; + $var[$key]['text'] = str_replace(":"," / ",$layoutName); + $var[$key]['link'] = '#'.$key; + $var[$key]['link_class'] = ' menuManagerSelect'; + $var[$key]['active'] = ($key==$pref['sitetheme_deflayout']) ? true: false; + $var[$key]['include'] = "data-url='".$url = e_SELF."?configure=".$key."'"; + } + $action = $pref['sitetheme_deflayout']; + + $defLayout = $pref['sitetheme_deflayout']; + + $var = array($defLayout => $var[$defLayout]) + $var; + + e107::getNav()->admin(ADLAN_6,$action, $var); + + return null; + + // TODO: Move to another shortcode. + // TODO: Get drag-n-drop working. + + $sql = e107::getDb(); + + + $sql->select("menus", "menu_name, menu_id, menu_pages, menu_path", "1 GROUP BY menu_name ORDER BY menu_name ASC"); + + while ($row = $sql->fetch()) + { + if(is_numeric($row['menu_path'])) + { + $pageMenu[] = $row; + } + else + { + $pluginMenu[] = $row; + } + + } + + $text = ""; + + + return e107::getRender()->tablerender("Menus", $text, null, true); + +/* $var['menumanager']['text'] = LAN_MENULAYOUT; $var['menumanager']['link'] = e_ADMIN_ABS.'menus.php'; @@ -1850,7 +1930,9 @@ Inverse 10 10 // $action = (in_array($this->action,$keys)) ? $this->action : "installed"; e107::getNav()->admin("Menu Manager",$action, $var); - // e_admin/_menu(ADLAN_6,$action, $var); + +*/ + } diff --git a/e107_plugins/news/e_menu.php b/e107_plugins/news/e_menu.php index 1ab6b33cc..8df606502 100644 --- a/e107_plugins/news/e_menu.php +++ b/e107_plugins/news/e_menu.php @@ -20,6 +20,7 @@ class news_menu function __construct() { // e107::lan('news','admin', 'true'); + } /** @@ -92,10 +93,12 @@ class news_menu_form extends e_form public function layout($curVal) { + // class='alert alert-info' + $arr = array( - "col-md-6" => "
1/2
1/2
", - "col-md-4" => "
1/3
1/3
1/3
", - "col-md-3" => "
1/4
1/4
1/4
1/4
", + "col-md-6" => "
1/2
1/2
", + "col-md-4" => "
1/3
1/3
1/3
", + "col-md-3" => "
1/4
1/4
1/4
1/4
", ); $text = ''; @@ -103,7 +106,7 @@ class news_menu_form extends e_form foreach($arr as $k=>$v) { - $text .= ""; + $text .= ""; } $text .= "
".$this->radio('layout', $k, $curVal, array('label'=>$k))."".$v."
".$this->radio('layout', $k, $curVal, array('label'=>$k))."".str_replace('{STYLE}',"class='alert alert-info' style='margin-bottom:0;text-align:center' ",$v)."
"; diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index 0de5b2d9c..80c7a1579 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -115,6 +115,9 @@ table input.form-control, table textarea.form-control, table select.form-contro width:530px } +.plugin-navigation li a { outline: 0; } +.plugin-navigation li a.link-active:before { content: "\f054"; font-family:FontAwesome; margin-left:-10px } + table textarea.input-block-level, input.input-block-level, input.form-control.input-block-level, diff --git a/e107_themes/bootstrap3/admin_template.php b/e107_themes/bootstrap3/admin_template.php index be0e1e8ff..22ae02266 100644 --- a/e107_themes/bootstrap3/admin_template.php +++ b/e107_themes/bootstrap3/admin_template.php @@ -418,7 +418,7 @@ $E_ADMIN_MENU['button'] = ' '; $E_ADMIN_MENU['button_active'] = '
  • -  {LINK_TEXT} +  {LINK_TEXT} {SUB_MENU}
  • '; diff --git a/e107_web/js/core/admin.jquery.js b/e107_web/js/core/admin.jquery.js index 9cc4316d9..5660310b4 100644 --- a/e107_web/js/core/admin.jquery.js +++ b/e107_web/js/core/admin.jquery.js @@ -623,8 +623,23 @@ $(document).ready(function() + $("a.menuManagerSelect").click(function(e){ + var link = $(this).attr('data-url'); + var text = $(this).text(); + $(this).html(text + ' '); + + $("#menu_iframe").attr("src",link); + + $("#menu_iframe").on("load", function () { + $('.e-mm-select-loading').hide(); + }); + + $(this).preventDefault(); + return false; + }); + // Menu Manager Layout drop-down options $("#menuManagerSelect").change(function(){