if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {\r
parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;\r
}\r
-\r
+ \r
// Only store selection if the type is a normal window\r
if (!f.type)\r
t.bookmark = ed.selection.getBookmark(1);\r
\r
- id = DOM.uniqueId("mce_inlinepopups_"); // Use a prefix so this can't conflict with other ids\r
+ id = DOM.uniqueId();\r
vp = DOM.getViewPort();\r
f.width = parseInt(f.width || 320);\r
f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);\r
opt += ' mceMovable';\r
\r
// Create DOM objects\r
- t._addAll(DOM.doc.body,\r
- ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},\r
+ t._addAll(DOM.doc.body, \r
+ ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'}, \r
['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},\r
- ['div', {id : id + '_top', 'class' : 'mceTop'},\r
+ ['div', {id : id + '_top', 'class' : 'mceTop'}, \r
['div', {'class' : 'mceLeft'}],\r
['div', {'class' : 'mceCenter'}],\r
['div', {'class' : 'mceRight'}],\r
['span', {id : id + '_title'}, f.title || '']\r
],\r
\r
- ['div', {id : id + '_middle', 'class' : 'mceMiddle'},\r
+ ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, \r
['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],\r
['span', {id : id + '_content'}],\r
['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]\r
\r
DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});\r
DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));\r
-\r
+ \r
Event.add(id, 'keyup', function(evt) {\r
var VK_ESCAPE = 27;\r
if (evt.keyCode === VK_ESCAPE) {\r
}\r
}\r
});\r
-\r
+ \r
// Make sure the tab order loops within the dialog.\r
Event.add([id + '_left', id + '_right'], 'focus', function(evt) {\r
var iframe = DOM.get(id + '_ifr');\r
DOM.get(id + '_ok').focus();\r
}\r
});\r
-\r
+ \r
// Add window\r
w = t.windows[id] = {\r
id : id,\r
DOM.removeClass(t.lastId, 'mceFocus');\r
DOM.addClass(id, 'mceFocus');\r
t.lastId = id;\r
-\r
+ \r
if (w.focussedElement) {\r
w.focussedElement.focus();\r
} else if (DOM.get(id + '_ok')) {\r
\r
dw = v;\r
}\r
-\r
+ \r
if (dh < (v = w.features.min_height - sz.h)) {\r
if (dy !== 0)\r
dy += dh - v;\r
if (dx + dy !== 0) {\r
if (sx + dx < 0)\r
dx = 0;\r
-\r
+ \r
if (sy + dy < 0)\r
dy = 0;\r
\r
t.focus(fw.id);\r
}\r
},\r
-\r
+ \r
// Find front most window\r
_frontWindow : function() {\r
var fw, ix = 0;\r