version 1.155, 2002/03/06 20:28:19
|
version 1.156, 2002/03/08 18:32:55
|
Line 430 ENDREGTHIS
|
Line 430 ENDREGTHIS
|
ENDDONOTREGTHIS |
ENDDONOTREGTHIS |
} |
} |
if ($target eq 'edit') { |
if ($target eq 'edit') { |
|
# Javascript routines for construction space: |
|
# openbrowser and opensearcher will start the file browser |
|
# (lonindexer) and searcher (lonsearchcat) respectively. |
|
# Inputs are the name of the html form being used |
|
# and the name of the element the selected URL should |
|
# be placed in. |
$result .=<<"ENDBROWSERSCRIPT"; |
$result .=<<"ENDBROWSERSCRIPT"; |
<script> |
<script> |
var editform; |
var editbrowser; |
function openbrowser(formname,elementname) { |
function openbrowser(formname,elementname) { |
var url = '/res/?'; |
var url = '/res/?'; |
if (editform == null) { |
if (editbrowser == null) { |
url += 'launch=1&'; |
url += 'launch=1&'; |
} |
} |
url += 'catalogmode=interactive&'; |
url += 'catalogmode=interactive&'; |
Line 445 ENDDONOTREGTHIS
|
Line 451 ENDDONOTREGTHIS
|
var title = 'Browser'; |
var title = 'Browser'; |
var options = 'scrollbars=1,resizable=1,menubar=0'; |
var options = 'scrollbars=1,resizable=1,menubar=0'; |
options += ',width=700,height=600'; |
options += ',width=700,height=600'; |
editform = open(url,title,options,'1'); |
editbrowser = open(url,title,options,'1'); |
editform.focus(); |
editbrowser.focus(); |
|
} |
|
var editsearcher; |
|
function opensearcher(formname,elementname) { |
|
var url = '/adm/searchcat?'; |
|
if (editsearcher == null) { |
|
url += 'launch=1&'; |
|
} |
|
url += 'catalogmode=interactive&'; |
|
url += 'mode=edit&'; |
|
url += 'form=' + formname + '&'; |
|
url += 'element=' + elementname + ''; |
|
var title = 'Search'; |
|
var options = 'scrollbars=1,resizable=1,menubar=0'; |
|
options += ',width=700,height=600'; |
|
editsearcher = open(url,title,options,'1'); |
|
editsearcher.focus(); |
} |
} |
</script> |
</script> |
ENDBROWSERSCRIPT |
ENDBROWSERSCRIPT |