Commit dcc6337a authored by Clément Damiens's avatar Clément Damiens

Merged branch master into master

parents 3c5d46cd 79b0b324
......@@ -5478,6 +5478,30 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
echo "Number of user with preferences modified : ".$nbUser;
}
}
public function actionReferenceFail() {
if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
$nbUser = 0;
$mails = PHDB::find( Cron::COLLECTION,
array( "status" => "fail",
"tpl" => "referenceEmailInElement") );
//Rest::json($mails); exit;
foreach ($mails as $keyE => $elt) {
$res = PHDB::update(Cron::COLLECTION,
array("_id"=>new MongoId($keyE)),
array('$set' => array( "status" => "pending" ) ) );
if($res["ok"] == 1){
$nbUser++;
}else{
echo "<br/> Error with user id : ".$key;
}
}
//Rest::json($tags); exit;
echo "Number of mails with status modified : ".$nbUser;
}
}
}
......
......@@ -46,6 +46,7 @@ Yii::app()->theme->baseUrl. '/assets');
<script type="text/javascript">
var contextMapNetwork = [];
var activeMapNetwork = [];
//var contextNow = [];
var currentKFormType = "";
var indexStepInit = 100;
......@@ -174,8 +175,8 @@ function addTooltips(){
function bindNetwork(){
// mylog.log("bindNetwork");
$('#btn-toogle-map').click(function(e){
showMapNetwork();
$('#btn-toogle-map').click(function(e){
showMapNetwork();
updateMap();
});
......@@ -218,6 +219,7 @@ function bindNetwork(){
});
$('#btn-menu-launch').click(function(){
//alert('#btn-menu-launch');
// mylog.log("#btn-menu-launch", $(this).hasClass("active"));
if(!$(this).hasClass("active")){
$(this).addClass("active");
......@@ -576,6 +578,7 @@ function dataSuccess(data, indexMin, indexMax, locality){
// mylog.log("Tags element", o.tags);
mapElements.push(o);
contextMapNetwork.push(o);
activeMapNetwork.push(o);
}); //end each
if(str == "") {
......@@ -672,6 +675,22 @@ function dataSuccess(data, indexMin, indexMax, locality){
$("#countResult").html(length+" résultat"+s);
geoShapeCity();
$.unblockUI();
if(typeof networkJson.skin.open != "undefined" ){
if(typeof networkJson.skin.open.lists != "undefined" && networkJson.skin.open.lists == true ){
//$("#btn-toogle-map").trigger("click");
setTimeout(function(){
showMapNetwork();
calendarNetwork();
}, 1000);
//alert("HERE");
}
if(typeof networkJson.skin.open.filter != "undefined" && networkJson.skin.open.filter == true ){
//alert("HERE");
$("#btn-menu-launch").trigger("click");
}
}
}
function tagActivedUpdate(checked, tag, parent){
......@@ -1320,22 +1339,22 @@ function updateMap(){
filteredList = contextMapNetwork;
}
}
activeMapNetwork = filteredList;
$.each(filteredList, function(e,v){
$(".contain_"+v.type+"_"+v.id).show(700);
});
//contextNow = filteredList;
if( typeof networkJson.add != "undefined" && typeof networkJson.add.event != "undefined" && networkJson.add.event == true){
$("#profil-content-calendar").fullCalendar('destroy');
calendar.showCalendar("#profil-content-calendar", filteredList, "month");
$("#profil-content-calendar").fullCalendar("gotoDate", moment(Date.now()));
$(window).on('resize', function(){
$("#profil-content-calendar").fullCalendar('destroy');
calendar.showCalendar("#profil-content-calendar", filteredList, "month");
});
}
calendarNetwork();
// if( typeof networkJson.add != "undefined" && typeof networkJson.add.event != "undefined" && networkJson.add.event == true){
// $("#profil-content-calendar").fullCalendar('destroy');
// calendar.showCalendar("#profil-content-calendar", filteredList, "month");
// $("#profil-content-calendar").fullCalendar("gotoDate", moment(Date.now()));
// $(window).on('resize', function(){
// $("#profil-content-calendar").fullCalendar('destroy');
// calendar.showCalendar("#profil-content-calendar", filteredList, "month");
// });
// }
......@@ -1353,6 +1372,18 @@ function updateMap(){
$.unblockUI();
}
function calendarNetwork(){
if( typeof networkJson.add != "undefined" && typeof networkJson.add.event != "undefined" && networkJson.add.event == true){
$("#profil-content-calendar").fullCalendar('destroy');
calendar.showCalendar("#profil-content-calendar", activeMapNetwork, "month");
$("#profil-content-calendar").fullCalendar("gotoDate", moment(Date.now()));
$(window).on('resize', function(){
$("#profil-content-calendar").fullCalendar('destroy');
calendar.showCalendar("#profil-content-calendar", activeMapNetwork, "month");
});
}
}
function addTabMap(element, tab){
if( "undefined" != typeof element.geo && element.geo != null )
tab.push(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