Subversion Repositories DevTools

Rev

Rev 4395 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4395 Rev 4396
Line 269... Line 269...
269
function closeAllViews()
269
function closeAllViews()
270
{
270
{
271
    openingAllViews = 0;
271
    openingAllViews = 0;
272
    toggleAllViewsIcon(0);
272
    toggleAllViewsIcon(0);
273
 
273
 
274
    //  Get a list of the possible views to hide
274
    //  Get the View cookie and convert it into a hash
-
 
275
    var vhash = new Object();
275
    var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
276
    var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
276
    if (us) {
277
    if (us) {
277
        var aViewList = us.split(',');
278
        var aViewList = us.split(',');
278
        var aViewNewList = new Array();
-
 
279
        for (index=0; index < aViewList.length;++index) {
279
        for (index=0; index < aViewList.length;++index) {
280
            var div_name, el, rowId;
280
            vhash[aViewList[index]] = 1;
-
 
281
        }
-
 
282
    }
-
 
283
 
-
 
284
    //  Locate first/next view to be closed
-
 
285
    var divs = document.getElementsByTagName("div");
-
 
286
    for (var i=0;i<divs.length;i++) {
281
            rowId = aViewList[index];
287
        var el = divs[i]; 
-
 
288
        var id = el.id;
282
            div_name = 'ENVDIV'+ rowId;
289
        if (id.indexOf("ENVDIV") == 0)
-
 
290
        {
283
            el = MM_findObj(div_name);
291
            var rowId = id.substr(6);
284
            if (el && (el.style.display == 'block' || el.style.display == 'none')) {
292
            if (el.innerHTML.indexOf('<%=enumLOADING%>') == -1)
-
 
293
            {
285
                    el.style.display = 'none'
294
                el.style.display = 'none'
286
                    UpdateViewHeader(rowId, 1);
295
                UpdateViewHeader(rowId, 1);
287
                    el.innerHTML = '<%=enumLOADING%>';
296
                el.innerHTML = '<%=enumLOADING%>';
-
 
297
 
288
            } else {
298
                // Delete from cookie too
289
                aViewNewList.push(rowId);
299
                delete vhash[rowId];
290
            }
300
            }
291
        }
301
        }
-
 
302
    }
-
 
303
 
292
        // Make a new view list to be stored in cookie
304
    //  Reform the cookie
-
 
305
    if (us)
-
 
306
    {
293
        us = aViewNewList.join(',');
307
        us = Object.keys(vhash).join(',');
294
        // Store to cookie
308
        // Store to cookie
295
        document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
309
        document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
296
     }
310
    }
297
}
311
}
298
 
312
 
299
///////////////////////////////////////////////
313
///////////////////////////////////////////////
300
//  Function:    toggleAllViewsIcon
314
//  Function:    toggleAllViewsIcon
301
//  Description: Update the toogleAllViews Icon
315
//  Description: Update the toogleAllViews Icon
Line 319... Line 333...
319
//  Description: Hide/Show all the expanded views
333
//  Description: Hide/Show all the expanded views
320
//               Will not change the saved list, just the current display
334
//               Will not change the saved list, just the current display
321
//
335
//
322
function toggleAllViews()
336
function toggleAllViews()
323
{
337
{
324
    openingAllViews = 0;
-
 
325
 
-
 
326
    //  Get a list of the possible views to hide
-
 
327
    var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
-
 
328
    var aViewList = new Array();
-
 
329
    var dmatch, dset;
338
    var dmatch, dset;
-
 
339
    openingAllViews = 0;
330
 
340
 
331
    //  Update the icon image
341
    //  Update the icon image
332
    var f = document.getElementById('cb_minall');
342
    var f = document.getElementById('cb_minall');
333
    if (f.src.indexOf('min.gif') >= 0) {
343
    if (f.src.indexOf('min.gif') >= 0) {
334
        f.src = 'images/btn_max.gif';
344
        f.src = 'images/btn_max.gif';
Line 338... Line 348...
338
        f.src = 'images/btn_min.gif';
348
        f.src = 'images/btn_min.gif';
339
        dmatch = 'none';
349
        dmatch = 'none';
340
        dset = 'block';
350
        dset = 'block';
341
    }
351
    }
342
 
352
 
343
    //  Locate all DIVs, check for current state and change
353
    //  Locate first/next view to be toggled
-
 
354
    var divs = document.getElementsByTagName("div");
344
    if (us)
355
    for (var i=0;i<divs.length;i++) {
345
    {
356
        var el = divs[i]; 
346
        aViewList = us.split(',');
357
        var id = el.id;
347
 
-
 
348
        for (index=0; index < aViewList.length;++index) {
358
        if (id.indexOf("ENVDIV") == 0)
349
            var div_name, el;
359
        {
350
            div_name = 'ENVDIV'+ aViewList[index];
360
            if (el.innerHTML.indexOf('<%=enumLOADING%>') == -1) {
351
            el = MM_findObj(div_name);
361
                var rowId = id.substr(6);
352
            if (el && el.style.display == dmatch ) {
362
                if (el && el.style.display == dmatch ) {
353
                el.style.display = dset;
363
                    el.style.display = dset;
-
 
364
                }
354
            }
365
            }
355
        }
366
        }
356
    }
367
    }
357
}
368
}
358
 
369
 
Line 370... Line 381...
370
       MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_min.gif';
381
       MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_min.gif';
371
       MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#000000';
382
       MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#000000';
372
    }
383
    }
373
}
384
}
374
 
385
 
-
 
386
///////////////////////////////////////////////
-
 
387
//  Function:       RequestViewContent    
-
 
388
//  Description:    Maintain view content
-
 
389
//                  If View Tab is unpopulated - then populate it
-
 
390
//                  if View Tab is populated - then Minimise it
-
 
391
//
375
function RequestViewContent( paramString, rowId ){
392
function RequestViewContent( paramString, rowId ){
376
   var requestURL = 'RequestViewContent.asp';
393
   var requestURL = 'RequestViewContent.asp';
377
 
394
 
378
   // Toggle div
395
   // Toggle div
379
   ToggleDisplay( 'ENVDIV'+ rowId );
396
   ToggleDisplay( 'ENVDIV'+ rowId );