[LON-CAPA-cvs] cvs: rat / lonratedt.pm lonratmenu.pm /client ratcode.js

www lon-capa-cvs@mail.lon-capa.org
Mon, 19 Jun 2006 09:43:02 -0000


www		Mon Jun 19 05:43:02 2006 EDT

  Modified files:              
    /rat	lonratedt.pm lonratmenu.pm 
    /rat/client	ratcode.js 
  Log:
  Bug #2674, Bug #563: Import from Bookmarks
  
  
Index: rat/lonratedt.pm
diff -u rat/lonratedt.pm:1.79 rat/lonratedt.pm:1.80
--- rat/lonratedt.pm:1.79	Thu Jun  8 09:56:40 2006
+++ rat/lonratedt.pm	Mon Jun 19 05:42:56 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Edit Handler for RAT Maps
 #
-# $Id: lonratedt.pm,v 1.79 2006/06/08 13:56:40 www Exp $
+# $Id: lonratedt.pm,v 1.80 2006/06/19 09:42:56 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -699,10 +699,10 @@
 }
 
 // ------------------------------------------------------ Open groupsort window
-function groupopen(url,recover) {
+function groupopen(url,recover,bookmarks) {
    var options="scrollbars=1,resizable=1,menubar=0";
    idxflag=1;
-   idx=open("/adm/groupsort?mode=$mode&recover="+recover+"&readfile="+url,"idxout",options);
+   idx=open("/adm/groupsort?mode=$mode&recover="+recover+"&readfile="+url+"&bookmarks="+bookmarks,"idxout",options);
    idx.focus();
 }
 
@@ -1037,6 +1037,7 @@
 				      'nt' => 'New Title',
 				      'se' => 'Search',
 				      'im' => 'Import',
+                                      'bk' => 'Import Bookmarks',
 				      'vi' => 'View',
 				      'lm' => 'Load Map',
 				      'ds' => 'Discard Selected',
@@ -1139,7 +1140,9 @@
 <input type=button onClick=
 "javascript:impfortarget.value=1;groupimport();" value="$lt{'im'}">
 <input type=button onClick=
-"javascript:impfortarget.value=1;javascript:groupopen('$url',1);" value="$lt{'reco'}">
+"javascript:impfortarget.value=1;groupopen(0,1,1);" value="$lt{'bk'}">
+<input type=button onClick=
+"javascript:impfortarget.value=1;groupopen('$url',1,0);" value="$lt{'reco'}">
 $lt{'as'}
 <hr>
 <input type=submit name="moveup" value="$lt{'mu'}">
Index: rat/lonratmenu.pm
diff -u rat/lonratmenu.pm:1.6 rat/lonratmenu.pm:1.7
--- rat/lonratmenu.pm:1.6	Thu Apr 13 15:00:57 2006
+++ rat/lonratmenu.pm	Mon Jun 19 05:42:56 2006
@@ -67,6 +67,7 @@
 <td bgcolor="#ffffcc"><a href="javascript:groupopen('$readfile');"><font size="-2">Recover deleted</font></a></td>
 <td bgcolor="#ffffcc"><a href="javascript:groupsearch();"><font size="-2">Search</font></a></td>
 <td bgcolor="#ffffcc"><a href="javascript:groupimport();"><font size="-2">Import</font></a></td>
+<td bgcolor="#ffffcc"><a href="javascript:bookmarkopen();"><font size="-2">Import Bookmarks</font></a></td>
 <td bgcolor="#ffffcc"><a href="javascript:groupcopy();"><font size="-2">Copy</font></a></td>
 <td bgcolor="#ffffcc"><a href="javascript:graphdef='no';save();storechange();"><font size="-2">Save map</font></a></td>
 <td bgcolor="#ccffcc"><a href="javascript:storechange();"><font size="-2">Save map and layout</font></a></td>
Index: rat/client/ratcode.js
diff -u rat/client/ratcode.js:1.5 rat/client/ratcode.js:1.6
--- rat/client/ratcode.js:1.5	Thu Jun  8 09:56:52 2006
+++ rat/client/ratcode.js	Mon Jun 19 05:43:02 2006
@@ -1,7 +1,7 @@
 <!--
 The LearningOnline Network
 Resource Assembly Tool
-// $Id: ratcode.js,v 1.5 2006/06/08 13:56:52 www Exp $
+// $Id: ratcode.js,v 1.6 2006/06/19 09:43:02 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -1680,6 +1680,14 @@
    idx=open("/adm/groupsort?mode=rat&recover=1&readfile="+url,"idxout",options);
    idx.focus();
 }
+// ------------------------------------------------------- Open bookmark window
+function bookmarkopen() {
+   var options="scrollbars=1,resizable=1,menubar=0";
+   idxmode=mode;
+   idxflag=1;
+   idx=open("/adm/groupsort?mode=rat&bookmarks=1","idxout",options);
+   idx.focus();
+}
 // ------------------------------------------------- Open browser to select map
     var editbrowser;
     function openbrowser(formname,elementname,only,omit) {