Commit 2b382b4c authored by Clément Damiens's avatar Clément Damiens

Merged pumpupthejam into development

parents 0f8d6f9e c82c21b6
......@@ -21,11 +21,11 @@ dynForm = {
$(".sectionBtntagList").hide();
$(".categoryBtntagList").hide();
} else
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form, .deviseselect").hide();
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .parentfinder, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form, .deviseselect").hide();
$("#devise").val(deviseDefault);
contextDataId = userId;
/*contextDataId = userId;
contextDataType = "citoyens";
if(contextData != null && contextData.type && contextData.id )
{
......@@ -33,7 +33,7 @@ dynForm = {
contextDataType = contextData.type;
}
$('#ajaxFormModal #parentId').val(contextDataId);
$("#ajaxFormModal #parentType").val( contextDataType );
$("#ajaxFormModal #parentType").val( contextDataType ); */
},
/*,
loadData : function(data){
......@@ -62,10 +62,10 @@ dynForm = {
if( typeof $("#ajaxFormModal #description").code === 'function' )
$("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() );
if($('#ajaxFormModal #parentId').val() == "" && $('#ajaxFormModal #parentType').val() ){
$('#ajaxFormModal #parentId').val(userId);
$("#ajaxFormModal #parentType").val( "citoyens" );
}
//if($('#ajaxFormModal #parentId').val() == "" && $('#ajaxFormModal #parentType').val() ){
// $('#ajaxFormModal #parentId').val(userId);
// $("#ajaxFormModal #parentType").val( "citoyens" );
//}
$("#ajaxFormModal #type").val("classifieds");
},
afterSave : function(){
......@@ -87,7 +87,7 @@ dynForm = {
$(".categoryBtntagList").hide();
$(".subtypeSection").html("");
$(".subtypeSectioncustom").show();
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, .deviseselect").hide();
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .parentfinder, .imageuploader, .formshowerscustom, .tagstags, .deviseselect").hide();
$("#btn-submit-form").hide();
},
initTypeBtn : function () {
......@@ -128,7 +128,7 @@ dynForm = {
$( ".subtypeBtn" ).removeClass("active");
$(this).addClass("active");
$("#ajaxFormModal #subtype").val( ( $(this).hasClass('active') ) ? $(this).data('key') : "" );
$(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, .deviseselect").show();
$(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .parentfinder, .imageuploader, .formshowerscustom, .tagstags, .deviseselect").show();
if($(".form-group.sectionhidden #section").val() == "donation" ||
$(".form-group.sectionhidden #section").val() == "sharing" ||
......@@ -145,7 +145,7 @@ dynForm = {
dyFObj.canSubmitIf();
});
} else
$(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, .deviseselect").show();
$(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .parentfinder, .imageuploader, .formshowerscustom, .tagstags, .deviseselect").show();
});
}
......@@ -216,6 +216,14 @@ dynForm = {
},
subtype : dyFInputs.inputHidden(),
name : dyFInputs.name( "classified" ) ,
parent : {
inputType : "finder",
label : tradDynForm.classifiedproposedby,
multiple : false,
open:false,
initType: ["organizations", "projects"],
},
description : dyFInputs.textarea(tradDynForm.description, "..."),
price : dyFInputs.price(),
devise : dyFInputs.inputSelect(tradDynForm.currency, tradDynForm.indicatethemoneyused, deviseTheme),
......@@ -224,8 +232,8 @@ dynForm = {
location : dyFInputs.location,
tags : dyFInputs.tags(),
type : dyFInputs.inputHidden(),
parentId : dyFInputs.inputHidden(),
parentType : dyFInputs.inputHidden(),
//parentId : dyFInputs.inputHidden(),
//parentType : dyFInputs.inputHidden(),
}
}
};
\ No newline at end of file
......@@ -18,9 +18,9 @@ dynForm = {
$(".sectionBtntagList").hide();
$(".categoryBtntagList").hide();
} else
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, .deviseselect, #btn-submit-form").hide();
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .parentfinder, .imageuploader, .formshowerscustom, .tagstags, .deviseselect, #btn-submit-form").hide();
contextDataId = userId;
/*contextDataId = userId;
contextDataType = "citoyens";
if(contextData != null && contextData.type && contextData.id )
{
......@@ -28,7 +28,7 @@ dynForm = {
contextDataType = contextData.type;
}
$('#ajaxFormModal #parentId').val(contextDataId);
$("#ajaxFormModal #parentType").val( contextDataType );
$("#ajaxFormModal #parentType").val( contextDataType ); */
$("#ajaxFormModal #type").val( "jobs" );
},
},
......@@ -70,7 +70,7 @@ dynForm = {
$(".categoryBtntagList").hide();
$(".subtypeSection").html("");
$(".subtypeSectioncustom").show();
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, .deviseselect, #btn-submit-form").hide();
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .parentfinder, .imageuploader, .formshowerscustom, .tagstags, .deviseselect, #btn-submit-form").hide();
}
},
properties : {
......@@ -160,7 +160,7 @@ dynForm = {
var subtype = ( $(this).hasClass('active') ) ? $(this).data('tag') : "";
subtype = subtype != "" ? subtype : "";
$("#ajaxFormModal #subtype").val( subtype );
$(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, .deviseselect, #btn-submit-form").show();
$(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .parentfinder, .imageuploader, .formshowerscustom, .tagstags, .deviseselect, #btn-submit-form").show();
//$(".subtypeBtn:not(.active)").hide();
$(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' "+
......@@ -183,6 +183,13 @@ dynForm = {
},
subtype : dyFInputs.inputHidden(),
name : dyFInputs.name("job"),
parent : {
inputType : "finder",
label : tradDynForm.jobsproposedby,
multiple : false,
open:false,
initType: ["organizations", "projects"],
},
image : dyFInputs.image(),
price : dyFInputs.price(),
devise : dyFInputs.inputSelect(tradDynForm.currency, tradDynForm.indicatethemoneyused, deviseTheme),
......@@ -195,8 +202,8 @@ dynForm = {
html: "<a class='btn btn-default text-dark w100p' href='javascript:;' onclick='$(\".urlsarray\").slideToggle()'><i class='fa fa-plus'></i> options (urls)</a>",
},
urls : dyFInputs.urlsOptionnel,
parentId : dyFInputs.inputHidden(),
parentType : dyFInputs.inputHidden(),
//parentId : dyFInputs.inputHidden(),
//parentType : dyFInputs.inputHidden(),
type : dyFInputs.inputHidden(),
}
}
......
......@@ -18,9 +18,9 @@ dynForm = {
$(".sectionBtntagList").hide();
$(".categoryBtntagList").hide();
} else
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .publiccheckboxSimple, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form").hide();
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .publiccheckboxSimple, .parentfinder, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form").hide();
contextDataId = userId;
/*contextDataId = userId;
contextDataType = "citoyens";
if(contextData != null && contextData.type && contextData.id )
{
......@@ -28,7 +28,7 @@ dynForm = {
contextDataType = contextData.type;
}
$('#ajaxFormModal #parentId').val(contextDataId);
$("#ajaxFormModal #parentType").val( contextDataType );
$("#ajaxFormModal #parentType").val( contextDataType );*/
$("#ajaxFormModal #type").val( "ressources" );
//$('#ajaxFormModal #collection').val( "classifieds" );
//$('#ajaxFormModal #key').val( "classifieds" );
......@@ -71,7 +71,7 @@ dynForm = {
$(".categoryBtntagList").hide();
$(".subtypeSection").html("");
$(".subtypeSectioncustom").show();
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .publiccheckboxSimple, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form").hide();
$(".categoryBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .publiccheckboxSimple, .parentfinder, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form").hide();
}
},
properties : {
......@@ -162,7 +162,7 @@ dynForm = {
var subtype = ( $(this).hasClass('active') ) ? $(this).data('tag') : "";
subtype = subtype != "" ? subtype : "";
$("#ajaxFormModal #subtype").val( subtype );
$(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .publiccheckboxSimple, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form").show();
$(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .parentfinder, .publiccheckboxSimple, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form").show();
//$(".subtypeBtn:not(.active)").hide();
$(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' "+
......@@ -186,6 +186,13 @@ dynForm = {
subtype : dyFInputs.inputHidden(),
type : dyFInputs.inputHidden(),
name : dyFInputs.name("ressource"),
parent : {
inputType : "finder",
label : tradDynForm.ressourceproposedby,
multiple : false,
open:false,
initType: ["organizations", "projects"],
},
public : dyFInputs.checkboxSimple("true", "public",
{"onText" : trad.yes,
"offText": trad.no,
......@@ -205,8 +212,8 @@ dynForm = {
html: "<a class='btn btn-default text-dark w100p' href='javascript:;' onclick='$(\".urlsarray\").slideToggle()'><i class='fa fa-plus'></i> options (urls)</a>",
},
urls : dyFInputs.urlsOptionnel,
parentId : dyFInputs.inputHidden(),
parentType : dyFInputs.inputHidden(),
// parentId : dyFInputs.inputHidden(),
//parentType : dyFInputs.inputHidden(),
}
}
};
\ No newline at end of file
......@@ -49,6 +49,7 @@ class Classified {
"description" => array("name" => "description"),
"addresses" => array("name" => "addresses"),
"parentId" => array("name" => "parentId"),
"parent" => array("name" => "parent"),
"parentType" => array("name" => "parentType"),
"media" => array("name" => "media"),
"urls" => array("name" => "urls"),
......
......@@ -98,7 +98,20 @@
);
?>
</span>
<?php } ?>
<?php }else if(@$element["parent"]){
foreach($element["parent"] as $key => $v){ ?>
<span class="letter-<?php echo Element::getColorIcon(@$element["typeClassified"]) ?> font-montserrat">
<i class="fa fa-angle-down"></i> <i class="fa fa-<?php echo Element::getFaIcon(@$element["typeClassified"]) ?>"></i>
<?php echo Yii::t("classified", "{what} published by {who}",
array("{what}"=>Yii::t("common",Element::getControlerByCollection(@$element["typeClassified"])),
"{who}"=>"<a href='#page.type.".@$v["type"].".id.".@$key."' class='lbh'>".
@$v["name"].
"</a>")
);
?>
</span>
<?php }
} ?>
<button class="btn btn-default pull-right btn-close-preview" style="margin-top:-15px;">
<i class="fa fa-times"></i>
</button>
......
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