Commit 930323b4 authored by Yorre Rajaonarivelo's avatar Yorre Rajaonarivelo
Browse files

Merge remote-tracking branch 'origin/master'

parents 299e71fa 402acfd3
......@@ -988,7 +988,7 @@ function removeEmptyAttr (jsonObj, sourceObj) {
});
}
function buildSelectOptions(list,value, order,isPolice=false,isImagepicker=false) {
function buildSelectOptions(list,value,dataValue, order,isPolice=false,isImagepicker=false) {
mylog.log("fieldObj buildSelectOptions ", value, list, order);
mylog.log("fieldObj buildSelectOptions tradCategory", tradCategory);
var html = "";
......@@ -1009,7 +1009,8 @@ function buildSelectOptions(list,value, order,isPolice=false,isImagepicker=false
else if(isImagepicker == true)
html += '<option data-img-label="'+valueName+'" data-img-src="'+assetPath+'/images/blockCmsPaint/'+optKey+'" value="'+optKey+'" '+selected+'>'+valueName+'</option>';
else
html += '<option value="'+optKey+'" '+selected+'>'+valueName+'</option>';
//html += '<option value="'+optKey+'" data-value="'+(exists(dataValue[optKey]) ? JSON.stringify(dataValue[optKey]) : "")+'" '+selected+'>'+valueName+'</option>';
html += "<option value='"+optKey+"' data-value='"+(exists(dataValue) && exists(dataValue[optKey]) ? JSON.stringify(dataValue[optKey]) : "")+"' "+selected+" >"+valueName+"</option>";
});
}
......
......@@ -2737,11 +2737,12 @@ var dyFObj = {
if(checked == "true" || checked){
$(idTrue).addClass("bg-green-k").removeClass("letter-green");
$("#ajaxFormModal ."+field+"checkboxSimple label").append(
if(typeof fieldObj.params.onLabel!="undefined"){
$("#ajaxFormModal ."+field+"checkboxSimple label").append(
"<span class='lbl-status-check margin-left-10'>"+
'<span class="letter-green"><i class="fa fa-check-circle"></i> '+fieldObj.params.onLabel+'</span>'+
"</span>");
}
setTimeout(function(){
if(typeof fieldObj.inputTrue != "undefined")
$(fieldObj.inputTrue).hide(400);
......@@ -2749,11 +2750,12 @@ var dyFObj = {
}
else if(checked == "false" || !checked){
$(idFalse).addClass("bg-red").removeClass("letter-red");
$("#ajaxFormModal ."+field+"checkboxSimple label").append(
if(typeof fieldObj.params.offLabel!="undefined"){
$("#ajaxFormModal ."+field+"checkboxSimple label").append(
"<span class='lbl-status-check margin-left-10'>"+
'<span class="letter-red"><i class="fa fa-minus-circle"></i> '+fieldObj.params.offLabel+'</span>'+
"</span>");
}
setTimeout(function(){
if(typeof fieldObj.inputId != "undefined")
$(fieldObj.inputId).hide(400);
......@@ -2769,9 +2771,10 @@ var dyFObj = {
if(checkval) {
$(idTrue).addClass("bg-green-k").removeClass("letter-green");
$(idFalse).removeClass("bg-red").addClass("letter-red");
$("#ajaxFormModal ."+field+"checkboxSimple .lbl-status-check").html(
if(typeof fieldObj.params.onLabel!="undefined"){
$("#ajaxFormModal ."+field+"checkboxSimple .lbl-status-check").html(
'<span class="letter-green"><i class="fa fa-check-circle"></i> '+fieldObj.params.onLabel+'</span>');
}
if(typeof fieldObj.inputId != "undefined") $(fieldObj.inputId).show(400);
if(typeof fieldObj.inputTrue != "undefined") $(fieldObj.inputTrue).hide(400);
......@@ -2783,9 +2786,10 @@ var dyFObj = {
else{
$(idFalse).addClass("bg-red").removeClass("letter-red");
$(idTrue).removeClass("bg-green-k").addClass("letter-green");
$("#ajaxFormModal ."+field+"checkboxSimple .lbl-status-check").html(
if(typeof fieldObj.params.offLabel!="undefined"){
$("#ajaxFormModal ."+field+"checkboxSimple .lbl-status-check").html(
'<span class="letter-red"><i class="fa fa-minus-circle"></i> '+fieldObj.params.offLabel+'</span>');
}
if(typeof fieldObj.inputId != "undefined") $(fieldObj.inputId).hide(400);
if(typeof fieldObj.inputTrue != "undefined") $(fieldObj.inputTrue).show(400);
......@@ -2931,11 +2935,11 @@ var dyFObj = {
mylog.log("fieldObj select order", order);
if(fieldObj.options){
if(fieldObj.isPolice)
fieldHTML += buildSelectOptions(fieldObj.options, ((typeof fieldObj.value != "undefined")?fieldObj.value:value), order,fieldObj.isPolice);
fieldHTML += buildSelectOptions(fieldObj.options, ((typeof fieldObj.value != "undefined")?fieldObj.value:value),false, order,fieldObj.isPolice);
else if(fieldObj.isImagepicker)
fieldHTML += buildSelectOptions(fieldObj.options, ((typeof fieldObj.value != "undefined")?fieldObj.value:value), order,false,fieldObj.isImagepicker);
fieldHTML += buildSelectOptions(fieldObj.options, ((typeof fieldObj.value != "undefined")?fieldObj.value:value),false, order,false,fieldObj.isImagepicker);
else
fieldHTML += buildSelectOptions(fieldObj.options, ((typeof fieldObj.value != "undefined")?fieldObj.value:value), order);
fieldHTML += buildSelectOptions(fieldObj.options, ((typeof fieldObj.value != "undefined")?fieldObj.value:value),((typeof fieldObj.dataValue != "undefined")?fieldObj.dataValue:{}), order);
}
if( fieldObj.groupOptions )
......@@ -7558,10 +7562,12 @@ var dyFInputs = {
if(checked == "true" || checked===true){
$(idTrue).addClass("bg-green-k").removeClass("letter-green");
$("#ajaxFormModal ."+id+"checkboxSimple label").append(
if(typeof params["onLabel"]!="undefined"){
$("#ajaxFormModal ."+id+"checkboxSimple label").append(
"<span class='lbl-status-check margin-left-10'>"+
'<span class="letter-green"><i class="fa fa-check-circle"></i> '+params["onLabel"]+'</span>'+
"</span>");
}
setTimeout(function(){
if(typeof params["inputTrue"] != "undefined")
......@@ -7570,10 +7576,12 @@ var dyFInputs = {
}
else if(checked == "false" || checked===false){
$(idFalse).addClass("bg-red").removeClass("letter-red");
$("#ajaxFormModal ."+id+"checkboxSimple label").append(
if(typeof params["offLabel"]!="undefined"){
$("#ajaxFormModal ."+id+"checkboxSimple label").append(
"<span class='lbl-status-check margin-left-10'>"+
'<span class="letter-red"><i class="fa fa-minus-circle"></i> '+params["offLabel"]+'</span>'+
"</span>");
}
setTimeout(function(){
if(typeof params["inputId"] != "undefined")
......@@ -7590,9 +7598,10 @@ var dyFInputs = {
if(checkval) {
$(idTrue).addClass("bg-green-k").removeClass("letter-green");
$(idFalse).removeClass("bg-red").addClass("letter-red");
$("#ajaxFormModal ."+id+"checkboxSimple .lbl-status-check").html(
if(typeof params["onLabel"]!="undefined"){
$("#ajaxFormModal ."+id+"checkboxSimple .lbl-status-check").html(
'<span class="letter-green"><i class="fa fa-check-circle"></i> '+params["onLabel"]+'</span>');
}
if(typeof params["inputId"] != "undefined") $(params["inputId"]).show(400);
if(typeof params["inputTrue"] != "undefined") $(params["inputTrue"]).hide(400);
......@@ -7600,9 +7609,10 @@ var dyFInputs = {
else{
$(idFalse).addClass("bg-red").removeClass("letter-red");
$(idTrue).removeClass("bg-green-k").addClass("letter-green");
$("#ajaxFormModal ."+id+"checkboxSimple .lbl-status-check").html(
if(typeof params["offLabel"]!="undefined"){
$("#ajaxFormModal ."+id+"checkboxSimple .lbl-status-check").html(
'<span class="letter-red"><i class="fa fa-minus-circle"></i> '+params["offLabel"]+'</span>');
}
if(typeof params["inputId"] != "undefined") $(params["inputId"]).hide(400);
if(typeof params["inputTrue"] != "undefined") $(params["inputTrue"]).show(400);
}
......
......@@ -2277,6 +2277,22 @@ margin-right: 5px;
.dropdown.open .dropdown-menu{
display: block;
}
#menuTopLeft .xsMenu.menu-xs-cplx .dropdown.open .dropdown-menu{
display: contents !important;
}
@media (max-width:767px){
#menuTopLeft .xsMenu.menu-xs-cplx .dropdown{
display: block !important;
}
}
#menuLeft .dropdown,#menuRight .dropdown{
display: inline-block;
cursor:pointer;
}
#menuTopLeft .dropdown,#menuTopRight .dropdown{
display: inline;
cursor:pointer;
}
.dropdown-submenu.pull-left{
float:none;
}
......
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