Commit a567d6d7 authored by Tibor Katelbach's avatar Tibor Katelbach

lots of small changes , like loading section preselected in the forms

parent 0f9b6390
......@@ -2537,7 +2537,7 @@ var dyFObj = {
if(userId)
{
formInMap.formType = type;
dyFObj.getDynFormObj(type, function() {
dyFObj.getDynFormObj(type, function(afterLoad,data) {
dyFObj.starBuild(afterLoad,data);
},afterLoad, data);
} else {
......@@ -2571,6 +2571,12 @@ var dyFObj = {
}else {
//TODO : pouvoir surchargé le dossier dynform dans le theme
//via themeObj.dynForm.folder overload
if (jsonHelper.notNull("typeObj."+type+".sameAs") ) {
if(data == null) data = {};
data.section = type;
type = typeObj[type].sameAs;
mylog.log(" switching types to Parent ", type);
}
var dfPath = (jsonHelper.notNull( "themeObj.dynForm.folder" ) ) ? themeObj.dynForm.folder : moduleUrl+'/js/dynForm/';
lazyLoad( dfPath+type+'.js',
null,
......@@ -2582,7 +2588,7 @@ var dyFObj = {
dyFInputs.get(type).dynForm = dynForm;
dyFObj.elementObj = dyFInputs.get(type);
if( notNull(dyFInputs.get(type).col) ) uploadObj.type = dyFInputs.get(type).col;
callback( afterLoad, data );
callback( afterLoad, data );
});
}
},
......@@ -2633,8 +2639,11 @@ var dyFObj = {
//alert(afterLoad+"|"+typeof dyFObj.elementObj.dynForm.jsonSchema.onLoads[afterLoad]);
}
if( jsonHelper.notNull( "dyFObj.elementObj.dynForm.jsonSchema.onLoads."+afterLoad, "function") )
if(typeof afterLoad == "function")
afterLoad(data);
else if( jsonHelper.notNull( "dyFObj.elementObj.dynForm.jsonSchema.onLoads."+afterLoad, "function") )
dyFObj.elementObj.dynForm.jsonSchema.onLoads[afterLoad](data);
//incase we need a second global post process
if( jsonHelper.notNull( "dyFObj.elementObj.dynForm.jsonSchema.onLoads.onload", "function") )
dyFObj.elementObj.dynForm.jsonSchema.onLoads.onload(data);
......@@ -3481,7 +3490,12 @@ var typeObj = {
"place":{ col:"place",ctrl:"place",color:"green",icon:"map-marker", titleClass : "bg-azure"},
"TiersLieux" : {sameAs:"place",color: "azure",icon: "home"},
"Maison" : {sameAs:"place", color: "azure",icon: "home"},
"ressource":{ col:"ressource",ctrl:"ressource",color:"purple",icon:"cube", titleClass : "bg-azure" },
"ressource":{ col:"ressource",ctrl:"ressource",color:"purple",icon:"cube", titleClass : "bg-azure",
subTypes : ["need", "offer","service","competence","tool","documentation","Machine","transport",
"offices","internet","activity","wiki","visio","drive","openWifi"] },
"need" : {sameAs:"ressource", color: "azure",icon: "hand-o-up"},
"offer" : {sameAs:"ressource", color: "azure",icon: "hand-o-down"},
"service" : {sameAs:"ressource", color: "azure",icon: "exchange"},
"siteurl":{ col:"siteurl",ctrl:"siteurl"},
"organization" : { col:"organizations", ctrl:"organization", icon : "group",titleClass : "bg-green",color:"green",bgClass : "bgOrga"},
......
......@@ -18,6 +18,12 @@ dynForm = {
$(".sectionBtntagList").hide();
} else
$(".typeBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form").hide();
if(contextData.type && contextData.id )
{
$('#ajaxFormModal #parentId').val(contextData.id);
$("#ajaxFormModal #parentType").val( contextData.type );
}
},
},
beforeSave : function(){
......
......@@ -84,12 +84,26 @@
"subdomainName" : "Lieux",
"hash" : "#app.search.type.place",
"icon" : "map-marker",
"mainTitle" : "Moteur de Ressource <span class='text-red'>territoriales</span>",
"mainTitle" : "Moteur de Lieux <span class='text-red'>territoriales</span>",
"placeholderMainSearch" : "Rechercher un lieu ...",
"lblBtnCreate" : "Ajouter un lieu",
"colorBtnCreate" : "green"
},
"#ressource":
{"inMenu" : true,
"useHeader" : true,
"open" : true,
"subdomain" : "ressource",
"subdomainName" : "Ressources",
"hash" : "#app.search.type.ressource",
"icon" : "cubes",
"mainTitle" : "Moteur de Ressource <span class='text-red'>territoriales</span>",
"placeholderMainSearch" : "Rechercher un ressource ...",
"lblBtnCreate" : "Ajouter une ressource",
"colorBtnCreate" : "purple"
},
"#page": {
"inMenu" : false,
"useHeader" : false,
......
......@@ -30,6 +30,11 @@
"label":"Rural",
"key" : "rural",
"icon" : "tree"
},
"travel": {
"label":"Travel",
"key" : "travel",
"icon" : "car"
}
},
......
{
"sections" : {
"tool": {
"label":"Tool",
"key" : "tool",
"icon" : "cutlery"
"need": {
"label":"Need",
"key" : "need",
"icon" : "hand-o-up"
},
"offer": {
"label":"Offer",
"key" : "offer",
"icon" : "hand-o-down"
},
"service": {
"label":"Service",
"key" : "service",
"icon" : "exchange"
},
"competence": {
"label":"Competence",
......@@ -17,6 +28,21 @@
"Community Manager"
]
},
"humanRessource": {
"label":"Human Ressource",
"key" : "humanRessource",
"icon" : "user"
},
"tool": {
"label":"Tool",
"key" : "tool",
"icon" : "cutlery",
"subcat" :
[
"Open",
"Private"
]
},
"documentation": {
"label":"Documentation",
"key" : "documentation",
......
......@@ -10,4 +10,17 @@ var ressource = <?php echo json_encode( CO2::getContextList("ressource") ) ?>;
- add left menu link views/pod/menuLeftElement.php
- ctk/models/Element.php add new Element Mappings
- if used as a directory add to GetDataDetailAction
- add to Document::generateProfilImages $allowedElements
\ No newline at end of file
- add to Document::generateProfilImages $allowedElements
# if needed a territorial search engine
check directory.md documentation
ex : classified , places
- views/app/search.php
```
if(@$type=="ressource") { $page = "ressource"; }
```
- add to directory.Js line 1812
```
else if( $.inArray(params.type, ["citoyens","organizations","projects","poi","place","ressource"] )>=0)
str += directory.elementPanelHtml(params);
```
\ No newline at end of file
......@@ -2,7 +2,7 @@
- add entry in co2/config/CO2/params.json
- add entry into headerParams in directoryjs.php
- ex : "place" : { color: "green", icon: "map-marker", name: "Lieux" },
- add entry into Search::globalAutoComplete
- left side filter can be added optionaly in directoryjs.php
- allSearchType add type
- left side filter can be added optionaly in directoryjs.php
- allSearchType add type
- add entry into Search::globalAutoComplete
- add new type Authorisation canedit for image uploads
......@@ -24,6 +24,7 @@
if(@$type=="classified"){ $page = "annonces"; }
if(@$type=="vote") { $page = "power"; }
if(@$type=="place") { $page = "place"; }
if(@$type=="ressource") { $page = "ressource"; }
if(@$type=="cities") { $lblCreate = ""; }
......
......@@ -116,7 +116,7 @@ var headerParams = {
"vote" : { color: "azure", icon: "gavel", name: "Propositions, Questions, Votes" },
"actions" : { color: "lightblue2", icon: "cogs", name: "actions" },
"cities" : { color: "red", icon: "university", name: "communes" },
"poi" : { color: "black", icon: "map-marker", name: "points d'intérêts" },
"poi" : { color: "black", icon: "map-marker", name: "points d'intérêts" }
}
function setHeaderDirectory(type){
......
......@@ -471,7 +471,7 @@ var headerParams = {
"place" : { color: "green", icon: "map-marker", name: "Lieux" },
"classified" : { color: "lightblue2", icon: "bullhorn", name: "Annonces" },
"GovernmentOrganization" : { color: "red", icon: "university", name: "services publics" },
"ressource" : { color: "purple", icon: "cubes", name: "Ressource" },
}
if( typeof themeObj != "undefined" && typeof themeObj.headerParams != "undefined" )
......@@ -524,7 +524,7 @@ function setHeaderDirectory(type){
}
var searchType = [ "persons" ];
var allSearchType = [ "persons", "organizations", "projects", "events", "vote", "cities","place" ];
var allSearchType = [ "persons", "organizations", "projects", "events", "vote", "cities","place","ressource" ];
var personCOLLECTION = "<?php echo Person::COLLECTION ?>";
var userId = '<?php echo isset( Yii::app()->session["userId"] ) ? Yii::app() -> session["userId"] : null; ?>';
......@@ -546,7 +546,7 @@ jQuery(document).ready(function() {
searchType = (typeSelected == null) ? [ "persons" ] : [ typeSelected ];
allSearchType = [ "persons", "organizations", "projects", "events", "events", "vote", "cities","poi","place" ];
allSearchType = [ "persons", "organizations", "projects", "events", "events", "vote", "cities","poi","place","ressource" ];
topMenuActivated = true;
hideScrollTop = true;
loadingData = false;
......
......@@ -334,7 +334,8 @@
<?php } ?>
<?php } ?>
<?php if ( $type==Place::COLLECTION ){
<?php if ($type==Project::COLLECTION || $type==Organization::COLLECTION ||
$type==Event::COLLECTION || $type==Person::COLLECTION || $type==Place::COLLECTION ){
if(!@$front || (@$front && $front["poi"])){
?>
<li>
......
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