Changeset 9159


Ignore:
Timestamp:
Nov 12, 2008, 4:24:29 PM (12 years ago)
Author:
dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9158 r9159  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2008/11/12 Daniela Dorner
     22
     23   * datacenter/db/menu.js, datacenter/db/include.php:
     24     - added feature to remove lines for table ('-' button at beginning
     25       of each line) and button to get all lines back ('+' at top of
     26       the column)
     27
     28
    2029
    2130 2008/11/12 Thomas Bretz
  • trunk/MagicSoft/Mars/datacenter/db/include.php

    r8467 r9159  
    471471        printf("<form method='POST'>");
    472472    if (empty($_GET["fPrintTable"]))
    473         printf("<p>%s<P>\n", $menu);
    474     printf("<table BORDER='0'>\n");
     473        printf("%s\n", $menu);
     474    printf("<table BORDER='0' style='margin-top:1ex'>\n");
     475    $counter=0;
    475476    while ($row0 = mysql_fetch_assoc($result0))
    476477    {
    477478        if ($first)
    478479        {
    479             printf(" <tr BGCOLOR='#C0C0C0'>\n");
     480            printf(" <tr BGCOLOR='#C0C0C0'>\n<td BGCOLOR='#F0F0F0'><img src='../plus.png' alt='+' onClick='showalllines(%d)'></td>\n", mysql_num_rows($result0));
    480481            $first = FALSE;
    481482            if ($form)
     
    503504        }
    504505
     506        $counter++;
    505507        if (!$col)
    506             printf(" <tr BGCOLOR='#E0E0E0'>\n");
     508            printf(" <tr id='line%s' BGCOLOR='#E0E0E0'>\n<td BGCOLOR='#F0F0F0'>\n<img id='line%sbutton' src='../minus.png' alt='-' onClick='showhide(\"line%s\")'>\n</td>\n", $counter, $counter, $counter);
    507509        else
    508             printf(" <tr BGCOLOR='#D0D0D0'>\n");
     510            printf(" <tr id='line%s' BGCOLOR='#D0D0D0'>\n<td BGCOLOR='#F0F0F0'>\n<img id='line%sbutton' src='../minus.png' alt='-' onClick='showhide(\"line%s\")'>\n</td>\n", $counter, $counter, $counter);
    509511        $col = !$col;
    510512
  • trunk/MagicSoft/Mars/datacenter/db/menu.js

    r8476 r9159  
    6161    var img = document.getElementById(id+"button");
    6262    //query current status and change it accordingly
    63     if (el.style.display == 'block')
     63    if (el.style.display != 'none')
    6464        hide(el,img);
    6565    else
     
    106106    var fShowHide = document.getElementById("sh");
    107107    fShowHide.value = setdisplays();
     108}
     109
     110//show all lines on db website
     111function showalllines(num)
     112{
     113    for (var i = 1 ; i < num+1 ; i++)
     114    {
     115        var el = document.getElementById("line"+i);
     116        var img = document.getElementById("line"+i+"button");
     117        if (el.style.display == 'none')
     118        {
     119            el.style.display='';
     120            if (img)
     121            {
     122                img.src='minus.png';
     123                img.alt='-';
     124            }
     125        }
     126    }
    108127}
    109128
Note: See TracChangeset for help on using the changeset viewer.