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

confilts

parents be06f877 ca572797
......@@ -1516,10 +1516,19 @@ var urlCtrl = {
urlCtrl.bindModalPreview();
coInterface.bindLBHLinks();
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(){
urlCtrl.previewCurrentlyLoading=false;
$("#modal-preview-coop .btn-close-preview, .deleteThisBtn").click(function(){
......@@ -1698,11 +1707,15 @@ var smallMenu = {
}else if(type == "bootbox"){
bb = bootbox.dialog({
message: content
})
});
if(color == "black")
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
if(!$("#openModal").hasClass('in'))
if($("#openModal").hasClass('in'))
$("#openModal").modal("show");
if(content)
smallMenu.content(content);
......
......@@ -235,6 +235,11 @@ var adminDirectory = {
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>';
});
}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{
var urlCsv = baseUrl+'/api/'+kCSV+'/get/format/csv';
if(typeof valCSV == "object" ){
......@@ -828,6 +833,29 @@ var adminDirectory = {
}
},
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){
$("#"+aObj.container+" .updateBtn").off().on("click", function(){
mylog.log("adminDirectory..updateBtn ", $(this).data("id"), $(this).data("type"));
......
......@@ -141,7 +141,7 @@ var searchObj = {
numberPage=Math.floor(fObj.results.numberOfResults(fObj)/searchObject.indexStep);
$('.pageTable').pagination({
items: numberPage,
itemOnPage: 15,
itemOnPage: searchObject.indexStep,
currentPage: (searchObject.nbPage+1),
hrefTextPrefix:"?page=",
cssStyle: 'light-theme',
......
......@@ -424,8 +424,9 @@ var Login = {
addressPosition : ".passwordAgainRegister"
},
//alert("incorun run");
runRegisterValidator : function() { mylog.log("runRegisterValidator!!!!");
// alert("runRegisterValidator 1");
runRegisterValidator : function() {
mylog.log("runRegisterValidator!!!!");
//alert("runRegisterValidator 1");
var form3 = $('.form-register');
var errorHandler3 = $('.errorHandler', form3);
var createBtn = null;
......
......@@ -368,6 +368,24 @@ var pageProfil = {
// formProfil.events.form(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(){
mylog.log("pageProfil.views.md");
......
......@@ -833,7 +833,7 @@ class CommunecterController extends Controller
//var_dump($cacheCostum);exit;
if(isset(Yii::app()->session["userId"])){
$el = [
"id" => $cacheCostum["contextId"],
"id" => $cacheCostum["contextId"],
"type" => $cacheCostum["contextType"] ];
$costumUser = Costum::getCheckCustomUser($cacheCostum,$el);
......
......@@ -603,14 +603,22 @@
"class":"",
"view":"gallery",
"id":"btn-start-gallery",
"id":"btn-start-gallery"
"id":"btn-start-gallery" ,
"separator":true
},
"forms":{
"label": "Forms",
"icon":"file-text-o",
"class":"",
"view":"forms",
"id":"btn-start-forms",
"id":"btn-start-forms"
},
"dashboard":{
"label": "Observatory",
"icon":"tachometer",
"class":"",
"view":"dashboard",
"id":"btn-start-dashboard",
"separator":true
},
"community":{
......
......@@ -15,6 +15,14 @@ co2/datamigration/BashforeachActiveTags
///////////////////////// 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 sur les groupes du pactes supression des doublons
=> co2/datamigration/RemoveGroupDoublon
......
......@@ -127,15 +127,17 @@
);
$this->renderPartial('co2.views.poi.standalone', $params );
}else if($type == Form::ANSWER_COLLECTION){
$params = array("element"=>$element ,
}else if($type == Answer::COLLECTION){
$params = array("answer"=>$element ,
"page" => "page",
"type" => $type,
"form"=>$answer["form"],
"canEdit"=>$canEdit,
"controller" => $controller);
$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>
......
......@@ -27,12 +27,16 @@
else
$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);
if(!isset($params["mode"]))
$params["mode"] = "r";
}
//echo "<script>alert('welcome')</script>";
//var_dump($params['parentForm']);exit;
// var_dump($this->costum["welcomeTpl"]);
// var_dump($params);
// var_dump($params);
// exit;
$this->renderPartial( $this->costum["welcomeTpl"],$params );
}
......
......@@ -26,14 +26,14 @@
$params["canEdit"] = $canEdit;
else
$params["canEdit"] = Authorisation::canEditItem(Yii::app()->session["userId"],@$this->costum["contextType"], @$this->costum["contextId"]);
//echo "<script>alert('welcomeAjax')</script>";
if( isset($test) ){
$params["tpl"]=$id;
$params["test"]=$test;
}
if(isset($_GET["form"]))
$params = Form::getDataForm($params);
//var_dump($params['parentForm']);exit;
//var_dump($params);exit;
$this->renderPartial( $this->costum["welcomeTpl"],$params );
}
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