includes/clientside/tinymce/plugins/inlinepopups/editor_plugin_src.js
changeset 459 31c23016ab62
parent 395 fa4c5ecb7c9a
child 476 f26a69c40431
equal deleted inserted replaced
458:c433348f3628 459:31c23016ab62
     1 /**
     1 /**
     2  * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
     2  * $Id: editor_plugin_src.js 602 2008-02-15 14:52:29Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
    35 			t.parent(ed);
    35 			t.parent(ed);
    36 			t.zIndex = 1000;
    36 			t.zIndex = 1000;
    37 		},
    37 		},
    38 
    38 
    39 		open : function(f, p) {
    39 		open : function(f, p) {
    40 			var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w;
    40 			var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u;
    41 
    41 
    42 			f = f || {};
    42 			f = f || {};
    43 			p = p || {};
    43 			p = p || {};
    44 
    44 
    45 			// Run native windows
    45 			// Run native windows
   148 			}
   148 			}
   149 
   149 
   150 			// Resize window
   150 			// Resize window
   151 			DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
   151 			DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
   152 
   152 
       
   153 			u = f.url || f.file;
       
   154 			if (tinymce.relaxedDomain)
       
   155 				u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
       
   156 
   153 			if (!f.type) {
   157 			if (!f.type) {
   154 				DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
   158 				DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
   155 				DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
   159 				DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
   156 				DOM.setAttrib(id + '_ifr', 'src', f.url || f.file);
   160 				DOM.setAttrib(id + '_ifr', 'src', u);
   157 			} else {
   161 			} else {
   158 				DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'button ok', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
   162 				DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'button ok', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
   159 
   163 
   160 				if (f.type == 'confirm')
   164 				if (f.type == 'confirm')
   161 					DOM.add(id + '_wrapper', 'a', {'class' : 'button cancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
   165 					DOM.add(id + '_wrapper', 'a', {'class' : 'button cancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');