Changeset 12449 for trunk/www/db_po


Ignore:
Timestamp:
11/07/11 12:27:42 (13 years ago)
Author:
Daniela Dorner
Message:
removed variable selectsize from functions and set size of select box depending on fMode
Location:
trunk/www/db_po
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/db_po/edit_po.php

    r12096 r12449  
    88    //call get_progs() at startup
    99    printf("<script type=\"text/javascript\" >\n");
    10     printf("window.onload = function () { get_progs(\"\",\"10\",\"edit\"); }\n");
     10    printf("window.onload = function () { get_progs(\"\",\"edit\"); }\n");
    1111    printf("</script>\n");
    1212
  • trunk/www/db_po/get_keys.php

    r12448 r12449  
    1111    if (empty($_GET["fKey"]))
    1212        $_GET["fKey"]="";
    13     if (empty($_GET["fSelectSize"]))
    14         $_GET["fSelectSize"]="10";
    1513    if (empty($_GET["fMode"]))
    1614        $_GET["fMode"]="view";
     
    4543
    4644    if (strcmp($_GET["fMode"], "view")==0)//reload tables in case of mode 'view'
    47         printf("<select style='width:300px' id='key' size='%s' onchange='get_values(1,\"%s\",this.value,\"%s\");get_values(2,\"all\",\"all\");get_values(3,\"all\",\"all\");CompareValues();' class='Width'>\n",
    48                $_GET["fSelectSize"], $_GET["fProgram"], $_GET["fMode"]);
     45        printf("<select style='width:300px' id='key' size='1' onchange='get_values(1,\"%s\",this.value,\"%s\");get_values(2,\"all\",\"all\");get_values(3,\"all\",\"all\");CompareValues();' class='Width'>\n",
     46               $_GET["fProgram"], $_GET["fMode"]);
    4947    else
    50         printf("<select style='width:300px' id='key' size='%s' onchange=\"get_values(1,'%s',this.value,'%s')\" class='Width'>\n",
    51                $_GET["fSelectSize"], $_GET["fProgram"], $_GET["fMode"]);
     48        printf("<select style='width:300px' id='key' size='20' onchange=\"get_values(1,'%s',this.value,'%s')\" class='Width'>\n",
     49               $_GET["fProgram"], $_GET["fMode"]);
    5250
    5351    if (!empty($_GET["fKey"]) && strcmp("all", $_GET["fKey"])==0)
  • trunk/www/db_po/get_progs.php

    r12444 r12449  
    66    if (empty($_GET["fProgram"]))
    77        $_GET["fProgram"]="";
    8     if (empty($_GET["fSelectSize"]))
    9         $_GET["fSelectSize"]="20";
    108    if (empty($_GET["fMode"]))
    119        $_GET["fMode"]="view";
     
    3331    if (strcmp($_GET["fMode"], "edit")==0)
    3432        printf("select program: <br>\n");
    35 //    else
    36 //        printf("select program: \n");
    3733
    38     if (strcmp($_GET["fMode"], "view")==0)//reload tables in case of mode 'view'
    39         printf("<select style='width: 150px' id='prog' size='%s' onchange='get_keys(this.value,\"\",\"%s\",\"%s\");get_values(2,\"all\",\"all\");get_values(3,\"all\",\"all\");CompareValues();' class='Width'>\n",
    40                $_GET["fSelectSize"], $_GET["fSelectSize"], $_GET["fMode"]);
     34    if (strcmp($_GET["fMode"], "view")==0)
     35        printf("<select style='width: 150px' id='prog' size='1' onchange='get_keys(this.value,\"\",\"%s\");get_values(2,\"all\",\"all\");get_values(3,\"all\",\"all\");CompareValues();' class='Width'>\n", $_GET["fMode"]);
    4136    else
    42         printf("<select style='width: 150px' id='prog' size='%s' onchange=\"get_keys(this.value,'','%s','%s');get_values(1,this.value,'all');\" class='Width'>\n",
    43                $_GET["fSelectSize"], 20, $_GET["fMode"]);//select size can be removed when fMode is used instead and only the two cases are needed
     37        printf("<select style='width: 150px' id='prog' size='10' onchange=\"get_keys(this.value,'','%s');get_values(1,this.value,'all');\" class='Width'>\n", $_GET["fMode"]);
    4438
    4539    if (!empty($_GET["fProgram"]) && strcmp("all", $_GET["fProgram"])==0)
  • trunk/www/db_po/po.js

    r12446 r12449  
    1010
    1111//function to get programs from the db
    12 function get_progs(prog, selectsize, mode)
    13 {
    14     xmlhttp.open("GET","get_progs.php?fProgram="+prog+"&fSelectSize="+selectsize+"&fMode="+mode,false);
     12function get_progs(prog, mode)
     13{
     14    xmlhttp.open("GET","get_progs.php?fProgram="+prog+"&fMode="+mode,false);
    1515    xmlhttp.send();
    1616    if (xmlhttp.readyState==4 && xmlhttp.status==200)
     
    2626
    2727//function to get keys from the db
    28 function get_keys(prog, key, selectsize, mode)
    29 {
    30     xmlhttp.open("GET","get_keys.php?fProgram="+prog+"&fKey="+key+"&fSelectSize="+selectsize+"&fMode="+mode,false);
     28function get_keys(prog, key, mode)
     29{
     30    xmlhttp.open("GET","get_keys.php?fProgram="+prog+"&fKey="+key+"&fMode="+mode,false);
    3131    xmlhttp.send();
    3232    if (xmlhttp.readyState==4 && xmlhttp.status==200)
  • trunk/www/db_po/view_po.php

    r12097 r12449  
    88    //call get_progs() at startup
    99    printf("<script type=\"text/javascript\" >\n");
    10     printf("window.onload = function () { get_progs(\"all\",1,'view'); get_keys(\"all\",\"all\",1,'view'); }\n");
     10    printf("window.onload = function () { get_progs(\"all\",'view'); get_keys(\"all\",\"all\",'view'); }\n");
    1111    printf("</script>\n");
    1212
Note: See TracChangeset for help on using the changeset viewer.