Subversion Repositories DevTools

Rev

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

Rev 4389 Rev 4395
Line 225... Line 225...
225
      }
225
      }
226
   }
226
   }
227
}
227
}
228
 
228
 
229
///////////////////////////////////////////////
229
///////////////////////////////////////////////
-
 
230
//  Function:    openAllViews
-
 
231
//  Description: Open and Populate all Views
-
 
232
//               Views are populated via AJAX
-
 
233
//               Current scheme allows for one AJAX request to be outstanding
-
 
234
//               Have AJAX callback determine if there is more work to be done
-
 
235
//
-
 
236
var openingAllViews = 0;
-
 
237
function openAllViews()
-
 
238
{
-
 
239
    openingAllViews = 0;
-
 
240
    toggleAllViewsIcon(0);
-
 
241
 
-
 
242
    //if (event.shiftKey==1)
-
 
243
    //
-
 
244
    //  Locate first/next view to be expanded
-
 
245
    var divs = document.getElementsByTagName("div");
-
 
246
    for (var i=0;i<divs.length;i++) {
-
 
247
        var el = divs[i]; 
-
 
248
        var id = el.id;
-
 
249
        if (id.indexOf("ENVDIV") == 0)
-
 
250
        {
-
 
251
            var rowId = id.substr(6);
-
 
252
            if (el.innerHTML.indexOf('<%=enumLOADING%>') != -1)
-
 
253
            {
-
 
254
                openingAllViews = 1;
-
 
255
                RequestViewContent('?envtab=<%=nEnvTab%>&rtag_id=<%=parRtag_id%>&view_id=' + rowId,rowId);
-
 
256
                return;
-
 
257
            } else if (el.style.display == 'none') {
-
 
258
               el.style.display = 'block';
-
 
259
               UpdateViewHeader(rowId, 0);
-
 
260
            }
-
 
261
        }
-
 
262
    }
-
 
263
}
-
 
264
 
-
 
