[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface londocs.pm
raeburn
raeburn at source.lon-capa.org
Wed Dec 12 21:27:27 EST 2012
raeburn Thu Dec 13 02:27:27 2012 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface londocs.pm
Log:
- For 2.11
- Backport 1.502
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.484.2.12 loncom/interface/londocs.pm:1.484.2.13
--- loncom/interface/londocs.pm:1.484.2.12 Thu Dec 13 00:51:34 2012
+++ loncom/interface/londocs.pm Thu Dec 13 02:27:27 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.484.2.12 2012/12/13 00:51:34 raeburn Exp $
+# $Id: londocs.pm,v 1.484.2.13 2012/12/13 02:27:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3533,6 +3533,7 @@
'srch' => 'Search',
'impo' => 'Import',
'lnks' => 'Import from Stored Links',
+ 'impm' => 'Import from Assembled Map',
'selm' => 'Select Map',
'load' => 'Load Map',
'reco' => 'Recover Deleted Documents',
@@ -3632,26 +3633,31 @@
</form>
FUFORM
- my $simpleeditdefaultform=(<<SEDFFORM);
- <form action="/adm/coursedocs" method="post" name="simpleeditdefault">
- <input type="hidden" name="active" value="bb" />
+ my $importpubform=(<<SEDFFORM);
+ <a class="LC_menubuttons_link" href="javascript:toggleMap();">
+ $lt{'impm'}</a>$help{'Load_Map'}
+ <form action="/adm/coursedocs" method="post" name="mapimportform">
+ <fieldset id="importmapform" style="display: none;" />
+ <legend>$lt{'impm'}</legend>
+ <input type="hidden" name="active" value="bb" />
+ $lt{'copm'}<br />
+ <span class="LC_nobreak">
+ <input type="text" name="importmap" size="40" value=""
+ onfocus="this.blur();openbrowser('mapimportform','importmap','sequence,page','');" />
+ <a href="javascript:openbrowser('mapimportform','importmap','sequence,page','');">$lt{'selm'}</a><br />
+ <input type="submit" name="loadmap" value="$lt{'load'}" />
+ </fieldset>
+ </form>
+
SEDFFORM
+
my @simpleeditdefaultforma = (
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/src.png" alt="'.$lt{srch}.'" onclick="javascript:groupsearch()" />' => "$uploadtag<a class='LC_menubuttons_link' href='javascript:groupsearch()'>$lt{'srch'}</a>" },
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/res.png" alt="'.$lt{impo}.'" onclick="javascript:groupimport();"/>' => "<a class='LC_menubuttons_link' href='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" },
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/wishlist.png" alt="'.$lt{lnks}.'" onclick="javascript:open_StoredLinks_Import();" />' => "<a class='LC_menubuttons_link' href='javascript:open_StoredLinks_Import();'>$lt{'lnks'}</a>" },
- );
- $simpleeditdefaultform .= &create_form_ul(&create_list_elements(@simpleeditdefaultforma));
- $simpleeditdefaultform .=(<<SEDFFORM);
- <hr id="bb_hrule" style="width:0px;text-align:left;margin-left:0" />
- $lt{'copm'}<br />
- <input type="text" size="40" name="importmap" /><br />
- <span class="LC_nobreak" style="float:left"><input type="button"
- onclick="javascript:openbrowser('simpleeditdefault','importmap','sequence,page','')"
- value="$lt{'selm'}" /> <input type="submit" name="loadmap" value="$lt{'load'}" />
- $help{'Load_Map'}</span>
- </form>
-SEDFFORM
+ { '<img class="LC_noBorder LC_middle" src="/res/adm/pages/sequence.png" alt="'.$lt{impm}.'" onclick="javascript:toggleMap();" />' => $importpubform }
+ );
+ $importpubform = &create_form_ul(&create_list_elements(@importpubforma));
my $extresourcesform=(<<ERFORM);
<a class="LC_menubuttons_link" href="javascript:toggleUpload('ext');">$lt{'extr'}</a>$help{'Adding_External_Resource'}
@@ -3918,7 +3924,7 @@
my %orderhash = (
'aa' => ['Import Content',$fileuploadform],
- 'bb' => ['Published Content',$simpleeditdefaultform],
+ 'bb' => ['Published Content',$importpubform],
'cc' => ['Grading Resources',$gradingform],
);
unless ($env{'form.pagepath'}) {
@@ -4546,6 +4552,34 @@
}
}
+function toggleUpload(caller) {
+ var blocks = Array($fieldsets);
+ for (var i=0; i<blocks.length; i++) {
+ var disp = 'none';
+ if (caller == blocks[i]) {
+ var curr = document.getElementById('upload'+caller+'form').style.display;
+ if (curr == 'none') {
+ disp='block';
+ }
+ }
+ document.getElementById('upload'+blocks[i]+'form').style.display=disp;
+ }
+ resize_scrollbox('contentscroll','1','1');
+ return;
+}
+
+function toggleMap() {
+ var disp = 'none';
+ var curr = document.getElementById('importmapform').style.display;
+ if (curr == 'none') {
+ disp='block';
+ }
+ document.getElementById('importmapform').style.display=disp;
+ resize_scrollbox('contentscroll','1','1');
+ return;
+}
+
+
function extUrlPreview(caller) {
if (document.getElementById(caller)) {
var url = document.getElementById(caller).value;
More information about the LON-CAPA-cvs
mailing list