From e0043013b150e399a65b829dfbe0ea6ffbf8f3b2 Mon Sep 17 00:00:00 2001 From: Matthew Borden Date: Tue, 8 Jul 2014 09:44:09 +1000 Subject: [PATCH] Update: Editor & UI now load into selector. Need to combat the problem of multiple instances. --- Demo.html | 8 +++++++- Makefile | 2 +- build/Squire-UI.css | 1 + build/Squire-UI.html | 3 +-- build/Squire-UI.js | 41 +++++++++++++++++++++++++++++------------ serve.js | 15 +++++++++++++++ ui/Squire-UI.css | 1 + ui/Squire-UI.html | 3 +-- ui/Squire-UI.js | 41 +++++++++++++++++++++++++++++------------ 9 files changed, 85 insertions(+), 30 deletions(-) create mode 100644 serve.js diff --git a/Demo.html b/Demo.html index a6fddaa..3194032 100644 --- a/Demo.html +++ b/Demo.html @@ -8,9 +8,15 @@ +

HTML Editor Test

+
- + \ No newline at end of file diff --git a/Makefile b/Makefile index eb70de4..f464ec4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: all build clean -all: build +all: build ui clean: rm -rf build diff --git a/build/Squire-UI.css b/build/Squire-UI.css index db8a986..16eeaec 100644 --- a/build/Squire-UI.css +++ b/build/Squire-UI.css @@ -45,6 +45,7 @@ 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; } diff --git a/build/Squire-UI.html b/build/Squire-UI.html index 84495d4..5385e26 100644 --- a/build/Squire-UI.html +++ b/build/Squire-UI.html @@ -22,10 +22,9 @@ diff --git a/build/Squire-UI.js b/build/Squire-UI.js index 7b94f9f..69e4604 100644 --- a/build/Squire-UI.js +++ b/build/Squire-UI.js @@ -210,22 +210,39 @@ LazyLoad = (function (doc) { (function() { - LazyLoad.js(['build/squire.js','build/assets/jQuery/jQuery.js','build/assets/drop/drop.min.js']); - LazyLoad.css(['build/Squire-UI.css','build/assets/font-awesome/font-awesome.min.css', 'build/assets/drop/drop-theme-hubspot-popovers.css']); + 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) { - var originElement = $(options.replace); - var container = originElement.parent(); - - originElement.remove(); - var editorContainer = $('