1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-04 09:54:56 +02:00

Menu-Manager auto-height on iFrame and other GUI fixes.

This commit is contained in:
Cameron 2013-04-14 17:06:02 -07:00
parent a40736e9b4
commit 755bf861c4
4 changed files with 31 additions and 23 deletions

View File

@ -141,7 +141,7 @@ if(strpos(e_QUERY, 'configure') !== FALSE || vartrue($_GET['enc']))
e107::css('inline'," .column { width:100%; padding-bottom: 100px; }
.regularMenu { border-bottom:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px }
.regularMenu { border-bottom:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px; padding-bottom:20px }
.portlet { margin: 0 1em 1em 0; }
.portlet-header { margin: 0.3em; padding-bottom: 4px; padding-left: 0.2em; cursor:move }
@ -262,14 +262,17 @@ if(strpos(e_QUERY, 'configure') !== FALSE || vartrue($_GET['enc']))
.menu-panel-header
{
display: block;
padding: 3px 15px;
font-size: 11px;
font-weight: bold;
line-height: 20px;
color: rgb(153, 153, 153);
text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5);
text-transform: uppercase;
display: block;
padding: 10px;
font-size: 13px;
font-weight: bold;
line-height: 20px;
border-radius: 5px;
text-transform: uppercase;
margin-bottom:10px;
background-color: rgb(0, 136, 204);
color: white;
}

View File

@ -142,10 +142,11 @@ class e_menuManager {
$url = e_SELF."?configure=".$this->curLayout;
}
$cnt = $sql->select("menus", "*", "menu_location > 0 AND menu_layout = '$curLayout' ORDER BY menu_name "); // calculate height to remove vertical scroll-bar.
// $cnt = $sql->select("menus", "*", "menu_location > 0 AND menu_layout = '$curLayout' ORDER BY menu_name "); // calculate height to remove vertical scroll-bar.
$text = "<object class='well' type='text/html' id='menu_iframe' data='".$url."' width='100%' style='overflow:auto;width: 100%; height: ".(($cnt*90)+600)."px; border: 0px' ></object>";
// $text = "<object class='well' type='text/html' id='menu_iframe' data='".$url."' width='100%' style='overflow:auto;width: 100%; height: ".(($cnt*90)+600)."px; border: 0px' ></object>";
$text = "<iframe class='well' id='menu_iframe' src='".$url."' width='100%' scrolling='no' style='width: 100%; height: 800px; border: 0px' ></iframe>";
return $text;
}
@ -1036,9 +1037,9 @@ class e_menuManager {
// onchange=\"urljump(this.options[selectedIndex].value);\"
$text = "<form method='post' action='".e_SELF."?configure=".$this->curLayout."'>";
$text .= "<div class='buttons-bar'>".MENLAN_30." ";
$text .= "<select name='custom_select' id='menuManagerSelect' class='tbox' >\n"; // window.frames['menu_iframe'].location=this.options[selectedIndex].value ???
$text = "<form class='form-inline' method='post' action='".e_SELF."?configure=".$this->curLayout."'>";
$text .= "<div class='buttons-bar'>Layout ";
$text .= "<select name='custom_select' id='menuManagerSelect' >\n"; //tbox class will break links. // window.frames['menu_iframe'].location=this.options[selectedIndex].value ???
$search = array("_","legacyDefault","legacyCustom");
@ -1056,10 +1057,11 @@ class e_menuManager {
$url = e_SELF."?configure=".$key;
$text .= "<option value='$url' {$selected}>".$layoutName."</option>";
$text .= "<option value='".$url."' {$selected}>".$layoutName."</option>";
}
$text .= "</select>
<div class='field-help'>".MENLAN_30."</div>
</div></form>";
// $text .= "<div id='visibility'>Something here</div>";
@ -1397,10 +1399,11 @@ class e_menuManager {
if(!$this->dragDrop)
{
return "<b class='muted'>".$caption."</b><br />". $text;
// return;
return $ns->tablerender($caption, $text,'', true);
// return $ns->tablerender($caption, $text,'', true); Theme style too unpredictable.
}

View File

@ -32,14 +32,14 @@ define("MENLAN_22", "Inactive Menus");
define("MENLAN_23", "Move to bottom");
define("MENLAN_24", "Move to top");
define("MENLAN_25", "Function...");
define("MENLAN_25", "Action...");
define("MENLAN_26", "This menu will only be <strong>SHOWN</strong> on the following pages"); //FIXME HTML
define("MENLAN_27", "This menu will only be <strong>HIDDEN</strong> on the following pages"); //FIXME HTML
define("MENLAN_28", "Enter one page per line, enter enough of the url to distinguish it properly. If you need the ending of the url to match exactly, use a ! at the end of the page name <br />For example: <strong>page.php?1!</strong>"); //FIXME HTML
define("MENLAN_29", "Select Layout");
define("MENLAN_30", "To see the menu areas and their positions for custom layouts, select the custom layout here:");
define("MENLAN_30", "To see the menu areas and their positions for custom layouts, select the custom layout here.");
define("MENLAN_31", "Default Layout");
define("MENLAN_32", "Newsheader Layout");
define("MENLAN_33", "Custom Layout");

View File

@ -428,12 +428,14 @@ $(document).ready(function()
// Menu Manager Layout drop-down options
$("#menuManagerSelect").change(function(){
var link = $(this).val();
$("#menu_iframe").attr("data",link);
$("#menu_iframe").attr("src",link);
return false;
});
$('#menu_iframe').load(function() {
this.style.height = this.contentWindow.document.body.offsetHeight + 100 + 'px';
});
$(".e-shake" ).effect("shake",{times: 10, distance: 2},20);