[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages menu.html /xml scripttag.pm

raeburn raeburn@source.lon-capa.org
Tue, 02 Dec 2008 00:22:44 -0000


This is a MIME encoded message

--raeburn1228177364
Content-Type: text/plain

raeburn		Tue Dec  2 00:22:44 2008 EDT

  Modified files:              
    /loncom/xml	scripttag.pm 
    /loncom/html/res/adm/pages	menu.html 
  Log:
  - Restore launch of remote control without ISE.
    - Changes required following removal of loncommon::lonhttpd_port() in rev 1.692.
  
  
--raeburn1228177364
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20081202002244.txt"

Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.149 loncom/xml/scripttag.pm:1.150
--- loncom/xml/scripttag.pm:1.149	Mon Nov 24 18:55:01 2008
+++ loncom/xml/scripttag.pm	Tue Dec  2 00:22:39 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # <script> definiton
 #
-# $Id: scripttag.pm,v 1.149 2008/11/24 18:55:01 jms Exp $
+# $Id: scripttag.pm,v 1.150 2008/12/02 00:22:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -44,8 +44,7 @@
 			     'window','display','storetc','physnet',
 			     'standalone','comment','num','parse','algebra',
 			     'LONCAPA_INTERNAL_TURN_STYLE_ON',
-			     'LONCAPA_INTERNAL_TURN_STYLE_OFF',
-			     'LONCAPA_INTERNAL_LONHTTPD_PORT'));
+			     'LONCAPA_INTERNAL_TURN_STYLE_OFF'));
 }
 
 sub start_LONCAPA_INTERNAL_TURN_STYLE_ON {
@@ -81,19 +80,6 @@
     return ('','no');
 }
 
-sub start_LONCAPA_INTERNAL_LONHTTPD_PORT {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-    if ($target eq 'web' || $target eq 'webgrade') {
-	return '<script type="text/javascript">var lonhttpdport=\''.
-	    &Apache::loncommon::lonhttpd_port().'\';</script>';
-    }
-    return ('','no');
-}
-
-sub end_LONCAPA_INTERNAL_LONHTTPD_PORT {
-    return ('','no');
-}
-
 sub start_script {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
   @Apache::scripttag::parser_env = @_;
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.123 loncom/html/res/adm/pages/menu.html:1.124
--- loncom/html/res/adm/pages/menu.html:1.123	Tue Oct 30 23:40:49 2007
+++ loncom/html/res/adm/pages/menu.html	Tue Dec  2 00:22:44 2008
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.123 2007/10/30 23:40:49 albertel Exp $
+// $Id: menu.html,v 1.124 2008/12/02 00:22:44 raeburn Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -40,7 +40,6 @@
       onLoad="activate();"
       style="{background-repeat: no-repeat;}"
       >
-<LONCAPA_INTERNAL_LONHTTPD_PORT />
 <script type="text/javascript">
 //<!--
 var statustop = '';
@@ -49,16 +48,8 @@
 var dislocked = 1;
 var statuslocked = 0;
 
-if (lonhttpdport == null) {
-    var lonhttpdport='8080';
-}
-
-var protocol="http://";
-if (lonhttpdport == 443) {
-    protocol="https://"
-}
-var imgpath=':'+lonhttpdport+'/res/adm/pages/';
-var fontpath=':'+lonhttpdport+'/adm/lonLCDfont/';
+var imgpath='/res/adm/pages/';
+var fontpath='/adm/lonLCDfont/';
 var currentURL='';
 var reloadURL='';
 var currentSymb='';
@@ -105,7 +96,6 @@
    }
 }
 
-var clienthost=window.location.host;
 var clientwindow=opener;
 var navwindow;
 
