page.php 1.97 KB
Newer Older
Kgneo's avatar
Kgneo committed
1 2
<?php 
	//HtmlHelper::registerCssAndScriptsFiles( array('', ) , Yii::app()->theme->baseUrl. '/assets');
Kgneo's avatar
Kgneo committed
3
	//$cssAnsScriptFilesModule = array('');
Kgneo's avatar
Kgneo committed
4 5 6 7 8 9
	//HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl);

    $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.';
    //header + menu
    $this->renderPartial($layoutPath.'header', 
                        array(  "layoutPath"=>$layoutPath , 
Kgneo's avatar
Kgneo committed
10
                                "page" => "page") ); 
Kgneo's avatar
Kgneo committed
11 12 13 14
?>


<div class="col-md-12 col-sm-12 col-xs-12 no-padding social-main-container">
Kgneo's avatar
Kgneo committed
15
	<div class="padding-top-15" id="onepage"></div>
Kgneo's avatar
Kgneo committed
16 17 18 19 20 21 22
</div>


<script type="text/javascript" >

var type = "<?php echo $type; ?>";
var id = "<?php echo $id; ?>";
Kgneo's avatar
Kgneo committed
23 24
var indexStepGS = 20;

Kgneo's avatar
Kgneo committed
25 26
jQuery(document).ready(function() {
	
Kgneo's avatar
Kgneo committed
27 28
	initKInterface({"affixTop":0});
	$("#mainNav").addClass("affix");
Kgneo's avatar
Kgneo committed
29
	
Kgneo's avatar
Kgneo committed
30
	var tpl = '<?php echo @$_GET["tpl"] ? $_GET["tpl"] : "profilSocial"; ?>';
Kgneo's avatar
Kgneo committed
31
	getAjax('#onepage' ,baseUrl+'/'+moduleId+"/element/detail/type/"+type+"/id/"+id+"?tpl="+tpl,function(){ 
Kgneo's avatar
Kgneo committed
32 33
		initPageInterface();
	},"html");
Kgneo's avatar
Kgneo committed
34 35
});

Kgneo's avatar
Kgneo committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

function initPageInterface(){

	$("#second-search-bar").addClass("input-global-search");

    $("#main-btn-start-search, .menu-btn-start-search").click(function(){
        startGlobalSearch(0, indexStepGS);
    });

    $("#second-search-bar").keyup(function(e){
        $("#input-search-map").val($("#second-search-bar").val());
        if(e.keyCode == 13){
            startGlobalSearch(0, indexStepGS);
         }
    });
    
    $("#input-search-map").keyup(function(e){
        $("#second-search-bar").val($("#input-search-map").val());
        if(e.keyCode == 13){
            startGlobalSearch(0, indexStepGS);
         }
    });

    $("#menu-map-btn-start-search").click(function(){
        startGlobalSearch(0, indexStepGS);
    });

    $(".social-main-container").mouseenter(function(){
    	$(".dropdown-result-global-search").hide();
    });

    //$(".dropdown-result-global-search").hide();
    

}

Kgneo's avatar
Kgneo committed
72
</script>