Changeset 5982


Ignore:
Timestamp:
Feb 22, 2012, 1:06:36 PM (10 years ago)
Author:
Nicklas Nordborg
Message:

Merged patch release 3.0.3 to the trunk.

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/credits.txt

    r5934 r5982  
    11$Id$
    22
    3 The current BASE team is (at BASE 3.0.2 release)
     3The current BASE team is (at BASE 3.0.3 release)
    44{{{
    55Jari Häkkinen
    66Nicklas Nordborg
    7 Martin Svensson
    87Johan Vallon-Christersson
    98}}}
  • trunk/www/include/scripts/main.js

    r5978 r5982  
    100100    @param options Specifies options for the decoration of the window as defined
    101101      by the JavaScript window.open() method
     102    @param parentWin The window object to use when calling open(). If not given
     103      the current window is used
    102104    @see http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/window.html#1202731
    103105  */
    104   this.openPopup = function(url, name, width, height, options)
     106  this.openPopup = function(url, name, width, height, options, parentWin)
    105107  {
    106108    /*
     
    110112    }
    111113    */
     114   
     115    if (!parentWin) parentWin = window;
     116    if (window.top != window && window.top.Main)
     117    {
     118      window.top.Main.openPopup(url, name, width, height, options, parentWin);
     119      return;
     120    }
    112121   
    113122    // Rescale the width and height
     
    121130      have different properties for the width and height.
    122131    */
    123     var wTop = window.screenY;
    124     if (wTop == undefined) wTop = window.screenTop;
     132    var wTop = window.top.screenY;
     133    if (wTop == undefined) wTop = window.top.screenTop;
    125134    if (wTop == undefined) wTop = 0;
    126135 
    127     var wLeft = window.screenX;
    128     if (wLeft == undefined) wLeft = window.screenLeft;
     136    var wLeft = window.top.screenX;
     137    if (wLeft == undefined) wLeft = window.top.screenLeft;
    129138    if (wLeft == undefined) wLeft = 0;
    130139 
    131     var wHeight = this.getWindowHeight();
    132     var wWidth = this.getWindowWidth();
     140    var wHeight = Main.getWindowHeight(window.top);
     141    var wWidth = Main.getWindowWidth(window.top);
    133142   
    134143    var top = Math.ceil(wTop+(wHeight-height) / 2);
     
    139148    options = "top="+top+",left="+left+",width="+width+",height="+height+"," + options;
    140149
    141     var newWin = this.getPageValue('open.windows', name);
     150    var newWin = Main.getPageValue('open.windows', name);
    142151    if (newWin && !newWin.closed)
    143152    {
     
    151160      url += '&warnIfOpen=0';
    152161    }
    153     var newWin = window.open('', name, options);
    154     this.setPageValue('open.windows', name, newWin);
    155     Main.safeSetLocation(url, newWin, true);
     162    if (Main.isTooLongURL(url))
     163    {
     164      newWin = window.open(getRoot()+'blank.jsp', name, options);
     165      Main.safeSetLocation(url, newWin, true);
     166    }
     167    else
     168    {
     169      newWin = parentWin.open(url, name, options);
     170    }
     171    Main.setPageValue('open.windows', name, newWin);
    156172    setTimeout("Main.focusWindow('" + name + "')", 100);
    157173  }
     
    813829    if (!win) win = window;
    814830    var postform;
    815     if (window.getMaxUrlLength && url.length > window.getMaxUrlLength())
     831    if (this.isTooLongURL(url))
    816832    {
    817833      postform = this.convertToPostForm(url, win);
     
    830846      win.document.location.href = url;
    831847    }
     848  }
     849 
     850  /*
     851    Check if the URL is longer than the configured max URL length.
     852  */
     853  this.isTooLongURL = function(url)
     854  {
     855    return window.getMaxUrlLength && url.length > window.getMaxUrlLength();
    832856  }
    833857 
     
    889913  this.getPageValue = function(page, key)
    890914  {
    891     if (!window.top.pageValues) return null;
    892     if (!window.top.pageValues[page]) return null;
    893     return window.top.pageValues[page][key];
     915    var value = null;
     916    try
     917    {
     918      if (window.top.pageValues && window.top.pageValues[page])
     919      {
     920        value = window.top.pageValues[page][key];
     921      }
     922    }
     923    catch (e)
     924    {
     925      value = null;
     926    }
     927    return value;
    894928  }
    895929
  • trunk/www/index.jsp

    r5484 r5982  
    3636SessionControl sc = Base.getSessionControl(pageContext, true);
    3737String ID = sc.getId();
     38request.setAttribute("ID", ID);
    3839%>
    3940<base:page type="frameset" title="">
Note: See TracChangeset for help on using the changeset viewer.