File:  [LON-CAPA] / doc / window_handling.txt
Revision 1.2: download - view: text, annotated - select for diffs
Sun Apr 29 20:56:01 2001 UTC (21 years ago) by harris41
Branches: MAIN
CVS tags: HEAD
some "rules" for how windows are to be handled

The following files have window handling:
(find . -type f | xargs grep -s -l -i '<script' | xargs grep -s -l -i '\.open')

./loncom/homework/lonhomework.pm
./loncom/html/res/adm/pages/annotator/admannotations.pm
./loncom/html/res/adm/pages/homeworkmenu.html
./loncom/html/res/adm/pages/menu.html
./loncom/html/res/adm/pages/bookmarkmenu/bookmarkpal_old.html
./loncom/interface/londropadd.pm
./loncom/interface/lonmenu.pm
./loncom/interface/lonnavmaps.pm
./loncom/interface/lonparmset.pm
./loncom/interface/loncreateuser.pm
./loncom/xml/scripttag.pm
./rat/client/code.html
./rat/client/parameter.html

things that refer to loncapaclient
find . -type f | xargs grep loncapaclient

#########################################
# ./loncom/html/res/adm/pages/menu.html
#

clienthost=window.location.host;
clientwindow=opener;

function windowcheck() {
   if (clientwindow.closed) {
      clientwindow=window.open("http://"+clienthost+"/"); 
   }
   clientwindow.name='loncapaclient';
}

function logout () {
   windowcheck();
   if (clientwindow.status!='MenuControl:nologout')
   {   
      clientwindow.window.location.href="http://"+clienthost+"/adm/logout";
   }
}



The way that children windows of 
loncapaclient should work:

* need to track if they have ever been opened
* if not,
   * open when needed
   * never refer to any object properties
   * never close
* if currently open,
   * just focus when needed
   * close when needed
   * can refer to object properties
* if have been closed,
   * can refer to object properties

The way loncapaclient window should work.
* lonxml makes exceptions for some URI=resources like
 * /res/adm/pages/menu.html
 * bookmark stuff.html
* lonxml should by default
 * a script command should follow the body tag
   and 
   * name the window (loncapaclient2)
   * tell remote control it exists
   * remote control checks clientwindow
     and if clientwindow name is loncapaclient2
     it changes this to loncapaclient


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>