/**
*
*/
function createProdTableHeaderLine() {
var txt = "
Name"
+ " | Typ "
+ " | Durchlauf Küche"
+ " | Durchlauf Bereitst."
+ " | Drucker" +
" | Preis (A)" +
" |
";
return trline;
},
insertValuesIntoMenuTable:function() {
$("#prodleaf_" + this.id + " input.prodlongname").val(this.longname);
$("#prodleaf_" + this.id + " input.prodshortname").val(this.shortname);
$("#prodleaf_" + this.id + " input.prodpriceA").val(this.priceA);
$("#prodleaf_" + this.id + " input.prodpriceB").val(this.priceB);
$("#prodleaf_" + this.id + " input.prodpriceC").val(this.priceC);
$("#prodleaf_" + this.id + " input.produnit").val(this.unit);
$("#prodleaf_" + this.id + " input.proddisplay").val(this.display);
if (this.days == '0123456') {
$("#prodleaf_" + this.id + " input.proddays").val('');
} else {
$("#prodleaf_" + this.id + " input.proddays").val(this.days);
}
$("#prodleaf_" + this.id + " input.prodtax").val(this.tax);
$("#prodleaf_" + this.id + " input.prodamount").val(this.amount);
},
createAudioSelection:function(audiofiles,id) {
var txt = "";
return txt;
},
createAvailSelection:function(id,text0,text1) {
if (this.available == 1) {
return "";
} else {
return "";
}
},
createOption:function(value,selected,txt) {
if (value == selected) {
return "";
} else {
return "";
}
},
createTaxAustriaSelection:function(id) {
var txt = "";
return txt;
},
createUnitSelection:function(id) {
var txt = "";
return txt;
},
createDisplaySelection:function(id) {
var txt = "";
return txt;
},
createTaxAustriaSel:function(id) {
var visi = ""
if (austria == 0) {
visi = " style='display:none;' ";
}
var txt = ''
+ ''
+ this.createTaxAustriaSelection(id)
+ '
';
return txt;
},
createUnitField:function(id) {
var txt = ''
+ ''
+ this.createUnitSelection(id)
+ '
';
return txt;
},
createDisplayField:function(id) {
var txt = ''
+ ''
+ this.createDisplaySelection(id)
+ '
';
return txt;
},
createFavoriteSelection:function(id,text0,text1) {
if (this.favorite == 1) {
return "";
} else {
return "";
}
},
createMobileAudioSel:function(audiofiles,id) {
var txt = ''
+ ''
+ this.createAudioSelection(audiofiles,id)
+ '
';
return txt;
},
createMobileAvail:function(id,label) {
var txt = ''
+ ''
+ this.createAvailSelection(id,PROD_NO,PROD_YES)
+ '
';
return txt;
},
createMobileFavorite:function(id,label) {
var txt = ''
+ ''
+ this.createFavoriteSelection(id,PROD_NO,PROD_YES)
+ '
';
return txt;
},
createListStructureLine:function (audiofiles) {
var theme="e";
if (this.id.indexOf("n") == 0) {
theme="f";
}
var line = ''
+'
'
+ '
'
+ createInputField("prodlong_" + this.id,"prodlong_input_" + this.id,"longname")
+ createInputField("prodshort_" + this.id,"prodshort_input_" + this.id,"shortname")
+ '
'
+ createInputField("prodpriceA_" + this.id,"prodpriceA_input_" + this.id,"priceA")
+ createInputField("prodpriceB_" + this.id,"prodpriceB_input_" + this.id,"priceB")
+ createInputField("prodpriceC_" + this.id,"prodpriceC_input_" + this.id,"priceC")
+ "
"
+ this.createUnitField("produnit_input_" + this.id)
+ "
"
+ "
"
+ this.createDisplayField("proddisplay_input_" + this.id)
+ "
"
+ createInputField("proddays_" + this.id,"proddays_input_" + this.id,"days")
+ createInputField("prodtax_" + this.id,"prodtax_input_" + this.id,"tax")
+ '
'
+ createInputField("prodamount_" + this.id,"prodamount_input_" + this.id,"amount")
+ "
"
+ this.createTaxAustriaSel("taxaustriasel_" + this.id)
+ "
"
+ "
"
+ this.createMobileAudioSel(audiofiles,"audiosel_" + this.id)
+ "
"
+ "
"
+ this.createMobileAvail("prodavail_" + this.id,PROD_AVAILABLE[lang])
+ "
"
+ "
"
+ this.createMobileFavorite("prodfav_" + this.id,PROD_FAVORITE[lang])
+ "
"
if (theme != "f") {
line += this.createProdNavArea();
line += createInputOsCmdField("prodextra_" + this.id,"prodextrainput_" + this.id,"extra");
line += "";
line += createResetApplyArea("prodapply_" + this.id,"prodcancel_" + this.id,null) + '
';
} else {
line += this.createApplyArea("prodnew_" + this.id) + '';
}
return line;
},
insertValuesIntoMenuList:function() {
if (this.id.indexOf("n") != 0) {
$("#prodheader_" + this.id).html(toHtml(this.longname));
} else {
$("#prodheader_" + this.id).html(PROD_NEW_PROD[lang]);
}
$("#prodlong_" + this.id).html(PROD_LONG_NAME[lang]);
$("#prodlong_input_" + this.id).val(this.longname);
$("#prodshort_" + this.id).html(PROD_SHORTNAME[lang]);
$("#prodshort_input_" + this.id).val(this.shortname);
$("#prodpriceA_" + this.id).html(PROD_PRICE[lang] + ' (A)');
$("#prodpriceB_" + this.id).html(PROD_PRICE[lang] + ' (B)');
$("#prodpriceC_" + this.id).html(PROD_PRICE[lang] + ' (C)');
$("#produnit_" + this.id).html(PROD_UNIT[lang]);
$("#proddisplay_" + this.id).html(PROD_DISPLAY[lang]);
$("#proddays_" + this.id).html(PROD_DAYS[lang]);
$("#prodtax_" + this.id).html(PROD_TAX[lang]);
$("#prodtaxaustria_" + this.id).html(PROD_TAXAUSTRIA[lang]);
$("#prodamount_" + this.id).html(PROD_AMOUNT[lang]);
$("#prodpriceA_input_" + this.id).val(this.priceA.toString().replace(".",decpoint));
$("#prodpriceB_input_" + this.id).val(this.priceB.toString().replace(".",decpoint));
$("#prodpriceC_input_" + this.id).val(this.priceC.toString().replace(".",decpoint));
$("#unitcont_" + this.id).html(this.createUnitField("produnit_input_" + this.id));
$("#displaycont_" + this.id).html(this.createDisplayField("proddisplay_input_" + this.id));
$("#proddisplay_input_" + this.id).val(this.display);
if ((this.days == '0123456') || (this.days == null) || (this.days == 'null')) {
$("#proddays_input_" + this.id).val('');
} else {
$("#proddays_input_" + this.id).val(this.days);
}
if (this.tax != "null") {
$("#prodtax_input_" + this.id).val(this.tax.toString().replace(".",decpoint));
} else {
$("#prodtax_input_" + this.id).val('');
}
if (this.amount != "null") {
$("#prodamount_input_" + this.id).val(this.amount.toString().replace(".",decpoint));
} else {
$("#prodamount_input_" + this.id).val('');
}
$("#availcont_" + this.id).html(this.createMobileAvail("prodavail_" + this.id,PROD_AVAILABLE[lang]));
$("#favcont_" + this.id).html(this.createMobileFavorite("prodfav_" + this.id,PROD_FAVORITE[lang]));
$("#audiocont_" + this.id).html(this.createMobileAudioSel(audiofiles,"audiosel_" + this.id));
$("#prodextra_" + this.id).html(PROD_ASS_EXTRAS[lang]);
$("#prodextra_" + this.id).data("orig_assignedextras",null);
$("#prodextra_" + this.id).data("assignedextras",null);
},
createApplyArea:function(idApply) {
var txt = '';
return txt;
},
createProdNavArea:function() {
var buttonUp = '';
var buttonDown = '';
var buttonDel = '';
var aText = '';
aText += '';
return aText;
}
};
return product;
}
function createInputField(idForNameOfField,idForInputField,nameOfInputField) {
var txt = ''
+ ''
+ '
';
return txt;
}
function createInputOsCmdField(idForNameOfField,idForInputField,nameOfInputField) {
var txt = ''
+ ''
+ '
';
return txt;
}
function createResetApplyArea(idApply,idCancel,idDel) {
var txt = '';
} else {
txt += 'b">'
+ ''
+ ''
+ ''
+ '';
}
return txt;
}
function createProdType(id,name,kind,usekitchen,usesupplydesk,printer) {
var prodtype = {
id:id,
name: name,
usekitchen:usekitchen,
usesupplydesk:usesupplydesk,
kind:kind,
printer:printer,
createTableStructureLine: function (depth) {
var depthstr = ident(depth);
var trline = ""
+ "" + depthstr + ""
+ " | " + this.createTwoValSelection(kind,PROD_FOOD,PROD_DRINKS)
+ " | " + this.createTwoValSelection(usekitchen,PROD_NO,PROD_YES)
+ " | " + this.createTwoValSelection(usesupplydesk,PROD_NO,PROD_YES)
+ " | " + this.createTwoValSelection(printer,PROD_PRINTER_1,PROD_PRINTER_2)
+ " | "
+ " |
";
return trline;
},
insertValuesIntoMenuTable:function() {
$("#prodtype_" + id + " input.typename").val(name);
},
createTwoValSelection:function(theVal,text0,text1) {
if (theVal == 1) {
return "