265
///////////////////////////////////////////////
230
//  Function:       closeAllViews
266
//  Function:       closeAllViews
231
//  Description:    Cloase and forget about All Populated Views
267
//  Description:    Close and forget about All Populated Views
232
//
268
//
233
function closeAllViews()
269
function closeAllViews()
234
{
270
{
-
 
271
    openingAllViews = 0;
-
 
272
    toggleAllViewsIcon(0);
-
 
273
 
235
    //  Get a list of the possible views to hide
274
    //  Get a list of the possible views to hide
236
    var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
275
    var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
237
    if (us) {
276
    if (us) {
238
        var aViewList = us.split(',');
277
        var aViewList = us.split(',');
239
        var aViewNewList = new Array();
278
        var aViewNewList = new Array();
240
        for (index=0; index < aViewList.length;++index) {
279
        for (index=0; index < aViewList.length;++index) {
241
            var div_name, el, rowId;
280
            var div_name, el, rowId;
242
            rowId = aViewList[index];
281
            rowId = aViewList[index];
243
            div_name = 'ENVDIV'+ rowId;
282
            div_name = 'ENVDIV'+ rowId;
244
            el = MM_findObj(div_name);
283
            el = MM_findObj(div_name);
245
            if (el && el.style.display == 'block') {
284
            if (el && (el.style.display == 'block' || el.style.display == 'none')) {
246
                    el.style.display = 'none'
285
                    el.style.display = 'none'
247
                    UpdateViewHeader(rowId, 1);
286
                    UpdateViewHeader(rowId, 1);
248
                    el.innerHTML = '<%=enumLOADING%>';
287
                    el.innerHTML = '<%=enumLOADING%>';
249
            } else {
288
            } else {
250
                aViewNewList.push(rowId);
289
                aViewNewList.push(rowId);
Line 256... Line 295...
256
        document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
295
        document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
257
     }
296
     }
258
}
297
}
259
 
298
 
260
///////////////////////////////////////////////
299
///////////////////////////////////////////////
-
 
300
//  Function:    toggleAllViewsIcon
-
 
301
//  Description: Update the toogleAllViews Icon
-
 
302
//  arg        : mode - 0 min, else max
-
 
303
//
-
 
304
function toggleAllViewsIcon(mode)
-
 
305
{
-
 
306
    //  Update image
-
 
307
    //      images/btn_min.gif 
-
 
308
    var f = document.getElementById('cb_minall');
-
 
309
    if (mode ) {
-
 
310
        f.src = 'images/btn_max.gif';
-
 
311
    } else {
-
 
312
        f.src = 'images/btn_min.gif';
-
 
313
    }
-
 
314
}
-
 
315
 
-
 
316
 
-
 
317
///////////////////////////////////////////////
261
//  Function:    toggleAllViews
318
//  Function:    toggleAllViews
262
//  Description: Hide/Show all the expanded views
319
//  Description: Hide/Show all the expanded views
263
//               Will not change the saved list, just the current display
320
//               Will not change the saved list, just the current display
264
//
321
//
265
function toggleAllViews()
322
function toggleAllViews()
266
{
323
{
-
 
324
    openingAllViews = 0;
-
 
325
 
267
    //  Get a list of the possible views to hide
326
    //  Get a list of the possible views to hide
268
    var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
327
    var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
269
    var aViewList = new Array();
328
    var aViewList = new Array();
270
    var dmatch, dset;
329
    var dmatch, dset;
271
 
330
 
272
    //  Update image
331
    //  Update the icon image
273
    //      images/btn_min.gif 
-
 
274
    var f = document.getElementById('cb_minall');
332
    var f = document.getElementById('cb_minall');
275
    if (f.src.indexOf('min.gif') >= 0) {
333
    if (f.src.indexOf('min.gif') >= 0) {
276
        f.src = 'images/btn_max.gif';
334
        f.src = 'images/btn_max.gif';
277
        dmatch = 'block';
335
        dmatch = 'block';
278
        dset = 'none';
336
        dset = 'none';
Line 409... Line 467...
409
      var str = xmlHttp.responseText;
467
      var str = xmlHttp.responseText;
410
 
468
 
411
      //Populate the innerHTML of the div with the results
469
      //Populate the innerHTML of the div with the results
412
      document.getElementById(ajaxdivname).innerHTML = str;
470
      document.getElementById(ajaxdivname).innerHTML = str;
413
   }
471
   }
-
 
472
 
-
 
473
   //Cascade view opening
-
 
474
   if (openingAllViews) {
-
 
475
       openAllViews();
-
 
476
   }
414
}
477
}
415
 
478
 
416
// XMLHttp send GET request
479
// XMLHttp send GET request
417
function xmlHttp_Get(xmlhttp, url) {
480
function xmlHttp_Get(xmlhttp, url) {
418
   //Getting a permissions error here? Check the url string to
481
   //Getting a permissions error here? Check the url string to
Line 1142... Line 1205...
1142
                  If nEnvTab <> 1 Then cb_selectall_display = " style=display:none"
1205
                  If nEnvTab <> 1 Then cb_selectall_display = " style=display:none"
1143
                  If NOT objAccessControl.UserLogedIn Then cb_disabled = " disabled"%>
1206
                  If NOT objAccessControl.UserLogedIn Then cb_disabled = " disabled"%>
1144
                <input id="cb_selectall" type="checkbox" title="Toggle all checkboxes" onclick="toggletick(this);"<%=cb_selectall_display%><%=cb_disabled%> style="position: relative;left: 5px;float: left;">
1207
                <input id="cb_selectall" type="checkbox" title="Toggle all checkboxes" onclick="toggletick(this);"<%=cb_selectall_display%><%=cb_disabled%> style="position: relative;left: 5px;float: left;">
1145
                <a href="javascript:;" title="Minimise/Restore all populated Views" onclick="toggleAllViews();"><img id="cb_minall" src="images/btn_min.gif" style="float: right;position: relative;left: -4;top: 3;"></a>
1208
                <a href="javascript:;" title="Minimise/Restore all populated Views" onclick="toggleAllViews();"><img id="cb_minall" src="images/btn_min.gif" style="float: right;position: relative;left: -4;top: 3;"></a>
1146
                <a href="javascript:;" title="Close Populated Views" onclick="closeAllViews();"><img src="images/btn_remove.gif" style="float: right;position: relative;left: -4;"></a>
1209
                <a href="javascript:;" title="Close Populated Views" onclick="closeAllViews();"><img src="images/btn_remove.gif" style="float: right;position: relative;left: -4;"></a>
-
 
1210
                <a href="javascript:;" title="Open and Populate all Views" onclick="openAllViews();"><img src="images/btn_expand.gif" style="float: right;position: relative;left: -4; top:2;"></a>
1147
               <%
1211
               <%
1148
               Dim tempTimer
1212
               Dim tempTimer
1149
               tempTimer = Timer
1213
               tempTimer = Timer
1150
               %>
1214
               %>
1151
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1215
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>