| 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); |
| 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 |
|
|