Persönliche Werkzeuge

Vorlage:SH

Aus BogenWiki

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 26: Zeile 26:
   function CountSHBD(sSHID)
   function CountSHBD(sSHID)
   {
   {
 +
    // Count the rows in a BD table:
 +
    // - Amount of rows that are shown (visible in UI, display=table-row and and Bg!=-)
 +
    // - Amount of rows that contain an abject (Bg!=. and Bg!=-)
 +
    // - Total amount of rows (Bg!=-)
     console.log('CountSHBD('+sSHID+')');
     console.log('CountSHBD('+sSHID+')');
     let nRowsShown = 0;
     let nRowsShown = 0;
Zeile 116: Zeile 120:
         break;
         break;
       case 'showall':
       case 'showall':
-
        break;
+
       case 'showavail':
-
       case 'showallavail':
+
-
        break;
+
       case 'hideall':
       case 'hideall':
 +
        // update rows to the desired state
 +
        aNodesAll = AddNodesSHBD('tr[id^=SH-objrow-'+sSHID+']')
 +
        aNodesAll = AddNodesSHBD('tr[id^=SH-emptyrow-'+sSHID+']',aNodesAll)
 +
        // update display state of the rows
 +
        for (let i = 0; i < aNodesAll.length; i++)
 +
          SetRowStateSHBD(aNodesAll[i].id,sCmd);
 +
        // update header button
 +
        [sActState,sNewState] = GetActAndNewStateSHBD(sSHID)
 +
        SetBtnStateSHBD('SH-headbtn-'+sSHID,sNewState);
 +
        // update group buttons
 +
        let aNodesGroup = AddNodesSHBD('tr[id^=SH-divrow-'+sSHID+']');
 +
        for (var i = 0; i < aNodesGroup.length; i++) {
 +
          let sSHGroupID = aNodesGroup[i].id.split('-')[2];
 +
          let [sGroupActState,sGroupNewState] = GetActAndNewStateSHBD(sSHGroupID)
 +
          SetBtnStateSHBD('SH-divbtn-'+sSHGroupID,sGroupNewState);
 +
        }
         break;
         break;
       case 'showgroup':
       case 'showgroup':
Zeile 126: Zeile 144:
         break;
         break;
       case 'hidegroup':
       case 'hidegroup':
 +
        // update rows to the desired state
 +
        aNodesAll = AddNodesSHBD('tr[id^=SH-objrow-'+sSHID+']')
 +
        aNodesAll = AddNodesSHBD('tr[id^=SH-emptyrow-'+sSHID+']',aNodesAll)
 +
        // update display state of the rows
 +
        for (let i = 0; i < aNodesAll.length; i++) {
 +
          SetRowStateSHBD(aNodesAll[i].id,(sCmd=='showgroup' ? 'show' : (sCmd=='showgroupavail' ? 'showavail' : 'hide')));
 +
        }
 +
        [sActState,sNewState] = GetActAndNewStateSHBD(sSHID)
 +
        SetBtnStateSHBD('SH-divbtn-'+sSHID,sNewState);
         break;
         break;
       case 'toggleall':
       case 'toggleall':

Version vom 10:36, 5. Okt. 2026


Zeigen/Verbergen:

dies ist ein Test ...
dies ist ein Test ...
dies ist ein Test ...
dies ist ein Test ...