1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 04:02:28 +02:00

Media-Manager styling fix. Faqs expandit working again

This commit is contained in:
CaMer0n 2012-06-03 01:42:05 +00:00
parent 22debd60b1
commit fb0ef82806
6 changed files with 30 additions and 28 deletions

View File

@ -58,11 +58,13 @@ if(strpos(e_QUERY, 'configure') !== FALSE )
e107::js('core', 'core/admin.jquery.js', 'jquery', 4);
e107::css('inline'," .column { width: 170px; float: left; padding-bottom: 100px; }
e107::css('inline'," .column { width:100%; padding-bottom: 100px; }
.regularMenu { border:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px }
.menuOptions { padding-top:7px; padding-right:5px; text-align:right; }
.portlet { margin: 0 1em 1em 0; }
.portlet-header { margin: 0.3em; padding-bottom: 4px; padding-left: 0.2em; cursor:move }
.portlet-header .ui-icon { float: right; }
.portlet-content { padding: 10px; }
.portlet-content { padding: 7px; }
.ui-sortable-placeholder { border: 1px dotted black; visibility: visible !important; height: 50px !important; }
.ui-sortable-placeholder * { visibility: hidden; }
",'jquery');
@ -84,7 +86,7 @@ require_once(e_HANDLER."menumanager_class.php");
$rs = new form;
$frm = new e_form();
$men = new e_menuManager(1); // use 1 for dragdrop.
$men = new e_menuManager(0); // use 1 for dragdrop.
if(e_AJAX_REQUEST)

View File

@ -20,6 +20,8 @@ $(document).ready(function()
});
$(".e-radio-multi").each(function() {
// $(this).nextAll(".field-help").hide();
// $(this).nextAll(":input").tipsy({title: 'hello'});
@ -371,6 +373,7 @@ $(document).ready(function()
});
$( ".portlet" ).addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
// $( ".portlet" ).addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
.find( ".portlet-header" )
.addClass( "ui-widget-header ui-corner-all" )
.prepend( "<span class='ui-icon ui-icon-minusthick'></span>")

View File

@ -5,8 +5,10 @@ $(document).ready(function()
$(".e-expandit").show();
$(".e-expandit").click(function () {
var id = $(this).attr("href");
var id = $(this).attr("href");
$(id).toggle("slow");
return false;
});
// Dates --------------------------------------------------
@ -119,7 +121,7 @@ $(document).ready(function()
// Tooltips for bbarea.
$(".bbcode_buttons").tipsy({gravity: 's',opacity: 1.0, fade: true,html: true});
$("a.e-tip").tipsy({gravity: 'w',opacity: 1.0, fade: true,html: true});
// var tabs = $('#tab-container').clone(true);
// $('#htmlEditor').append(tabs);

View File

@ -28,6 +28,7 @@ class e_menuManager {
var $menuActivateIds;
var $debug;
var $menuMessage;
var $style = 'default';
function __construct($dragdrop=FALSE)
{
@ -1035,6 +1036,7 @@ class e_menuManager {
}
else if(strstr($str, "MENU"))
{
$matches = array();
if(preg_match_all("/\{MENU=([\d]{1,3})(:[\w\d]*)?\}/", $str, $matches))
{
@ -1075,11 +1077,13 @@ class e_menuManager {
$sql9->db_Select("menus", "*", "menu_location='$menu' AND menu_layout='" . $this->dbLayout . "' ORDER BY menu_order");
$menu_count = $sql9->db_Rows();
$cl = ($this->dragDrop) ? "'portlet" : "regularMenu";
$menuText .= "\n<div class='column' id='area-".$menu."'>\n\n";
while($row = $sql9->db_Fetch(MYSQL_ASSOC))
{
$menuText .= "\n\n\n <!-- Menu Start ".$row['menu_name']. "-->\n";
$menuText .= "<div class='portlet' id='block-".$row['menu_id']."-".$menu."'>\n";
$menuText .= "<div class='{$cl}' id='block-".$row['menu_id']."-".$menu."'>\n";
// echo "<div class='ggportal'>";
@ -1120,6 +1124,8 @@ class e_menuManager {
{
$tmp = explode("=", $str);
$style = preg_replace("/\{SETSTYLE=(.*?)\}/si", "\\1", $str);
$this->style = $style;
}
else if(strstr($str, "SITEDISCLAIMER"))
{
@ -1131,6 +1137,8 @@ class e_menuManager {
function menuRenderMenu($row,$menu_count,$rep = FALSE)
{
global $ns,$rs,$menu,$menu_info,$menu_act;
global $style;
$style = $this->style;
// $menu_count is empty in here
//FIXME extract
extract($row);
@ -1207,7 +1215,7 @@ class e_menuManager {
//DEBUG remove inline style, switch to simple quoted string for title text value
//TODO hardcoded text
$text .= '<div class="center">
$text .= '<div class="menuOptions">
<a class="e-dialog" target="_top" href="'.e_SELF.'?lay='.$this->curLayout.'&amp;vis='.$menu_id.'&amp;iframe=1" title="'.MENLAN_20.'">'.ADMIN_VIEW_ICON.'</a>';
if($conf)
@ -1219,33 +1227,18 @@ class e_menuManager {
$text .= '<a target="_top" href="'.e_SELF.'?lay='.$this->curLayout.'&amp;parmsId='.$menu_id.'"
title="Configure parameters">'.ADMIN_EDIT_ICON.'</a>';
$text .= '<a title="'.LAN_DELETE.'" id="remove-'.$menu_id.'-'.$menu_location.'" class="delete e-menumanager-delete" href="'.e_SELF.'?configure='.$this->curLayout.'&amp;mode=deac&amp;id='.$menu_id.'">'.ADMIN_DELETE_ICON.'</a>
$text .= '<a title="'.LAN_DELETE.'" id="remove-'.$menu_id.'-'.$menu_location.'" class="e-tip delete e-menumanager-delete" href="'.e_SELF.'?configure='.$this->curLayout.'&amp;mode=deac&amp;id='.$menu_id.'">'.ADMIN_DELETE_ICON.'</a>
<span id="status-'.$menu_id.'" style="display:none">'.($rep == true ? "" : "insert").'</span>
</div>';
$text .= ($rep == true) ? "</div>" : "";
/*
if($this->dragDrop)
{
$text .= '
<div class="block-controls">
<a class="block-remove"><span>x</span></a> <a class="block-config"><span>e</span></a>
</div>
<div class="config" style="display: none; width: 200px;">
<div>config-params</div>
<div style="float:right">
<a href="#" class="cancel-button">cancel</a>
<a href="#" class="save-button">save</a>
</div>
</div>';
}
*/
if(!$this->dragDrop)
{
ob_start();
$ns->tablerender($caption, $text);
@ -1256,10 +1249,10 @@ class e_menuManager {
}
else
{
return "
<div class='portlet-header'>".$caption."</div>
<div class='portlet-content'>".$text."</div>";
<div class='portlet-content' >".$text."</div>";
}

View File

@ -30,8 +30,9 @@ class faqs_shortcodes
if($parm == 'expand')
{
$text = "<a class='e-expandit faq-question' href='faqs.php'>".$tp->toHtml($this->row['faq_question'])."</a>
<div class='e-hideme faq-answer faq_answer'>".$tp->toHTML($this->row['faq_answer'],TRUE)."</div>";
$id = "faq_".$this->row['faq_id'];
$text = "<a class='e-expandit faq-question' href='#{$id}'>".$tp->toHtml($this->row['faq_question'])."</a>
<div id='{$id}' class='e-hideme faq-answer faq_answer'>".$tp->toHTML($this->row['faq_answer'],TRUE)."</div>";
}
else
{

View File

@ -32,6 +32,7 @@ e107::js("core", "tooltip/jquery.tipsy.js","jquery",3);
e107::css('core', 'tooltip/tipsy.css', 'jquery');
// ------------------
e107::js('core', 'jquery.elastic.js', 'jquery', 2);
e107::js('core', 'rate/js/jquery.raty.js', 'jquery', 2);
e107::css('core', 'core/all.jquery.css', 'jquery');