From bbaaaa3102f7c58857b85906902081bf122c9d23 Mon Sep 17 00:00:00 2001 From: FastMail Admin Date: Tue, 8 Jul 2014 10:45:18 +1000 Subject: [PATCH] Testing: Firefox Support --- build/Squire-UI.css | 62 - build/Squire-UI.html | 30 - build/Squire-UI.js | 248 -- build/assets/drop/drop-theme-arrows.css | 120 - build/assets/drop/drop-theme-basic.css | 29 - .../drop/drop-theme-hubspot-popovers.css | 139 - build/assets/drop/drop.js | 1814 --------- build/assets/drop/drop.min.js | 2 - build/assets/font-awesome/FontAwesome.otf | Bin 75188 -> 0 bytes .../assets/font-awesome/font-awesome.min.css | 4 - .../font-awesome/fontawesome-webfont.eot | Bin 72449 -> 0 bytes .../font-awesome/fontawesome-webfont.svg | 504 --- .../font-awesome/fontawesome-webfont.ttf | Bin 141564 -> 0 bytes .../font-awesome/fontawesome-webfont.woff | Bin 83760 -> 0 bytes build/assets/jQuery/jQuery.js | 4 - build/assets/lazyload/lazyload.js | 390 -- build/document.html | 57 - build/ie8.js | 1 - build/squire-raw.js | 3479 ----------------- build/squire.js | 2 - ui/Squire-UI.js | 15 +- 21 files changed, 10 insertions(+), 6890 deletions(-) delete mode 100644 build/Squire-UI.css delete mode 100644 build/Squire-UI.html delete mode 100644 build/Squire-UI.js delete mode 100755 build/assets/drop/drop-theme-arrows.css delete mode 100755 build/assets/drop/drop-theme-basic.css delete mode 100755 build/assets/drop/drop-theme-hubspot-popovers.css delete mode 100755 build/assets/drop/drop.js delete mode 100755 build/assets/drop/drop.min.js delete mode 100644 build/assets/font-awesome/FontAwesome.otf delete mode 100644 build/assets/font-awesome/font-awesome.min.css delete mode 100755 build/assets/font-awesome/fontawesome-webfont.eot delete mode 100755 build/assets/font-awesome/fontawesome-webfont.svg delete mode 100755 build/assets/font-awesome/fontawesome-webfont.ttf delete mode 100755 build/assets/font-awesome/fontawesome-webfont.woff delete mode 100644 build/assets/jQuery/jQuery.js delete mode 100644 build/assets/lazyload/lazyload.js delete mode 100644 build/document.html delete mode 100644 build/ie8.js delete mode 100644 build/squire-raw.js delete mode 100644 build/squire.js diff --git a/build/Squire-UI.css b/build/Squire-UI.css deleted file mode 100644 index 16eeaec..0000000 --- a/build/Squire-UI.css +++ /dev/null @@ -1,62 +0,0 @@ -.menu .item { - color:#000; - float:left; - background:#FFF; - padding:10px; - border-left:1px #EEE solid; - -webkit-font-smoothing:subpixel-antialiased -} - -.menu .group { - border-radius:3px; - display:inline-block; - border:1px #EEE solid; - margin:5px -} - -.menu .group .item .flip { - -ms-transform:rotateY(180deg); - -webkit-transform:rotateY(180deg); - -moz-transform:rotateY(180deg); - transform:rotateY(180deg) -} - -.menu { - text-align:center; - -webkit-touch-callout:none; - -webkit-user-select:none; - -khtml-user-select:none; - -moz-user-select:none; - -ms-user-select:none; - user-select:none -} - -.menu .group .item:hover, .menu .item:first-child:hover { - border-left: 3px #55ACEE solid; -} - -.menu .item:first-child { - border-left:none; -} - -.drop { - border: 1px solid #dbdbdb; - padding: 14px; - background: white; - box-shadow: 0 1px 0 rgba(255,255,255,0),0 0 10px rgba(0,0,0,0.1); - -webkit-border-radius: 4px; - border-radius: 4px; - margin-top: 5px; -} - -.hidden { - display: none; -} - -.quit { - float: right; - top:0; - right:0; -} - - \ No newline at end of file diff --git a/build/Squire-UI.html b/build/Squire-UI.html deleted file mode 100644 index 5385e26..0000000 --- a/build/Squire-UI.html +++ /dev/null @@ -1,30 +0,0 @@ - - diff --git a/build/Squire-UI.js b/build/Squire-UI.js deleted file mode 100644 index 69e4604..0000000 --- a/build/Squire-UI.js +++ /dev/null @@ -1,248 +0,0 @@ - -LazyLoad = (function (doc) { - var env, - - head, - pending = {}, - pollCount = 0, - queue = {css: [], js: []}, - styleSheets = doc.styleSheets; - function createNode(name, attrs) { - var node = doc.createElement(name), attr; - - for (attr in attrs) { - if (attrs.hasOwnProperty(attr)) { - node.setAttribute(attr, attrs[attr]); - } - } - - return node; - } - - function finish(type) { - var p = pending[type], - callback, - urls; - - if (p) { - callback = p.callback; - urls = p.urls; - - urls.shift(); - pollCount = 0; - - // If this is the last of the pending URLs, execute the callback and - // start the next request in the queue (if any). - if (!urls.length) { - callback && callback.call(p.context, p.obj); - pending[type] = null; - queue[type].length && load(type); - } - } - } - - function getEnv() { - var ua = navigator.userAgent; - - env = { - async: doc.createElement('script').async === true - }; - - (env.webkit = /AppleWebKit\//.test(ua)) - || (env.ie = /MSIE|Trident/.test(ua)) - || (env.opera = /Opera/.test(ua)) - || (env.gecko = /Gecko\//.test(ua)) - || (env.unknown = true); - } - - function load(type, urls, callback, obj, context) { - var _finish = function () { finish(type); }, - isCSS = type === 'css', - nodes = [], - i, len, node, p, pendingUrls, url; - - env || getEnv(); - - if (urls) { - urls = typeof urls === 'string' ? [urls] : urls.concat(); - - if (isCSS || env.async || env.gecko || env.opera) { - // Load in parallel. - queue[type].push({ - urls : urls, - callback: callback, - obj : obj, - context : context - }); - } else { - // Load sequentially. - for (i = 0, len = urls.length; i < len; ++i) { - queue[type].push({ - urls : [urls[i]], - callback: i === len - 1 ? callback : null, // callback is only added to the last URL - obj : obj, - context : context - }); - } - } - } - - // If a previous load request of this type is currently in progress, we'll - // wait our turn. Otherwise, grab the next item in the queue. - if (pending[type] || !(p = pending[type] = queue[type].shift())) { - return; - } - - head || (head = doc.head || doc.getElementsByTagName('head')[0]); - pendingUrls = p.urls.concat(); - - for (i = 0, len = pendingUrls.length; i < len; ++i) { - url = pendingUrls[i]; - - if (isCSS) { - node = env.gecko ? createNode('style') : createNode('link', { - href: url, - rel : 'stylesheet' - }); - } else { - node = createNode('script', {src: url}); - node.async = false; - } - - node.className = 'lazyload'; - node.setAttribute('charset', 'utf-8'); - - if (env.ie && !isCSS && 'onreadystatechange' in node && !('draggable' in node)) { - node.onreadystatechange = function () { - if (/loaded|complete/.test(node.readyState)) { - node.onreadystatechange = null; - _finish(); - } - }; - } else if (isCSS && (env.gecko || env.webkit)) { - if (env.webkit) { - p.urls[i] = node.href; // resolve relative URLs (or polling won't work) - pollWebKit(); - } else { - node.innerHTML = '@import "' + url + '";'; - pollGecko(node); - } - } else { - node.onload = node.onerror = _finish; - } - - nodes.push(node); - } - - for (i = 0, len = nodes.length; i < len; ++i) { - head.appendChild(nodes[i]); - } - } - - function pollGecko(node) { - var hasRules; - - try { - // We don't really need to store this value or ever refer to it again, but - // if we don't store it, Closure Compiler assumes the code is useless and - // removes it. - hasRules = !!node.sheet.cssRules; - } catch (ex) { - // An exception means the stylesheet is still loading. - pollCount += 1; - - if (pollCount < 200) { - setTimeout(function () { pollGecko(node); }, 50); - } else { - // We've been polling for 10 seconds and nothing's happened. Stop - // polling and finish the pending requests to avoid blocking further - // requests. - hasRules && finish('css'); - } - - return; - } - - // If we get here, the stylesheet has loaded. - finish('css'); - } - - function pollWebKit() { - var css = pending.css, i; - - if (css) { - i = styleSheets.length; - - // Look for a stylesheet matching the pending URL. - while (--i >= 0) { - if (styleSheets[i].href === css.urls[0]) { - finish('css'); - break; - } - } - - pollCount += 1; - - if (css) { - if (pollCount < 200) { - setTimeout(pollWebKit, 50); - } else { - // We've been polling for 10 seconds and nothing's happened, which may - // indicate that the stylesheet has been removed from the document - // before it had a chance to load. Stop polling and finish the pending - // request to prevent blocking further requests. - finish('css'); - } - } - } - } - - return { - css: function (urls, callback, obj, context) { - load('css', urls, callback, obj, context); - }, - js: function (urls, callback, obj, context) { - load('js', urls, callback, obj, context); - } - - }; -})(this.document); - - -(function() { - console.log(typeof buildPath); - if (typeof buildPath == "undefined") { buildPath = 'build/'; } - - LazyLoad.js(['squire.js','assets/jQuery/jQuery.js','assets/drop/drop.min.js'].map(function (value) { - return buildPath + value; - })); - - LazyLoad.css(['Squire-UI.css','assets/font-awesome/font-awesome.min.css', 'assets/drop/drop-theme-hubspot-popovers.css'].map(function (value) { - return buildPath + value; - })); - -SquireUI = function(options) { - // Create instance of iFrame - var container; - if (options.replace) { - container = $(options.replace).parent(); - $(options.replace).remove(); - } else if (options.div) { - container = $(options.div); - } else { - throw new Error( - "No element was defined for the editor to inject to."); - } - - $('
').load(buildPath + 'Squire-UI.html').appendTo(container); - - - var editorContainer = $('