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

ajoute coopérative dans le type d'orga

parent e9f8915d
......@@ -107,13 +107,13 @@ function initCountType(){
searchObject.countType = [];
$.each(costum.app[directory.appKeyParam].filters.types, function(e, v){
if(v=='organizations')
searchObject.countType=searchObject.countType.concat('NGO', 'Group', 'GovernmentOrganization', 'LocalBusiness');
searchObject.countType=searchObject.countType.concat('NGO', 'Group', 'GovernmentOrganization', 'LocalBusiness', 'Cooperative');
else
searchObject.countType.push(v);
});
}
else{
searchObject.countType=['NGO', 'Group', 'GovernmentOrganization', 'LocalBusiness', 'citoyens', 'projects', 'events', 'poi', 'classifieds'];
searchObject.countType=['NGO', 'Group', 'GovernmentOrganization','LocalBusiness', 'Cooperative' ,'citoyens', 'projects', 'events', 'poi', 'classifieds'];
}
}
//else if(searchObject.initType=="ressources") searchObject.countType=["ressources"];
......@@ -2965,7 +2965,7 @@ var directory = {
"name":$("#nameFavorite").val(),
"type":"research"
}
if(typeof costum != "undefined"){
if(typeof costum != "undefined" && costum != null){
formData.mailParams={
logo : costum.logo,
title : costum.title,
......
......@@ -441,7 +441,7 @@ var searchObj = {
res=false;
if(searchObject.types.length > 1){
$.each(searchObject.types, function(e, v){
if($.inArray(v,["NGO", "LocalBusiness", "Group", "GovernmentOrganization"]) == -1)
if($.inArray(v,["NGO", "LocalBusiness", "Group", "GovernmentOrganization", "Cooperative"]) == -1)
res = true;
});
}
......
......@@ -425,7 +425,7 @@ var Login = {
},
//alert("incorun run");
runRegisterValidator : function() { mylog.log("runRegisterValidator!!!!");
//alert("runRegisterValidator 1");
// alert("runRegisterValidator 1");
var form3 = $('.form-register');
var errorHandler3 = $('.errorHandler', form3);
var createBtn = null;
......
......@@ -702,7 +702,7 @@ var searchInterface={
else{
mylog.log("searchInterface.setSearchTypes else");
//make sure headerParams (initjs.php) contains thany type of the searchObj
searchObject.types = ["NGO", "Group", "GovernmentOrganization", "LocalBusiness", "projects", "events", "poi", "classifieds"];
searchObject.types = ["NGO", "Group", "GovernmentOrganization", "LocalBusiness", "Cooperative", "projects", "events", "poi", "classifieds"];
if(searchObject.text != "" || Object.keys(getSearchLocalityObject()).length > 0)
searchObject.types.push("persons");
}
......@@ -959,7 +959,7 @@ function customFiltersInterface(){
if(e=="types"){
if(typeof categoriesFilters != "undefined"){
$.each(categoriesFilters, function(i, content){
if($.inArray(i, ["NGO", "LocalBusiness", "Group", "GovernmentOrganization"]) >= 0){
if($.inArray(i, ["NGO", "LocalBusiness", "Group", "GovernmentOrganization", "Cooperative"]) >= 0){
if( $.inArray("organizations", v) < 0) delete categoriesFilters[i];
}else if($.inArray(i, v) < 0)
delete categoriesFilters[i];
......@@ -1077,6 +1077,7 @@ var searchAllEngine = {
Group : 0,
LocalBusiness : 0,
GovernmentOrganization:0,
Cooperative : 0,
projects : 0,
events : 0,
citoyens : 0,
......@@ -1098,6 +1099,7 @@ var searchAllEngine = {
Group : { indexMin : 0, indexMax : 30, waiting : 30 },
LocalBusiness : { indexMin : 0, indexMax : 30, waiting : 30 },
GovernmentOrganization:{ indexMin : 0, indexMax : 30, waiting : 30 },
Cooperative : { indexMin : 0, indexMax : 30, waiting : 30 },
projects : { indexMin : 0, indexMax : 30, waiting : 30 },
events : { indexMin : 0, indexMax : 30, waiting : 30 },
citoyens : { indexMin : 0, indexMax : 30, waiting : 30 },
......
......@@ -36,6 +36,7 @@ return array(
"the localBusiness" => "l'entreprise",
"Local Business" => "Entreprise",
"the group" => "le collectif",
"Cooperative" => "Cooperative",
"the Group" => "le groupe",
"the government organization" => "l'organisation gouvernementale",
);
......
......@@ -250,7 +250,7 @@ function bindAddData(){
if($("#chooseElementLink").val() == "<?php echo Person::COLLECTION; ?>")
searchType = [ "persons" ];
else if($("#chooseElementLink").val() == "<?php echo Organization::COLLECTION; ?>")
searchType = [ "NGO", "Group", "LocalBusiness", "GovernmentOrganization" ];
searchType = [ "NGO", "Group", "LocalBusiness", "GovernmentOrganization", "Cooperative" ];
else if($("#chooseElement").val() == "<?php echo Project::COLLECTION; ?>")
searchType = [ "projects" ];
else if($("#chooseElement").val() == "<?php echo Event::COLLECTION; ?>")
......
......@@ -46,7 +46,7 @@
scope : true,
around : true,
types : {
lists : ["NGO", "LocalBusiness", "Group", "GovernmentOrganization", "projects", "citoyens", "poi"]
lists : ["NGO", "LocalBusiness", "Group", "GovernmentOrganization", "Cooperative" ,"projects", "citoyens", "poi"]
}
}
};
......
......@@ -230,6 +230,7 @@ if(searchObject.initType=="all"){
"LocalBusiness" : { "key": "LocalBusiness", "icon":"industry", "label":"LocalBusiness","color":"azure"},
"Group" : { "key": "Group", "icon":"circle-o", "label":"Groups","color":"turq"},
"GovernmentOrganization" : { "key": "GovernmentOrganization", "icon":"university", "label":"services publics","color":"red"},
"Cooperative" : { "key": "Cooperative", "icon":"university", "label":"Cooperative","color":"green"},
"projects" : { "key": "projects", "icon":"lightbulb-o", "label":"projects","color":"purple"},
"events" : { "key": "events", "icon":"calendar", "label":"events","color":"orange"},
"poi" : { "key": "poi", "icon":"map-marker", "label":"points of interest","color":"green-poi"},
......
......@@ -318,6 +318,7 @@ if(searchObject.initType=="all"){
"LocalBusiness" : { "key": "LocalBusiness", "icon":"industry", "label":"LocalBusiness","color":"azure"},
"Group" : { "key": "Group", "icon":"circle-o", "label":"Groups","color":"turq"},
"GovernmentOrganization" : { "key": "GovernmentOrganization", "icon":"university", "label":"services publics","color":"red"},
"Cooperative" : {"key": "Cooperative", "icon":"industry", "label":"Cooperative","color":"green"},
"projects" : { "key": "projects", "icon":"lightbulb-o", "label":"projects","color":"purple"},
"events" : { "key": "events", "icon":"calendar", "label":"events","color":"orange"},
"poi" : { "key": "poi", "icon":"map-marker", "label":"points of interest","color":"green-poi"},
......
......@@ -286,7 +286,7 @@ function initCityView(){
var nameCommunexion="";
searchQuery={
"onlyCount":true,
"countType":["citoyens", "NGO", "Group", "GovernmentOrganization", "LocalBusiness", "projects"],
"countType":["citoyens", "NGO", "Group", "GovernmentOrganization", "LocalBusiness", "Cooperative" ,"projects"],
"locality": {},
"count":true
//"type" : ["citoyens", "NGO", "projects", "news", "events"]
......
......@@ -811,6 +811,7 @@
var modeEdit = '<?php echo (@$modeEdit == true) ? "true" : "false"; ?>';
//var birthDate = '<?php echo (isset($person["birthDate"])) ? $person["birthDate"] : null; ?>';
var NGOCategoriesList = <?php echo json_encode(@$NGOCategories) ?>;
var CooperativeCategories = <?php echo json_encode(@$CooperativeCategories) ?>;
var localBusinessCategoriesList = <?php echo json_encode(@$localBusinessCategories) ?>;
//var seePreferences = '<?php echo (@$element["seePreferences"] == true) ? "true" : "false"; ?>';
var color = '<?php echo Element::getColorIcon($type); ?>';
......@@ -829,6 +830,7 @@
var TYPE_NGO = "<?php echo Organization::TYPE_NGO ?>";
var TYPE_BUSINESS = "<?php echo Organization::TYPE_BUSINESS ?>";
var TYPE_COOP = "<?php echo Organization::TYPE_COOP ?>";
var EVENT_COLLECTION = "<?php echo Event::COLLECTION ?>";
......
......@@ -248,6 +248,7 @@ var trad = {
"groups" :"<?php echo Yii::t("common","Groups") ?>",
"GovernmentOrganization" : "<?php echo Yii::t("common","GovernmentOrganization") ?>",
"GovernmentOrganizations" : "<?php echo Yii::t("common","Government organizations") ?>",
"Cooperative" :"<?php echo Yii::t("common","Cooperative") ?>",
"character(s)" : "<?php echo Yii::t("common","character(s)") ?>",
"Change password" : "<?php echo Yii::t("common","Change password") ?>",
......@@ -1209,6 +1210,7 @@ var tradCategory = {
"LocalBusiness":"<?php echo Yii::t("category","Local Business") ?>",
"Local Business":"<?php echo Yii::t("category","Local Business") ?>",
"Group":"<?php echo Yii::t("category","Group") ?>",
"Cooperative":"<?php echo Yii::t("category","Cooperative") ?>",
"classifieds":"<?php echo Yii::t("common","Classifieds") ?>",
"projects":"<?php echo Yii::t("common","Projects") ?>",
"events":"<?php echo Yii::t("common","Events") ?>",
......@@ -1278,6 +1280,13 @@ var tradCategory = {
"agriculture":"<?php echo Yii::t("category","Agriculture") ?>",
"restauration":"<?php echo Yii::t("category","Restauration") ?>",
"building":"<?php echo Yii::t("category","Building") ?>",
"typeHelp":"<?php echo Yii::t("category","Type d'aide") ?>",
"benevolat":"<?php echo Yii::t("category" , "Bénévolat") ?>",
"vente":"<?php echo Yii::t("category" , "Vente") ?>",
"donate" :"<?php echo Yii::t("category" , "Don") ?>",
"ecolocation":"<?php echo Yii::t("category" , "Éco-location") ?>",
"material":"<?php echo Yii::t("category","Material") ?>",
"electronic":"<?php echo Yii::t("category","Electronic") ?>",
......
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