Commit 9229d7e0 authored by Raph El's avatar Raph El
Browse files

Merge branch 'development' into custom-alex

parents c206d37a c6ad2fc5
......@@ -16,12 +16,16 @@ class Co2Module extends CWebModule {
private $_keywords = "societal, reseau,opensource,CO,communecter";
private $_description = "réseau social libre et citoyen";
private $_pageTitle = "Communecter:libre et connecté";
private $_image= "Communecter:libre et connecté";
private $_favicon= "ico.ico";
public function getVersion(){return $this->_version;}
public function getVersionDate(){return $this->_versionDate;}
public function getKeywords(){return $this->_keywords;}
public function getDescription(){return $this->_description;}
public function getPageTitle(){return $this->_pageTitle;}
public function getImage(){return $this->_image;}
public function getFavicon(){return $this->_favicon;}
public function init()
{
......
......@@ -8,6 +8,19 @@
*/
class CustomModule extends CWebModule {
private $_keywords = "societal, reseau,opensource,CO,communecter";
private $_description = "réseau social libre et citoyen";
private $_pageTitle = "Communecter:libre et connecté";
private $_image= "Communecter:libre et connecté";
private $_favicon= "ico.ico";
public function getVersion(){return $this->_version;}
public function getVersionDate(){return $this->_versionDate;}
public function getKeywords(){return $this->_keywords;}
public function getDescription(){return $this->_description;}
public function getPageTitle(){return $this->_pageTitle;}
public function getImage(){return $this->_image;}
public function getFavicon(){return $this->_favicon;}
public function init()
{
......
......@@ -653,8 +653,7 @@ function connectTo(parentType, parentId, childId, childType, connectType, parent
}
}
}
}
);
});
}
}
......@@ -860,8 +859,9 @@ var urlCtrl = {
window.location.href = urlObj.goto;
return false;
}
checkMenu(urlObj, hash);
endPoint = urlCtrl.loadableUrls[urlIndex];
mylog.log("jsController 2",endPoint,"login",endPoint.login,endPoint.hash );
if( typeof endPoint.login == undefined || !endPoint.login || ( endPoint.login && userId ) )
......@@ -897,6 +897,7 @@ var urlCtrl = {
if( endPoint.preaction && typeof endPoint.preaction == "function")
res = endPoint.preaction(hash);
//hash can be iliased
if (endPoint.hash)
hash = hash.replace(urlIndex, endPoint.hash);
if(hash.indexOf("?") >= 0){
......@@ -908,6 +909,7 @@ var urlCtrl = {
if(extraParams.indexOf("#") >= 0){
extraParams=extraParams.replace( "#","%hash%" );
}
path = urlCtrl.convertToPath(hash);
pathT = path.split('/');
//open path in a modal (#openModal)
......@@ -918,20 +920,24 @@ var urlCtrl = {
} else {
//console.log(">>>>>>>>>>>>>>>>>>> endPoint:",endPoint);
mod = moduleId+ '/';
if(moduleId != activeModuleId || endPoint.module){
if((moduleId != activeModuleId && activeModuleId != "costum") || endPoint.module){
mod = '';
//go get the path , module is given in the hash
//console.log(">>>>>>>>>>>>>>>>>>> module path",path);
}
// console.log(">>>>>>>>>>>>>>>>>>> mod",mod,"> path : ",path,"> urlExtra : ",urlExtra,"> extraParams : ",extraParams);
// alert(baseUrl+'/'+ mod +path+urlExtra+extraParams);
showAjaxPanel( baseUrl+'/'+ mod +path+urlExtra+extraParams, endPoint.title,endPoint.icon, res,endPoint );
if(path == "dda" && extraParams != "" && urlCtrl.firstLoad ){
if(path == "dda" && extraParams != "" ){
urlCtrl.afterLoad = function() {
extraParams = extraParams.substring(1);
extraParamsT = extraParams.split(".");
uiCoop.prepPreview(extraParamsT[0],extraParamsT[1],null,extraParamsT[2],extraParamsT[3],null);
typeProp= (extraParamsT[0]=="proposals") ? "proposal": extraParamsT[0];
uiCoop.getCoopDataPreview(typeProp,extraParamsT[1]/*, function(){
onchangeClick=false;
location.hash="#dda?"+typeProp+"."+extraParamsT[1];
}*/);
//uiCoop.prepPreview(extraParamsT[0],extraParamsT[1],null,extraParamsT[2],extraParamsT[3],null);
}
}
}
......@@ -1149,7 +1155,7 @@ var urlCtrl = {
//else
}
}
else if ( moduleId != activeModuleId) {
else if ( moduleId != activeModuleId && activeModuleId != "costum") {
//alert( ctrlId +"/"+ actionId );
showAjaxPanel( baseUrl+'/'+ activeModuleId + '/'+ctrlId +"/"+ actionId, 'Home','home' );
}
......
......@@ -160,7 +160,6 @@ function autoCompleteSearch(indexMin, indexMax, callBack){
$(".btn-start-search").addClass("bg-azure");
$(".btn-start-search").removeClass("bg-dark");
//if(indexMin > 0)
if(indexMin==0 || (typeof pageEvent != "undefined" && pageEvent)){
simpleScroll(scrollH, 400);
$("#dropdown_search").html("<div class='col-md-12 col-sm-12 text-center search-loader text-dark'>"+
......@@ -293,15 +292,15 @@ function autoCompleteSearch(indexMin, indexMax, callBack){
if(searchObject.initType == "events" && typeof showResultInCalendar != "undefined" && searchObject.text=="")
showResultInCalendar(results);
if(mapElements.length==0) mapElements = results;
else $.extend(mapElements, results);
if(mapElements.length==0 || indexMin == 0)
mapElements = results;
else
$.extend(mapElements, results);
if(location.hash == "#search" && searchObject.types.length > 1)
directory.switcherViewer(mapElements);
else
directory.switcherViewer(results);
//affiche les éléments sur la carte
console.log("mapElements", results);
Sig.clearMap();
Sig.showMapElements(Sig.map, mapElements, "search", "Résultats de votre recherche");
......@@ -664,6 +663,12 @@ function initPageTable(number){
$(".all-coop-detail-desc"+coopId).toggleClass('hide');
});
$(".btn-coopfilter").off().click(function(){
$(".coopFilter").addClass('hidden');
$("."+$(this).data("filter")+"Filter").removeClass('hidden');
directory.sortSearch('.coopFilter:not(.hidden)');
});
$(".openCoopPanelHtml").off().click(function(){
mylog.log("HERE .openCoopPanelHtml");
var coopType = $(this).data("coop-type");
......@@ -672,25 +677,26 @@ function initPageTable(number){
var parentId = $(this).data("coop-parentid");
var parentType = $(this).data("coop-parenttype");
var afterLoad = null;
location.hash="#dda?"+coopType+"."+coopId+"."+parentId+"."+parentType;
onchangeClick=false;
location.hash="#dda?"+coopType+"."+coopId;//+"."+parentId+"."+parentType;
uiCoop.prepPreview(coopType,coopId,idParentRoom,parentId,parentType,afterLoad);
if( $(this).data("coop-section") ){
coopSection = $(this).data("coop-section");
if(coopSection == "amendments" ){
afterLoad = function() {
uiCoop.showAmendement(true);
if($("#form-amendement").hasClass("hidden"))
/*if($("#form-amendement").hasClass("hidden"))
$("#form-amendement").removeClass("hidden");
else
$("#form-amendement").addClass("hidden");
$("#form-amendement").addClass("hidden");*/
};
} else if(coopSection == "vote" ){
mylog.log(".openCoopPanelHtml vote");
afterLoad = function() {
setTimeout(function(){
$("#coop-container").animate({
scrollTop: $("#podVote").offset().top
}, 1000);
// $("#coop-container").animate({
// scrollTop: $("#podVote").offset().top
// }, 1000);
}, 1000);
};
}
......@@ -746,6 +752,7 @@ function initPageTable(number){
mylog.log("send vote",voteValue);
uiCoop.sendVote("proposal", idParentProposal, voteValue, idParentRoom, null, true);
});
}
function initBtnShare(){
......@@ -2549,11 +2556,25 @@ var directory = {
var thisId = typeof params["_id"] != "undefined" &&
typeof params["_id"]["$id"] != "undefined" ? params["_id"]["$id"] :
typeof params["id"] != "undefined" ? params["id"] : "";
var filterClass = "";
var sortData = "";
if(typeof params.votes != "undefined"){
if(typeof params.votes.up != "undefined"){
filterClass += " upFilter";
sortData += " data-sort='"+params.votes.up.length+"' ";
}
if(typeof params.votes.down != "undefined"){
filterClass += " downFilter";
sortData += " data-sort='"+params.votes.down.length+"'";
}
}
str = "";
if(size == "S")
str += "<div class='col-lg-4 col-md-4 col-sm-6 col-xs-12 blockCoop"+thisId+" coop-wraper margin-bottom-10 ' style='word-wrap: break-word; overflow:hidden;'>";
str += "<div class='col-lg-4 col-md-4 col-sm-6 col-xs-12 blockCoop"+thisId+" "+filterClass+" coopFilter coop-wraper margin-bottom-10 ' "+sortData+" style='word-wrap: break-word; '>";
else
str += "<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12 coop-wraper margin-bottom-10 ' style='word-wrap: break-word; overflow:hidden;'>";
str += "<div class='col-xs-12 coop-wraper margin-bottom-10 coopFilter "+filterClass+" ' "+sortData+" style='word-wrap: break-word;'>";
linkParams = " data-coop-type='"+ params.type + "' "+
" data-coop-id='"+ thisId + "' "+
......@@ -2583,10 +2604,59 @@ var directory = {
// "><i class='fa fa-chevron-right'></i> <span class='hidden-xs'>"+trad.Open+"</span></button>";
// NAME
if(name != "")
str += '<a href="javascript:;" class="openCoopPanelHtml" style="text-decoration:none;" '+linkParams+'>'+
'<h4 class="panel-title letter-turq"><i class="fa '+ params.ico + '"></i> '+ name + '</h4></a>';
if(name != ""){
str += '<a href="javascript:;" class="openCoopPanelHtml" style="text-decoration:none;" '+linkParams+' >'+
'<h4 class="panel-title tooltips letter-turq" data-toggle="tooltip" data-placement="bottom" data-original-title="'+name+'">'+
'<i class="fa '+ params.ico + '"></i> '+
( (name.length > 100) ? name.substring(0,100)+"..." : name ) + '</h4></a>';
}
// if( typeof params.producer != "undefined" &&
// params.producer != null &&
// Object.keys(params.producer).length > 0 ) {
// var count = Object.keys(params.producer).length ;
// str += trad.proposedBy + " ";
// $.each(params.producer, function(kProd,valProd){
// var heightImg = ( count > 1 ) ? 35 : 25;
// var imgPath = assetPath+'/images/thumb/default_'+valProd.type+'.png';
// if(typeof valProd.profilThumbImageUrl != "undefined" && valProd.profilThumbImageUrl != null){
// imgPath = "/ph"+valProd.profilThumbImageUrl ;
// }
// str += '<img src="'+imgPath+'" class="img-circle" width="'+heightImg+'" height="'+heightImg+'" />';
// str += " "+valProd.name + " " ;
// });
// }
if( typeof params.producer != "undefined" &&
params.producer != null &&
Object.keys(params.producer).length > 0 ) {
count=Object.keys(params.producer).length;
htmlAbout="";
$.each(params.producer, function(e, v){
heightImg=(count>1) ? 35 : 25;
imgIcon = (typeof v.profilThumbImageUrl != "undefined" && v.profilThumbImageUrl!="" ) ? baseUrl+"/"+v.profilThumbImageUrl: assetPath + "/images/thumb/default_"+v.type+".png";
// htmlAbout+='<a href="#page.type.'+v.type+'.id.'+e+'" class="lbh tooltips" target="_blank" ';
// if(count>1) htmlAbout+= 'data-toggle="tooltip" data-placement="left" title="'+v.name+'"';
// htmlAbout+=">"+
htmlAbout+='<span ';
if(count>1) htmlAbout+= 'data-toggle="tooltip" data-placement="left" title="'+v.name+'"';
htmlAbout+=">"+
'<img src="'+imgIcon+'" class="img-circle margin-right-10" width='+heightImg+' height='+heightImg+' />';
if(count==1) htmlAbout+=v.name;
//htmlAbout+="</a>";
htmlAbout+="</span>";
});
htmlHeader = ((params.type == typeObj.event.col) ? trad["Planned on"] : tradCategory.carriedby ) ;
htmlHeader += " : "+htmlAbout;
str += htmlHeader;
}
// STATE OF THE PROPOSAL
console.log("hasVote ? ", params.hasVote );
......@@ -2634,7 +2704,8 @@ var directory = {
if(typeof userId != "undefined" && userId != null && userId != ""){
var btnSize = (params.status == "amendementAndVote") ? "6" : "12";
if( (params.status == "tovote" || params.status == "amendementAndVote") && params.hasVote ===false )
str += '<a href="javascript:" '+ linkParams + ' class="btn-openVoteDetail bg-green btn col-sm-'+btnSize+' "><i class="fa fa-gavel"></i> '+trad.Vote+'</a>';
str += '<a href="javascript:;" '+ linkParams + ' data-coop-section="vote" class="bg-green openCoopPanelHtml btn col-sm-'+btnSize+' "><i class="fa fa-gavel"></i> '+trad.Vote+'</a>';
//str += '<a href="javascript:" '+ linkParams + ' class="btn-openVoteDetail bg-green btn col-sm-'+btnSize+' "><i class="fa fa-gavel"></i> '+trad.Vote+'</a>';
else if( (params.status == "tovote" || params.status == "amendementAndVote") && params.hasVote !==false )
str += '<a href="javascript:;" '+ linkParams + ' data-coop-section="vote" class="openCoopPanelHtml btn btn-default col-sm-'+btnSize+' "><i class="fa fa-eye"></i> '+trad["See votes"]+'</a>';
} else {
......@@ -2643,7 +2714,7 @@ var directory = {
str += '<a href="javascript:" data-toggle="modal" data-target="#modalLogin" class="btn-menu-connect bg-green btn col-sm-'+btnSize+' "><i class="fa fa-gavel"></i> '+trad.Vote+'</a>';
}
if( params.status == "amendementAndVote" || params.status =="amendable" ){
if( (params.status == "amendementAndVote" || params.status =="amendable") ){
amendCount = (params.amendements) ? " ("+Object.keys(params.amendements).length+")": "";
str += '<a href="javascript:;" '+ linkParams + ' data-coop-section="amendments" class="openCoopPanelHtml btn btn-default text-purple col-sm-6 "><i class="fa fa-list"></i> '+trad.Amendements+amendCount+'</a>';
}
......@@ -3047,15 +3118,23 @@ var directory = {
titleSize=(searchObject.initType=="classifieds") ? "col-md-8 col-sm-6" : "col-md-9 col-sm-8";
toolsSize=(searchObject.initType=="classifieds") ? "col-md-4 col-sm-6" : "col-md-3 col-sm-4";
headerFilters = "";
if( typeof custom != "undefined" && custom != null && typeof custom.filters != 'undefined'
&& typeof custom.filters.searchFilters != 'undefined'){
$.each(custom.filters.searchFilters,function(k,p) {
colorClass = (typeof p.colorClass != "unde") ? p.colorClass : "";
headerFilters += "<a href='javascript:;' data-filter='"+k+"' class='btn-coopfilter btn btn-xs "+colorClass+"'> "+p.label+"</a> ";
});
}
headerStr +='<div class="col-xs-12 margin-bottom-10">'+
'<h4 class="elipsis '+titleSize+' col-xs-10 no-padding">'+
"<i class='fa fa-angle-down'></i> " + countHeader + " "+resultsStr+" "+
'<small>'+
directory.searchTypeHtml()+
'</small>'+
'</h4>'+
'<small>'+directory.searchTypeHtml()+'</small>'+
headerFilters+
'</h4>'+
'<div class="'+toolsSize+' col-xs-2 pull-right no-padding text-right headerSearchTools" style="padding-top:3px !important;">';
// TODO CLEM :: ADD SURVEY
// if(searchObject.types.length == 1 && searchObject.types[0]=="vote"){
......@@ -3064,8 +3143,8 @@ var directory = {
// '<span>'+tradDynForm.createsurvey+'</span>'+
// '</a>';
// }
if(userId != ""
&& notNull(directory.custom)
if(/*userId != ""
&& */notNull(directory.custom)
&& typeof directory.custom.header != "undefined"
&& typeof directory.custom.header.add != "undefined"
&& typeof directory.custom.header.add[searchObject.initType] != "undefined"){
......@@ -3101,8 +3180,17 @@ var directory = {
}
headerStr+= '</div>';
}
return headerStr;
},
sortSearch : function(what) {
var $wrapper = $('#dropdown_search');
$wrapper.find(what).sort(function (a, b) {
return +a.dataset.sort - +b.dataset.sort;
})
.appendTo( $wrapper );
},
checkImage : function($this){
// $.each(res, function(i,v){
// if($("#entity"+i+" .container-img-profil .img-responsive").length){
......@@ -3302,6 +3390,8 @@ var directory = {
directory.colPos = "left";
if(typeof data == "object" && data!=null){
$.each(data, function(i, params) {
if(i!="count"){
......@@ -3558,6 +3648,7 @@ var directory = {
params.type == "actions" ||
params.type == "resolutions" ||
params.type == "rooms"){
if(location.hash.indexOf('#dda') == 0)
str += directory.coopPanelHtml(params,null,"S");
else
......
......@@ -78,7 +78,7 @@ function autoCompleteSearchGS(search, indexMin, indexMax, input){
data.countType = [ "citoyens", "organizations", "projects", "events" ];
data.searchType = [ "citoyens", "organizations", "projects", "events" ];
}
if(notNull(custom) && typeof custom.filters != "undefined" && typeof custom.filters.searchTypeGS != "undefined"){
if(typeof custom != "undefined" && notNull(custom) && typeof custom.filters != "undefined" && typeof custom.filters.searchTypeGS != "undefined"){
data.countType = custom.filters.searchTypeGS;
data.searchType = custom.filters.searchTypeGS;
}
......@@ -386,7 +386,7 @@ function autoCompleteSearchGS(search, indexMin, indexMax, input){
"</div>"; */
extendMsg=trad.extendedsearch;
extendUrl="#search";
if(notNull(custom) && typeof custom.searchOpenMenu != "undefined"){
if(typeof custom != "undefined" && notNull(custom) && typeof custom.searchOpenMenu != "undefined"){
extendMsg=custom.searchOpenMenu.msg;
extendUrl=custom.searchOpenMenu.url;
}
......
......@@ -244,6 +244,10 @@ function buildNotifications(list, element, event, elementType, elementId)
url=url[1];
}
url = "#"+url.replace(/\//g, ".");
if(url.indexOf("#page.type.proposals") >= 0){
hasHProp=url.split(".");
url="#dda?proposals."+hasHProp[4];
}
momentNotif=notifObj.timeAgo;
var icon = (typeof notifObj.notify != "undefined") ? notifObj.notify.icon : "fa-bell";
var displayName = (typeof notifObj.notify != "undefined") ? notifObj.notify.displayName : "Undefined notification";
......
......@@ -44,7 +44,8 @@ var settings = {
if(hidden) $('.btn-group-'+field+' > button[value="hide"]').addClass('active');
});
$.each(typePreferencesBool, function(field, typePrefB){
if(notNull(preferences) && typeof preferences[typePrefB] != "undefined" && preferences[typePrefB] == true)
mylog.log("pref ", field, typePrefB, preferences)
if(notNull(preferences) && typeof preferences[typePrefB] != "undefined" && ( preferences[typePrefB] == true || preferences[typePrefB] == "true") )
$('.btn-group-'+typePrefB+' > button[value="true"]').addClass('active');
else
$('.btn-group-'+typePrefB+' > button[value="false"]').addClass('active');
......
......@@ -6,6 +6,13 @@ dynForm = {
onLoads : {
sub : function(){
dyFInputs.setSub("bg-url");
if(typeof contextData != "undefined" && contextData != null){
$("#parentId").val(contextData.id);
$("#parentType").val(contextData.type);
}
},
},
afterSave : function(){
......
......@@ -91,12 +91,13 @@ function getFileItem(k,v, edit){
titleDoc="";
if(notNull(v.name))
titleDoc=v.name;
var htmlThumbail = '<li class="content_file '+k+' col-sm-12 col-md-12 col-xs-12 no-padding" data-cat="1" id="'+v.id+'">'+
idDoc=v._id.$id;
var htmlThumbail = '<li class="content_file '+k+' col-sm-12 col-md-12 col-xs-12 no-padding" data-cat="1" id="'+idDoc+'">'+
' <div class="portfolio-item">';
if(edit){
htmlThumbail += '<div class="checkbox-content pull-left">'+
'<label>'+
'<input type="checkbox" class="checkPhoto checkbox-info" data-value="'+v.id+'">'+
'<input type="checkbox" class="checkPhoto checkbox-info" data-value="'+idDoc+'">'+
'<span class="cr"><i class="cr-icon fa fa-check"></i></span>'+
'</label>'+
'</div>';
......@@ -109,7 +110,7 @@ function getFileItem(k,v, edit){
' <i class="fa fa-upload"></i>'+
' </a>';
if(edit){
htmlThumbail+= ' <a href="javascript:;" onclick="updateDocument(\''+v.id+'\', \''+titleDoc+'\')">' +
htmlThumbail+= ' <a href="javascript:;" onclick="updateDocument(\''+idDoc+'\', \''+titleDoc+'\')">' +
' <i class="fa fa-pencil"></i>'+
' </a>';
}
......
......@@ -673,7 +673,9 @@ class CommunecterController extends Controller
}*/
//managed public and private sections through a url manager
if( Yii::app()->controller->id == "admin" && !Yii::app()->session[ "userIsAdmin" ] )
if( Yii::app()->controller->id == "admin" && !Yii::app()->session[ "userIsAdmin" ]
&& (!@Yii::app()->session[ "custom" ] || !@Yii::app()->session[ "custom" ]["admins"]
|| !Yii::app()->session[ "custom" ]["admins"][Yii::app()->session["userId"]]))
throw new CHttpException(403,Yii::t('error','Unauthorized Access.'));
if( Yii::app()->controller->id == "adminpublic" && ( !Yii::app()->session[ "userIsAdmin" ] && !Yii::app()->session[ "userIsAdminPublic" ] ) )
......
......@@ -194,7 +194,7 @@
"#dda": {
"inMenu" : true,
"useHeader" : true,
"useFilter" : true,
"useFilter" : {"scope":true, "filters":false},
"open" : true,
"subdomain" : "dda",
"subdomainName" : "Agora Citoyenne",
......
......@@ -182,7 +182,7 @@
<div class="col-md-12 col-sm-12 col-xs-12" id="navigationAdmin">
<div class="col-md-12 col-sm-12 col-xs-12 text-center">
<img src="<?php echo $logo ?>"
class="" height="100"><br/>
class="img-responsive" height="100"><br/>
<h3><?php echo $title ?></h3>
</div>
<?php
......@@ -192,7 +192,7 @@
id="div-select-create">
<div class="col-md-12 col-sm-12 col-xs-12 padding-15 shadow2 bg-white ">
<h4 class="text-center margin-top-15" style="">
<h4 class="text-center margin-top-15">
<a class="btn btn-link pull-right text-dark" id="btn-close-select-create" style="margin-top:-10px;">
<i class="fa fa-times-circle fa-2x"></i>
</a>
......@@ -224,7 +224,7 @@
<?php foreach(Yii::app()->session["paramsConfig"]["adminPanel"] as $key => $v){
if((!isset($v["super"]) || empty($v["super"]) || Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]))) && $key!="add"){
if(!isset($v["sourceKey"]) || (isset(Yii::app()->session["custom"]) && isset(Yii::app()->session["custom"]["sourceKey"]))){?>
<li class="list-group-item col-md-4 col-sm-6 ">
<li class="list-group-item col-md-4 col-sm-6 col-xs-12">
<a href="javascript:;" class="<?php echo $v["class"] ?>" id="<?php echo $v["id"] ?>" style="cursor:pointer;">
<i class="fa fa-<?php echo $v["icon"] ?> fa-2x"></i>
<?php echo Yii::t("admin", $v["label"]); ?>
......
......@@ -156,17 +156,20 @@ function initMenuReference(){
$(".sourceFilter").off().on("click", function(){
searchAdmin.mode="source";
searchAdmin.page=0;
searchAdmin.text=null;
startAdminSearch(true);
});
$(".referenceFilter").off().on("click", function(){
searchAdmin.mode="reference";
searchAdmin.page=0;
searchAdmin.text=null;
startAdminSearch(true);
});
$(".searchOpenFilter").off().on("click", function(){
searchAdmin.mode="open";
searchAdmin.page=0;
searchAdmin.text=null;
startAdminSearch(true);
});
}
......@@ -178,14 +181,11 @@ function initPageTable(number){
currentPage: 1,
hrefTextPrefix:"?page=",
cssStyle: 'light-theme',
//prevText: '<span aria-hidden="true">&laquo;</span>',
//nextText: '<span aria-hidden="true">&raquo;</span>',
onInit: function () {
// fire first page loading
},
onPageClick: function (page, evt) {
// some code
//alert(page);
searchAdmin.page=(page-1);
startAdminSearch();
}
......
......@@ -79,6 +79,10 @@ if( @$_GET["el"] || @$custom )
if(@$el["custom"]["metaImg"]){
$c["metaImg"] = Yii::app()->getRequest()->getBaseUrl(true).Yii::app()->getModule( Yii::app()->params["module"]["parent"] )->getAssetsUrl().$el["custom"]["metaImg"];
}
if(@$el["custom"]["logoMin"]){
$c["logoMin"] = Yii::app()->getModule( Yii::app()->params["module"]["parent"] )->getAssetsUrl().$el["custom"]["logoMin"];
}
if (@$el["custom"]["favicon"])
$c["favicon"] = Yii::app()->getModule( Yii::app()->params["module"]["parent"] )->getAssetsUrl().$el["custom"]["favicon"];
$c["admins"]= Element::getCommunityByTypeAndId($c["type"], $c["id"], Person::COLLECTION,"isAdmin");
......@@ -280,6 +284,11 @@ if( @Yii::app()->session['custom'] ){ ?>
}
});
}
str+="@media (max-width: 767px){"+
"#mainNav{margin-top:0px !important;}"+
"#mainNav .menu-btn-top{font-size:22px !important}}"+
"#mainNav .logo-menutop{height:40px}"+
"}";
str+="</style>";
$("head").append(str);
......
......@@ -292,9 +292,10 @@ HtmlHelper::registerCssAndScriptsFiles($cssJs, Yii::app()->getRequest()->getBase
if($parentType == Form::COLLECTION){
?>
<a href="<?php echo Yii::app()->getRequest()->getBaseUrl(true) ?>/survey/co/members/id/<?php echo $id; ?>/session/<?php echo $_GET["session"]; ?>" class="btn btn-success margin-top-20 col-xs-12 " id="btn-home" style="font-size:20px;"><i class="fa fa-home"></i> <?php echo Yii::t("invite","See the community") ?></a>
<?php } else /*if($parentType != Person::COLLECTION) */ {?>
<?php } else if($parentType == Proposal::COLLECTION){?>