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