var GEN_APPLY = ["Anwenden","Apply","Aplicar"]; var GEN_CANCEL = ["Abbrechen","Cancel","Cancelar"]; var GEN_DEL = ["Löschen","Remove","Removar"]; var GEN_DIRECTION = ["Verschieben","Move","Mover"]; var MAN_ROOM_PRINTER_NO = ["Kategorieeinstellung","Category setting","Configuración/categoria"]; var MAN_ROOM_PRINTER_1 = ["Drucker 1","Printer 1","Imprimadora 1"]; var MAN_ROOM_PRINTER_2 = ["Drucker 2","Printer 2","Imprimadora 2"]; var MAN_ROOM_PRINTER_TXT = ["Arbeitsdrucker","Work printer","Imprimadora de trabajo"]; var MAN_ROOM_ABBR_TXT = ["Kürzel","Abbr.","Abbr."]; var MAN_CREATENEWROOM = ["Neuer Raum","New Room","Nueva habitación"]; var MAN_SAMPLEROOMNAME = ["Raum","Room","Habitación"]; function Groundplan() { this.rooms = []; this.togoworkprinter = 0; this.insertRoomFieldDataFromServer = function(roomfield_json) { var roomfield = roomfield_json.roomfield; this.togoworkprinter = roomfield_json.togoworkprinter; this.rooms = []; for (var room_index = 0; room_index < roomfield.length; room_index++) { var aRoom = roomfield[room_index]; this.rooms[this.rooms.length] = new Room(aRoom); }; this.repaintGround(); showTableMap(); }; this.sortRoomsBySorting = function() { this.rooms = this.rooms.sort(function(a,b) { return a.sorting - b.sorting; }); }; this.repaintGround = function() { this.sortRoomsBySorting(); this.render(); var roomMap = new Roommap("#tablemaps"); }; this.responseFromServer = function(answer) { if (answer.status != "OK") { alert("Es ist ein Fehler aufgetreten: " + answer.msg); } else { alert("Aktion durchgeführt"); this.insertRoomFieldDataFromServer(answer); $('html, body').animate({ scrollTop: $("#dbactionroomconfig").offset().top }, 1000); } }; this.init = function() { var instance = this; doAjax("GET","php/contenthandler.php?module=roomtables&command=getRoomfieldAlsoInactive",null,instance.insertRoomFieldDataFromServer.bind(instance),"Raumplan",true); }; this.renderCancelApplyBtn = function() { var txt = ""; txt += ''; txt += '
' + MAN_ROOM_PRINTER_TXT[lang] + ": "; var printerOptions = [ { name: MAN_ROOM_PRINTER_NO[lang], value: 0}, { name: MAN_ROOM_PRINTER_1[lang], value: 1}, { name: MAN_ROOM_PRINTER_2[lang], value: 2} ]; txt += createGenericSelectBox("togoreceipt_printer",printerOptions,this.togoworkprinter,"togoworkreceiptprinter","c"); txt += ''; return txt; } this.render = function() { var txt = "
"; $("#roomfield").html(txt); $("#roomfield").trigger("create"); this.binding(); }; this.getRoomWithId = function (roomid) { for (var i=0;iRaumname | " + MAN_ROOM_ABBR_TXT[lang] + " | " + MAN_ROOM_PRINTER_TXT[lang] + " | " + GEN_DIRECTION[lang] + " | " + GEN_DEL[lang] + " |
---|---|---|---|---|
" + createGenericInputField(htmlId + "_name", this.name,"roomvalue_" + this.roomid + "_text"); txt += " | " + createGenericInputField(htmlId + "_abbreviation", this.abbreviation,"roomvalue_" + this.roomid + "_text"); var printerOptions = [ { name: MAN_ROOM_PRINTER_NO[lang], value: 0}, { name: MAN_ROOM_PRINTER_1[lang], value: 1}, { name: MAN_ROOM_PRINTER_2[lang], value: 2} ]; txt += " | " + createGenericSelectBox(htmlId + "_printer",printerOptions,this.printer,"roomvalue_" + this.roomid + "_printer","f"); txt += " | "; txt += " | "; txt += " |