version 1.1, 2004/02/18 08:07:15
|
version 1.2, 2004/06/01 23:46:10
|
Line 1
|
Line 1
|
|
// (c) dynarch.com 2003-2004 |
|
// Distributed under the same terms as HTMLArea itself. |
|
|
function PopupWin(editor, title, handler, initFunction) { |
function PopupWin(editor, title, handler, initFunction) { |
this.editor = editor; |
this.editor = editor; |
this.handler = handler; |
this.handler = handler; |
var dlg = window.open("", "__ha_dialog", |
var dlg = window.open("", "__ha_dialog", |
"toolbar=no,menubar=no,personalbar=no,width=600,height=600," + |
"toolbar=no,menubar=no,personalbar=no,width=600,height=600,left=20,top=40" + |
"scrollbars=no,resizable=no"); |
"scrollbars=no,resizable=no"); |
this.window = dlg; |
this.window = dlg; |
var doc = dlg.document; |
var doc = dlg.document; |
Line 13 function PopupWin(editor, title, handler
|
Line 16 function PopupWin(editor, title, handler
|
if (base && base.match(/(.*)\/([^\/]+)/)) { |
if (base && base.match(/(.*)\/([^\/]+)/)) { |
base = RegExp.$1 + "/"; |
base = RegExp.$1 + "/"; |
} |
} |
|
if (typeof _editor_url != "undefined" && !/^\//.test(_editor_url)) { |
|
// _editor_url doesn't start with '/' which means it's relative |
|
// FIXME: there's a problem here, it could be http:// which |
|
// doesn't start with slash but it's not relative either. |
|
base += _editor_url; |
|
} else |
|
base = _editor_url; |
|
if (!/\/$/.test(base)) { |
|
// base does not end in slash, add it now |
|
base += '/'; |
|
} |
this.baseURL = base; |
this.baseURL = base; |
|
|
doc.open(); |
doc.open(); |