diff --git a/.gitignore b/.gitignore index 141e1d4dc..a8abf019b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,10 @@ .project .metadata bin/ -/utilities/proxy/node_modules/ +/utilities/nodeproxy/node_modules/ +/utilities/nodeproxy/jt.key +/utilities/nodeproxy/www-spork* +/utilities/nodeproxy/www.spork* tmp/ proxy/ *extensions/_notes/ diff --git a/LICENSE.txt b/LICENSE.txt index d0f9348ce..2c13d1e3b 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013 anyCommerce.com +Copyright (c) 2014 Zoovy, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/README b/README index 3eb3213ee..6ff40fc60 100755 --- a/README +++ b/README @@ -1,18 +1,25 @@ +AnyCommerce Framework - v.201405 -Zoovy/AnyCommerce MVC JQuery Developer Framework - -Rich Internet Application, Model View Controller created using jQuery for creating standalone or -pluggable shopping applications that connect to the Zoovy e-Commerce Platform. - -WIKI Documentation: - https://github.com/zoovy/AnyCommerce-Development/wiki +Description: +Rich Internet Application, Model View Controller created using jQuery for creating awesome shopping applications that +connects to the CommerceRack Backend-As-A-Service (BAAS) via a JSON/REST API. Official Repository: - https://github.com/zoovy/AnyCommerce-Development - -API Calls Input/Output Reference: - http://www.zoovy.com/webdoc/index.cgi?VERB=DOC&DOCID=51609 + https://github.com/Commercerack/anycommerce Examples are stored in examples sub-directory. Extensions are stored in the extensions sub-directory. +MIT License stored in license.txt + +------------------------------------------------------------------------------- + +Hey Developers!! + +When you fork this REPO - please write any project specific notes such as the URL's to the podio/basecamp project along +with usability instructions into this file. + +Custom functionality should be documented how it is /supposed to work/ here, along with contact info for who is the +responsible party for maintenance. + +Thanks! diff --git a/admin_logout.html b/admin_logout.html index e9b1998bb..7b9e037f1 100644 --- a/admin_logout.html +++ b/admin_logout.html @@ -6,13 +6,41 @@ + + + + + + -
+ diff --git a/app-acreate.html b/app-acreate.html index cc71013d8..2f5638445 100644 --- a/app-acreate.html +++ b/app-acreate.html @@ -26,7 +26,7 @@ var app = {vars:{ /////////////////////////////////\ - "release":"201344.a", ///|> Increment this with each change. model version followed by each deployed update getting a new letter in the alphabet. + "release":"201405.a", ///|> Increment this with each change. model version followed by each deployed update getting a new letter in the alphabet. ////////////////////////////////// "thisSessionIsAdmin": true, "_clientid":"admin", @@ -63,8 +63,8 @@ var tmp = new zController(app); //instantiate wiki parser. // myCreole = new Parse.Simple.Creole(); - app.model.addExtensions([{'namespace':'acreate','filename':'app-acreate/extension.js','callback':'initExtension'}]); - app.u.handleEventDelegation($(document.body)); + _app.model.addExtensions([{'namespace':'acreate','filename':'app-acreate/extension.js','callback':'initExtension'}]); + _app.u.addEventDelegation($(document.body)); }); diff --git a/app-acreate/extension.js b/app-acreate/extension.js index e0db226d3..596a37113 100644 --- a/app-acreate/extension.js +++ b/app-acreate/extension.js @@ -53,6 +53,7 @@ var acreate = function() { onSuccess : function() { app.u.dump('BEGIN lookup.initExtension.onSuccess '); //the zoovy branding is in place by default. override if on anycommerce.com OR if an anycommerce URI param is present (for debugging) +// ## TODO -> need a better way to handle Zoovy vs non-zoovy content. if(document.domain && document.domain.toLowerCase().indexOf('anycommerce') > -1) { app.u.dump(" -> Treat as anycommerce"); $('.logo img').attr('src','app-admin/images/anycommerce_logo-173x30.png'); @@ -279,7 +280,7 @@ var acreate = function() { else { //kewl. found a match. now show them their logo, a link and a countdown till auto-redirect occurs. if(app.data[rd.datapointer].adminURL) { - window.location = app.data[rd.datapointer].adminURL+"?fromLookup="+app.u.unixNow(); //timestamp is passed so it can be used on landing page to determine if the user bookmarked w/ this param in the url + window.location = app.data[rd.datapointer].adminURL+"?fromLookup="+app.u.epochNow(); //timestamp is passed so it can be used on landing page to determine if the user bookmarked w/ this param in the url } else { $ele.prepend(""+message.FROM+"<\/span>sent page view: Several attempts were made to load the store but some necessary files were not found or could not load. We apologize for the inconvenience. This is most likely due to a slow computer and/or slow internet connection<\/b>. Please try 'refresh' and see if that helps. You are currently using a future (experimental) version of our interface. Here you'll find links labeled as 'alpha' and 'beta' which are a work in progress.<\/p>Alpha: here for your viewing pleasure. These links may have little or no working parts and you should avoid 'using' them (look don't touch). ]*>( | |\s|\u00a0|)<\/p>[\r\n]*| Several attempts were made to load the store but some necessary files were not found or could not load. We apologize for the inconvenience. Please try 'refresh' and see if that helps. "+message.FROM+" has joined the chat.<\/p>");
+ $('.show4ActiveChat',$ui).show();
+ $('.hide4ActiveChat',$ui).hide();
+ }
+ }]);
+
+ myApp.cmr.push(['goto',function(message,$context){
+ var $history = $("[data-app-role='messageHistory']",$context);
+ $P = $(" ")
+ .addClass('chat_post')
+ .append(""+message.FROM+"<\/span> has sent over a "+(message.vars.pageType || "")+" link for you within this store. Click here<\/span> to view.")
+ .on('click',function(){
+ showContent(myApp.ext.quickstart.u.whatAmIFor(message.vars),message.vars);
+ });
+ $history.append($P);
+ $history.parent().scrollTop($history.height());
+ }]);
-app.u.loadApp = function() {
-//instantiate controller. handles all logic and communication between model and view.
-//passing in app will extend app so all previously declared functions will exist in addition to all the built in functions.
-//tmp is a throw away variable. app is what should be used as is referenced within the mvc.
- app.vars.rq = null; //to get here, all these resources have been loaded. nuke record to keep DOM clean and avoid any duplication.
- var tmp = new zController(app);
-//instantiate wiki parser.
- myCreole = new Parse.Simple.Creole();
}
-//Any code that needs to be executed after the app init has occured can go here.
-//will pass in the page info object. (pageType, templateID, pid/navcat/show and more)
-app.u.appInitComplete = function(P) {
- app.u.dump("Executing myAppIsLoaded code...");
- }
-
-//don't execute script till both jquery AND the dom are ready.
-$(document).ready(function(){
- app.u.handleRQ(0)
+//this will trigger the content to load on app init. so if you push refresh, you don't get a blank page.
+//it'll also handle the old 'meta' uri params.
+//this will trigger the content to load on app init. so if you push refresh, you don't get a blank page.
+//it'll also handle the old 'meta' uri params.
+myApp.router.appendInit({
+ 'type':'function',
+ 'route': function(v){
+ return {'init':true} //returning anything but false triggers a match.
+ },
+ 'callback':function(f,g){
+ dump(" -> triggered callback for appendInit");
+ g = g || {};
+ if(g.uriParams.seoRequest){
+ showContent(g.uriParams.pageType, g.uriParams);
+ }
+ else if (g.uriParams.marketplace){
+ showContent("product",{"pid":g.uriParams.product});
+ }
+ else if(document.location.hash) {
+ myApp.u.dump('triggering handleHash');
+ myApp.router.handleHashChange();
+ }
+ else {
+ //IE8 didn't like the shortcut to showContent here.
+ myApp.ext.quickstart.a.showContent('homepage');
+ }
+ if(g.uriParams && g.uriParams.meta) {
+ myApp.ext.cco.calls.cartSet.init({'want/refer':infoObj.uriParams.meta,'cartID':_app.model.fetchCartID()},{},'passive');
+ }
+ if(g.uriParams && g.uriParams.meta_src) {
+ myApp.ext.cco.calls.cartSet.init({'want/refer_src':infoObj.uriParams.meta_src,'cartID':_app.model.fetchCartID()},{},'passive');
+ }
+ }
});
-
diff --git a/app-quickstart.css b/app-quickstart.css
index 69c6b8765..9abf9b047 100644
--- a/app-quickstart.css
+++ b/app-quickstart.css
@@ -1,9 +1,28 @@
-body,html {font-size:100%;}
+@charset "utf-8";
+
+/*
+
+The css in this file is optimized for a mobile device, then uses media queries to tailor the experience for larger browsers.
+That way, the mobile device (which typically has less power) can skip all the heavy lifting of dealing w/ the media queries.
+The media queries are located at the bottom of this file.
+
+*/
+
+body,html {font-size:85%;} /* increased for non mobile devices w/ a media query */
#appTemplates {display:none;} /* container for all templates. should be hidden */
-#appPreView {width:550px; margin:0 auto;}
+#appPreView {width:50%; max-width:550px; margin:0 auto;}
+section {display:block;}
+
+/*
+*** 201338 -> here to fix a bug in jqueryUI. the dialogs, when attempting to move, would jump away from the cursor in FF. This fixed it.
+Put this high in the doc as a reminder to occassionally re-check if it can be removed
+*/
+.ui-dialog {
+ position: fixed;
+ }
/*
loading class. add class to your templates if you want a loading graphic to appear while data is requested. add only to the parent element.
@@ -15,11 +34,18 @@ note - background- are use instead of background in case element this is applied
li.loadingBG, .wait {background:url(wait.gif) no-repeat top center !important; min-height:20px !important; min-width:20px;}
span.wait {display:inline-block;}
-/******* global styles - added for cross-browser uniformity or usability ******/
+/* global styles - added for cross-browser uniformity or usability */
img {border:0; vertical-align: top; display:inline-block;} /* vertical-align: top; removes the whitespace sometimes added under an image. */
-button {display:inline-block; margin: 0; padding: 0; cursor:pointer !important;}
-p {margin-bottom:12px;}
+a:focus { outline: none; } /* disable the outline around links. it's unattactive */
+a.blockLink {text-decoration:none; cursor:pointer;} /* used for #! anchors. IE needs the cursor defined or it shows as an arrow instead of a hand. */
+
+button {display:inline-block; margin: 0; padding: 0; cursor:pointer;}
+/* for small buttons */
+.smallButton .ui-button-text {line-height:normal; font-size:.75em;} /* don't mess with padding. will effect icon buttons */
+.smallButton .ui-button-text-icon-primary .ui-button-icon-primary {left:.25em}
+
+p {margin-bottom:1em;}
table {
@@ -33,7 +59,20 @@ td.valignMiddle {vertical-align: middle;}
/* feel free to delete these or override in your own .css file */
h1, h2, h3, h4, h5, h6 {padding:0; margin:0;}
-p {margin:0 0 12px 0;}
+
+/* some optional form styling
+ w/ alignedForm class around it on form, fieldset, whatever
+ */
+.alignedForm label {display:block; clear:both; margin:0 0 .2em 0; padding:0; vertical-align:top;} /* remove padding/margin to ensure cross-browser consistency */
+.alignedForm label:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+.alignedForm .prompt {text-align:right; float:left; width:35%; display:block; margin-right:2%;}
+.alignedForm .alignInput {width:55%; float:right;} /* not enforcing width is common enough that it justifies using a class to enforce it. */
/* chrome and safari add an outer border/glow to the input in focus. this removes it. */
input:focus {
@@ -41,11 +80,9 @@ input:focus {
}
input.numberInput {width:50px}
-
+label span.prompt {display:inline-block; width:20%; margin-right:2em; vertical-align:top;}
button:focus {outline:none;}
-.zform_number {width:50px;}
-
/*
classes used on menus that are toggled on/off. wrap offMenu around the default buttons and onMenu around buttons that get turned on.
for example, in /customer/myaccount, a 'change' button is displayed (wrapped in offMenu) for each address. onClick, 'onMenu' is toggled on, revealing save and cancel
@@ -64,7 +101,7 @@ and offMenu is toggle off, hiding the change button.
-/******* positioning *******/
+/* positioning */
.floatLeft {float:left;}
.floatRight {float:right;}
@@ -77,7 +114,7 @@ and offMenu is toggle off, hiding the change button.
.center {margin:0 auto;}
-/****** aesthetics/usability ******/
+/* aesthetics/usability */
/* added to buttons (such as place order) when they're disabled to clearly indicate they should not be clicked again. */
.disabled {
@@ -111,13 +148,15 @@ and offMenu is toggle off, hiding the change button.
-.marginLeft {margin-left:12px;}
-.marginRight {margin-right:12px;}
-.marginTop {margin-top:12px;}
-.marginBottom {margin-bottom:12px;}
-.stdMargin {margin:12px;}
-.headerPadding {padding: 3px 6px;} /* for use in headings or legends that use the ui-state classes and need a little padding within. */
-.stdPadding {padding:12px;}
+.marginLeft {margin-left:1em;}
+.marginRight {margin-right:1em;}
+.marginTop {margin-top:1em;}
+.marginBottom {margin-bottom:1em;}
+
+.stdMargin {margin:1em;}
+.headerPadding {padding: .2em .4em;} /* for use in headings or legends that use the ui-state classes and need a little padding within. */
+.stdPadding {padding:1em;}
+.smallPadding {padding:.5em;}
.fullWidth {width:100%;}
@@ -130,46 +169,18 @@ and offMenu is toggle off, hiding the change button.
.buyerLoggedIn .hideIfLoggedOut {display: block;} /* may be 'block' */
.buyerLoggedIn span.hideIfLoggedOut, .buyerLoggedIn a.hideIfLoggedOut {display: inline;} /* ensures inline on span elements */
-
-
-
-
-/****** APP specific styles ******/
-
-
-/* messaging css. some error css is defined in the jqueryui styles */
-
-.appMessage P {padding:0; margin:0;} /* used in app messaging for warnings, alerts, successes, etc */
-.zMessage {margin:6px; 0}
-
-.appMessage {margin-bottom:12px; position:relative;}
-.appMessage .stdMargin {padding:5px;}
-.appMessage .ui-button {position:absolute; top:-3px; right:-3px; z-index:100;}
-.appMessage .ui-icon {float:left; margin-right:12px;}
-
-/* some messages have a red bg. add a white circle around the icon in these cases. */
-.ui-state-z-ise .ui-icon, .ui-state-z-error .ui-icon, .ui-state-z-debug .ui-icon {
- background-color:#ffffff;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- }
-
-.appMessage .appMessageTxt {float:left;}
-
-.ui-state-success, .ui-state-statusupdate {border:1px solid #aecdae !important; background:#e3f6e3 !important; color:#333333 !important;}
-.ui-state-warning {border:1px solid #f58d48 !important; background:#ffdfc9 !important; color:#333333 !important;}
-
+.hint {font-weight:normal; font-size:.8em;}
/* used in order history and faq (possibly other places) in a format similar to an accordian, but more than one panel can be open. */
-.appAccordianesque .ui-accordion-header {padding:3px 24px;}
+.appAccordianesque .ui-accordion-header {padding:.5em 2em;}
/* pages like company and/or customer are in a two column format. by default, a narrow right w/ nav and the main column w/ content. */
.mainColumn {width:75%;}
-.sideline {float:right; width:20%; margin:0 0 24px 0px;}
-.sideline a {padding:5px 0; text-decoration:none; display:block;} /* recommend at least 5px vert padding for mobile/pad */
+.sideline {float:right; width:20%; margin:0 0 2em 0;}
+.sideline a {padding:.3em 0; text-decoration:none; display:block;} /* recommend at least 5px vert padding for mobile/pad */
@@ -182,25 +193,26 @@ and offMenu is toggle off, hiding the change button.
-/***************************************************
+/*
LISTS (product list and/or subcategory list)
these get used just about everywhere. leave these fairly generic
and override using classes or id's as needed.
-***************************************************/
+*/
+a.blockLink {border:none; display:block;}
.listStyleNone, .listStyleNone li {list-style:none;} /* apply to a ul or ol */
.noPadOrMargin {padding:0; margin:0;}
-.fluidList li {float:left; margin:12px; padding:0; display:inline-block;}
+.fluidList li {float:left; margin:1em; padding:0; display:inline-block;}
.quickView {position:absolute; top:5px; right:5px; z-index:1001;} /* jqui modal has zindex 1002 */
/* over rides - height and width ensure each row is the same height. percentages could be used for width */
.productList > li {width:150px; height:250px; position:relative;}
-.lineItemProdlist > li {position:relative; display:block; padding:12px 0; width:100% !important; height:auto !important; border-bottom:1px dotted #efefef;} /* single column product list - used in cart, checkout, etc. productList class is also defined in these cases. */
+.lineItemProdlist > li {position:relative; display:block; padding:1em 0; float:none; width:auto; height:auto !important; border-bottom:1px dotted #efefef;} /* single column product list - used in cart, checkout, etc. productList class is also defined in these cases. */
-.lineItemProdlist .prodThumb {margin-right:12px;}
+.lineItemProdlist .prodThumb {margin-right:1em;}
.categoryList > li {width:150px; height:200px;}
@@ -215,10 +227,7 @@ and override using classes or id's as needed.
/* multpage header for lists (product list) - most styling handled by jqueryUI */
-.mpControls {padding:2px 6px;}
-
-
-
+.mpControls {padding:.3em .8em;}
/* used for the picture slider mouse over effect in some product lists */
@@ -232,25 +241,25 @@ and override using classes or id's as needed.
/* for variations */
-.variation {margin-bottom:6px;} /* class applied to div containing a variation group */
-.pogType_radio span label {display:block; margin-bottom:4px; margin-left:12px;}
+.variation {margin-bottom:.5em;} /* class applied to div containing a variation group */
+.variation_radio span label {display:block; margin-bottom:.5em; margin-left:1em;}
-/***************************************************
+/*
PRODUCT DETAIL PAGE (productTemplate)
-***************************************************/
+*/
.prodViewerContainer {width:100%;}
-.breadAndAddThisContainer {margin-bottom:8px; padding-bottom:8px; border-bottom:1px dotted #b6b6b6;}
+.breadAndAddThisContainer {margin-bottom:.5em; padding-bottom:.5em; border-bottom:1px dotted #b6b6b6;}
/* primary image and thumbnails */
-.imageContainer {width:10%; padding-right:24px;}
-.prodViewerContainer .prodThumbs div {float:left; margin:12px 12px 0 0;}
+.imageContainer {width:10%; padding-right:2em;}
+.prodViewerContainer .prodThumbs div {float:left; margin:1em 1em 0 0;}
.prodSummaryContainer {width:90%;}
@@ -262,20 +271,20 @@ PRODUCT DETAIL PAGE (productTemplate)
the child list and loading graphic should only show up IF the product is a parent.
so the displayNone class is used, then a .grpType_PARENT class is added if the item is a parent.
*/
-.grpType_PARENT {display:block; margin-bottom:12px;}
+.grpType_PARENT {display:block; margin-bottom:1em;}
#prodlistChildren li {width:75px; height:120px; overflow:hidden; margin-left:0;}
-.prodViewerAddToCartForm {margin-bottom:24px;}
-.prodViewerAddToCartForm fieldset {margin:0 0 12px 0; padding:0;}
-.variation > label:after {content:":"; padding-right:12px;} /* applies to first label in a group. so no impact on radio labels */
+.prodViewerAddToCartForm {margin-bottom:2em;}
+.prodViewerAddToCartForm fieldset {margin-bottom: 1em; padding:0;}
+.variation > label:after {content:":"; padding-right:1em;} /* applies to first label in a group. so no impact on radio labels */
-.CRMButtonMenu {margin:0; padding:0; margin-bottom:12px;}
+.CRMButtonMenu {margin:0; padding:0; margin-bottom:1em;}
-.pogType_attribs {display:none;} /* don't show finder attributes */
+.variation_attribs {display:none;} /* don't show finder attributes */
-/****** REVIEW GFX - used for review summary and in list of reviews on product detail page ******/
+/* REVIEW GFX - used for review summary and in list of reviews on product detail page */
-.reviewSummaryContainer .numReviews {line-height:21px; display:inline-block; height:21px; float:left; margin-left:4px; padding-right:6px;}
+.reviewSummaryContainer .numReviews {line-height:21px; display:inline-block; height:21px; float:left; margin-left:.5em; padding-right:.5em;}
.reviewSummaryContainer .numReviews:after {content:": "}
.reviewSprite {background: url(qs_reviews_stars-124x324.png) no-repeat; width:124px; height:22px; display:none;} /* display none hides the reviews for the 'zero' reviews graphic */
@@ -294,103 +303,97 @@ so the displayNone class is used, then a .grpType_PARENT class is added if the i
.prodlist .review_0 {display:none;} /* hide the stars for items with no reviews */
-/****** REVIEW LIST - on product detail page, used for product reviews. ******/
+/* REVIEW LIST - on product detail page, used for product reviews. */
#prodViewerReviews {margin:0; padding:0;} /* parent ul containing all reviews, each review as an li */
-.reviewLineItem {margin:0 0 12px 0; padding:0 0 12px 0; display:block; clear:both; border-bottom:1px #cccccc dotted;} /* on the li of an individual review */
-.prodReviewInfo {float:left; display:block; width:165px; list-style:none; margin:0 12px 0px 0; font-weight:normal; padding:0;} /* on the ul of the list containing the name, location, date, etc */
+.reviewLineItem {margin:0 0 1em 0; padding:0 0 1em 0; display:block; clear:both; border-bottom:1px #cccccc dotted;} /* on the li of an individual review */
+.prodReviewInfo {float:left; display:block; width:165px; list-style:none; margin:0 1em 0px 0; font-weight:normal; padding:0;} /* on the ul of the list containing the name, location, date, etc */
.prodReviewInfo li {display:block; clear:both;} /* applies to li for location, name, date, etc */
.prodReviewTemplate li p {font-weight:normal; margin:0; padding:0;}
.reviewLineItem blockquote {margin:0 0 0 185px; padding:0;}
-/****** WRITE REVIEW MODAL ******/
-#reviewFrm label {display:block; text-align:right; float:left; width:150px;}
-#reviewsMessage {width:250px; height:250px;}
-#reviewFrm input, #reviewFrm textarea, #reviewFrm select {margin-bottom:5px;}
-#reviewFrm .ui-button {float:right;}
-/***************************************************
+
+/*
BREADCRUMB
-> used on product and category pages
-***************************************************/
+*/
-.breadcrumb {margin-bottom:12px;}
+.breadcrumb {margin-bottom:1em;}
.breadcrumb li {padding:0; margin:0; cursor:pointer; padding-right:10px;}
-.breadcrumb li:after {content:" \00BB "; padding-left:10px; font-size:10px; font-weight:bold; color:#999999;}
+.breadcrumb li:after {content:" \00BB "; padding-left:1em; font-size:1em; font-weight:bold; color:#999999;}
.breadcrumb li:last-child:after {content:"";}
.breadcrumb li:last-child a {color:#666666; text-decoration:none; font-weight:bold; cursor:text;}
-/***************************************************
+/*
cartTemplate
-***************************************************/
+*/
.cartContainer {width:100%;}
-
#mainContentArea_cart .continueShoppingButton {display:none;} /* used in modal cart only */
-/***************************************************
+.cartSummaryTotalsContainer .ui-widget .cartRefreshButton {margin: -4px 0 0 0; float:right;}
+/*
CUSTOMER PAGES
-***************************************************/
-
-
-
-
-/****** LOGIN MODAL ******/
-#loginFormForModal fieldset {border:0}
-.loginOption fieldset div {margin-bottom:12px;}
-.loginOption label {width:120px; text-align:right; display:block; float:left; clear:left;}
-.loginOption label:after {margin-right:12px; content:":"}
+*/
-/****** NEWSLETTER SUBSCRIBE/ACCOUNT CREATE ******/
-#subscribeFormContainer .userInfo div {margin-bottom:6px;}
+/* NEWSLETTER SUBSCRIBE/ACCOUNT CREATE */
+#subscribeFormContainer .userInfo div {margin-bottom:.5em;}
#subscribeFormContainer li {list-style:none;}
-#subscribeFormContainer .userInfo label, #changePasswordForm label {width:120px; display:inline-block; margin-right:10px;}
+#subscribeFormContainer .userInfo label, #changePasswordForm label {width:120px; display:inline-block; margin-right:1em;}
.subscribeListItem {display:block; height:30px;}
-/****** ORDER HISTORY AND INVOICE ******/
+/* ORDER HISTORY AND INVOICE */
#ordersArticle .ui-accordion-content {padding:.4em} /* reduce padding here to make a little extra room */
#ordersArticle .orderContentsTable {width:100%}
-
+/* ### TODO -> find where this is used and make it responsive */
#orderInvoiceSoloPage table {width:700px;}
.orderContentsProdlistContainer {width:500px;}
-.orderContentsProdlistContainer .prodThumbContainer {float:left; margin:0 5px 5px 0;}
+.orderContentsProdlistContainer .prodThumbContainer {float:left; margin:0 .5em .5em 0;}
+
+.invoiceAddressContainer .billAddress, .invoiceAddressContainer .shipAddress {margin-bottom:1em;}
+/* MY ACCOUNT */
-/****** MY ACCOUNT ******/
+#buyerAddresses {margin-bottom:1em;}
+#buyerAddresses h2 {margin:1em 0; clear:both;}
+#buyerAddresses address {margin:0 0px 1em 0; float:left; width:90%; display:block; padding:1em;}
-#buyerAddresses {margin-bottom:12px;}
-#buyerAddresses h2 {margin:12px 0; clear:both;}
-#buyerAddresses address {margin:0 0px 12px 0; float:left; width:90%; display:block; padding:5px;}
+/* buyer lists */
+.smallButtonList .ui-button-icon-only {width:1.4em}
+.smallButtonList .ui-button-icon-only .ui-button-text {height:1.4em; padding:0;}
+.buyerList .prodThumbContainer {position:relative;}
-/***************************************************
+
+/*
SEARCH RESULTS PAGE
-***************************************************/
+*/
#mainContentArea_search {position:relative;}
-.resultsHeader {position:relative; padding:3px 6px;}
+.resultsHeader {position:relative; padding:.3em 1em;}
.resultsMenuContainer {position:absolute; top:1px; left:3px;}
-.resultsMenuContainer .resultsMenu {margin:3px 12px 0 0px;} /* used for sorting and pagination menus */
+.resultsMenuContainer .resultsMenu {margin:.3em 1em 0 0;} /* used for sorting and pagination menus */
.resultsMenuContainer ul.ui-menu ul {z-index:10000; width:150px;}
.resultsHeader .nextPageButton, .resultsHeader .prevPageButton {float:right;}
@@ -399,29 +402,21 @@ SEARCH RESULTS PAGE
.minimalMode .hideInMinimalMode {display:none;}
.minimalMode .searchResultsProduct {
- height:120px; width:120px; overflow:hidden; margin:0 5px 5px 0;
+ height:120px; width:120px; overflow:hidden; margin:0 .5em .5em 0;
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box;
}
-/***************************************************
+/*
HELP PAGES
-***************************************************/
-
-/***** CONTACT US ******/
-#contactForm {float:right; margin: 0 0 12px 12px;}
-#contactForm fieldset {border:1px solid #cccccc; padding:10px;}
-#contactForm div {margin-bottom:5px}
-#contactForm label {width:105px; display:inline-block; margin-right:6px; vertical-align:top; text-align:right;}
-#contactForm input, #contactForm textarea {width:145px;}
-#contactForm textarea {height:125px;}
-
+*/
-/**** FAQ *****/
+/* FAQ /
+### TODO -> why is this commented out?
.faqQuestion:before, .faqAnswer:before {font-size:1.4em; font-weight:bold; padding-right:10px; color:#CCCCCC; display:inline-block;}
.faqQuestion:before {content:"Q: ";}
.faqAnswer:before {content:"A: ";}
@@ -433,53 +428,21 @@ HELP PAGES
-/***************************************************
+/*
CART
+*/
-***************************************************/
-
-.cartSummaryTotalsContainer h2 {margin:0; border-top:0; border-left:0; border-right:0; padding:2px 12px; font-size:.8em;} /* header */
-.cartSummaryTotalsContainer .cartSummaryContainer {padding:12px;}
-.cartZipCodeContainer, .cartAltButtonsContainer, .cartSummaryContainer {margin-bottom:12px; padding-bottom:12px; border-bottom:1px dotted #efefef;}
-
-.cartStuffContainer {width:60%; vertical-align:top; padding-right:12px;}
-.cartSummaryTotalsContainer {width:40%; padding-left:12px; font-size:.8em;} /* by default, this is the right column */
-
-.checkoutButtonsContainer > span {display:block; float:left; margin:0 12px 12px 0;}
-
-.cartShipMethods, .cartZipCodeContainer, .cartSummary {margin:12px 0;}
-
-.cartSummaryTotalsContainer h3 {margin:12px 0;} /* shipping methods prompt */
-
-.checkoutButton {font-weight:bold !important;} /* probably want to customize this with a graphic or something that stands out much more */
-
-
-
-
-
-
-/***************************************************
-
-CHECKOUT
-
-***************************************************/
-
-#paybySupplemental_CREDIT .ui-icon-help {display:inline-block; margin-left:6px;}
-
-
-.paybySupplemental {padding:12px; font-weight:normal; border-top-width:0;}
-.paybySupplemental select {margin-right:12px;}
-
-.addressList address {float:left; margin:0 12px 12px 0;}
+.cartStuffContainer {width:100%; margin:0 0 1em 0;}
+#cartStuffList {list-style:none; margin:0; padding:0; font-size:.85em;}
+#cartStuffList li {display:block; margin:0 0 1em 0;}
+.cartButtons {text-align:center;}
+.cartButtons .thisButton {display:block; margin-bottom:.5em;}
+.cartSummaryTotalsContainer h2 {font-size:.8em;}
-.creditCardCVVIcon {display:inline-block !important;}
-.checkoutFormContainer input, checkoutFormContainer select {margin:2px 6px 2px 0;}
-.checkoutFormContainer input[type='password'] {width:200px;} /* class affects both login password and create account passwords */
-.headerPadding label {padding:2px 6px;}
/* Pure CSS3 Multi Level Drop Down Navigation Menu */
/* http://www.bloggermint.com/demos/darknavmenu/# */
@@ -506,7 +469,7 @@ CHECKOUT
.ddUlMenu ul li a {
float: left;
text-decoration:none;
- padding:0 12px;
+ padding:0 1em;
cursor:pointer;
}
@@ -535,5 +498,34 @@ CHECKOUT
}
+.debug {position:fixed; bottom:0; left:0; right:0; background:#ffffff; color:#000000; border-top:1px solid #666666; padding:.5em;}
-.debug {position:fixed; bottom:0; left:0; right:0; background:#ffffff; color:#000000; border-top:1px solid #666666; padding:5px;}
\ No newline at end of file
+
+
+/* cart product list */
+@media only screen and (min-width: 400px) {
+ body,html {font-size:100%;}
+ }
+
+
+
+@media only screen and (min-width: 750px) {
+ /* invoice address get aligned on the same row now that space allows for it. the container around the addresses will handle the margin now. */
+ .invoiceAddressContainer .billAddress, .invoiceAddressContainer .shipAddress {float:left; margin-bottom:0;}
+ .invoiceAddressContainer .billAddress {margin-right:2em;}
+ /* shift cart totals to right side */
+ .cartSummaryTotalsContainer, .cartStuffContainer {width:49%;}
+ .cartStuffContainer {float:left;}
+ .cartSummaryTotalsContainer {float:right;}
+ .cartButtons .thisButton {float:right; margin:0 0 .4em .4em;}
+ .cartButtons .continueShoppingSpan {float:left; margin:0;}
+
+ .companyAddress {float:left; margin-right:2em; width:40%;}
+ .hint {font-weight:normal; font-size:.7em;}
+ }
+
+@media only screen and (min-width: 1024px) {
+ .cartTemplateShippingContainer {float:left; width:48%;}
+ .cartSummary {float:right; width:48%; text-align:right;}
+ }
+
diff --git a/app-quickstart.html b/app-quickstart.html
index 654d46782..b8c0c1a7d 100644
--- a/app-quickstart.html
+++ b/app-quickstart.html
@@ -1,44 +1,56 @@
-
+
-
+
+
";
+ if(message.vars && message.vars.pageType) {
+// dump(' -> pageType is set to: '+message.vars.pageType);
+ switch(message.vars.pageType) {
+ case 'product':
+ if(message.vars.pid) {
+ $o += 'product: '+message.vars.pid+' has been added to the product task list.'
+ adminApp.ext.admin_prodedit.u.addProductAsTask({'pid':message.vars.pid,'tab':'product','mode':'add'});
+ }
+ else {$o += 'Page type set to product but no pid specified.'}
+ break;
+ case 'homepage':
+ $o += 'homepage';
+ break;
+ case 'category':
+ if(message.vars.navcat) {
+ $o += 'category: '+message.vars.navcat;
+ if(message.vars.domain) {$o.addClass('lookLikeLink').on('click',function(){
+ window.open(message.vars.domain+"/category/"+message.vars.navcat+"/");
+ })}
+ }
+ else {$o += 'Page type set to category but no navcat specified.'}
+ break;
+
+ case 'search':
+ if(message.vars.keywords) {}
+ else {$o += 'Page type set to search but no keywords specified.'}
+ break;
+
+ case 'company':
+ if(message.vars.show) {}
+ else {$o += 'Page type set to company but show not specified.'}
+ break;
+
+ case 'customer':
+ if(message.vars.show) {}
+ else {$o += 'Page type set to customer but show not specified.'}
+ break;
+
+ default:
+ $o += 'unknown page type: '+message.vars.pageType+' (console contains more detail)';
+ dump("Unrecognized pageType in cart message.vars. vars follow:"); dump(message.vars);
}
- if(debug) {app.u.dump(" -> "+i+": "+app.vars.rq[i][2]+": "+app.vars.rq[i][app.vars.rq[i].length -1]);}
}
- return r;
- }
+ else {
+ $o += 'unspecified page type or no vars set in message. (console contains more detail)';
+ dump("Unspecified pageType in cart message.vars. vars follow:"); dump(message.vars);
+ }
+ $o += "<\/p>";
+ $history.append($o);
+ $history.parent().scrollTop($history.height());
+ }]);
-//gets executed once controller.js is loaded.
-//check dependencies and make sure all other .js files are done, then init controller.
-//function will get re-executed if not all the scripts in app.vars.scripts pass 1 are done loading.
-//the 'attempts' var is incremented each time the function is executed.
+adminApp.router.addAlias('404',function(v) {
+ $('#globalMessaging').anymessage({'message':'No route has been specified for '+v.hash,'gMessage':true,'errtype':'apperr'});
+ dump(" -> v from 404 alias:"); dump(v);
+ });
-app.u.initMVC = function(attempts){
-// app.u.dump("app.u.initMVC activated ["+attempts+"]");
- var includesAreDone = true;
-//what percentage of completion a single include represents (if 10 includes, each is 10%).
- var percentPerInclude = (100 / app.vars.rq.length);
- var resourcesLoaded = app.u.howManyPassZeroResourcesAreLoaded();
- var percentComplete = Math.round(resourcesLoaded * percentPerInclude); //used to sum how many includes have successfully loaded.
+adminApp.router.appendHash({'type':'match','route':'/biz/vstore*','callback':function(v){
+// _app.u.dump(" -> Welcome to legacy compat mode.");
+// console.dir(v);
+ adminApp.model.fetchAdminResource(v.hash.substr(2),{'tab':adminApp.ext.admin.vars.tab,'targetID':adminApp.ext.admin.vars.tab+'Content'});
+ }});
- $('#appPreViewProgressBar').val(percentComplete);
- $('#appPreViewProgressText').empty().append(percentComplete+"% Complete");
+adminApp.router.appendHash({'type':'exact','route':'dashboard','callback':function(v){
+ adminApp.ext.admin.a.showDashboard(); //will load itself into 'home' content area and bring that into focus.
+ }});
+adminApp.router.appendHash({'type':'exact','route':'product','callback':function(v){
+ adminApp.ext.admin_prodedit.a.showProductManager(v.hashParams);
+ }});
- if(resourcesLoaded == app.vars.rq.length) {
-//instantiate controller. handles all logic and communication between model and view.
-//passing in app will extend app so all previously declared functions will exist in addition to all the built in functions.
-//tmp is a throw away variable. app is what should be used as is referenced within the mvc.
- app.vars.rq = null; //to get here, all these resources have been loaded. nuke record to keep DOM clean and avoid any duplication. note this is NOT app.rq
- var tmp = new zController(app);
-//instantiate wiki parser.
- myCreole = new Parse.Simple.Creole();
-
- }
- else if(attempts > 100) {
- app.u.dump("WARNING! something went wrong in init.js");
- //this is 10 seconds of trying. something isn't going well.
- $('.appMessaging').empty().append("Not all resources were able to be loaded.
If the error persists, please contact the site administrator
- dev: see console.Welcome to the future!<\/h5>
Beta: These are features in the testing phase. These you can use, but may experience some errors.Enjoy!<\/h6>","persistent":true});
+ }
});
+//this will trigger the content to load on app init. so if you push refresh, you don't get a blank page.
+adminApp.router.appendInit({
+ 'type':'function',
+ 'route': function(v){
+ return {'some':'value'} //returning anything but false triggers a match.
+ },
+ 'callback':function(f){
+ adminApp.router.handleHashChange();
+ }
+ });
diff --git a/app-admin.html b/app-admin.html
index f165eb124..d237792dc 100644
--- a/app-admin.html
+++ b/app-admin.html
@@ -4,6 +4,12 @@
@@ -115,25 +123,39 @@ One moment please while we load our app
One moment please while we load our app
One moment please while we load our app
![]()
-
One moment please while we load our app
"+t,e.removeChild(e.firstChild)}catch(r){var i=n.create("div");i.innerHTML="
"+t,d(f(i.childNodes),function(t,n){n&&e.canHaveHTML&&e.appendChild(t)})}}else e.innerHTML=t;return t})},getOuterHTML:function(e){var t,n=this;return(e=n.get(e))?1===e.nodeType&&n.hasOuterHTML?e.outerHTML:(t=(e.ownerDocument||n.doc).createElement("body"),t.appendChild(e.cloneNode(!0)),t.innerHTML):null},setOuterHTML:function(e,t,n){var r=this;return r.run(e,function(e){function i(){var i,o;for(o=n.createElement("body"),o.innerHTML=t,i=o.lastChild;i;)r.insertAfter(i.cloneNode(!0),e),i=i.previousSibling;r.remove(e)}if(1==e.nodeType)if(n=n||e.ownerDocument||r.doc,g)try{1==e.nodeType&&r.hasOuterHTML?e.outerHTML=t:i()}catch(o){i()}else i()})},decode:a.decode,encode:a.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return u(t,"array")&&(e=e.cloneNode(!0)),n&&d(f(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),d(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(l.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],d(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(g){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,o,a,s,l,c=0;if(e=e.firstChild){s=new i(e,e.parentNode),t=t||n.schema?n.schema.getNonEmptyElements():null;do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(o=n.getAttribs(e),r=e.attributes.length;r--;)if(l=e.attributes[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!y.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new o(this)},nodeIndex:function(e,t){var n=0,r,i,o;if(e)for(r=e.nodeType,e=e.previousSibling,i=e;e;e=e.previousSibling)o=e.nodeType,(!t||3!=o||o!=r&&e.nodeValue.length)&&(n++,r=o);return n},split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=p(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.replaceChild(n,t):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(l.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(l.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return 1!=e.nodeType?null:(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null)},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},c.DOM=new c(document),c}),r(v,[g,f],function(e,t){function n(){function e(e,t){function n(){o.remove(s),a&&(a.onreadystatechange=a.onload=a=null),t()}function i(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var o=r,a,s;s=o.uniqueId(),a=document.createElement("script"),a.id=s,a.type="text/javascript",a.src=e,"onreadystatechange"in a?a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&n()}:a.onload=n,a.onerror=i,(document.getElementsByTagName("head")[0]||document.body).appendChild(a)}var t=0,n=1,a=2,s={},l=[],c={},d=[],u=0,f;this.isDone=function(e){return s[e]==a},this.markDone=function(e){s[e]=a},this.add=this.load=function(e,n,r){var i=s[e];i==f&&(l.push(e),s[e]=t),n&&(c[e]||(c[e]=[]),c[e].push({func:n,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(l,e,t)},this.loadScripts=function(t,r,l){function p(e){i(c[e],function(e){e.func.call(e.scope)}),c[e]=f}var m;d.push({func:r,scope:l||this}),m=function(){var r=o(t);t.length=0,i(r,function(t){return s[t]==a?(p(t),void 0):(s[t]!=n&&(s[t]=n,u++,e(t,function(){s[t]=a,u--,p(t),m()})),void 0)}),u||(i(d,function(e){e.func.call(e.scope)}),d.length=0)},m()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(y,[v,f],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){if(r.language&&r.languageLoad!==!1){if(n&&new RegExp("([, ]|\\b)"+r.language+"([, ]|\\b)").test(n)===!1)return;e.ScriptLoader.add(this.urls[t]+"/langs/"+r.language+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,d=o;c.urls[n]||("object"==typeof o&&(d=o.prefix+o.resource+o.suffix),0!==d.indexOf("/")&&-1==d.indexOf("://")&&(d=r.baseURL+"/"+d),c.urls[n]=d.substring(0,d.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(d,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(b,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(C,[f],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e){var t={},n,r;for(n=0,r=e.length;r>n;n++)t[e[n]]={};return t}var o,l,c,d=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),l=3;l
"+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,e=t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='_',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('_'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(){var e=this,t=e.getRng(),n,r,i,o;if(t.duplicate||t.item){if(t.item)return t.item(0);for(i=t.duplicate(),i.collapse(1),n=i.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),r=o=t.parentElement();o=o.parentNode;)if(o==n){n=r;break}return n}return n=t.startContainer,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[Math.min(n.childNodes.length-1,t.startOffset)]),n&&3==n.nodeType?n.parentNode:n},getEnd:function(){var e=this,t=e.getRng(),n,r;return t.duplicate||t.item?t.item?t.item(0):(t=t.duplicate(),t.collapse(0),n=t.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),n&&"BODY"==n.nodeName?n.lastChild||n:n):(n=t.endContainer,r=t.endOffset,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[r>0?r-1:r]),n&&3==n.nodeType?n.parentNode:n)},getBookmark:function(e,t){function n(e,t){var n=0;return s(a.select(e),function(e,r){e==t&&(n=r)}),n}function r(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function i(){function e(e,n){var i=e[n?"startContainer":"endContainer"],a=e[n?"startOffset":"endOffset"],s=[],l,c,d=0;if(3==i.nodeType){if(t)for(l=i.previousSibling;l&&3==l.nodeType;l=l.previousSibling)a+=l.nodeValue.length;s.push(a)}else c=i.childNodes,a>=c.length&&c.length&&(d=1,a=Math.max(0,c.length-1)),s.push(o.dom.nodeIndex(c[a],t)+d);for(;i&&i!=r;i=i.parentNode)s.push(o.dom.nodeIndex(i,t));return s}var n=o.getRng(!0),r=a.getRoot(),i={};return i.start=e(n,!0),o.isCollapsed()||(i.end=e(n)),i}var o=this,a=o.dom,l,c,d,u,f,p,m="",h;if(2==e)return p=o.getNode(),f=p.nodeName,"IMG"==f?{name:f,index:n(f,p)}:o.tridentSel?o.tridentSel.getBookmark(e):i();if(e)return{rng:o.getRng()};if(l=o.getRng(),d=a.uniqueId(),u=o.isCollapsed(),h="overflow:hidden;line-height:0px",l.duplicate||l.item){if(l.item)return p=l.item(0),f=p.nodeName,{name:f,index:n(f,p)};c=l.duplicate();try{l.collapse(),l.pasteHTML(''+m+""),u||(c.collapse(!1),l.moveToElementText(c.parentElement()),0===l.compareEndPoints("StartToEnd",c)&&c.move("character",-1),c.pasteHTML(''+m+""))}catch(g){return null}}else{if(p=o.getNode(),f=p.nodeName,"IMG"==f)return{name:f,index:n(f,p)};c=r(l.cloneRange()),u||(c.collapse(!1),c.insertNode(a.create("span",{"data-mce-type":"bookmark",id:d+"_end",style:h},m))),l=r(l),l.collapse(!0),l.insertNode(a.create("span",{"data-mce-type":"bookmark",id:d+"_start",style:h},m))}return o.moveToBookmark({id:d,keep:1}),{id:d}},moveToBookmark:function(e){function t(t){var n=e[t?"start":"end"],r,i,o,s;if(n){for(o=n[0],i=c,r=n.length-1;r>=1;r--){if(s=i.childNodes,n[r]>s.length-1)return;i=s[n[r]]}3===i.nodeType&&(o=Math.min(n[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(n[0],i.childNodes.length)),t?a.setStart(i,o):a.setEnd(i,o)}return!0}function n(t){var n=o.get(e.id+"_"+t),r,i,a,c,d=e.keep;if(n&&(r=n.parentNode,"start"==t?(d?(r=n.firstChild,i=1):i=o.nodeIndex(n),f=p=r,m=h=i):(d?(r=n.firstChild,i=1):i=o.nodeIndex(n),p=r,h=i),!d)){for(c=n.previousSibling,a=n.nextSibling,s(l(n.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});n=o.get(e.id+"_"+t);)o.remove(n,1);c&&a&&c.nodeType==a.nodeType&&3==c.nodeType&&!u&&(i=c.nodeValue.length,c.appendData(a.nodeValue),o.remove(a),"start"==t?(f=p=c,m=h=i):(p=c,h=i))}}function r(e){return!o.isBlock(e)||e.innerHTML||d||(e.innerHTML='
'),e}var i=this,o=i.dom,a,c,f,p,m,h;if(e)if(e.start){if(a=o.createRng(),c=o.getRoot(),i.tridentSel)return i.tridentSel.moveToBookmark(e);t(!0)&&t()&&i.setRng(a)}else e.id?(n("start"),n("end"),f&&(a=o.createRng(),a.setStart(r(f),m),a.setEnd(r(p),h),i.setRng(a))):e.name?i.select(o.select(e.name)[e.index]):e.rng&&i.setRng(e.rng)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){var t=this,n,r,i,o=t.win.document,a;if(!e&&t.lastFocusBookmark){var s=t.lastFocusBookmark;return s.startContainer?(r=o.createRange(),r.setStart(s.startContainer,s.startOffset),r.setEnd(s.endContainer,s.endOffset)):r=s,r}if(e&&t.tridentSel)return t.tridentSel.getRangeAt(0);try{(n=t.getSel())&&(r=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():o.createRange())}catch(l){}if(d&&r&&r.setStart){try{a=o.selection.createRange()}catch(l){}a&&a.item&&(i=a.item(0),r=o.createRange(),r.setStartBefore(i),r.setEndAfter(i))}return r||(r=o.createRange?o.createRange():o.body.createTextRange()),r.setStart&&9===r.startContainer.nodeType&&r.collapsed&&(i=t.dom.getRoot(),r.setStart(i,0),r.setEnd(i,0)),t.selectedRange&&t.explicitRange&&(0===r.compareBoundaryPoints(r.START_TO_START,t.selectedRange)&&0===r.compareBoundaryPoints(r.END_TO_END,t.selectedRange)?r=t.explicitRange:(t.selectedRange=null,t.explicitRange=null)),r},setRng:function(e,t){var n=this,r;if(e.select)try{e.select()}catch(i){}else if(n.tridentSel){if(e.cloneRange)try{return n.tridentSel.addRange(e),void 0}catch(i){}}else if(r=n.getSel()){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(i){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,l=t.dom.getRoot();return n?n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){function t(t){function a(t,n){for(var r=new e(t,f.getParent(t.parentNode,f.isBlock)||p);t=r[n?"prev":"next"]();)if("BR"===t.nodeName)return!0}function s(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}function l(t,n){var r,a;for(n=n||c,r=new e(n,f.getParent(n.parentNode,f.isBlock)||p);m=r[t?"prev":"next"]();){if(3===m.nodeType&&m.nodeValue.length>0)return c=m,d=t?m.nodeValue.length:0,i=!0,void 0;if(f.isBlock(m)||h[m.nodeName.toLowerCase()])return;a=m}o&&a&&(c=a,i=!0,d=0)}var c,d,u,f=n.dom,p=f.getRoot(),m,h,g,v;if(c=r[(t?"start":"end")+"Container"],d=r[(t?"start":"end")+"Offset"],h=f.schema.getNonEmptyElements(),v=t,1==c.nodeType&&d>c.childNodes.length-1&&(v=!1),9===c.nodeType&&(c=f.getRoot(),d=0),c===p){if(v&&(m=c.childNodes[d>0?d-1:0],m&&(g=m.nodeName.toLowerCase(),h[m.nodeName]||"TABLE"==m.nodeName)))return;if(c.hasChildNodes()&&(d=Math.min(!v&&d>0?d-1:d,c.childNodes.length-1),c=c.childNodes[d],d=0,c.hasChildNodes()&&!/TABLE/.test(c.nodeName))){m=c,u=new e(c,p);do{if(3===m.nodeType&&m.nodeValue.length>0){d=v?0:m.nodeValue.length,c=m,i=!0;break}if(h[m.nodeName.toLowerCase()]){d=f.nodeIndex(m),c=m.parentNode,"IMG"!=m.nodeName||v||d++,i=!0;break}}while(m=v?u.next():u.prev())}}o&&(3===c.nodeType&&0===d&&l(!0),1===c.nodeType&&(m=c.childNodes[d],!m||"BR"!==m.nodeName||s(m,"A")||a(m)||a(m,!0)||l(!0,c.childNodes[d]))),v&&!o&&3===c.nodeType&&d===c.nodeValue.length&&l(!1),i&&r["set"+(t?"Start":"End")](c,d)}var n=this,r,i,o;d||(r=n.getRng(),o=r.collapsed,t(!0),o||t(),i&&(o&&r.collapse(!0),n.setRng(r,n.isForward())))},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};s(n.selectorChangedData,function(e,t){s(o,function(n){return i.is(n,t)?(r[t]||(s(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),s(r,function(e,n){a[n]||(delete r[n],s(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e){function t(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var n,r,i=this,o=i.dom,a=o.getRoot(),s,l;if("BODY"!=a.nodeName){var c=i.getScrollContainer();if(c)return n=t(e).y-t(c).y,l=c.clientHeight,s=c.scrollTop,(s>n||n+25>s+l)&&(c.scrollTop=s>n?n:n-l+25),void 0}r=o.getViewPort(i.editor.getWin()),n=o.getPos(e).y,s=r.y,l=r.h,(n
'),r}function v(t){var n,r,i;if(3==T.nodeType&&(t?R>0:R
|)$/," "))),e}var a,s,l,c,u,f,p,m,h,g,v;/^ | $/.test(i)&&(i=o(i)),a=r.parser,s=new e({},r.schema),v='ÈB;',f={content:i,format:"html",selection:!0},r.fire("BeforeSetContent",f),i=f.content,-1==i.indexOf("{$caret}")&&(i+="{$caret}"),i=i.replace(/\{\$caret\}/,v),m=_.getRng();var y=m.startContainer||(m.parentElement?m.parentElement():null),b=r.getBody();y===b&&_.isCollapsed()&&w.isBlock(b.firstChild)&&w.isEmpty(b.firstChild)&&(m=w.createRng(),m.setStart(b.firstChild,0),m.setEnd(b.firstChild,0),_.setRng(m)),_.isCollapsed()||r.getDoc().execCommand("Delete",!1,null),l=_.getNode();
+var C={context:l.nodeName.toLowerCase()};if(u=a.parse(i,C),h=u.lastChild,"mce_marker"==h.attr("id"))for(p=h,h=h.prev;h;h=h.walk(!0))if(3==h.type||!w.isBlock(h.name)){h.parent.insert(p,h,"br"===h.name);break}if(C.invalid){for(_.setContent(v),l=_.getNode(),c=r.getBody(),9==l.nodeType?l=h=c:h=l;h!==c;)l=h,h=h.parentNode;i=l==c?c.innerHTML:w.getOuterHTML(l),i=s.serialize(a.parse(i.replace(//i,function(){return s.serialize(u)}))),l==c?w.setHTML(c,i):w.setOuterHTML(l,i)}else i=s.serialize(u),h=l.firstChild,g=l.lastChild,!h||h===g&&"BR"===h.nodeName?w.setHTML(l,i):_.setContent(i);p=w.get("mce_marker"),_.scrollIntoView(p),m=w.createRng(),h=p.previousSibling,h&&3==h.nodeType?(m.setStart(h,h.nodeValue.length),d||(g=p.nextSibling,g&&3==g.nodeType&&(h.appendData(g.data),g.parentNode.removeChild(g)))):(m.setStartBefore(p),m.setEndBefore(p)),w.remove(p),_.setRng(m),r.fire("SetContent",f),r.addVisual()},mceInsertRawHTML:function(e,t,n){_.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){b(n)},mceSetContent:function(e,t,n){r.setContent(n)},"Indent,Outdent":function(e){var t,n,r;t=E.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),m("InsertUnorderedList")||m("InsertOrderedList")?v(e):(E.forced_root_block||w.getParent(_.getNode(),w.isBlock)||k.apply("div"),i(_.getSelectedBlocks(),function(i){var o;"LI"!=i.nodeName&&(o="rtl"==w.getStyle(i,"direction",!0)?"paddingRight":"paddingLeft","outdent"==e?(r=Math.max(0,parseInt(i.style[o]||0,10)-t),w.setStyle(i,o,r?r+n:"")):(r=parseInt(i.style[o]||0,10)+t+n,w.setStyle(i,o,r)))}))},mceRepaint:function(){if(c)try{C(u),_.getSel()&&_.getSel().selectAllChildren(r.getBody()),_.collapse(u),x()}catch(e){}},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"
")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(e,t,n){r.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,_.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=w.getParent(_.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||k.remove("link"),n.href&&k.apply("link",n,r)},selectAll:function(){var e=w.getRoot(),t;_.getRng().setStart?(t=w.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),_.setRng(t)):(t=_.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){v("Delete");var e=r.getBody();w.isEmpty(e)&&(r.setContent(""),e.firstChild&&w.isBlock(e.firstChild)?r.selection.setCursorLocation(e.firstChild,0):r.selection.setCursorLocation(e,0))},mceNewDocument:function(){r.setContent("")}}),g({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=_.isCollapsed()?[w.getParent(_.getNode(),w.isBlock)]:_.getSelectedBlocks(),r=a(n,function(e){return!!k.matchNode(e,t)});return-1!==s(r,u)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return y(e)},mceBlockQuote:function(){return y("blockquote")},Outdent:function(){var e;if(E.inline_styles){if((e=w.getParent(_.getStart(),w.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return u;if((e=w.getParent(_.getEnd(),w.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return u}return m("InsertUnorderedList")||m("InsertOrderedList")||!E.inline_styles&&!!w.getParent(_.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=w.getParent(_.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),g({"FontSize,FontName":function(e){var t=0,n;return(n=w.getParent(_.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),g({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}),r(P,[f],function(e){function t(e,i){var o=this,a,s;if(e=r(e),i=o.settings=i||{},/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return o.source=e,void 0;var l=0===e.indexOf("//");0!==e.indexOf("/")||l||(e=(i.base_uri?i.base_uri.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(s=i.base_uri?i.base_uri.path:new t(location.href).directory,e=""===i.base_uri.protocol?"//mce_host"+o.toAbsPath(s,e):(i.base_uri&&i.base_uri.protocol||"http")+"://mce_host"+o.toAbsPath(s,e)),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),o[t]=r}),a=i.base_uri,a&&(o.protocol||(o.protocol=a.protocol),o.userInfo||(o.userInfo=a.userInfo),o.port||"mce_host"!==o.host||(o.port=a.port),o.host&&"mce_host"!==o.host||(o.host=a.host),o.source=""),l&&(o.protocol="")}var n=e.each,r=e.trim;return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(this.host==e.host&&this.protocol==e.protocol?n:0)},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.length
";var g='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';if(document.domain!=location.hostname&&(c=g),s=E.add(l.iframeContainer,"iframe",{id:t.id+"_ifr",src:c||'javascript:""',frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}}),P)try{t.getDoc()}catch(v){s.src=c=g}t.contentAreaContainer=l.iframeContainer,l.editorContainer&&(E.get(l.editorContainer).style.display=t.orgDisplay),E.get(t.id).style.display="none",E.setAttrib(t.id,"aria-hidden",!0),c||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,o=n.settings,f=E.get(n.id),p=n.getDoc(),m,h;o.inline||(n.getElement().style.visibility=n.orgVisibility),t||o.content_editable||(p.open(),p.write(n.iframeHTML),p.close()),o.content_editable&&(n.on("remove",function(){var e=this.getBody();E.removeClass(e,"mce-content-body"),E.removeClass(e,"mce-edit-focus"),E.setAttrib(e,"tabIndex",null),E.setAttrib(e,"contentEditable",null)
+}),E.addClass(f,"mce-content-body"),f.tabIndex=-1,n.contentDocument=p=o.content_document||document,n.contentWindow=o.content_window||window,n.bodyElement=f,o.content_document=o.content_window=null,o.root_name=f.nodeName.toLowerCase()),m=n.getBody(),m.disabled=!0,o.readonly||(n.inline&&"static"==E.getStyle(m,"position",!0)&&(m.style.position="relative"),m.contentEditable=n.getParam("content_editable_state",!0)),m.disabled=!1,n.schema=new g(o),n.dom=new e(p,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:o.force_hex_style_colors,class_filter:o.class_filter,update_styles:!0,root_element:o.content_editable?n.id:null,collect:o.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new v(o,n.schema),n.parser.addAttributeFilter("src,href,style",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)i=e[r],a=i.attr(t),s="data-mce-"+t,i.attributes.map[s]||("style"===t?i.attr(s,o.serializeStyle(o.parseStyle(a),i.name)):i.attr(s,n.convertURL(a,t,i.name)))}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("type","mce-"+(n.attr("type")||"text/javascript"))}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,i,o=n.schema.getNonEmptyElements();t--;)i=e[t],i.isEmpty(o)&&(i.empty().append(new r("br",1)).shortEnded=!0)}),n.serializer=new i(o,n),n.selection=new a(n.dom,n.getWin(),n.serializer,n),n.formatter=new s(n),n.undoManager=new l(n),n.forceBlocks=new d(n),n.enterKey=new c(n),n.editorCommands=new u(n),n.fire("PreInit"),o.browser_spellcheck||o.gecko_spellcheck||(p.body.spellcheck=!1,E.setAttrib(m,"spellcheck","false")),n.fire("PostRender"),n.quirks=y(n),o.directionality&&(m.dir=o.directionality),o.nowrap&&(m.style.whiteSpace="nowrap"),o.protect&&n.on("BeforeSetContent",function(e){R(o.protect,function(t){e.content=e.content.replace(t,function(e){return""})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),o.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(
[\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,R(n._pendingNativeEvents,function(e){n.dom.bind(_(n,e),e,function(e){n.fire(e.type,e)})}),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.contentStyles.length>0&&(h="",R(n.contentStyles,function(e){h+=e+"\r\n"}),n.dom.addStyle(h)),R(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),o.auto_focus&&setTimeout(function(){var e=n.editorManager.get(o.auto_focus);e.selection.select(e.getBody(),1),e.selection.collapse(1),e.getBody().focus(),e.getWin().focus()},100),f=p=m=null},focus:function(e){var t,n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l;e||(o=r.getRng(),o.item&&(a=o.item(0)),n._refreshContentEditable(),i||(b.opera||n.getBody().focus(),n.getWin().focus()),(M||i)&&(l=n.getBody(),l.setActive&&b.ie<11?l.setActive():l.focus(),i&&r.normalize()),a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())),n.editorManager.activeEditor!=n&&((t=n.editorManager.activeEditor)&&t.fire("deactivate",{relatedTarget:n}),n.fire("activate",{relatedTarget:t})),n.editorManager.activeEditor=n},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?H(r):0,n=H(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?R(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),i[L(e[0])]=e.length>1?L(e[1]):L(e)}):i=r,i):r},nodeChanged:function(){var e=this,t=e.selection,n,r,i;e.initialized&&!e.settings.disable_nodechange&&(i=e.getBody(),n=t.getStart()||i,n=P&&n.ownerDocument!=e.getDoc()?e.getBody():n,"IMG"==n.nodeName&&t.isCollapsed()&&(n=n.parentNode),r=[],e.dom.getParent(n,function(e){return e===i?!0:(r.push(e),void 0)}),e.fire("NodeChange",{element:n,parents:r}))},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addCommand:function(e,t,n){this.execCommands[e]={func:t,scope:n||this}},addQueryStateHandler:function(e,t,n){this.queryStateCommands[e]={func:t,scope:n||this}},addQueryValueHandler:function(e,t,n){this.queryValueCommands[e]={func:t,scope:n||this}},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){var i=this,o=0,a;return/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus||i.focus(),r=T({},r),r=i.fire("BeforeExecCommand",{command:e,ui:t,value:n}),r.isDefaultPrevented()?!1:(a=i.execCommands[e])&&a.func.call(a.scope,t,n)!==!0?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):(R(i.plugins,function(r){return r.execCommand&&r.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),o=!0,!1):void 0}),o?o:i.theme&&i.theme.execCommand&&i.theme.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):i.editorCommands.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):(i.getDoc().execCommand(e,t,n),i.fire("ExecCommand",{command:e,ui:t,value:n}),void 0))},queryCommandState:function(e){var t=this,n,r;if(!t._isHidden()){if((n=t.queryStateCommands[e])&&(r=n.func.call(n.scope),r!==!0))return r;if(r=t.editorCommands.queryCommandState(e),-1!==r)return r;try{return t.getDoc().queryCommandState(e)}catch(i){}}},queryCommandValue:function(e){var n=this,r,i;if(!n._isHidden()){if((r=n.queryValueCommands[e])&&(i=r.func.call(r.scope),i!==!0))return i;if(i=n.editorCommands.queryCommandValue(e),i!==t)return i;try{return n.getDoc().queryCommandValue(e)}catch(o){}}},show:function(){var e=this;E.show(e.getContainer()),E.hide(e.id),e.load(),e.fire("show")},hide:function(){var e=this,t=e.getDoc();P&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),E.hide(e.getContainer()),E.setStyle(e.id,"display",e.orgDisplay),e.fire("hide")},isHidden:function(){return!E.isHidden(this.id)},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(n.innerHTML=r,(i=E.getParent(t.id,"form"))&&R(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&(t.isNotDirty=!0),r},setContent:function(e,t){var n=this,r=n.getBody(),i;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=P&&11>P?"":'
',e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):(!P||11>P)&&(e='
'),r.innerHTML=e,n.fire("SetContent",t)):("raw"!==t.format&&(e=new o({},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=L(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?r.innerHTML:"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),e.content="text"!=e.format?L(n):n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e){this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},getContainer:function(){var e=this;return e.container||(e.container=E.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return E.get(this.settings.content_element||this.id)},getWin:function(){var e=this,t;return e.contentWindow||(t=E.get(e.id+"_ifr"),t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),R(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),t&&"0"!=t||(n.hasVisual?i.addClass(e,o):i.removeClass(e,o)),void 0;case"A":return i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o="mce-item-anchor",t&&(n.hasVisual?i.addClass(e,o):i.removeClass(e,o))),void 0}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;if(!e.removed){e.removed=1,e.hasHiddenInput&&E.remove(e.getElement().nextSibling);var t=e.getDoc();P&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),E.setStyle(e.id,"display",e.orgDisplay),e.settings.content_editable||(D.unbind(e.getWin()),D.unbind(e.getDoc()));var n=e.getContainer();D.unbind(e.getBody()),D.unbind(n),e.fire("remove"),e.editorManager.remove(e),E.remove(n),e.destroy()}},bindNative:function(e){var t=this;t.settings.readonly||(t.initialized?t.dom.bind(_(t,e),e,function(n){t.fire(e,n)}):t._pendingNativeEvents?t._pendingNativeEvents.push(e):t._pendingNativeEvents=[e])},unbindNative:function(e){var t=this;t.initialized&&t.dom.unbind(e)},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return t.remove(),void 0;e&&M&&(D.unbind(t.getDoc()),D.unbind(t.getWin()),D.unbind(t.getBody())),e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),E.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=null,t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},_refreshContentEditable:function(){var e=this,t,n;e._isHidden()&&(t=e.getBody(),n=t.parentNode,n.removeChild(t),n.appendChild(t),t.focus())},_isHidden:function(){var e;return M?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}},T(N.prototype,x),N}),r(it,[],function(){var e={};return{rtl:!1,add:function(t,n){for(var r in n)e[r]=n[r];this.rtl=this.rtl||"rtl"===e._dir},translate:function(t){if("undefined"==typeof t)return t;if("string"!=typeof t&&t.raw)return t.raw;if(t.push){var n=t.slice(1);t=(e[t[0]]||t[0]).replace(/\{([^\}]+)\}/g,function(e,t){return n[t]})}return e[t]||t},data:e}}),r(ot,[g,h],function(e,t){function n(r){function i(){try{return document.activeElement}catch(e){return document.body}}function o(e){return e&&e.startContainer?{startContainer:e.startContainer,startOffset:e.startOffset,endContainer:e.endContainer,endOffset:e.endOffset}:e}function a(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function s(t){return!!e.DOM.getParent(t,n.isEditorUIElement)}function l(e,t){for(var n=t.getBody();e;){if(e==n)return!0;e=e.parentNode}}function c(n){var c=n.editor,d;c.on("init",function(){"onbeforedeactivate"in document&&t.ie<11?c.dom.bind(c.getBody(),"beforedeactivate",function(){try{c.lastRng=c.selection.getRng()}catch(e){}c.selection.lastFocusBookmark=o(c.lastRng)}):(c.inline||t.ie>10)&&(c.on("nodechange keyup",function(){var e=document.activeElement;e&&e.id==c.id+"_ifr"&&(e=c.getBody()),l(e,c)&&(c.lastRng=c.selection.getRng())}),t.webkit&&(d=function(){var e=c.selection.getRng();e.collapsed||(c.lastRng=e)},e.DOM.bind(document,"selectionchange",d),c.on("remove",function(){e.DOM.unbind(document,"selectionchange",d)})))}),c.on("setcontent",function(){c.lastRng=null}),c.on("mousedown",function(){c.selection.lastFocusBookmark=null}),c.on("focusin",function(){var e=r.focusedEditor;c.selection.lastFocusBookmark&&(c.selection.setRng(a(c,c.selection.lastFocusBookmark)),c.selection.lastFocusBookmark=null),e!=c&&(e&&e.fire("blur",{focusedEditor:c}),r.activeEditor=c,r.focusedEditor=c,c.fire("focus",{blurredEditor:e}),c.focus(!1)),c.lastRng=null}),c.on("focusout",function(){window.setTimeout(function(){var e=r.focusedEditor;s(i())||e!=c||(c.fire("blur",{focusedEditor:null}),r.focusedEditor=null,c.selection.lastFocusBookmark=null)},0)})}e.DOM.bind(document,"focusin",function(e){var t=r.activeEditor;t&&e.target.ownerDocument==document&&(t.selection.lastFocusBookmark=o(t.lastRng),s(e.target)||r.focusedEditor!=t||(t.fire("blur",{focusedEditor:null}),r.focusedEditor=null))}),r.on("AddEditor",c)}return n.isEditorUIElement=function(e){return-1!==e.className.indexOf("mce-")},n}),r(at,[rt,g,P,h,f,tt,it,ot],function(e,n,r,i,o,a,s,l){var c=n.DOM,d=o.explode,u=o.each,f=o.extend,p=0,m,h={majorVersion:"4",minorVersion:"0.12",releaseDate:"2013-12-18",editors:[],i18n:s,activeEditor:null,setup:function(){var e=this,t,n,i="",o;if(n=document.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/"),o=window.tinymce||window.tinyMCEPreInit)t=o.base||o.baseURL,i=o.suffix;else for(var a=document.getElementsByTagName("script"),s=0;sWhat next?
");
+ $('.ocmTwitterComment',$checkout).click(function(){
+ window.open('http://twitter.com/home?status='+cartContentsAsLinks,'twitter');
+ window[myApp.vars.analyticsPointer]('send', 'event','Checkout','User Event','Tweeted about order');
});
- } else {
- app.u.loadApp();
+ //the fb code only works if an appID is set, so don't show banner if not present.
+ if(myApp.u.thisNestedExists("zGlobals.thirdParty.facebook.appId") && typeof FB == 'object') {
+ $('.ocmFacebookComment',$checkout).click(function(){
+ myApp.ext.quickstart.thirdParty.fb.postToWall(cartContentsAsLinks);
+ _gaq.push(['_trackEvent','Checkout','User Event','FB message about order']);
+ window[myApp.vars.analyticsPointer]('send', 'event','Checkout','User Event','FB message about order');
+ });
}
- }
-// *** 201324 -> increase # of attempts to reduce pre-timeout error reporting. will help to load app on slow connection/computer.
- else if(attempts > 250) {
- app.u.dump("WARNING! something went wrong in init.js");
- //this is 10 seconds of trying. something isn't going well.
- $('#appPreView').empty().append("Uh Oh. Something seems to have gone wrong.
If the error persists, please contact the site administrator
- dev: see console.One moment please.
@@ -137,6 +175,42 @@ One moment please.
+
+
+
+
+One moment please.
-->
-
+
-
-
+
-
-
-
-
+
+
One moment please.
each of the 'sections' are used to load another template. don't change the id.
don't modify the 'data-templateid' unless you are changing template names and updating everywhere appropriate.
-->
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
-
+
-
+
if you change the height and width of this image, change the .minimalMode .searchResultsProduct in qs_styles.css to match
-->
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-


-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+



+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-