Uebernahme der kompletten Version, so wie sie Philip als "Demo-Version" gezeigt hat...
[kivitendo-erp.git] / js / common.js
1 function centerParms(width,height,extra) {
2   xPos = (screen.width - width) / 2;
3   yPos = (screen.height - height) / 2;
4
5   string = "left=" + xPos + ",top=" + yPos;
6
7   if (extra)
8     string += "width=" + width + ",height=" + height;
9
10   return string;
11 }
12
13 function set_longdescription_window(input_name) {
14   var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
15   var name = document.getElementsByName(input_name)[0].value;
16   url = "common.pl?" +
17     "action=set_longdescription&" +
18     "login=" +  encodeURIComponent(document.getElementsByName("login")[0].value)+ "&"+
19     "password=" + encodeURIComponent(document.getElementsByName("password")[0].value) + "&" +
20     "path=" + encodeURIComponent(document.getElementsByName("path")[0].value) + "&" +
21     "longdescription=" + escape(document.getElementsByName(input_name)[0].value) + "&" +
22     "input_name=" + escape(input_name) + "&"
23   window.open(url, "_new_generic", parm);
24 }