1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 04:10:38 +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::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 { margin: 0 1em 1em 0; }
.portlet-header { margin: 0.3em; padding-bottom: 4px; padding-left: 0.2em; cursor:move } .portlet-header { margin: 0.3em; padding-bottom: 4px; padding-left: 0.2em; cursor:move }
.portlet-header .ui-icon { float: right; } .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 { border: 1px dotted black; visibility: visible !important; height: 50px !important; }
.ui-sortable-placeholder * { visibility: hidden; } .ui-sortable-placeholder * { visibility: hidden; }
",'jquery'); ",'jquery');
@@ -84,7 +86,7 @@ require_once(e_HANDLER."menumanager_class.php");
$rs = new form; $rs = new form;
$frm = new e_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) if(e_AJAX_REQUEST)

View File

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

View File

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

View File

@@ -28,6 +28,7 @@ class e_menuManager {
var $menuActivateIds; var $menuActivateIds;
var $debug; var $debug;
var $menuMessage; var $menuMessage;
var $style = 'default';
function __construct($dragdrop=FALSE) function __construct($dragdrop=FALSE)
{ {
@@ -1035,6 +1036,7 @@ class e_menuManager {
} }
else if(strstr($str, "MENU")) else if(strstr($str, "MENU"))
{ {
$matches = array(); $matches = array();
if(preg_match_all("/\{MENU=([\d]{1,3})(:[\w\d]*)?\}/", $str, $matches)) 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"); $sql9->db_Select("menus", "*", "menu_location='$menu' AND menu_layout='" . $this->dbLayout . "' ORDER BY menu_order");
$menu_count = $sql9->db_Rows(); $menu_count = $sql9->db_Rows();
$cl = ($this->dragDrop) ? "'portlet" : "regularMenu";
$menuText .= "\n<div class='column' id='area-".$menu."'>\n\n"; $menuText .= "\n<div class='column' id='area-".$menu."'>\n\n";
while($row = $sql9->db_Fetch(MYSQL_ASSOC)) while($row = $sql9->db_Fetch(MYSQL_ASSOC))
{ {
$menuText .= "\n\n\n <!-- Menu Start ".$row['menu_name']. "-->\n"; $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'>"; // echo "<div class='ggportal'>";
@@ -1120,6 +1124,8 @@ class e_menuManager {
{ {
$tmp = explode("=", $str); $tmp = explode("=", $str);
$style = preg_replace("/\{SETSTYLE=(.*?)\}/si", "\\1", $str); $style = preg_replace("/\{SETSTYLE=(.*?)\}/si", "\\1", $str);
$this->style = $style;
} }
else if(strstr($str, "SITEDISCLAIMER")) else if(strstr($str, "SITEDISCLAIMER"))
{ {
@@ -1131,6 +1137,8 @@ class e_menuManager {
function menuRenderMenu($row,$menu_count,$rep = FALSE) function menuRenderMenu($row,$menu_count,$rep = FALSE)
{ {
global $ns,$rs,$menu,$menu_info,$menu_act; global $ns,$rs,$menu,$menu_info,$menu_act;
global $style;
$style = $this->style;
// $menu_count is empty in here // $menu_count is empty in here
//FIXME extract //FIXME extract
extract($row); extract($row);
@@ -1207,7 +1215,7 @@ class e_menuManager {
//DEBUG remove inline style, switch to simple quoted string for title text value //DEBUG remove inline style, switch to simple quoted string for title text value
//TODO hardcoded text //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>'; <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) if($conf)
@@ -1219,33 +1227,18 @@ class e_menuManager {
$text .= '<a target="_top" href="'.e_SELF.'?lay='.$this->curLayout.'&amp;parmsId='.$menu_id.'" $text .= '<a target="_top" href="'.e_SELF.'?lay='.$this->curLayout.'&amp;parmsId='.$menu_id.'"
title="Configure parameters">'.ADMIN_EDIT_ICON.'</a>'; 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> <span id="status-'.$menu_id.'" style="display:none">'.($rep == true ? "" : "insert").'</span>
</div>'; </div>';
$text .= ($rep == true) ? "</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) if(!$this->dragDrop)
{ {
ob_start(); ob_start();
$ns->tablerender($caption, $text); $ns->tablerender($caption, $text);
@@ -1256,10 +1249,10 @@ class e_menuManager {
} }
else else
{ {
return " return "
<div class='portlet-header'>".$caption."</div> <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') if($parm == 'expand')
{ {
$text = "<a class='e-expandit faq-question' href='faqs.php'>".$tp->toHtml($this->row['faq_question'])."</a> $id = "faq_".$this->row['faq_id'];
<div class='e-hideme faq-answer faq_answer'>".$tp->toHTML($this->row['faq_answer'],TRUE)."</div>"; $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 else
{ {

View File

@@ -32,6 +32,7 @@ e107::js("core", "tooltip/jquery.tipsy.js","jquery",3);
e107::css('core', 'tooltip/tipsy.css', 'jquery'); 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::js('core', 'rate/js/jquery.raty.js', 'jquery', 2);
e107::css('core', 'core/all.jquery.css', 'jquery'); e107::css('core', 'core/all.jquery.css', 'jquery');