diff options
author | Barak Korren <[email protected]> | 2013-04-02 20:38:07 +0300 |
---|---|---|
committer | Barak Korren <[email protected]> | 2013-04-02 20:38:07 +0300 |
commit | 58a2577d48790c79adfd44bcfd662c980ce6cfe4 (patch) | |
tree | 523d814ea0b7b6f617fe515b186099c6e83fed72 /lib/dijit/BackgroundIframe.js.uncompressed.js | |
parent | e470a273cf09562fb2f9c0c899002303f19c8d16 (diff) | |
parent | cc332603431102a682feda22b9cf0093a29f0176 (diff) |
Merge branch 'master' of https://github.com/gothfox/Tiny-Tiny-RSS.git
Diffstat (limited to 'lib/dijit/BackgroundIframe.js.uncompressed.js')
-rw-r--r-- | lib/dijit/BackgroundIframe.js.uncompressed.js | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/lib/dijit/BackgroundIframe.js.uncompressed.js b/lib/dijit/BackgroundIframe.js.uncompressed.js deleted file mode 100644 index 06ee17e06..000000000 --- a/lib/dijit/BackgroundIframe.js.uncompressed.js +++ /dev/null @@ -1,110 +0,0 @@ -define("dijit/BackgroundIframe", [ - "require", // require.toUrl - "./main", // to export dijit.BackgroundIframe - "dojo/_base/config", - "dojo/dom-construct", // domConstruct.create - "dojo/dom-style", // domStyle.set - "dojo/_base/lang", // lang.extend lang.hitch - "dojo/on", - "dojo/sniff", // has("ie"), has("mozilla"), has("quirks") - "dojo/_base/window" // win.doc.createElement -], function(require, dijit, config, domConstruct, domStyle, lang, on, has, win){ - - // module: - // dijit/BackgroundIFrame - - // TODO: remove _frames, it isn't being used much, since popups never release their - // iframes (see [22236]) - var _frames = new function(){ - // summary: - // cache of iframes - - var queue = []; - - this.pop = function(){ - var iframe; - if(queue.length){ - iframe = queue.pop(); - iframe.style.display=""; - }else{ - if(has("ie") < 9){ - var burl = config["dojoBlankHtmlUrl"] || require.toUrl("dojo/resources/blank.html") || "javascript:\"\""; - var html="<iframe src='" + burl + "' role='presentation'" - + " style='position: absolute; left: 0px; top: 0px;" - + "z-index: -1; filter:Alpha(Opacity=\"0\");'>"; - iframe = win.doc.createElement(html); - }else{ - iframe = domConstruct.create("iframe"); - iframe.src = 'javascript:""'; - iframe.className = "dijitBackgroundIframe"; - iframe.setAttribute("role", "presentation"); - domStyle.set(iframe, "opacity", 0.1); - } - iframe.tabIndex = -1; // Magic to prevent iframe from getting focus on tab keypress - as style didn't work. - } - return iframe; - }; - - this.push = function(iframe){ - iframe.style.display="none"; - queue.push(iframe); - } - }(); - - - dijit.BackgroundIframe = function(/*DomNode*/ node){ - // summary: - // For IE/FF z-index schenanigans. id attribute is required. - // - // description: - // new dijit.BackgroundIframe(node). - // - // Makes a background iframe as a child of node, that fills - // area (and position) of node - - if(!node.id){ throw new Error("no id"); } - if(has("ie") || has("mozilla")){ - var iframe = (this.iframe = _frames.pop()); - node.appendChild(iframe); - if(has("ie")<7 || has("quirks")){ - this.resize(node); - this._conn = on(node, 'resize', lang.hitch(this, function(){ - this.resize(node); - })); - }else{ - domStyle.set(iframe, { - width: '100%', - height: '100%' - }); - } - } - }; - - lang.extend(dijit.BackgroundIframe, { - resize: function(node){ - // summary: - // Resize the iframe so it's the same size as node. - // Needed on IE6 and IE/quirks because height:100% doesn't work right. - if(this.iframe){ - domStyle.set(this.iframe, { - width: node.offsetWidth + 'px', - height: node.offsetHeight + 'px' - }); - } - }, - destroy: function(){ - // summary: - // destroy the iframe - if(this._conn){ - this._conn.remove(); - this._conn = null; - } - if(this.iframe){ - _frames.push(this.iframe); - delete this.iframe; - } - } - }); - - return dijit.BackgroundIframe; -}); |