Commit e2935b57 authored by Raph El's avatar Raph El
Browse files

Hotfix raffinerie

parent a7e0df84
......@@ -41,6 +41,7 @@ function pushListRoles(links){
var pageProfil = {
params:{},
init : function(){
mylog.log("pageProfil.init");
coInterface.showLoader("#central-container");
pageProfil.initDateHeaderPage();
pageProfil.initView();
......@@ -53,10 +54,12 @@ var pageProfil = {
},
initDateHeaderPage : function(){
mylog.log("pageProfil.initDateHeaderPage");
var str = directory.getDateFormated(contextData);
$(".event-infos-header").html(str);
},
initView(){
mylog.log("pageProfil.initView");
if(pageProfil.params.view!=""){
if(!notEmpty(pageProfil.params.dir))
$(".ssmla[data-view='"+pageProfil.params.view+"']").addClass("active");
......@@ -76,6 +79,7 @@ var pageProfil = {
}
},
initMetaPage(title, description, image){
mylog.log("pageProfil.initMetaPage", title, description, image);
if(title != ""){
$("meta[name='title']").attr("content",title);
$("meta[property='og:title']").attr("content",title);
......@@ -90,6 +94,7 @@ var pageProfil = {
}
},
bindViewActionEvent:function(){
mylog.log("pageProfil.bindViewActionEvent");
$(".ssmla").off().on("click", function(){
pageProfil.responsiveMenuLeft();
pageProfil.params.action = $(this).data("action");
......@@ -115,6 +120,7 @@ var pageProfil = {
});
},
bindButtonMenu : function(){
mylog.log("pageProfil.bindButtonMenu");
pageProfil.bindViewActionEvent();
$("#paramsMenu").click(function(){
$(".dropdown-profil-menu-params").addClass("open");
......@@ -137,6 +143,7 @@ var pageProfil = {
},
responsiveMenuLeft: function(menuTop){
mylog.log("pageProfil.responsiveMenuLeft", menuTop);
if($(window).width()<768)
pageProfil.menuLeftShow();
if(menuTop){
......@@ -145,6 +152,7 @@ var pageProfil = {
}
},
menuLeftShow : function(){
mylog.log("pageProfil.menuLeftShow");
if($("#menu-left-container").hasClass("hidden-xs"))
$("#menu-left-container").removeClass("hidden-xs");
else
......@@ -152,6 +160,7 @@ var pageProfil = {
},
views : {
newspaper: function(){
mylog.log("pageProfil.views.newspaper");
//coInterface.scrollTo("#profil_imgPreview");
setTimeout(function(){ //attend que le scroll retourn en haut (coInterface.scrollTo)
ajaxPost('#central-container', baseUrl+"/news/co/index/type/"+typeItem+"/id/"+contextData.id,
......@@ -160,12 +169,14 @@ var pageProfil = {
}, 700);
},
preferences: function(){
mylog.log("pageProfil.views.preferences");
var url = "pod/preferences";
ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url,
null,
function(){},"html");
},
gallery: function(){
mylog.log("pageProfil.views.gallery");
var url = "gallery/index/type/"+typeItem+"/id/"+contextData.id;
if(notNull(pageProfil.params.dir))
url+="/docType/"+pageProfil.params.dir;
......@@ -180,41 +191,48 @@ var pageProfil = {
function(){},"html");
},
coop : function(){
mylog.log("pageProfil.views.coop");
$("#modalCoop").modal("show");
pageProfil.actions.cospace();
pageProfil.views.newspaper(false);
},
photos : function(){
mylog.log("pageProfil.views.photos");
var url = "gallery/index/type/"+typeItem+"/id/"+contextData.id+"/docType/image";
ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url,
null,
function(){},"html");
},
bookmarks : function(){
mylog.log("pageProfil.views.bookmarks");
var url = "gallery/index/type/"+typeItem+"/id/"+contextData.id+"/docType/bookmark";
ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url,
null,
function(){},"html");
},
library: function(){
mylog.log("pageProfil.views.library");
var url = "gallery/index/type/"+typeItem+"/id/"+contextData.id+"/docType/file";
ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url,
null,
function(){},"html");
},
notifications : function(){
mylog.log("pageProfil.views.notifications");
var url = "element/notifications/type/"+typeItem+"/id/"+contextData.id;
ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url,
null,
function(){},"html");
},
history : function (){
mylog.log("pageProfil.views.history");
var url = "pod/activitylist/type/"+typeItem+"/id/"+contextData.id;
ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url,
null,
function(){},"html");
},
community : function(){
mylog.log("pageProfil.views.community");
pageProfil.views.directory();
},
directory : function(){
......@@ -240,22 +258,26 @@ var pageProfil = {
,"html");
},
chart: function(){
mylog.log("pageProfil.views.chart");
var url = "chart/header/type/"+typeItem+"/id/"+contextData.id;
ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url,
null,
function(){},"html");
},
editChart: function(){
mylog.log("pageProfil.views.editChart");
var url = "chart/addchartsv/type/"+contextData.type+"/id/"+contextData.id;
ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url,
null,
function(){},"html");
},
detail : function(){
mylog.log("pageProfil.views.detail");
var url = "element/about/type/"+contextData.type+"/id/"+contextData.id;
ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url+'?tpl=ficheInfoElement', null, function(){},"html");
},
urls : function(){
mylog.log("pageProfil.views.urls");
getAjax('', baseUrl+'/'+moduleId+'/element/geturls/type/'+contextData.type+
'/id/'+contextData.id,
function(data){
......@@ -264,6 +286,7 @@ var pageProfil = {
,"html");
},
networks: function(){
mylog.log("pageProfil.views.networks");
getAjax('', baseUrl+'/'+moduleId+'/element/getnetworks/type/'+contextData.type+
'/id/'+contextData.id,
function(data){
......@@ -273,6 +296,7 @@ var pageProfil = {
,"html");
},
curiculum: function(){
mylog.log("pageProfil.views.curiculum");
getAjax('', baseUrl+'/'+moduleId+'/element/getcuriculum/type/'+contextData.type+
'/id/'+contextData.id,
function(html){
......@@ -282,6 +306,7 @@ var pageProfil = {
,"html");
},
settings: function(){
mylog.log("pageProfil.views.settings");
getAjax('', baseUrl+'/'+moduleId+'/settings/index',
function(html){
$("#central-container").html(html);
......@@ -289,6 +314,7 @@ var pageProfil = {
,"html");//urlCtrl.loadByHash("#settings.page.myAccount");
},
settingsCommunity : function(){
mylog.log("pageProfil.views.settingsCommunity");
getAjax('', baseUrl+'/'+moduleId+'/settings/confidentiality/type/'+contextData.type+'/id/'+contextData.id,
function(html){
$("#central-container").html("<div class='col-xs-12 bg-white'>"+html+"</div>");
......@@ -296,6 +322,7 @@ var pageProfil = {
,"html");
},
contacts: function(){
mylog.log("pageProfil.views.contacts");
getAjax('', baseUrl+'/'+moduleId+'/element/getcontacts/type/'+contextData.type+
'/id/'+contextData.id,
function(data){
......@@ -329,6 +356,7 @@ var pageProfil = {
,"html");
},
md : function(){
mylog.log("pageProfil.views.md");
getAjax('', baseUrl+'/api/person/get/id/'+contextData.id+"/format/md",
function(data){
descHtml = dataHelper.markdownToHtml(data) ;
......
......@@ -46,9 +46,17 @@
"linksBtn" => $linksBtn,
"isLinked" => $isLinked,
"controller" => $controller,
"iconColor" => @$iconColor,
"typeItem" => $typeItem,
"typeItemHead" => $typeItemHead,
"categoryItem" => $categoryItem,
"icon" => @$icon,
"countStrongLinks" => $countStrongLinks,
"countInvitations" => $countInvitations,
"countries" => $countries );
"countries" => $countries,
"useBorderElement" => $useBorderElement,
"pageConfig" => $pageConfig,
"addConfig" => $addConfig );
echo $this->renderPartial($url,$params);
} else if( in_array($type,[Person::COLLECTION,Event::COLLECTION,Project::COLLECTION,Organization::COLLECTION,Place::COLLECTION]) ){
$params = array("element"=>$element ,
......
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