/[drupal]/contributions/modules/dbfmgreybox/dbfmgreybox.js
ViewVC logotype

Diff of /contributions/modules/dbfmgreybox/dbfmgreybox.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.4, Thu Dec 13 02:30:53 2007 UTC revision 1.1.2.5, Fri Jan 25 15:27:59 2008 UTC
# Line 9  var GB_DONE = false; Line 9  var GB_DONE = false;
9  var GB_HEIGHT = 400;  var GB_HEIGHT = 400;
10  var GB_WIDTH = 400;  var GB_WIDTH = 400;
11  var GB_ANIMATION = false;  var GB_ANIMATION = false;
12    var GB_REFRESHFM = 0;          //possible values: 0 = no refresh, 1 = refresh file browser, 2 = refresh file and tree browser
13    
14  function GB_show(caption, url, height, width) {  //a new parameter has been adde allowing you to specify whether the dbFM browser should be refreshed
15    function GB_show(caption, url, height, width, refreshit) {
16      var closepath;
17    GB_HEIGHT = height || 400;    GB_HEIGHT = height || 400;
18    GB_WIDTH = width || 400;    GB_WIDTH = width || 400;
19      GB_REFRESHFM = refreshit;
20    if(!GB_DONE) {    if(!GB_DONE) {
21        closepath = getGreyPath() + '/close.gif';
22      $(document.body)      $(document.body)
23        .append("<div id='GB_overlay'></div><div id='GB_window'><div id='GB_caption'></div>"        .append("<div id='GB_overlay'></div><div id='GB_window'><div id='GB_caption'></div>"
24          + "<img src='/modules/dbfmgreybox/close.gif' alt='Close window'/></div>");          + "<img src='" + closepath + "' alt='Close window'/></div>");
25    
26      $("#GB_window img").click(GB_hide);      $("#GB_window img").click(GB_hide);
27      $("#GB_overlay").click(GB_hide);      $("#GB_overlay").click(GB_hide);
28      $(window).resize(GB_position);      $(window).resize(GB_position);
# Line 38  function GB_show(caption, url, height, w Line 44  function GB_show(caption, url, height, w
44  }  }
45    
46  function GB_hide() {  function GB_hide() {
47    $('#refreshiconlist').trigger('click');  //need some code here to allow us to decide whether we're refreshing one or both lists.
48    $('#refreshicontree').trigger('click');  var retval;
49    
50      retval = dbFM.dirListObj;
51      if (retval != null) {
52    
53        if (GB_REFRESHFM > 0) {
54          dbFM.dirListObj.refresh();
55          if (GB_REFRESHFM > 1) {
56            dbFM.dirTreeObj.fetch();
57          }
58        }
59      }
60    $("#GB_window,#GB_overlay").hide();    $("#GB_window,#GB_overlay").hide();
61  }  }
62    

Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.1.2.5

  ViewVC Help
Powered by ViewVC 1.1.2