Commit 73921f49 authored by Tibor Katelbach's avatar Tibor Katelbach

tab switcher

parent cc7d3c7e
......@@ -1101,6 +1101,7 @@ var urlCtrl = {
// location.hash.indexOf("#default.directory"), CoAllReadyLoad);
onchangeClick=false;
navInSlug=false;
mylog.log("loadByHash", hash, back );
if(typeof globalTheme != "undefined" && globalTheme=="network"){
mylog.log("globalTheme", globalTheme);
......@@ -1623,7 +1624,17 @@ function showAjaxPanel (url,title,icon, mapEnd , urlObj) {
/*setTimeout(function(){$("#loadingModal").css({"opacity": 0.});}, 500);
setTimeout(function(){$("#loadingModal").css({"opacity": 0.5});}, 1500);*/
$("#loadingModal").css({"opacity": 0.9});
getAjax(dest, url, function(data){
params = null;
if(activeModuleId == "costum" ){
mylog.log("costum LBH", costum.slug, contextData );
if(contextData && contextData.id)
params = { costumSlug : costum.slug, costumId : contextData.id, costumType : contextData.type };
else
params = { costumSlug : costum.slug };
}
ajaxPost(dest, url,params, function(data){
if( dest != themeObj.mainContainer )
$(".subModuleTitle").html("");
......
......@@ -634,6 +634,9 @@ class CommunecterController extends Controller
"siteurl" => array(
"incnbclick" => array('href' => "ph/co2/siteurl/incnbclick")
),
"co" => array(
"index" => array('href' => "ph/costum/co/index")
),
"cooperation" => array(
"getcoopdata" => array('href' => "ph/co2/cooperation/getcoopdata"),
"savevote" => array('href' => "ph/co2/cooperation/savevote"),
......@@ -667,14 +670,38 @@ class CommunecterController extends Controller
),
);
function initPage(){
//review the value of the userId to check loosing session
//creates an issue with Json requests : to clear add josn:true on the page definition here
//if( Yii::app()->request->isAjaxRequest && (!isset( $page["json"] )) )
//echo "<script type='text/javascript'> userId = '".Yii::app()->session['userId']."'; var blackfly = 'sosos';</script>";
//bug du double load
//echo "<script type='text/javascript'> alert('CommunecterController initPage ".@$_POST["costumSlug"]." =? ".@Yii::app()->session[ "costum" ][ "slug" ]."'); </script>";
if( isset($_POST["costumSlug"]) ){
if( isset($_POST["costumId"]) && isset($_POST["costumId"]) ){
Costum::init( null, $_POST["costumId"], $_POST["costumType"] );
}
//pas d'element fourni juste un slug de costum
else
Costum::init( null, $_POST["costumSlug"] );
//var_dump(Yii::app()->session[ "costum" ]);
}
// if( isset($_POST["costumSlug"]) && @Yii::app()->session[ "costum" ][ "slug" ] != $_POST["costumSlug"] )
// {
// //echo "<script type='text/javascript'> alert('CommunecterController reload init ".@$_POST["costumSlug"]." != ".@Yii::app()->session[ "costum" ][ "slug" ]."'); </script>";
// //cas ou l'on se base sur un element qui pointra vers un template costum
// if( isset($_POST["costumId"]) && isset($_POST["costumId"]) ){
// Costum::init( null, $_POST["costumId"], $_POST["costumType"] );
// var_dump(Yii::app()->session[ "costum" ]);
// //echo "<script type=Yii::app()->session[ "costum" ]);'text/javascript'> alert('set session ".@$_POST["costumId"]." ".@$_POST["costumType"]."'); </script>";
// }
// //pas d'element fourni juste un slug de costum
// else
// Costum::init( null, $_POST["costumSlug"] );
// }
Yii::app()->params["version"] = $this->version ;
if( @$_GET["theme"] ){
Yii::app()->theme = $_GET["theme"];
......
<?php
$cssJS = array(
'/plugins/jQuery-Knob/js/jquery.knob.js',
'/plugins/jQuery-Smart-Wizard/js/jquery.smartWizard.js',
//'/plugins/jQuery-Smart-Wizard/styles/smart_wizard.css',
// SHOWDOWN
'/plugins/showdown/showdown.min.js',
// MARKDOWN
'/plugins/to-markdown/to-markdown.js'
);
HtmlHelper::registerCssAndScriptsFiles($cssJS, Yii::app()->request->baseUrl);
?>
<style type="text/css">
#docs-main-container{
position: absolute;
......@@ -160,7 +173,7 @@
<?php
if(@Yii::app()->session["costum"] && @Yii::app()->session["costum"]["docTpl"]){
$this->renderPartial(Yii::app()->session["costum"]["docTpl"],false,true);
$this->renderPartial( Yii::app()->session["costum"]["docTpl"] ,true);
} else { ?>
<div id="docs-main-container">
<div id="header-doc" class="shadow2">
......@@ -336,6 +349,8 @@ var page="<?php echo @$page ?>";
var dir="<?php echo @$dir ?>";
jQuery(document).ready(function() {
mylog.log("render","co2.views.docs.index");
dir=(dir=="") ? mainLanguage : dir;
if(page != "")
initDocs(page, dir);
......@@ -343,7 +358,7 @@ jQuery(document).ready(function() {
initDocs("welcome", mainLanguage);
$(".link-docs-menu").off().on("click",function(){
alert(".link-docs-menu");
if($(this).hasClass("down-menu")){
$("#menu-left > ul > li > a").removeClass("active").find("i").removeClass("fa-angle-down").addClass("fa-angle-right");
$(".subMenu .link-docs-menu").removeClass("active");
......@@ -369,8 +384,11 @@ jQuery(document).ready(function() {
//if(moduleId == activeModuleId)
// moduleInDocs($(this).data("type"), $(this).data("dir"), $(this).data("get"));
//else
navInDocs($(this).data("type"), $(this).data("dir"), $(this).data("get"));
navInDocs($(this).data("type"), $(this).data("dir"), $(this).data("get"));
});
$("#show-menu-xs").click(function(){
if(!$(this).hasClass("show-dir")){
$(this).addClass("show-dir").data("title", "<?php echo Yii::t("common","Close") ?>").find("i").removeClass("fa-chevron-right").addClass("fa-times");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment