Commit 7791588a authored by Clément Damiens's avatar Clément Damiens
Browse files

refactor custom to costum & migration module costum & repair /custom
parent 295d8806
<?php <?php
/******************************* NOT USED ANYMORE ********************/ /**********************TODO : MOVE IN LIVE MODULE **************************/
/**********************MOVE IN LIVE MODULE **************************/
$cssAnsScriptFilesModule = array( $cssAnsScriptFilesModule = array(
'/js/default/search.js', '/js/default/search.js',
...@@ -218,8 +217,8 @@ jQuery(document).ready(function() { ...@@ -218,8 +217,8 @@ jQuery(document).ready(function() {
function startNewsSearch(isFirst){ function startNewsSearch(isFirst){
var urlCtrl = "/news/co/index/type/city/isLive/true"; var urlCtrl = "/news/co/index/type/city/isLive/true";
if(typeof liveParams != "undefined"){ if(typeof liveParams != "undefined"){
if(typeof liveParams.slug != "undefined" && notNull(custom)) if(typeof liveParams.slug != "undefined" && notNull(costum))
urlCtrl = "/news/co/index/type/"+custom.type+"/id/"+custom.id; urlCtrl = "/news/co/index/type/"+costum.contextType+"/id/"+costum.contextId;
if(typeof liveParams.formCreate != "undefined") if(typeof liveParams.formCreate != "undefined")
urlCtrl += "/formCreate/false"; urlCtrl += "/formCreate/false";
} }
...@@ -229,7 +228,7 @@ function startNewsSearch(isFirst){ ...@@ -229,7 +228,7 @@ function startNewsSearch(isFirst){
"</div>"; "</div>";
$("#newsstream").html(loading); $("#newsstream").html(loading);
simpleScroll(0, 500); simpleScroll(0, 500);
ajaxPost("#newsstream",baseUrl+"/"+urlCtrl,{search:true}, function(news){ spinSearchAddon();}, "html"); ajaxPost("#newsstream",baseUrl+urlCtrl,{search:true}, function(news){ spinSearchAddon();}, "html");
} }
</script> </script>
\ No newline at end of file
...@@ -27,8 +27,13 @@ ...@@ -27,8 +27,13 @@
<section class="bg-white inline-block pull-left no-padding" id="bg-homepage"> <section class="bg-white inline-block pull-left no-padding" id="bg-homepage">
<?php <?php
if( @Yii::app()->session['costum']["welcomeTpl"]) //var_dump(Yii::app()->session['costum']);
// exit;
if( @Yii::app()->session['costum']["welcomeTpl"]){
//var_dump("ouiiiiiiiiiii"); exit;
$this->renderPartial( Yii::app()->session["costum"]["welcomeTpl"] ); $this->renderPartial( Yii::app()->session["costum"]["welcomeTpl"] );
}
else if( @$_GET["city"] || Yii::app()->session['costum']['id'] ) else if( @$_GET["city"] || Yii::app()->session['costum']['id'] )
{ {
$city = City::getById( Yii::app()->session['costum']['id'] ); $city = City::getById( Yii::app()->session['costum']['id'] );
......
...@@ -117,7 +117,7 @@ if( @Yii::app()->session['costum'] ){ ?> ...@@ -117,7 +117,7 @@ if( @Yii::app()->session['costum'] ){ ?>
var costum = <?php echo json_encode(Yii::app()->session['costum']) ?>; var costum = <?php echo json_encode(Yii::app()->session['costum']) ?>;
//if(typeof custom.appRendering != "undefined") //if(typeof custom.appRendering != "undefined")
themeParams=<?php echo json_encode(Yii::app()->session['paramsConfig']) ?>; themeParams=<?php echo json_encode(Yii::app()->session['paramsConfig']) ?>;
custom.init = function(where){ costum.init = function(where){
if(costum.logo){ if(costum.logo){
$(".topLogoAnim").remove(); $(".topLogoAnim").remove();
$(".logo-menutop, .logoLoginRegister").attr({'src':costum.logo}); $(".logo-menutop, .logoLoginRegister").attr({'src':costum.logo});
......
Supports Markdown
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