Commit d66ae7fb authored by Pierre Goubeaux's avatar Pierre Goubeaux
Browse files

confilts

parents be06f877 ca572797
...@@ -1516,10 +1516,19 @@ var urlCtrl = { ...@@ -1516,10 +1516,19 @@ var urlCtrl = {
urlCtrl.bindModalPreview(); urlCtrl.bindModalPreview();
coInterface.bindLBHLinks(); coInterface.bindLBHLinks();
coInterface.bindTooltips(); coInterface.bindTooltips();
} urlCtrl.resizePreview();
}
); );
}); });
}, },
resizePreview : function(){
heightModal=$("#modal-preview-coop").outerHeight();
heightToolsMenu=$("#modal-preview-coop .toolsMenu").outerHeight();
if(heightModal != 0)
$("#modal-preview-coop .container-preview").css({"height": (heightModal-heightToolsMenu)+"px"});
else
setTimeout(function(){ urlCtrl.resizePreview(); }, 200);
},
bindModalPreview : function(){ bindModalPreview : function(){
urlCtrl.previewCurrentlyLoading=false; urlCtrl.previewCurrentlyLoading=false;
$("#modal-preview-coop .btn-close-preview, .deleteThisBtn").click(function(){ $("#modal-preview-coop .btn-close-preview, .deleteThisBtn").click(function(){
...@@ -1698,11 +1707,15 @@ var smallMenu = { ...@@ -1698,11 +1707,15 @@ var smallMenu = {
}else if(type == "bootbox"){ }else if(type == "bootbox"){
bb = bootbox.dialog({ bb = bootbox.dialog({
message: content message: content
}) });
if(color == "black") if(color == "black")
bb.css({'background-color': '#000', 'opacity' : '0.8'} ); bb.css({'background-color': '#000', 'opacity' : '0.8'} );
bb.on('shown.bs.modal', function (e) {
if (typeof callback == "function")
callback();
})
} else{//open inside a boostrap modal } else{//open inside a boostrap modal
if(!$("#openModal").hasClass('in')) if($("#openModal").hasClass('in'))
$("#openModal").modal("show"); $("#openModal").modal("show");
if(content) if(content)
smallMenu.content(content); smallMenu.content(content);
......
...@@ -235,6 +235,11 @@ var adminDirectory = { ...@@ -235,6 +235,11 @@ var adminDirectory = {
if(typeof valURL.url != "undefined") if(typeof valURL.url != "undefined")
str += '<a class="pull-right" href="'+valURL.url+'" target="_blank"><i class="fa fa-2x fa-table text-green"></i></a>'; str += '<a class="pull-right" href="'+valURL.url+'" target="_blank"><i class="fa fa-2x fa-table text-green"></i></a>';
}); });
}else if(kCSV == "post"){
$.each(valCSV, function(kURL, valURL){
if(typeof valURL.url != "undefined")
str += '<a class="pull-right btnCsv" href="javascript:;" data-url="'+valURL.url+'" ><i class="fa fa-2x fa-table text-green"></i></a>';
});
}else{ }else{
var urlCsv = baseUrl+'/api/'+kCSV+'/get/format/csv'; var urlCsv = baseUrl+'/api/'+kCSV+'/get/format/csv';
if(typeof valCSV == "object" ){ if(typeof valCSV == "object" ){
...@@ -828,6 +833,29 @@ var adminDirectory = { ...@@ -828,6 +833,29 @@ var adminDirectory = {
} }
}, },
events : { events : {
csv: function(aObj){
mylog.log("adminDirectory.events.csv ");
$("#"+aObj.container+" .btnCsv").off().on("click", function(){
mylog.log("adminDirectory.events.csv.btnCsv ", $(this).data("url"));
var paramsSearch = searchInterface.constructObjectAndUrl();
paramsSearch = jQuery.extend(paramsSearch, aObj.paramsSearch);
ajaxPost(
null,
$(this).data("url"),
paramsSearch,
function(data){
var hiddenElement = document.createElement('a');
hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(data);
hiddenElement.target = '_blank';
hiddenElement.download = 'people.csv';
hiddenElement.click();
},
function(data){
$("#searchResults").html("erreur");
}
);
});
},
update: function(aObj){ update: function(aObj){
$("#"+aObj.container+" .updateBtn").off().on("click", function(){ $("#"+aObj.container+" .updateBtn").off().on("click", function(){
mylog.log("adminDirectory..updateBtn ", $(this).data("id"), $(this).data("type")); mylog.log("adminDirectory..updateBtn ", $(this).data("id"), $(this).data("type"));
......
...@@ -141,7 +141,7 @@ var searchObj = { ...@@ -141,7 +141,7 @@ var searchObj = {
numberPage=Math.floor(fObj.results.numberOfResults(fObj)/searchObject.indexStep); numberPage=Math.floor(fObj.results.numberOfResults(fObj)/searchObject.indexStep);
$('.pageTable').pagination({ $('.pageTable').pagination({
items: numberPage, items: numberPage,
itemOnPage: 15, itemOnPage: searchObject.indexStep,
currentPage: (searchObject.nbPage+1), currentPage: (searchObject.nbPage+1),
hrefTextPrefix:"?page=", hrefTextPrefix:"?page=",
cssStyle: 'light-theme', cssStyle: 'light-theme',
......
...@@ -424,8 +424,9 @@ var Login = { ...@@ -424,8 +424,9 @@ var Login = {
addressPosition : ".passwordAgainRegister" addressPosition : ".passwordAgainRegister"
}, },
//alert("incorun run"); //alert("incorun run");
runRegisterValidator : function() { mylog.log("runRegisterValidator!!!!"); runRegisterValidator : function() {
// alert("runRegisterValidator 1"); mylog.log("runRegisterValidator!!!!");
//alert("runRegisterValidator 1");
var form3 = $('.form-register'); var form3 = $('.form-register');
var errorHandler3 = $('.errorHandler', form3); var errorHandler3 = $('.errorHandler', form3);
var createBtn = null; var createBtn = null;
......
...@@ -368,6 +368,24 @@ var pageProfil = { ...@@ -368,6 +368,24 @@ var pageProfil = {
// formProfil.events.form(formProfil); // formProfil.events.form(formProfil);
// formProfil.events.add(formProfil); // formProfil.events.add(formProfil);
},
dashboard: function(){
mylog.log("pageProfil.views.dashboard");
//alert( contextData.costum.dashbordTpl );
var dTpl = "";
var dType = "";
if( notNull(contextData.costum.dashboard ) ){
if( notNull( contextData.costum.dashboard.tpl ) )
dTpl = "/tpl/"+contextData.costum.dashboard.tpl;
if ( notNull( contextData.costum.dashboard.type ) )
dType = "/type/"+contextData.costum.dashboard.type;
}
getAjax('#central-container', baseUrl+'/costum/co/dashboard/sk/'+contextData.slug+dTpl+dType,
function(data){
//alert("loaded dashboard ")
}
,"html");
}, },
md : function(){ md : function(){
mylog.log("pageProfil.views.md"); mylog.log("pageProfil.views.md");
......
...@@ -833,7 +833,7 @@ class CommunecterController extends Controller ...@@ -833,7 +833,7 @@ class CommunecterController extends Controller
//var_dump($cacheCostum);exit; //var_dump($cacheCostum);exit;
if(isset(Yii::app()->session["userId"])){ if(isset(Yii::app()->session["userId"])){
$el = [ $el = [
"id" => $cacheCostum["contextId"], "id" => $cacheCostum["contextId"],
"type" => $cacheCostum["contextType"] ]; "type" => $cacheCostum["contextType"] ];
$costumUser = Costum::getCheckCustomUser($cacheCostum,$el); $costumUser = Costum::getCheckCustomUser($cacheCostum,$el);
......
...@@ -603,14 +603,22 @@ ...@@ -603,14 +603,22 @@
"class":"", "class":"",
"view":"gallery", "view":"gallery",
"id":"btn-start-gallery", "id":"btn-start-gallery",
"id":"btn-start-gallery" "id":"btn-start-gallery" ,
"separator":true
}, },
"forms":{ "forms":{
"label": "Forms", "label": "Forms",
"icon":"file-text-o", "icon":"file-text-o",
"class":"", "class":"",
"view":"forms", "view":"forms",
"id":"btn-start-forms", "id":"btn-start-forms"
},
"dashboard":{
"label": "Observatory",
"icon":"tachometer",
"class":"",
"view":"dashboard",
"id":"btn-start-dashboard",
"separator":true "separator":true
}, },
"community":{ "community":{
......
...@@ -15,6 +15,14 @@ co2/datamigration/BashforeachActiveTags ...@@ -15,6 +15,14 @@ co2/datamigration/BashforeachActiveTags
///////////////////////// END BASH //////////////////////////////////////////////// ///////////////////////// END BASH ////////////////////////////////////////////////
///////////////// BASH VERSION 0.994 - 21/04/2020 //////////////////////////////////
db.getCollection('answers').update({parentSlug:"sommom"},{ $set: {form:"5e9962ef539f225f158b4577"}},{multi:true})
///////////////////////// END BASH ////////////////////////////////////////////////
///////////////// BASH VERSION 0.993 - 18/12/2019 ////////////////////////////////// ///////////////// BASH VERSION 0.993 - 18/12/2019 //////////////////////////////////
** BASH sur les groupes du pactes supression des doublons ** BASH sur les groupes du pactes supression des doublons
=> co2/datamigration/RemoveGroupDoublon => co2/datamigration/RemoveGroupDoublon
......
...@@ -127,15 +127,17 @@ ...@@ -127,15 +127,17 @@
); );
$this->renderPartial('co2.views.poi.standalone', $params ); $this->renderPartial('co2.views.poi.standalone', $params );
}else if($type == Form::ANSWER_COLLECTION){ }else if($type == Answer::COLLECTION){
$params = array("element"=>$element , $params = array("answer"=>$element ,
"page" => "page", "page" => "page",
"type" => $type, "type" => $type,
"form"=>$answer["form"],
"canEdit"=>$canEdit, "canEdit"=>$canEdit,
"controller" => $controller); "controller" => $controller);
$params = Form::getDataForm($params); $params = Form::getDataForm($params);
$this->renderPartial('survey.views.tpls.forms.formWizard', $params ); $params["canEdit"]=false;
$params["mode"]="r";
$this->renderPartial('survey.views.tpls.forms.formWizard', $params );
} }
?> ?>
</div> </div>
......
...@@ -27,12 +27,16 @@ ...@@ -27,12 +27,16 @@
else else
$params["canEdit"] = Authorisation::canEditItem(Yii::app()->session["userId"],@$this->costum["contextType"], @$this->costum["contextId"]); $params["canEdit"] = Authorisation::canEditItem(Yii::app()->session["userId"],@$this->costum["contextType"], @$this->costum["contextId"]);
if(isset($_GET["form"])) if(isset($_GET["form"])){
$params = Form::getDataForm($params); $params = Form::getDataForm($params);
if(!isset($params["mode"]))
$params["mode"] = "r";
}
//echo "<script>alert('welcome')</script>";
//var_dump($params['parentForm']);exit; //var_dump($params['parentForm']);exit;
// var_dump($this->costum["welcomeTpl"]); // var_dump($this->costum["welcomeTpl"]);
// var_dump($params); // var_dump($params);
// exit; // exit;
$this->renderPartial( $this->costum["welcomeTpl"],$params ); $this->renderPartial( $this->costum["welcomeTpl"],$params );
} }
......
...@@ -26,14 +26,14 @@ ...@@ -26,14 +26,14 @@
$params["canEdit"] = $canEdit; $params["canEdit"] = $canEdit;
else else
$params["canEdit"] = Authorisation::canEditItem(Yii::app()->session["userId"],@$this->costum["contextType"], @$this->costum["contextId"]); $params["canEdit"] = Authorisation::canEditItem(Yii::app()->session["userId"],@$this->costum["contextType"], @$this->costum["contextId"]);
//echo "<script>alert('welcomeAjax')</script>";
if( isset($test) ){ if( isset($test) ){
$params["tpl"]=$id; $params["tpl"]=$id;
$params["test"]=$test; $params["test"]=$test;
} }
if(isset($_GET["form"])) if(isset($_GET["form"]))
$params = Form::getDataForm($params); $params = Form::getDataForm($params);
//var_dump($params['parentForm']);exit; //var_dump($params);exit;
$this->renderPartial( $this->costum["welcomeTpl"],$params ); $this->renderPartial( $this->costum["welcomeTpl"],$params );
} }
else if( @$_GET["city"] || @$this->costum['id'] ) else if( @$_GET["city"] || @$this->costum['id'] )
......
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