@@ -146,7 +136,7 @@
 
 function windowcheck() {
    if (clientwindow==null || clientwindow.closed) {
-      clientwindow=window.open(protocol+clienthost+"/",'',
+      clientwindow=window.open("/",'',
       "height=400,width=440,"+
       "scrollbars=1,toolbar=1,status=1,resizable=1,location=1,menubar=1,"+
       "left=190,top=15,screenX=190,screenY=15"); 
@@ -157,7 +147,7 @@
 
 function navwindowcheck() {
    if (navwindow==null || navwindow.closed) {
-      navwindow=window.open(protocol+clienthost+"/adm/navmaps#curloc",
+      navwindow=window.open("/adm/navmaps#curloc",
                   "loncapanav","height=600,width=400,scrollbars=1"); 
    }
 }
@@ -214,7 +204,7 @@
 
 function switchbutton(row,col,imgsrc,texttop,textbot,action,desc) {
    var idx=10*row+col;
-   this.document['b'+idx].src=protocol+clienthost+imgpath+imgsrc;
+   this.document['b'+idx].src=imgpath+imgsrc;
    hr[idx]=action;
    dt[idx]=texttop;
    db[idx]=textbot;
@@ -228,7 +218,7 @@
 
 function clearbut(row,col) {
    var idx=10*row+col;
-   this.document['b'+idx].src=protocol+clienthost+imgpath+'empty.gif';
+   this.document['b'+idx].src=imgpath+'empty.gif';
    hr[idx]='javascript:defdis();';
    dt[idx]='';
    db[idx]='';
@@ -241,7 +231,7 @@
 }
 
 function setstatus(tp,bt) {
-   this.document['led'].src=protocol+clienthost+imgpath+"ledblink.gif";
+   this.document['led'].src=imgpath+"ledblink.gif";
    statustop=tp;
    statusbot=bt;
    statuslocked=1;
@@ -251,12 +241,12 @@
 function go(url) {
    windowcheck();
    statuslocked=0;
-   this.document['led'].src=protocol+clienthost+imgpath+"ledsend.gif";
+   this.document['led'].src=imgpath+"ledsend.gif";
    if (url!='' && url!= null) {
       currentURL = null;
       currentSymb= null;
       this.document.server.target='loncapaclient';
-      this.document.server.action=protocol+clienthost+url;
+      this.document.server.action=url;
       this.document.server.postdata.value='';
       this.document.server.command.value='';
       this.document.server.url.value='';
@@ -273,9 +263,9 @@
    } else {
       this.document.server.target="loncapaclient";
    } 
-   this.document['led'].src=protocol+clienthost+imgpath+"ledsend.gif";
+   this.document['led'].src=imgpath+"ledsend.gif";
    if (url!='' && url!= null) {
-       this.document.server.action=protocol+clienthost+url;
+       this.document.server.action=url;
        this.document.server.postdata.value=currentURL;
        this.document.server.command.value='';
        this.document.server.url.value='';
@@ -287,10 +277,10 @@
 function gopost(url,postdata,makenewwin) {
    windowcheck();
    statuslocked=0;
-   this.document['led'].src=protocol+clienthost+imgpath+"ledsend.gif";
+   this.document['led'].src=imgpath+"ledsend.gif";
    if (url!='') {
       if (makenewwin) {
-         var LONcomWin=window.open(protocol+clienthost+"/adm/rat/empty.html",
+         var LONcomWin=window.open("/adm/rat/empty.html",
                        'LONcom',
                        "height=600,width=600,"+
       "scrollbars=1,toolbar=0,status=0,resizable=1,location=0,menubar=0"); 
@@ -298,7 +288,7 @@
       } else {
          this.document.server.target='loncapaclient';
       }
-      this.document.server.action=protocol+clienthost+url;
+      this.document.server.action=url;
       this.document.server.postdata.value=postdata;
       this.document.server.command.value='';
       this.document.server.url.value='';
@@ -310,10 +300,10 @@
 function gocmd(url,cmd) {
    windowcheck();
    statuslocked=0;
-   this.document['led'].src=protocol+clienthost+imgpath+"ledsend.gif";
+   this.document['led'].src=imgpath+"ledsend.gif";
    if (url!='') {
       this.document.server.target='loncapaclient';
-      this.document.server.action=protocol+clienthost+url;
+      this.document.server.action=url;
       this.document.server.postdata.value='';
       this.document.server.command.value=cmd;
       this.document.server.url.value=currentURL;
@@ -371,7 +361,7 @@
 function extenddisp() {
    go('');
    w_extdisp_flag=1;
-   extdisp=window.open(protocol+clienthost+"/adm/rat/loading.html",
+   extdisp=window.open("/adm/rat/loading.html",
                "ExtDisp", "scrollbars=1,width=400,height=450");
 }
 
@@ -403,7 +393,7 @@
 function edit_bookmarks() {
    go('');
    w_BookmarkPal_flag=1;
-   bookmarkpal=window.open(protocol+clienthost+"/adm/bookmarks",
+   bookmarkpal=window.open("/adm/bookmarks",
                "BookmarkPal", "width=400,height=505,scrollbars=0");
 }
 
@@ -434,8 +424,8 @@
                    if (ch==':') { ch='colon'; }
                    if (ch=='/') { ch='slash'; }
                 } else { ch='space'; }
-                extdisp.document.writeln('<td><img border="0" src="http://'
-                                    +clienthost+fontpath+ch+'.gif" /><\/td>');
+                extdisp.document.writeln('<td><img border="0" src="'
+                                         +fontpath+ch+'.gif" /><\/td>');
              }
              extdisp.document.writeln('<\/tr><tr>');
              for (var j=0;j<=7;j++) {
@@ -446,8 +436,8 @@
                    if (ch==':') { ch='colon'; }
                    if (ch=='/') { ch='slash'; }
                 } else { ch='space'; }
-                extdisp.document.writeln('<td><img border="0" src="http://'
-                                    +clienthost+fontpath+ch+'.gif" /><\/td>');
+                extdisp.document.writeln('<td><img border="0" src="'
+                                         +fontpath+ch+'.gif" /><\/td>');
             }
             extdisp.document.writeln('<\/tr><\/table>');
 }
@@ -473,7 +463,7 @@
          if (ch==':') { ch='colon'; }
          if (ch=='/') { ch='slash'; }
       } else { ch='space'; }
-      this.document['i'+i].src=protocol+clienthost+fontpath+ch+'.gif';
+      this.document['i'+i].src=fontpath+ch+'.gif';
    }
    for (i=0;i<=7;i++) {
       if (i<ltext.length) {
@@ -483,7 +473,7 @@
          if (ch==':') { ch='colon'; }
          if (ch=='/') { ch='slash'; }
       } else { ch='space'; }
-      this.document['j'+i].src=protocol+clienthost+fontpath+ch+'.gif';
+      this.document['j'+i].src=fontpath+ch+'.gif';
    }
   }
 }

--raeburn1228177364--