diff --git a/.gitignore b/.gitignore index b9892d026..764c9a7c4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ .metadata bin/ node_modules/ +/utilities/htmlbuilder/built/*/*.html +/utilities/htmlbuilder/built/*.html /utilities/nodeproxy/jt.key /utilities/nodeproxy/www-spork* /utilities/nodeproxy/www.spork* diff --git a/_banners.json b/_banners.json new file mode 100644 index 000000000..473be35fa --- /dev/null +++ b/_banners.json @@ -0,0 +1,44 @@ +[ + { + "src":"banners/wrigley_centennial_banner.png", + "alt":"100 Years of Wrigley Field", + "title":"100 Years of Wrigley Field", + "href":"/filter/100_years_of_wrigley_field/" + }, + { + "src":"banners/2014/chicago_bears_transparent_artwork.png", + "alt":"Chicago Bears Shirts, Hats, Apparel and Souvenirs at SportsWorldChicago.com", + "title":"Chicago Bears Shirts, Hats, Apparel and Souvenirs at SportsWorldChicago.com", + "href":"/filter/bears/" + }, + { + "src":"banners/2014/sportsworldchicago_nike_transparent_banner_v2.png", + "alt":"Authentic Chicago Cubs Nike Apparel at SportsWorldChicago.com", + "title":"Authentic Chicago Cubs Nike Apparel at SportsWorldChicago.com", + "href":"/search/keywords/nike/" + }, + { + "src":"banners/2014/chicago_blackhawks_transparent_banner_3.png", + "alt":"Chicago Blackhawks Shirts, Jerseys, Hats at SportsWorldChicago.com", + "title":"Chicago Blackhawks Shirts, Jerseys, Hats at SportsWorldChicago.com", + "href":"/filter/blackhawks/" + }, + { + "src":"banners/chicago_cubs_authentic_jersey_homepage_banner.png", + "alt":"Authentic Jerseys at SportsWorldChicago.com", + "title":"Authentic Jerseys at SportsWorldChicago.com", + "href":"/filter/jerseys/" + }, + { + "src":"banners/chicago_cubs_hats_banner_homepage.png", + "alt":"Chicago Cubs Caps and Hats at SportsWorldChicago.com", + "title":"Chicago Cubs Caps and Hats at SportsWorldChicago.com", + "href":"/filter/hats/" + }, + { + "src":"banners/2014/blackhawks_transparent_banner.png", + "alt":"Chicago Blackhawks Apparel and Merchandise", + "title":"Chicago Blackhawks Apparel and Merchandise", + "href":"/filter/blackhawks/" + } +] diff --git a/_swc_styles.css b/_swc_styles.css new file mode 100644 index 000000000..7fe8af613 --- /dev/null +++ b/_swc_styles.css @@ -0,0 +1,546 @@ +html, body{padding:0px; margin: 0px;} +/* +*/ +#preview {color:gray;} +#preview, #preview svg { + position:absolute; + top:0px; + left:0px; + right:0px; + bottom:0px; + width:100%; + height:100%; +} +#svg-circle { + display:block; + width:150px; + height:150px; + margin: 0 auto; +} +#pink { + fill:#eb307d; + } +#svg-circle #clipmask { +animation: move-mask infinite running 2s ease; +} +@keyframes move-mask { +0%, 100% {transform: translateY(-90px)} +50% {transform: translateY(0px)} +} +#preview img {margin-top: 10%; max-width:85%;} + +body{background: #F0F0F0;) no-repeat fixed center top, #003366;} +.highlightText {color:red;} +.highlight_1, a.highlight_1{color:#003366;} +.highlight_2, a.highlight_2{color:#B3B3B3;} +.highlightBG_1 {background: #003366;} +.highlightBG_1_alpha {background:rgba(00,33,66,.75);} +.highlightBG_2 {background: #B3B3B3;} +.redText{color:#7e0000;} +a.redText{color:#7e0000;} +.strong{font-weight:bold;} +.underline {text-decoration:underline;} +.noUnderline, a.noUnderline {text-decoration:none;} +.blockLink, .blockLink a {text-decoration:none;} +.bold {font-weight:bold;} +.white{color:white;} +.emph{font-size:1.2em;} + +#mainContentArea > div > div, .contentBG {background:rgba(256,256,256,.8);} +#mainContentArea > div > div.noBG {background:none;} + +.checkoutFormContainer fieldset { padding:0px !important; font-size: 1.15em; border:none; background: rgba(256,256,256,.9); } +.checkoutFormContainer fieldset > .panelContentContainer{box-sizing: border-box; padding: 1em; border:1px solid white; width:100%; } +.checkoutFormContainer fieldset legend {font-size: .9em; border:1px solid white; box-sizing: border-box; width:100%;} +.checkoutFormContainer fieldset.marginBottom {margin-bottom: .5em;} +.checkoutFormContainer .optional {color: gray;} +.checkoutFormContainer fieldset button {font-size: .8em;} + +.paycon.PAYPALEC , +.paycon.CREDIT { + height: 16px; + width: 76px; + display:block; + float:left; + margin: 3px 10px 0 0; + background: url(images/spritesheet_payment.png); +} +.paycon.PAYPALEC{background-position: 0px 0px;} +.paycon.CREDIT{background-position: 0px -18px;} +.preview img { + margin-top: 30px; + background:rgba(256,256,256,.8); +} + +.textDecNone{text-decoration:none;} +.alignBottom {vertical-align:bottom;} +.alignJustify {text-align:justify;} +.displayTable {display: table;} +.displayTableRow {display: table-row;} +.displayTableCell {display: table-cell;} + +.positionRelative{position:relative} + +.fillWidth {width:100%;} + +.clear{clear:both;} +.clearLeft{clear:left;} +.clearRight{clear:right;} + +.dosis {font-family:'Dosis', sans-serif;} + +@font-face {font-family: LHFFullBlock; src: url('extensions/jerseypreview/LHFFullBlock.ttf');} +@font-face {font-family: LHFFullBlock2; src: url('extensions/jerseypreview/LHFFullBlock.TTF');} +.LHFFullBlock { font-family: LHFFullBlock, LHFFullBlock2;} +@font-face {font-family: LHFoldblockCONDBOLD; src: url('extensions/jerseypreview/LHFoldblockCONDBOLD.ttf');} +@font-face {font-family: LHFoldblockCONDBOLD2; src: url('extensions/jerseypreview/LHFoldblockCONDBOLD.TTF');} +.LHFoldblockCONDBOLD { font-family: LHFoldblockCONDBOLD, LHFoldblockCONDBOLD2;} +@font-face {font-family: LHFoldblockCONDMED; src: url('extensions/jerseypreview/LHFoldblockCONDMED.ttf');} +@font-face {font-family: LHFoldblockCONDMED2; src: url('extensions/jerseypreview/LHFoldblockCONDMED.TTF');} +.LHFoldblockCONDMED { font-family: LHFoldblockCONDMED, LHFoldblockCONDMED2;} +@font-face {font-family: LHFoldblockREGBOLD; src: url('extensions/jerseypreview/LHFoldblockREGBOLD.ttf');} +@font-face {font-family: LHFoldblockREGBOLD2; src: url('extensions/jerseypreview/LHFoldblockREGBOLD.TTF');} +.LHFoldblockREGBOLD { font-family: LHFoldblockREGBOLD, LHFoldblockREGBOLD2;} +@font-face {font-family: LHFoldblockREGMED; src: url('extensions/jerseypreview/LHFoldblockREGMED.ttf');} +@font-face {font-family: LHFoldblockREGMED2; src: url('extensions/jerseypreview/LHFoldblockREGMED.TTF');} +.LHFoldblockREGMED { font-family: LHFoldblockREGMED, LHFoldblockREGMED2;} + +#appPreView{ + background: rgba(64,64,64,.5); + position:fixed; + top:0px; + bottom:0px; + left:0px; + right:0px; + z-index:1000; + + width: 100%; + max-width:100%; +} +#appPreView > div { + background: white; + position: absolute; + top: 50%; + left: 50%; + height: 100px; + width: 200px; + margin-left: -100px; + margin-top: -50px; + border: 5px solid #003366; + box-shadow:box-shadow: 5px 5px 8px rgba(64,64,64,.5); +} +#mainContentArea {position:relative;} +#mainContentArea > div { + position:relative; + left: -150%; + transition: left .6s; + width: 100%; +} +#mainContentArea > div.active {left:0%;} +#mainContentArea > div.active.post {left:150%;} + +#header { + position:fixed; + background:white; + left:0px; + right:0px; + top:0px; + z-index: 100; +} + +#headerTeam {display:block; border:0px; text-decoration:none;} + +#expandNav a {display:block; width: 30px; height: 30px; line-height:30px} +#expandNav a img{vertical-align:middle;} +#nav {padding:3px 0px; position:absolute; left:0px; right:0px; bottom:0px;} +#nav .fullNav { + position:absolute; + top:0px; + width: 100%; + left: -150%; + transition: all .4s; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +#nav a { + text-decoration:none; + font-weight:bold; + color: white; +} + +#nav .tableNav a { + border-left:1px solid white; + border-right:1px solid white; +} +#nav a:hover {color:#FFFC00;} +#mininav a{color:black;} +#search input{ border-radius:3px; border: 1px solid #b3b3b3;} + +#footer { + color:white; + /* padding: 20px 0px; */ + position:fixed; + left:0px; + right:0px; + z-index:100; +} + +#GTS_CONTAINER{ + position: absolute; + left:0px; + bottom:100%; +} + +#toggleFooterBtn{ + height:40px; + width: 40px; + position:absolute; + right:0px; + top:-40px; + border-left:1px solid white; + border-top: 1px solid white; + box-shadow: -2px -2px 6px rgba(64,64,64,.5); + background-image:url(images/wrapper/menu_icon.png); + background-position:center center; + background-repeat: no-repeat; +} + +#toggleFooterBar{ + border-bottom: none; + border-right: none; + border-left: none; + height: 20px; + position:absolute; + left:0px; + right:0px; + top:0px; +} + +#appView #toggleFooterBar .hideFooter{display:none;} +#appView.showFooter #toggleFooterBar .hideFooter{display:inline-block;} +#appView.initFooter #toggleFooterBar .hideFooter{display:inline-block;} +#appView #toggleFooterBar .showFooter{display:inline-block;} +#appView.showFooter #toggleFooterBar .showFooter{display:none;} +#appView.initFooter #toggleFooterBar .showFooter{display:none;} + +#footer{transition: bottom .6s;} +#appView.peekFooter.showFooter #footer, +#appView.showFooter #footer {bottom:0px;} +#appView.peekFooter.initFooter #footer, +#appView.initFooter #footer {bottom:0px;} + +#footer a {color:white; text-decoration: none;} + +#footerMiddle .displayTableCell, #footerLeft .displayTableCell {padding: 4px 0px; font-size:.9em;} + +#footerRight .displayTableCell {width: 16.66%} +#footerRight .socialIcons img{width: 100%; max-width:33px;} +#footerRight form {padding: 20px 0px;} + +.footerColumn h3 { letter-spacing:6px; font-size: .8em; padding: 4px 0px;} +.footerBottomBorder .displayTableCell{border-bottom:1px solid #2f483d;} + +#footerLeft .displayTableCell {width:50%;} +#footerMiddle .displayTableCell {width:33.33%;} + +#footer #copyright { + margin: 0px auto; + max-width:260px; + position:absolute; bottom: -6px; font-size: .7em; + left: 0px; + right: 0px; +} + +.homepageBanner{display: block; text-decoration: none; border:none; width: 100%; background:url(images/homepage/SportsWorldChicago-Homepagev3.jpg) no-repeat center center; position:relative;z-index:50;} +.homeSlideshow{display:inline-block; vertical-align:middle; max-width: 60%; width: 100%; height:100%;} +.homeSlideshow a{display:block; width: 100%; height:100%;} +.homeSlideshow a .vAlignHelper{display:inline-block; vertical-align:middle; height:100%;} +.homepageBanner img{vertical-align:middle; max-width: 98%; max-height: 98%;} + +.homepageContent p{ font-size: .9em; padding: 0px 12px; text-indent: 12px;} +.homepageContent {border: 2px solid #003366; padding-bottom: 12px;} + +.leagueLinkContainer {border-spacing: 5px;} +.leagueLink {font-size: 3em; border: 3px solid #003366;} +a.leagueLink:hover {background:#9E0000; color:white;} + +a.blockLink, li.blockLink {display: inline-block;} +.categoryListItem.blockLink, .productListItem.blockLink{position:relative;} +.categoryListItem .catName, .productListItem .prodInfo {position:absolute; bottom:0px; right:0px; left:0px; color: white; padding: .8em 0em; font-weight:bold;} +.productListItem a:hover h6.prodName{color:orange;} +.categoryListItem a:hover .catName{color:orange;} +.productListItem .prodInfo {height: 12%;} +.productListItem .prodInfo .prodName {padding: 0px 10px;} +.productListItem .price {position:absolute; bottom: 5px; right: 10px; color:#9E0000; font-size: 1.2em;} +.productListItem .price > span {color:white; font-size.75em;} + +.productListItem.blockLink { padding-bottom: 66px;} +.productListItem .prodInfo {height: 60px; padding: 3px 0px;} + +.blockLink img {width:100%;} + +.fieldCamPage iframe, +.fieldCamPage object {max-width: 100%;} + +.productPage {color:#333333;} +.productPage a {color:#333333;} +.productTitle, .productInfo, .productTabs{float:right; clear:right; width: 36%;} + +.productImages {float:left; width: 60%;} +.productImages a {text-decoration:none;} +.productImages .prodThumb { width: 30%;} +.productImages .prodThumb img{max-width:100%; max-height: 550px;} +.productImages .morefromteamlink img {max-width:100%;} +.productImages .prodThumb .imgContainer{display:inline-block; max-width: 100%;} +.productImages .prodThumbs .prodThumb img{width:100%;} + +.productImages canvas.prodPreviewer { + position:absolute; + left:0px; + top:0px; + bottom:0px; + right:0px; + width: 100%; + height: 100%; +} + +.productInfoSection {border-bottom: 1px solid #b3b3b3; padding-bottom: 1em;} +.productInfoSection label {font-weight:bold;} +.prodPrice .prefix, .prodMSRP .prefix { display:inline-block; width: 100px; } +.prodPrice .prefix{ color: #333333;} +.basePrice {color:#9E0000; font-size: 1.5em;} + +.productPage .addtocartbutton{border:none;} + +.productPage .tabContent{overflow-y: auto; height:400px; font-size: .9em;} + +.filteredSearchPage form {color:white;} +.filterList { width: 16%; padding: 15px 2%;} +.filterList legend {font-weight: bold; margin-bottom: 6px;} +.filterResultsContainer {float:right; width: 80%;} +.filterCheckboxList {max-height: 120px; overflow:auto;} +.myTeamList .filterCheckboxList {max-height: none;} +.playerFilterList {max-height: 90px; overflow: auto; margin-bottom: 8px;} +.playerFilterList a{margin-right: 5px;} +.filterGroup {margin-bottom: 10px;} +.playerFilterList {text-indent: 1em;} + +.noResults { + display: inline-block; + text-align: left; + background:rgba(256,256,256,.8); +} +.noResults legend {font-weight: bold; font-size: 1.2em; color: #003366;} +.noResults label { width: 100px; display: inline-block; color: black;} + +.sliderValContainer {text-decoration: none;} +.ui-slider-handle {text-decoration: none;} + +.myteams h4 > span { padding-left: 10px;} + +.productTagsContainer { position:relative; max-width:550px; margin: 0px auto; overflow: hidden; transition: height .5s;} +.productTagsContainer.collapsed { + height:20px; + } +.productTagsContainer .productTag { + height:20px; + color: white; + line-height: 20px; + font-size: 18px; + font-weight:bold; + letter-spacing: 2px; + } + +.productTagsContainer .productTag.is_fresh { background:SteelBlue; } +.productTagsContainer .productTag.is_bestseller { background:DarkRed; } +.productTagsContainer .productTag.is_user1 { background:green; } +.productTagsContainer .productTag.is_sale { background:orange; } +.productTagsContainer .productTag.is_specialorder { background:DarkCyan; } +.productTagsContainer .productTag.is_preorder { background:DarkGoldenRod; } +.productTagsContainer .productTag.is_discontinued, +.productTagsContainer .productTag.is_outofstock { background:grey; } +.productTagsContainer .productTag.is_shipfree { background:red; } + +.productTagsContainer.collapsed .moreTagsButton .ui-icon-minusthick {display:none;} +.productTagsContainer .moreTagsButton .ui-icon-minusthick {display:block;} +.productTagsContainer.collapsed .moreTagsButton .ui-icon-plusthick {display:block;} +.productTagsContainer .moreTagsButton .ui-icon-plusthick {display:none;} + + +.moreTagsButton { + position:absolute; + height:18px; + width:18px; + top:0px; + right:0px; + } + +.prodListTagsContainer { + height: 26px; + overflow: hidden; + position: absolute; + bottom: 0px; + left: 0px; + z-index: 99; +} +.productListItem .prodListTagsContainer { + bottom: 66px; +} +.prodListTagsContainer span{ + display: inline-block; + height: 26px; + background: url(images/cubworld_bigtags.png) no-repeat; +} +.prodListTagsContainer .is_user3 {display:none;} + +.prodListTagsContainer .is_fresh{background-position:0px 0px; width:83px;} +.prodListTagsContainer .is_bestseller{background-position:0px -26px; width:80px;} +.prodListTagsContainer .is_user1{background-position:0px -52px; width:99px;} +.prodListTagsContainer .is_sale{background-position:0px -78px; width:99px;} +.prodListTagsContainer .is_specialorder {background-position:0px -104px; width:116px;} +.prodListTagsContainer .is_preorder{background-position:0px -130px; width:135px;} +.prodListTagsContainer .is_discontinued, +.prodListTagsContainer .is_outofstock{background-position:0px -156px; width: 128px;} +.prodListTagsContainer .is_shipfree{background-position:0px -182px; width: 176px;} + +#myTeamChooser {position:fixed; left:0px; right:0px; bottom:0px; top:0px; z-index:1000; opacity:0; transition: all .4s; visibility:hidden; background: rgba(64,64,64,.5);} +#myTeamChooser.active {opacity:1; visibility:visible;} +/* +#myTeamChooser.hidden {z-index:-1000;} +*/ +#myTeamChooser .closeButton{width:1em;} +#myTeamChooser .chooser {position:absolute; background: white; padding: 5px; box-shadow:box-shadow: 5px 5px 8px rgba(64,64,64,.5);overflow:hidden;} +#myTeamChooser .chooser h2{color:white; padding: 5px; height:30px;} +#myTeamChooser .contentContainer{position:absolute; top:45px; bottom: 5px; left:5px; right:5px;} +#myTeamChooser .sportChooser {height:100%;} +#myTeamChooser .sportChooser .selector h2 {position:absolute; bottom:0px; right:0px; left:0px;} +#myTeamChooser .sportChooser .selector { + position:relative; + width: 40%; + height: 36%; + padding-bottom: 2.4%; + padding-top: 2.4%; + display:inline-block; +} +#myTeamChooser .sportChooser .selector img{ + max-width: 100%; + max-height: 100%; +} +#myTeamChooser .teamlist {width: 45%; display: inline-block; padding: 0px 2.4%; overflow: auto; height: 90%;} +#myTeamChooser .teamlist .teamTemplate {height:45px; font-size:1.2em; vertical-align:middle; line-height: 45px;} +#myTeamChooser .teamlist .teamTemplate button {height:30px; width: 30px; text-align:center; vertical-align:middle; display:inline-block;} +#myTeamChooser .teamlist .teamTemplate button {vertical-align:middle;} +#myTeamChooser .teamlist .teamTemplate img {height:100%;} +#myTeamChooser .sportContainer{ + position:absolute; + width: 100%; + background: white; + top:0px; + bottom:0px; + overflow:auto; + transition: left 1s; + left: 120%; +} +#myTeamChooser[data-swc-sport=app_mlb] .sportContainer[data-swc-sport=app_mlb]{left: 0px;} +#myTeamChooser[data-swc-sport=app_nfl] .sportContainer[data-swc-sport=app_nfl]{left: 0px;} +#myTeamChooser[data-swc-sport=app_nba] .sportContainer[data-swc-sport=app_nba]{left: 0px;} +#myTeamChooser[data-swc-sport=app_nhl] .sportContainer[data-swc-sport=app_nhl]{left: 0px;} + +#myTeamChooser .myTeamPopupContainer, +#myTeamChooser .myTeamPromptContainer, +#myTeamChooser .myTeamSelectedContainer { + display: none; + position:absolute; + left:0px; + right:0px; + top:0px; + bottom:0px; + + background: rgba(64,64,64,.5); +} +#myTeamChooser.popup .myTeamPopupContainer {display:block;} +#myTeamChooser.selected .myTeamSelectedContainer {display:block;} +#myTeamChooser.prompt .myTeamPromptContainer {display:block;} + +#myTeamChooser .myTeamPopupContainer form .checkbox{position:absolute; bottom: 20px; left: 20px;} +#myTeamChooser .myTeamPopupContainer form .button{position:absolute; bottom: 20px; right: 20px;} + +#myTeamChooser .myTeamPromptContainer .dismiss{position:absolute; bottom: 20px; left: 20px;} +#myTeamChooser .myTeamPromptContainer .accept{position:absolute; bottom: 20px; right: 20px;} + +#myTeamChooser .myTeamPopupContainer form{background:white; padding: 20px;} +#myTeamChooser .myTeamSelectedContainer > div{background:white; padding: 20px;} +#myTeamChooser .myTeamPromptContainer > div{background:white; padding: 20px;} + +#myTeamChooser .myTeamSelectedContainer li{display: inline-block; padding: 12px;} +#myTeamChooser .myTeamSelectedContainer li .title{font-weight:bold; position:absolute; bottom:0px; right:0px; left:0px;} +#myTeamChooser .myTeamSelectedContainer li a{text-decoration:none;display:block;} +#myTeamChooser .myTeamSelectedContainer li img{display:block;} + +.sideline .indent { + text-indent: 25px; +} + +#rma-form { + font-size: .8em; + padding: 20px; +} +#rma-form label { + display: inline-block; + width: 150px; + text-align: right; + font-weight: bold; + margin-bottom: 10px; + margin-top: 10px; + margin-right: 15px; +} +#rma-form textarea { + width: 100%; +} +#rmaItems label { + font-weight: normal; + font-size: .8em; +} + +#rmaItems { padding-left: 40px;} + +#rmaItems .col1, +#rmaItems .col2, +#rmaItems .col3, +#rmaItems .col4, +#rmaItems .col5{ + display: inline-block; + text-align: left; + margin: 0px; + padding: 0px; +} + +#rmaItems .col1{width:20px;} +#rmaItems .col2{width:200px;} +#rmaItems .col3{width:60px; text-align: center;} +#rmaItems .col4{width:60px; text-align: center; margin-right: 14px;} +#rmaItems .col5{width:200px;} +.addRMAItemButton { + margin-left: 40px; + margin-top: 20px; +} +.rmaItem button{ + position:relative; + top:-2px; + width: 20px; + height: 20px; +} + +.affliate_banner{ max-width: 100%;} +.affiliate_category .text_desc, .affiliate_category .box_desc { padding: 5px;} + +#wholesale_signupArticle label { + display:inline-block; + width: 200px; +} + +.notFoundContainer{ + padding: 12px; + } + diff --git a/_swc_styles_1280+.css b/_swc_styles_1280+.css new file mode 100644 index 000000000..e00f3e292 --- /dev/null +++ b/_swc_styles_1280+.css @@ -0,0 +1,89 @@ +.displayNone_1280{display:none;} + +.fixedContainer { + max-width:1044px; + margin: auto; +} +#header {height:93px;} +#appView { + padding-top: 98px; + padding-bottom:40px;} +#appView.showFooter {padding-bottom: 210px;} +#appView.initFooter {padding-bottom: 210px;} +#appView #footer {bottom:-180px;} +/* #appView.peekFooter #footer {bottom:-130px;} */ + +#livechat {margin-left: 60px;} +#livechat img {/*width:172px;*/ height:67px;} + +#headerTeam {margin-left: 20px; width: 200px; height: 65px; padding: 2px;} + +#search input{ height:21px;} + +#footer .footerTeaser h3{line-height:30px;} +#footer .footerContent{position:relative; height:130px; margin:40px auto;} + +.footerColumn { + position:absolute; + width:256px; +} + +#footerLeft{left:0px;} +#footerRight{right:0px;} +#footerMiddle{left: 50%; margin-left:-128px;} + +#mainContentArea, #globalMessaging {max-width:1280px; margin: auto;} + +.homepageBanner {height:322px;} +.blockLink, li.blockLink {width: 19%; margin: .3%;} + +.productPage .addtocartbutton{width:131px; height:41px; background:url(images/prodpages/add_to_cart_button_131x41.png) no-repeat;} +.productPage .mfgLogoContainer img { + max-width: 150px; + max-height: 80px; + padding-right: 20px; +} + +#myTeamChooser .chooser{left:60px; right:60px; bottom:60px; top:100px;} +#myTeamChooser .sportContainer{width: 24%; padding: 0px .4%;} +#myTeamChooser .teamlist {width: 90%; padding: 0% 5%;} +#myTeamChooser .teamlist{height: auto;} +#myTeamChooser .sportContainer{position: static; display:inline-block; overflow: auto; height: 90%;} +#myTeamChooser .sportContainer h4{font-size: 1.5em;} +/* +#myTeamChooser .myteams {width: 30%;} +#myTeamChooser .moreteams {width: 60%;} +#myTeamChooser .moreteams ul {text-align: center;} +#myTeamChooser .moreteams li {width: 48%; display:inline-block; text-align:left;} +#myTeamChooser .teamlist .teamTemplate {height:85px; line-height: 85px;} +*/ +#myTeamChooser .myTeamPopupContainer form, +#myTeamChooser .myTeamPromptContainer > div{ + background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -260px; + margin-top: -90px; + width:480px; + height: 140px; +} +#myTeamChooser .myTeamSelectedContainer > div{ + background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -260px; + margin-top: -165px; + width:480px; + height: 290px; +} + + +.fieldCamPage{padding: 5px;} + +.fieldCamPage .cam1 {float:left;} +.fieldCamPage .cam2 {float:right;} +.checkoutFormContainer .vertHalf {width: 49%;} +.checkoutFormContainer .vertHalf.left {float:left;} +.checkoutFormContainer .vertHalf.right {float:right;} \ No newline at end of file diff --git a/_swc_styles_479-.css b/_swc_styles_479-.css new file mode 100644 index 000000000..340ee3f00 --- /dev/null +++ b/_swc_styles_479-.css @@ -0,0 +1,118 @@ +.displayNone_320{display:none;} +.alignCenter_320{text-align:center;} +.fixedContainer { + max-width:320px; + margin: auto; +} +#header {height:50px;} +#appView {padding-top: 52px;padding-bottom:40px;} +#mainContentArea {position:absolute; bottom:0px; left: 0px; right: 0px; top:52px;} +#globalMessaging {position:relative; z-index: 101;} +#nav {padding: 0px;} +#nav.expand .fullNav { left:50%;} +#nav .fullNav {margin-left:-160px; padding: 12px; text-align:center; font-size:16px;} +#nav .fullNav input{width:225px; } +#mainContentArea > div {height:100%; overflow: auto;} +#mainContentArea > div > div {height:100%; overflow: auto;} +#appView.showFooter {padding-bottom: 402px;} +/* #appView.peekFooter.showFooter {padding-bottom: 402px;} */ +#appView #footer {height: 360px; bottom:-400px; font-size:16px;} +#appView.initFooter #footer {bottom:-400px;} +/* #appView.peekFooter #footer {bottom:-360px;} */ + +#headerTeam {margin-left: 12px; width: 120px; font-size: height: 50px; padding: 2px;} +#headerTeam img{height: 46px; width: 46px;} +#headerTeam h3 {font-size:14px;} +#headerTeam h4 {font-size:12px;} + +#contact{font-size:11px;} +#mininav{font-size:12px;} + +#logo img {width: 150px;} + +.footerColumn {width:320px;} +#footer #copyright {position:static; margin-top:5px;} +.homepageBanner {height:322px;} +.homeSlideshow {max-width: 100%;} +.blockLink, li.blockLink {width: 48%; margin: .8%;} +.productListItem .prodInfo {font-size: 1.4em;} +.productListItem .price {font-size: 1em; bottom: 0px; right: 5px;} + +.categoryTemplate .catName {padding: .5em 0em;} + +.productTitle, .productInfo, .productTabs,.productImages {float: none; width:100%;} + +.productPage .addtocartbutton{width:131px; height:41px; background:url(images/prodpages/add_to_cart_button_131x41.png) no-repeat;} +.productPage .mfgLogoContainer img { + max-width: 150px; + max-height: 80px; + padding-right: 20px; +} +.productListItem .prodListTagsContainer { + height: 16px; + overflow: hidden; + position: absolute; + bottom: 0px; + left: 0px; + z-index: 99; +} +.productListItem .prodListTagsContainer { + bottom: 66px; +} +.productListItem .prodListTagsContainer span{ + display: inline-block; + height: 16px; + background: url(images/cubworld_smalltags.png) no-repeat; +} +.productListItem .prodListTagsContainer .is_fresh{background-position:0px 0px; width:51px;} +.productListItem .prodListTagsContainer .is_bestseller{background-position:0px -16px; width:49px;} +.productListItem .prodListTagsContainer .is_user1{background-position:0px -32px; width:61px;} +.productListItem .prodListTagsContainer .is_sale{background-position:0px -48px; width:61px;} +.productListItem .prodListTagsContainer .is_user3, +.productListItem .prodListTagsContainer .is_specialorder{background-position:0px -64px; width:71px;} +.productListItem .prodListTagsContainer .is_preorder{background-position:0px -80px; width:83px;} +.productListItem .prodListTagsContainer .is_discontinued, +.productListItem .prodListTagsContainer .is_outofstock{background-position:0px -96px; width: 78px;} +.productListItem .prodListTagsContainer .is_shipfree{background-position:0px -112px; width: 108px;} + +#myTeamChooser .chooser{left:20px; right:20px; bottom:20px; top:35px;} +#myTeamChooser .teamlist {width: 90%; padding: 0% 5%;} +#myTeamChooser .teamlist{height: auto;} +#myTeamChooser .teamlist .teamTemplate {height:55px; font-size:1.2em; vertical-align:middle; line-height: 55px;} +#myTeamChooser .teamlist .teamTemplate button {height:20px; width: 20px;} + +#myTeamChooser .myTeamPopupContainer form h3{font-size:1em;} +#myTeamChooser .myTeamSelectedContainer > div h3{font-size:1em;} +#myTeamChooser .myTeamPopupContainer form .checkbox{width: 100px;} +#myTeamChooser .myTeamPopupContainer form, +#myTeamChooser .myTeamPromptContainer > div{ + background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -120px; + margin-top: -90px; + width:200px; + height: 140px; +} +#myTeamChooser .myTeamSelectedContainer > div{ + background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -120px; + margin-top: -130px; + width:200px; + height: 220px; + overflow-y: auto; +} + +.filterResultsContainer { + float: none; + width: 100%; +} +.filterList {float: none; position: absolute; left: -110%; transition: .4s all; width: 100%; z-index: 101; font-size: 1.4em;} +.filterList.active {left: 0px;} +ul.filterResults{overflow-y:auto; position:absolute; bottom:0px; right:0px; left:0px; top:23px;} +.filterResultsContainer{position:absolute; bottom:0px; right:0px; left:0px; top:0px;} +.filterCheckboxList {max-height: none;} \ No newline at end of file diff --git a/_swc_styles_480-639.css b/_swc_styles_480-639.css new file mode 100644 index 000000000..b956e4d00 --- /dev/null +++ b/_swc_styles_480-639.css @@ -0,0 +1,116 @@ +.displayNone_480{display:none;} + +.fixedContainer { + max-width:480px; + margin: auto; +} +#header {height:70px;} +#appView { + padding-top: 75px; + padding-bottom:40px;} +#appView.showFooter {padding-bottom: 210px;} +/* #appView.peekFooter.showFooter {padding-bottom: 210px;} */ +#appView #footer {bottom:-170px;} +#appView.initFooter #footer {bottom:-170px;} +/* #appView.peekFooter #footer {bottom:-130px;} */ +#footer{padding: 20px 0px;} + +#logo img {width: 194px;} + +#headerTeam {margin-left: 12px; width: 120px; font-size: height: 50px; padding: 2px; font-size:.7em;} +#headerTeam img{height: 46px; width: 46px;} + +#mininav{font-size:.7em;} +#contact{font-size:.7em;} +#search input{ height:13px; width: 94px;} +#nav {font-size: .6em; padding: 5px 0px;} +#nav.expand .fullNav { left:50%;} +#nav .fullNav {margin-left:-240px; padding: 12px; font-size:1.4em;} +#footer{font-size:.8em} +#footer > div{position:relative; height:130px;} +.footerColumn { + position:absolute; + width:150px; +} + +#footerLeft{left:0px;} +#footerRight{right:0px;} +#footerMiddle{left: 50%; margin-left:-75px;} + +.homepageBanner {height:322px;} +.homeSlideshow{ max-width: 100%;} +.blockLink, li.blockLink {width: 32%; margin: .4%;} +.productListItem .prodInfo { font-size: .9em;} +.productListItem .price {font-size: 1em; bottom: 0px; right: 5px;} + +.categoryTemplate .catName {padding: .5em 0em;} + +.productPage .addtocartbutton{width:99px; height:31px; background:url(images/prodpages/add_to_cart_button_99x31.png) no-repeat;} +.productPage .mfgLogoContainer img { + max-width: 100px; + max-height: 80px; + padding-right: 20px; +} +.productTabs{float:none; clear:both; width: 100%;} +.productTitle, .productInfo {width: 50%;} +.productImages {width: 46%; padding-left: 5px;} + +.filterList { width: 26%; padding: 15px 2%;} +.filterResultsContainer {float:right; width: 70%;} + +.productListItem .prodListTagsContainer { + height: 16px; + overflow: hidden; + position: absolute; + bottom: 0px; + left: 0px; + z-index: 99; +} +.productListItem .prodListTagsContainer { + bottom: 66px; +} +.productListItem .prodListTagsContainer span{ + display: inline-block; + height: 16px; + background: url(images/cubworld_smalltags.png) no-repeat; +} +.productListItem .prodListTagsContainer .is_fresh{background-position:0px 0px; width:51px;} +.productListItem .prodListTagsContainer .is_bestseller{background-position:0px -16px; width:49px;} +.productListItem .prodListTagsContainer .is_user1{background-position:0px -32px; width:61px;} +.productListItem .prodListTagsContainer .is_sale{background-position:0px -48px; width:61px;} +.productListItem .prodListTagsContainer .is_user3, +.productListItem .prodListTagsContainer .is_specialorder{background-position:0px -64px; width:71px;} +.productListItem .prodListTagsContainer .is_preorder{background-position:0px -80px; width:83px;} +.productListItem .prodListTagsContainer .is_discontinued, +.productListItem .prodListTagsContainer .is_outofstock{background-position:0px -96px; width: 78px;} +.productListItem .prodListTagsContainer .is_shipfree{background-position:0px -112px; width: 108px;} + +#myTeamChooser .chooser{left:20px; right:20px; bottom:20px; top:75px;} +#myTeamChooser .teamlist {width: 49%; padding:0%;} +#myTeamChooser .teamlist .teamTemplate {height:45px; font-size:1em; line-height: 45px;} +#myTeamChooser .teamlist .teamTemplate button {height:20px; width: 20px;} + +#myTeamChooser .myTeamPopupContainer form h3{font-size:1em;} +#myTeamChooser .myTeamSelectedContainer > div h3{font-size:1em;} +#myTeamChooser .myTeamPopupContainer form, +#myTeamChooser .myTeamPromptContainer > div{ + background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -200px; + margin-top: -90px; + width:360px; + height: 140px; +} +#myTeamChooser .myTeamSelectedContainer > div{ + background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -190px; + margin-top: -140px; + width:340px; + height: 240px; + overflow-y: auto; +} \ No newline at end of file diff --git a/_swc_styles_640-959.css b/_swc_styles_640-959.css new file mode 100644 index 000000000..3aeca7401 --- /dev/null +++ b/_swc_styles_640-959.css @@ -0,0 +1,83 @@ +.displayNone_640{display:none;} + +.fixedContainer { + max-width:640px; + margin: auto; +} +#header {height:76px;} +#appView { + padding-top: 80px; + padding-bottom:40px;} +#appView.showFooter {padding-bottom: 210px;} +#appView.initFooter {padding-bottom: 210px;} +/* #appView.peekFooter.showFooter {padding-bottom: 210px;} */ +#appView #footer {bottom:-180px;} +/* #appView.peekFooter #footer {bottom:-130px;} */ + +/* #livechat {margin-left: 20px;} */ +/* #livechat img {width:115px; height:42px;} */ + +#headerTeam {margin-left: 36px; width: 140px; font-size: height: 50px; padding: 2px; font-size:.7em;} +#headerTeam img{height: 46px; width: 46px;} + +#mininav{font-size:.7em;} +#contact{font-size:.7em;} +#search input{ height:13px;} +#nav.expand .fullNav { left:50%;} +#nav .fullNav {margin-left:-320px; padding: 12px; } + +#footer .footerTeaser h3{line-height:30px;} +#footer .footerContent{position:relative; height:130px; margin:40px auto;} + +.footerColumn { + position:absolute; + width:170px; +} + +#footerLeft{left:0px;} +#footerRight{right:0px;} +#footerMiddle{left: 50%; margin-left:-85px;} + +.footerColumn h3 { letter-spacing:4px; font-size: .7em; padding: 2px 0px;} + +.homepageBanner {height:322px;} +.blockLink, li.blockLink {width: 24%; margin: .3%;} +.productListItem .price {font-size: 1em; bottom: 0px; right: 5px;} + +.productPage .addtocartbutton{width:99px; height:31px; background:url(images/prodpages/add_to_cart_button_99x31.png) no-repeat;} +.productPage .mfgLogoContainer img { + max-width: 150px; + max-height: 80px; + padding-right: 20px; +} +.productTabs{float:none; clear:both; width: 100%;} +.productTitle, .productInfo {width: 50%;} +.productImages {width: 46%; padding-left: 5px;} + +#myTeamChooser .chooser{left:20px; right:20px; bottom:20px; top:80px;} +#myTeamChooser .teamlist {width: 46%; padding: 0px 1.8%;} +#myTeamChooser .teamlist .teamTemplate {height:85px; font-size:1em; line-height: 85px;} + +#myTeamChooser .myTeamPopupContainer form, +#myTeamChooser .myTeamPromptContainer > div{ + background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -260px; + margin-top: -90px; + width:480px; + height: 140px; +} +#myTeamChooser .myTeamSelectedContainer > div{background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -260px; + margin-top: -165px; + width:480px; + height: 290px; +} +.checkoutFormContainer .vertHalf {width: 48%;} +.checkoutFormContainer .vertHalf.left {float:left;} +.checkoutFormContainer .vertHalf.right {float:right;} \ No newline at end of file diff --git a/_swc_styles_960-1279.css b/_swc_styles_960-1279.css new file mode 100644 index 000000000..13380590a --- /dev/null +++ b/_swc_styles_960-1279.css @@ -0,0 +1,83 @@ +.displayNone_960{display:none;} + +.fixedContainer { + max-width:960px; + margin: auto; +} +#header {height:93px;} +#appView {padding-top: 98px; padding-bottom:40px;} +#appView.showFooter {padding-bottom: 210px;} +#appView.initFooter {padding-bottom: 210px;} +#appView.peekFooter.showFooter {padding-bottom: 210px;} +#appView.peekFooter.initFooter {padding-bottom: 210px;} +#appView #footer {bottom:-180px;} +/* #appView.peekFooter #footer {bottom:-130px;} */ + +#livechat {margin-left: 20px;} +#livechat img {height:67px;} + +#headerTeam {margin-left: 20px; width: 180px; height: 65px; padding: 2px;} + +#search input{ height:21px;} + +#footer .footerTeaser h3{line-height:30px;} +#footer .footerContent{position:relative; height:130px; margin:40px auto;} + +.footerColumn { + position:absolute; + width:256px; +} + +#footerLeft{left:0px;} +#footerRight{right:0px;} +#footerMiddle{left: 50%; margin-left:-128px;} + +.homepageBanner {height:322px;} +.blockLink, li.blockLink {width: 19%; margin: .3%;} + +.productPage .addtocartbutton{width:131px; height:41px; background:url(images/prodpages/add_to_cart_button_131x41.png) no-repeat;} +.productPage .mfgLogoContainer img { + max-width: 150px; + max-height: 80px; + padding-right: 20px; +} +.productImages {padding-left: 5px;} + +#myTeamChooser .chooser{left:20px; right:20px; bottom:20px; top:100px;} +#myTeamChooser .sportContainer{width: 24.2%; padding: 0px .1%;} +#myTeamChooser .teamlist {width: 90%; padding: 0% 5%;} +#myTeamChooser .teamlist{height: auto;} +#myTeamChooser .sportContainer{position: static; display:inline-block; overflow: auto; height: 90%;} +#myTeamChooser .sportContainer h4{font-size: 1em;} +#myTeamChooser .teamlist .teamTemplate {font-size:.9em} +#myTeamChooser .teamlist .teamTemplate button {height:20px; width: 20px;} +/* +#myTeamChooser .myteams {width: 30%;} +#myTeamChooser .moreteams {width: 60%;} +#myTeamChooser .moreteams ul {text-align: center;} +#myTeamChooser .moreteams li {width: 48%; display:inline-block; text-align:left;} +#myTeamChooser .teamlist .teamTemplate {height:85px; line-height: 85px;font-size:1.0em} +*/ +#myTeamChooser .myTeamPopupContainer form, +#myTeamChooser .myTeamPromptContainer > div{ + background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -260px; + margin-top: -90px; + width:480px; + height: 140px; +} +#myTeamChooser .myTeamSelectedContainer > div{background:white; + position:absolute; + left:50%; + top:50%; + margin-left: -260px; + margin-top: -165px; + width:480px; + height: 290px; +} +.checkoutFormContainer .vertHalf {width: 49%;} +.checkoutFormContainer .vertHalf.left {float:left;} +.checkoutFormContainer .vertHalf.right {float:right;} \ No newline at end of file diff --git a/app-admin-init.js b/app-admin-init.js index 23a83797e..8929a2920 100644 --- a/app-admin-init.js +++ b/app-admin-init.js @@ -1,112 +1,43 @@ -adminApp.rq.push(['extension',0,'admin','extensions/admin/extension.js','initExtension']); -adminApp.rq.push(['extension',0,'admin_prodedit','extensions/admin/product_editor.js']); -adminApp.rq.push(['extension',0,'admin_orders','extensions/admin/orders.js']); -adminApp.rq.push(['extension',0,'admin_sites','extensions/admin/sites.js']); -//adminApp.rq.push(['extension',0,'admin_launchpad','extensions/admin/launchpad.js']); - -//these can be loaded later because none of them are required for a page to load. -//this will change going forward. -adminApp.rq.push(['extension',1,'store_prodlist','extensions/store_prodlist.js']); -adminApp.rq.push(['extension',1,'store_navcats','extensions/store_navcats.js']); -adminApp.rq.push(['extension',1,'store_search','extensions/store_search.js']); -adminApp.rq.push(['extension',1,'store_product','extensions/store_product.js']); - - - -adminApp.rq.push(['extension',0,'cco','extensions/cart_checkout_order.js']); -adminApp.rq.push(['extension',0,'order_create','extensions/checkout/extension.js']); -adminApp.rq.push(['extension',0,'cart_message','extensions/cart_message/extension.js']); - -adminApp.rq.push(['extension',0,'admin_support','extensions/admin/support.js']); -adminApp.rq.push(['extension',0,'admin_tools','extensions/admin/tools.js']); -adminApp.rq.push(['extension',0,'admin_navcats','extensions/admin/navcats.js']); -adminApp.rq.push(['extension',0,'admin_blast','extensions/admin/blast.js']); -adminApp.rq.push(['extension',0,'admin_task','extensions/admin/task.js']); -adminApp.rq.push(['extension',0,'admin_template','extensions/admin/template_editor.js']); -adminApp.rq.push(['extension',0,'admin_marketplace','extensions/admin/marketplace.js']); //needs to be in pass 0 for linkFrom (links from marketplaces) - -adminApp.rq.push(['extension',0,'admin_config','extensions/admin/config.js']); -adminApp.rq.push(['extension',0,'admin_reports','extensions/admin/reports.js']); -adminApp.rq.push(['extension',0,'admin_batchjob','extensions/admin/batchjob.js']); -adminApp.rq.push(['extension',0,'admin_customer','extensions/admin/customer.js']); -adminApp.rq.push(['extension',0,'admin_wholesale','extensions/admin/wholesale.js']); -adminApp.rq.push(['extension',0,'admin_user','extensions/admin/user.js']); -adminApp.rq.push(['extension',0,'admin_medialib','extensions/admin/medialib.js']); //do NOT set to zero. causes a script issue. -adminApp.rq.push(['extension',0,'admin_trainer','extensions/admin/trainer.js']); //load in pass 0 for local testing. - -adminApp.rq.push(['extension',0,'tools_animation','extensions/tools_animation.js', function(){ - $('.mhTabsContainer [data-animation]').each(function(){ - var args = $(this).attr('data-animation'); - var anim = args.split('?')[0]; - var params = adminApp.u.kvp2Array(args.split('?')[1]); - adminApp.ext.tools_animation.u.loadAnim($(this),anim,params); - }); - }]); - -//required for init. don't change from 0. -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'includes.js']); //','validator':function(){return (typeof handlePogs == 'function') ? true : false;}}) -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'resources/jsonpath.0.8.0.js']); //used pretty early in process.. -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'resources/tlc.js']); //used pretty early in process.. -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'resources/anycontent.js']); - -//once peg is loaded, need to retrieve the grammar file. Order is important there. This will validate the file too. -adminApp.u.loadScript(adminApp.vars.baseURL+'resources/peg-0.8.0.js',function(){ - adminApp.model.getGrammar(adminApp.vars.baseURL+"resources/pegjs-grammar-20140203.pegjs"); - }); // ### TODO -> callback on RQ.push wasn't getting executed. investigate. - - - -adminApp.rq.push(['script',1,adminApp.vars.baseURL+'resources/jquery.ui.jeditable.js']); //used for making text editable (customer address). non-essential. loaded late. used in orders. -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'app-admin/resources/highcharts-3.0.1/highcharts.js']); //used for KPI - -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'resources/crypto-md5-2.5.3.js']); //used for authentication and in various other places. - -//have showLoading as early as possible. pretty handy feature. used everywhere. -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'resources/jquery.showloading-v1.0.jt.js']); - -//these are resources that are not currently used. -//adminApp.rq.push(['script',0,adminApp.vars.baseURL+'resources/jquery.mousewheel-3.0.6.min.js']);//used in the launchpad. needed early. -//adminApp.rq.push(['script',1,adminApp.vars.baseURL+'resources/jquery.fullscreen-1.2.js']); //used in template editor. will likely get used more. - -//used in campaigns. probably get used more. allows for time selection in datepicker. -adminApp.rq.push(['css',1,adminApp.vars.baseURL+'resources/jquery-ui-timepicker-addon.css']); -adminApp.rq.push(['script',1,adminApp.vars.baseURL+'resources/jquery-ui-timepicker-addon.js']); - -// required for building/restoring ebay item specifics from @RECOMMENDATIONS list + 'ebay:itemspecifics' -adminApp.rq.push(['script',1,adminApp.vars.baseURL+'app-admin/resources/jquery.ebay-specifics-form.js']); - -//anycommerce plugins, such as anycontent, anytable, anycb, etc. -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'resources/jquery.ui.anyplugins.js']); -adminApp.rq.push(['css',1,adminApp.vars.baseURL+'resources/anyplugins.css']); +(function(_app){ +_app.extend({"namespace":"admin","filename":"extensions/admin/extension.js"}); //initExtension +_app.extend({"namespace":"admin_prodedit","filename":"extensions/admin/product_editor.js"}); +_app.extend({"namespace":"admin_orders","filename":"extensions/admin/orders.js"}); +_app.extend({"namespace":"admin_sites","filename":"extensions/admin/sites.js"}); +//adminApp.rq.push(['extension',0,'admin_launchpad','extensions/admin/launchpad.js']); -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'resources/jquery.ui.qrcode-0.7.0.js']); - - -// jQuery-contextMenu - http://medialize.github.com/jQuery-contextMenu/ used in orders. -adminApp.rq.push(['css',1,adminApp.vars.baseURL+'app-admin/resources/jquery.contextMenu.css']); -adminApp.rq.push(['script',0,adminApp.vars.baseURL+'app-admin/resources/jquery.contextMenu.js']); //must be in first pass in case orders is the landing page. -adminApp.rq.push(['script',1,adminApp.vars.baseURL+'app-admin/resources/jquery.ui.position.js']); - - -//used for image enlargement in template chooser (in syndication but suspect it will be in email, newsletter, app, etc soon enough) -adminApp.rq.push(['script',1,adminApp.vars.baseURL+'resources/load-image.min.js']); //in zero pass in case product page is first page. -adminApp.rq.push(['script',1,adminApp.vars.baseURL+'resources/jquery.image-gallery.jt.js']); //in zero pass in case product page is first page. - -//adminApp.rq.push(['script',0,adminApp.vars.baseURL+'app-admin/resources/jquery.ui.touch-punch.min.js']); -//adminApp.rq.push(['script',0,adminApp.vars.baseURL+'app-admin/resources/jquery.shapeshift.js']); - - - -//gets executed from app-admin.html as part of controller init process. -//progress is an object that will get updated as the resources load. -/* -'passZeroResourcesLength' : [INT], -'passZeroResourcesLoaded' : [INT], -'passZeroTimeout' : null //the timeout instance running within loadResources that updates this object. it will run indef unless clearTimeout run here OR all resources are loaded. - -*/ -adminApp.u.showProgress = function(progress) { +_app.extend({"namespace":"store_prodlist","filename":"extensions/store_prodlist.js"}); +_app.extend({"namespace":"store_navcats","filename":"extensions/store_navcats.js"}); +_app.extend({"namespace":"store_search","filename":"extensions/store_search.js"}); +_app.extend({"namespace":"store_product","filename":"extensions/store_product.js"}); + +_app.extend({"namespace":"cco","filename":"extensions/cart_checkout_order.js"}); +_app.extend({"namespace":"order_create","filename":"extensions/checkout/extension.js"}); +_app.extend({"namespace":"cart_message","filename":"extensions/cart_message/extension.js"}); + +_app.extend({"namespace":"admin_support","filename":"extensions/admin/support.js"}); +_app.extend({"namespace":"admin_tools","filename":"extensions/admin/tools.js"}); +_app.extend({"namespace":"admin_navcats","filename":"extensions/admin/navcats.js"}); +_app.extend({"namespace":"admin_blast","filename":"extensions/admin/blast.js"}); +_app.extend({"namespace":"admin_task","filename":"extensions/admin/task.js"}); +_app.extend({"namespace":"admin_template","filename":"extensions/admin/template_editor.js"}); +_app.extend({"namespace":"admin_marketplace","filename":"extensions/admin/marketplace.js"}); + +_app.extend({"namespace":"admin_config","filename":"extensions/admin/config.js"}); +_app.extend({"namespace":"admin_reports","filename":"extensions/admin/reports.js"}); +_app.extend({"namespace":"admin_batchjob","filename":"extensions/admin/batchjob.js"}); +_app.extend({"namespace":"admin_customer","filename":"extensions/admin/customer.js"}); +_app.extend({"namespace":"admin_wholesale","filename":"extensions/admin/wholesale.js"}); +_app.extend({"namespace":"admin_user","filename":"extensions/admin/user.js"}); +_app.extend({"namespace":"admin_medialib","filename":"extensions/admin/medialib.js"}); +_app.extend({"namespace":"admin_trainer","filename":"extensions/admin/trainer.js"}); + +_app.extend({"namespace":"tools_animation","filename":"extensions/tools_animation.js"}); + +_app.model.getGrammar("pegjs"); + + +_app.u.showProgress = function(progress) { function showProgress(attempt) { // dump(" -> passZeroResourcesLength: "+progress.passZeroResourcesLength+" and progress.passZeroResourcesLoaded: "+progress.passZeroResourcesLoaded); if(progress.passZeroResourcesLength == progress.passZeroResourcesLoaded) { @@ -129,21 +60,18 @@ adminApp.u.showProgress = function(progress) { } } showProgress(0) - } - -//don't execute script till both jquery AND the dom are ready. - -adminApp.cmr.push(['cart.orderCreate',function(message,$context){ + } +_app.cmr.push(['cart.orderCreate',function(message,$context){ if(message.who != 'ADMIN') { //cart was checked out by someone else. //leave the dialog open so communication can continue, but pull the cart from the session. and 'lock' the edit cart button. $("button[data-app-role='cartEditButton']").button('disable'); - adminApp.model.removeCartFromSession($context.data('cartid')); + _app.model.removeCartFromSession($context.data('cartid')); dump(" -------> cart.orderCreate cartMessage received. Cart dropped: "+$context.data('cartid')); } }]); -adminApp.cmr.push(["view",function(message,$context){ +_app.cmr.push(["view",function(message,$context){ var $history = $("[data-app-role='messageHistory']",$context); var $o = "
"+message.FROM+"<\/span>sent page view: "+message.FROM+" has joined the chat.<\/p>");
$('.show4ActiveChat',$ui).show();
@@ -124,13 +621,13 @@ myApp.u.appInitComplete = function() {
}
}]);
- myApp.cmr.push(['goto',function(message,$context){
+ _app.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);
+ showContent(_app.ext.quickstart.u.whatAmIFor(message.vars),message.vars);
});
$history.append($P);
$history.parent().scrollTop($history.height());
@@ -146,37 +643,68 @@ myApp.u.appInitComplete = function() {
//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({
+_app.router.appendInit({
'type':'function',
'route': function(v){
return {'init':true} //returning anything but false triggers a match.
},
'callback':function(f,g){
+ $('#clickBlocker').remove();
dump(" -> triggered callback for appendInit");
g = g || {};
- if(g.uriParams.seoRequest){
- showContent(g.uriParams.pageType, g.uriParams);
+ var $existingPage = $('#mainContentArea [data-app-uri]');
+ if($existingPage.length /*&& $existingPage.attr('data-app-uri') == document.location.pathname*/){
+ //We are a transplanted document, let's load accordingly.
+ //re-attach template handlers
+ var $renderedTemplate = $('[data-templateid]', $existingPage);
+ var templateid = $renderedTemplate.attr('data-templateid');
+ for(var i in _app.templateEvents){
+ var event = _app.templateEvents[i];
+ if(event.filterFunc(templateid)){
+ dump("Attaching event");
+ dump(event);
+ $renderedTemplate.on(event.event, event.handler);
+ }
+ }
+ //handleURIChange here will not change the page, but it will execute appropriate events
+ //that's why we pass false for the windowHistoryAction- no pushstate
+ _app.router.handleURIString($existingPage.attr('data-app-uri'), false, {"retrigger" : true});
}
- else if (g.uriParams.marketplace){
- var infoObj = {"pid":g.uriParams.product};
- if(g.uriParams.sku){
- infoObj.sku = g.uriParams.sku;
+ else if (document.location.hash.indexOf("#!") == 0){
+ var pathStr = document.location.hash.substr(2);
+ var search = false;
+ if(pathStr.indexOf('?') >= 0){
+ var arr = pathStr.split('?');
+ pathStr = arr[0];
+ search = arr[1];
}
- showContent("product",infoObj);
+ _app.router.handleURIChange("/"+pathStr, search, false, 'replace');
+ }
+ else if(document.location.protocol == "file:"){
+ _app.router.handleURIChange("/", document.location.search, document.location.hash, 'replace');
+ }
+ else if (g.uriParams.marketplace){
+ _app.router.handleURIString('/product/'+g.uriParams.product+'/', 'replace');
+ window[_app.vars.analyticsPointer]('send','event','Arrival','Syndication','product '+g.uriParams.product);
}
- else if(document.location.hash) {
- myApp.u.dump('triggering handleHash');
- myApp.router.handleHashChange();
+ else if(document.location.pathname) {
+ _app.u.dump('triggering handleHash');
+ _app.router.handleURIChange(document.location.pathname, document.location.search, document.location.hash, 'replace');
}
else {
- //IE8 didn't like the shortcut to showContent here.
- myApp.ext.quickstart.a.showContent('homepage');
+ _app.router.handleURIChange("/", document.location.search, document.location.hash, 'replace');
+ _app.u.throwMessage(_app.u.successMsgObject("We're sorry, the page you requested could not be found!"));
+ window[_app.vars.analyticsPointer]('send', 'event','init','404 event',document.location.href);
}
if(g.uriParams && g.uriParams.meta) {
- myApp.ext.cco.calls.cartSet.init({'want/refer':infoObj.uriParams.meta,'cartID':_app.model.fetchCartID()},{},'passive');
+ _app.require('cco', function(){
+ _app.ext.cco.calls.cartSet.init({'want/refer':g.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');
+ _app.require('cco',function(){
+ _app.ext.cco.calls.cartSet.init({'want/refer_src':g.uriParams.meta_src,'cartID':_app.model.fetchCartID()},{},'passive');
+ });
}
}
});
@@ -184,4 +712,4 @@ myApp.router.appendInit({
-
+})(myApp);
\ No newline at end of file
diff --git a/app-quickstart.html b/app-quickstart.html
index b84639153..7f20241bb 100644
--- a/app-quickstart.html
+++ b/app-quickstart.html
@@ -15,7 +15,7 @@
";
if(message.vars && message.vars.pageType) {
@@ -152,7 +80,7 @@ adminApp.cmr.push(["view",function(message,$context){
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'});
+ _app.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;
@@ -199,72 +127,73 @@ adminApp.cmr.push(["view",function(message,$context){
}]);
-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);
- });
+//unused?
+// 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);
+ // });
-adminApp.router.appendHash({'type':'match','route':'/biz/vstore*','callback':function(v){
+_app.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'});
+ _app.model.fetchAdminResource(v.path +''+ v.search,{'tab':_app.ext.admin.vars.tab,'targetID':_app.ext.admin.vars.tab+'Content'});
}});
-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.
+_app.router.appendHash({'type':'exact','route':'/dashboard','callback':function(v){
+ _app.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);
+_app.router.appendHash({'type':'exact','route':'/product','callback':function(v){
+ _app.ext.admin_prodedit.a.showProductManager(v.searchParams);
}});
-adminApp.router.appendHash({'type':'exact','route':'mediaLibraryManageMode','callback':function(v){
- adminApp.ext.admin_medialib.a.showMediaLib({'mode':'manage'});
+_app.router.appendHash({'type':'exact','route':'/mediaLibraryManageMode','callback':function(v){
+ _app.ext.admin_medialib.a.showMediaLib({'mode':'manage'});
}});
-adminApp.router.appendHash({'type':'exact','route':'showPlatformInfo','callback':function(v){
- adminApp.ext.admin_support.a.showPlatformInfo({'mode':'manage'});
+_app.router.appendHash({'type':'exact','route':'/showPlatformInfo','callback':function(v){
+ _app.ext.admin_support.a.showPlatformInfo({'mode':'manage'});
}});
-adminApp.router.appendHash({'type':'exact','route':'logout','callback':function(v){
- adminApp.ext.admin.a.logout();
+_app.router.appendHash({'type':'exact','route':'/logout','callback':function(v){
+ _app.ext.admin.a.logout();
}});
//will handle any clicks directly on the tabs.
-adminApp.router.appendHash({'type':'match','route':'tab/{{tab}}','callback':function(v){
- adminApp.ext.admin.a.handleTabClick(v.params.tab,v.hashParams);
+_app.router.appendHash({'type':'match','route':'/tab/{{tab}}','callback':function(v){
+ _app.ext.admin.a.handleTabClick(v.params.tab,v.searchParams);
if(v.params.tab == 'product') {
//product page tab is 'special'. the navtab section needs to always show up. handleTabClick nukes the navTabs and the function below re-adds them.
- adminApp.ext.admin_prodedit.u.handleNavTabs(); //builds the filters, search, etc menu at top, under main tabs.
+ _app.ext.admin_prodedit.u.handleNavTabs(); //builds the filters, search, etc menu at top, under main tabs.
}
}});
-adminApp.router.appendHash({'type':'exact','route':'downloads','callback':function(v){
+_app.router.appendHash({'type':'exact','route':'/downloads','callback':function(v){
$('#homeContent').empty();
- adminApp.ext.admin.u.bringTabIntoFocus('home');
- adminApp.ext.admin.u.bringTabContentIntoFocus($('#homeContent'));
- adminApp.ext.admin.a.showDownloads($('#homeContent'));
+ _app.ext.admin.u.bringTabIntoFocus('home');
+ _app.ext.admin.u.bringTabContentIntoFocus($('#homeContent'));
+ _app.ext.admin.a.showDownloads($('#homeContent'));
}});
-adminApp.router.appendHash({'type':'exact','route':'help','callback':function(v){
+_app.router.appendHash({'type':'exact','route':'/help','callback':function(v){
$('#supportContent').empty();
- adminApp.ext.admin.u.bringTabIntoFocus('support');
- adminApp.ext.admin.u.bringTabContentIntoFocus($('#supportContent'));
- adminApp.ext.admin_support.a.showHelpInterface($('#supportContent'));
+ _app.ext.admin.u.bringTabIntoFocus('support');
+ _app.ext.admin.u.bringTabContentIntoFocus($('#supportContent'));
+ _app.ext.admin_support.a.showHelpInterface($('#supportContent'));
}});
//handles a lot of the defaults for loading native apps. More or less a 'catch'.
-adminApp.router.appendHash({'type':'match','route':'ext/{{ext}}/{{a}}*','callback':function(v){
- adminApp.ext.admin.a.execApp(v.params.ext,v.params.a.split('?')[0],v.hashParams);
+_app.router.appendHash({'type':'match','route':'/ext/{{ext}}/{{a}}*','callback':function(v){
+ _app.ext.admin.a.execApp(v.params.ext,v.params.a.split('?')[0],v.searchParams);
}});
-adminApp.router.appendInit({
+_app.router.appendInit({
'type':'regexp',
'route': /^(.*?)\/future$/,
'callback':function(f){
@@ -273,13 +202,59 @@ adminApp.router.appendInit({
});
//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({
+_app.router.appendInit({
'type':'function',
'route': function(v){
return {'some':'value'} //returning anything but false triggers a match.
},
'callback':function(f){
- adminApp.router.handleHashChange();
+ //no need to do anything
}
});
+var startupRequires = [
+ "admin", "extensions/admin/templates.html", "extensions/admin/downloads.html",
+ "admin_prodedit", "extensions/admin/product_editor.html",
+ "admin_orders", "extensions/admin/orders.html",
+ "admin_sites", "extensions/admin/sites.html",
+ "store_prodlist",
+ "store_navcats",
+ "store_search",
+ "store_product",
+
+ "cco",
+ "order_create", "extensions/checkout/"+_app.vars.checkoutAuthMode+".html",
+ "cart_message",
+
+ "admin_support", "extensions/admin/support.html",
+ "admin_tools", "extensions/admin/tools.html",
+ "admin_navcats", "extensions/admin/navcats.html",
+ "admin_blast", "extensions/admin/blast.html",
+ "admin_task", "extensions/admin/task.html",
+ "admin_template", "extensions/admin/template_editor.html",
+ "admin_marketplace", "extensions/admin/marketplace.html",
+
+ "admin_config", "extensions/admin/config.html",
+ "admin_reports", "extensions/admin/reports.html",
+ "admin_batchjob", "extensions/admin/batchjob.html",
+ "admin_customer", "extensions/admin/customer.html",
+ "admin_wholesale", "extensions/admin/wholesale.html",
+ "admin_user", "extensions/admin/user.html",
+ "admin_medialib", "extensions/admin/medialib.html",
+ "admin_trainer", "extensions/admin/trainer.html",
+
+ "tools_animation"
+ ]
+_app.require(startupRequires,function(){
+ _app.ext.admin.callbacks.initExtension.onSuccess();
+
+ //animation
+ $('.mhTabsContainer [data-animation]').each(function(){
+ var args = $(this).attr('data-animation');
+ var anim = args.split('?')[0];
+ var params = _app.u.kvp2Array(args.split('?')[1]);
+ _app.ext.tools_animation.u.loadAnim($(this),anim,params);
+ });
+ })
+
+})(adminApp);
diff --git a/app-admin.html b/app-admin.html
index 0ca50cf84..6c7ca92e9 100644
--- a/app-admin.html
+++ b/app-admin.html
@@ -14,6 +14,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app-admin/styles.css b/app-admin/styles.css
index 484326447..0e87abe8d 100644
--- a/app-admin/styles.css
+++ b/app-admin/styles.css
@@ -1045,10 +1045,10 @@ see shipping panel in product editor for example
.pageLanding .ui-anypanel-header .ui-button {display:none;} /* temporarily disabled buttons till state is supported */
/* three column panel layout (homepage) */
-#dashboardColumn1 {width:65%; float:left;}
-#dashboardColumn2 {width:33%; float:right;}
+.dashboardColumn1 {width:65%; float:left;}
+.dashboardColumn2 {width:33%; float:right;}
-#dashboardColumn2 .varImage {max-width:300px; width:100%;}
+.dashboardColumn2 .varImage {max-width:300px; width:100%;}
.recentNewsContainer {height:450px; overflow:auto;}
.recentNewsContainer article {margin-bottom:24px;}
@@ -1209,4 +1209,4 @@ NOTIFICATIONS
@media screen and (max-width: 1024px) {
/* changing to 7% keeps list from line-wrapping. */
.mhTabsContainer li {width:7.5%;}
- }
\ No newline at end of file
+ }
diff --git a/app-analyzer.js b/app-analyzer.js
index bd7040245..427b76722 100644
--- a/app-analyzer.js
+++ b/app-analyzer.js
@@ -292,4 +292,4 @@ $('#tabs-4').append(app.ext.analyzer.u.buildTagsList({'id':'tagList'}));
} //r object.
return r;
- }
\ No newline at end of file
+ }
diff --git a/app-quickstart-init.js b/app-quickstart-init.js
index ce103ef88..3ff259c2e 100644
--- a/app-quickstart-init.js
+++ b/app-quickstart-init.js
@@ -1,122 +1,619 @@
+(function(_app){
+var configURI = (document.location.protocol == 'file:') ? _app.vars.testURL+'jsonapi/config.js' : _app.vars.baseURL+'jsonapi/config.js';
-myApp.rq.push(['script',0,(document.location.protocol == 'file:') ? myApp.vars.testURL+'jsonapi/config.js' : myApp.vars.baseURL+'jsonapi/config.js',function(){
-//in some cases, such as the zoovy UI, zglobals may not be defined. If that's the case, certain vars, such as jqurl, must be passed in via P in initialize:
-// myApp.u.dump(" ->>>>>>>>>>>>>>>>>>>>>>>>>>>>> zGlobals is an object");
- myApp.vars.username = zGlobals.appSettings.username.toLowerCase(); //used w/ image URL's.
-//need to make sure the secureURL ends in a / always. doesn't seem to always come in that way via zGlobals
- myApp.vars.secureURL = zGlobals.appSettings.https_app_url;
- myApp.vars.domain = zGlobals.appSettings.sdomain; //passed in ajax requests.
- myApp.vars.jqurl = (document.location.protocol === 'file:') ? myApp.vars.testURL+'jsonapi/' : '/jsonapi/';
- }]); //The config.js is dynamically generated.
+//Load the config.js script asynchronously. When it finishes loading, we can start up the app
+_app.u.loadScript(configURI,function(){
+ //in some cases, such as the zoovy UI, zglobals may not be defined. If that's the case, certain vars, such as jqurl, must be passed in via P in initialize:
+ _app.vars.username = zGlobals.appSettings.username.toLowerCase(); //used w/ image URL's.
+ //need to make sure the secureURL ends in a / always. doesn't seem to always come in that way via zGlobals
+ _app.vars.secureURL = zGlobals.appSettings.https_app_url;
+ _app.vars.domain = zGlobals.appSettings.sdomain; //passed in ajax requests.
+ _app.vars.jqurl = (document.location.protocol === 'file:') ? _app.vars.testURL+'jsonapi/' : '/jsonapi/';
-myApp.rq.push(['extension',0,'order_create','extensions/checkout/extension.js']);
-myApp.rq.push(['extension',0,'cco','extensions/cart_checkout_order.js']);
+ var startupRequires = ['quickstart'];
+
+ _app.require(startupRequires, function(){
+ setTimeout(function(){$('#appView').removeClass('initFooter');}, 1200);
+ _app.ext.quickstart.callbacks.startMyProgram.onSuccess();
+ });
+ }); //The config.js is dynamically generated.
+
+_app.extend({
+ "namespace" : "quickstart",
+ "filename" : "app-quickstart.js"
+ });
-myApp.rq.push(['extension',0,'store_routing','extensions/store_routing.js']);
+_app.couple('quickstart','addPageHandler',{
+ "pageType" : "static",
+ "require" : [],
+ "handler" : function($container, infoObj){
+ var deferred = $.Deferred();
+ infoObj.defPipeline.addDeferred(deferred);
+ if(infoObj.deferred){
+ infoObj.defPipeline.addDeferred(infoObj.deferred);
+ }
+ //We use infoObj.require here because the router handlers may have put something in there.
+ //By nature, the static page handler requires nothing, but the templates it renders may require all kinds of stuff
+ infoObj.require = infoObj.require || [];
+ _app.require(infoObj.require,function(){
+ infoObj.verb = 'translate';
+ infoObj.templateid = infoObj.templateID;
+ var $page = new tlc().runTLC(infoObj);
+ //$page.tlc(infoObj);
+ $page.data('templateid',infoObj.templateid);
+ $page.data('pageid',infoObj.id);
+ $container.append($page);
+ infoObj.state = 'complete';
+ //this method is synchronous so no extra deferred required
+ _app.renderFunctions.handleTemplateEvents($page,infoObj);
+ deferred.resolve();
+ });
+ }
+ });
-myApp.rq.push(['extension',0,'store_prodlist','extensions/store_prodlist.js']);
-myApp.rq.push(['extension',0,'store_navcats','extensions/store_navcats.js']);
-myApp.rq.push(['extension',0,'store_search','extensions/store_search.js']);
-myApp.rq.push(['extension',0,'store_product','extensions/store_product.js']);
-myApp.rq.push(['extension',0,'cart_message','extensions/cart_message/extension.js']);
-myApp.rq.push(['extension',0,'store_crm','extensions/store_crm.js']);
-myApp.rq.push(['extension',0,'store_tracking','extensions/store_tracking.js']);
-myApp.rq.push(['extension',0,'quickstart','app-quickstart.js','startMyProgram']);
+_app.extend({
+ "namespace" : "order_create",
+ "filename" : "extensions/checkout/extension.js"
+ });
-//myApp.rq.push(['extension',0,'entomologist','extensions/entomologist/extension.js']);
-//myApp.rq.push(['extension',0,'tools_animation','extensions/tools_animation.js']);
+_app.couple('quickstart','addPageHandler',{
+ "pageType" : "checkout",
+ "require" : ['order_create','cco', 'extensions/checkout/active.html'],
+ "handler" : function($container, infoObj, require){
+ var deferred = $.Deferred();
+ infoObj.defPipeline.addDeferred(deferred);
+ infoObj.templateID = 'checkoutTemplate';
+ _app.require(require,function(){
+ $container.attr('id', 'checkoutContainer');
+ _app.ext.order_create.a.startCheckout($container,_app.model.fetchCartID());
+ infoObj.state = 'complete'; //needed for handleTemplateEvents.
+ _app.renderFunctions.handleTemplateEvents($container,infoObj);
+ deferred.resolve();
+ });
+ }
+ });
+_app.u.bindTemplateEvent('checkoutTemplate','depart.destroy',function(event, $context, infoObj){
+ var $page = $context.closest('[data-app-uri]');
+ if($page){
+ $page.empty().remove();
+ }
+ });
+_app.extend({
+ "namespace" : "cco",
+ "filename" : "extensions/cart_checkout_order.js"
+ });
-// 201405 - Deprecated for Universal Analytics
-//myApp.rq.push(['extension',1,'google_analytics','extensions/partner_google_analytics.js','startExtension']);
+_app.couple('quickstart','addPageHandler',{
+ "pageType" : "cart",
+ "require" : ['cco','order_create','templates.html'],
+ "handler" : function($container, infoObj, require){
+ infoObj.deferred = $.Deferred();
+ infoObj.defPipeline.addDeferred(infoObj.deferred);
+ infoObj.navcat = zGlobals.appSettings.rootcat;
+ infoObj.cartid = _app.model.fetchCartID();
+ infoObj.templateID = 'cartTemplate';
+ infoObj.trigger = 'fetch';
+ _app.require(require,function(){
+ //var $cart = new tlc().getTemplateInstance('cartTemplate');
+ //var $cart = $(_app.renderFunctions.createTemplateInstance('cartTemplate',infoObj));
+ var $cart = _app.ext.cco.a.getCartAsJqObj(infoObj);
+ $container.append($cart);
+
+ $cart.on('complete',function(){
+ $("[data-app-role='shipMethodsUL']",$(this)).find(":radio").each(function(){
+ $(this).attr('data-app-change','quickstart|cartShipMethodSelect');
+ });
+ });
-//myApp.rq.push(['extension',1,'tools_ab_testing','extensions/tools_ab_testing.js']);
-//myApp.rq.push(['extension',0,'partner_addthis','extensions/partner_addthis.js']);
-//myApp.rq.push(['extension',1,'resellerratings_survey','extensions/partner_buysafe_guarantee.js','startExtension']); /// !!! needs testing.
-//myApp.rq.push(['extension',1,'buysafe_guarantee','extensions/partner_buysafe_guarantee.js','startExtension']);
-//myApp.rq.push(['extension',1,'powerReviews_reviews','extensions/partner_powerreviews_reviews.js','startExtension']);
-//myApp.rq.push(['extension',0,'magicToolBox_mzp','extensions/partner_magictoolbox_mzp.js','startExtension']); // (not working yet - ticket in to MTB)
+ $cart.trigger(infoObj.trigger,$.extend({'Q':'mutable'},infoObj));
+ _app.model.dispatchThis('mutable');
+
+ // _app.calls.cartDetail.init(_app.model.fetchCartID(),{
+ // 'callback':'tlc',
+ // 'onComplete' : function(){
+ // infoObj.state = 'complete';
+ // _app.renderFunctions.handleTemplateEvents($cart,$.extend(true,{},infoObj));
+ // },
+ // 'jqObj' : $cart,
+ // 'verb' : 'translate'
+ // },'mutable');
+ // _app.model.dispatchThis('mutable');
+ });
+ }
+ });
+_app.u.bindTemplateEvent(function(templateID){ return (templateID == 'cartTemplate' || templateID == 'fieldcamTemplate')},'depart.destroy',function(event, $context, infoObj){
+ var $page = $context.closest('[data-app-uri]');
+ if($page){
+ $page.empty().remove();
+ }
+ });
+_app.extend({
+ "namespace" : "store_routing",
+ "filename" : "extensions/store_routing.js"
+ });
+ //formerly in startup callback of store_routing
+_app.router.addAlias('product', function(routeObj){_app.ext.quickstart.a.showContent(routeObj.value, $.extend({'pageType':'product'}, routeObj.params));});
+_app.router.appendHash({'type':'match','route':'/product/{{pid}}/{{name}}*','callback':'product'});
+_app.router.appendHash({'type':'match','route':'/product/{{pid}}*','callback':'product'});
-myApp.rq.push(['script',0,myApp.vars.baseURL+'resources/jquery.showloading-v1.0.jt.js']); //used pretty early in process..
-myApp.rq.push(['script',0,myApp.vars.baseURL+'resources/jquery.ui.anyplugins.js']); //in zero pass because it's essential to rendering and error handling.
-myApp.rq.push(['script',0,myApp.vars.baseURL+'resources/tlc.js']); //in zero pass cuz you can't render a page without it..
-myApp.rq.push(['css',1,myApp.vars.baseURL+'resources/anyplugins.css']);
-myApp.rq.push(['script',0,myApp.vars.baseURL+'resources/jsonpath.0.8.0.js']); //used pretty early in process..
+_app.router.addAlias('homepage', function(routeObj){_app.ext.quickstart.a.showContent(routeObj.value, $.extend({'pageType':'homepage'}, routeObj.params));});
+_app.router.appendHash({'type':'exact','route':'/home','callback':'homepage'});
+_app.router.appendHash({'type':'exact','route':'/home/','callback':'homepage'});
+_app.router.appendHash({'type':'exact','route':'/','callback':'homepage'});
-//once peg is loaded, need to retrieve the grammar file. Order is important there. This will validate the file too.
-myApp.u.loadScript(myApp.vars.baseURL+'resources/peg-0.8.0.js',function(){
- myApp.model.getGrammar(myApp.vars.baseURL+"resources/pegjs-grammar-20140203.pegjs");
- }); // ### TODO -> callback on RQ.push wasn't getting executed. investigate.
+_app.router.addAlias('category', function(routeObj){_app.ext.quickstart.a.showContent(routeObj.value, $.extend({'pageType':'category'}, routeObj.params));});
+_app.router.appendHash({'type':'match','route':'/category/{{navcat}}*','callback':'category'});
+_app.router.addAlias('search', function(routeObj){_app.ext.quickstart.a.showContent(routeObj.value, $.extend({'pageType':'search'}, routeObj.params));});
+_app.router.appendHash({'type':'match','route':'/search/tag/{{tag}}*','callback':'search'});
+_app.router.appendHash({'type':'match','route':'/search/keywords/{{KEYWORDS}}*','callback':'search'});
+_app.router.addAlias('checkout', function(routeObj){_app.ext.quickstart.a.showContent(routeObj.value, $.extend({'pageType':'checkout', 'requireSecure':true}, routeObj.params));});
+_app.router.appendHash({'type':'exact','route':'/checkout','callback':'checkout'});
+_app.router.appendHash({'type':'exact','route':'/checkout/','callback':'checkout'});
+_app.router.addAlias('cart', function(routeObj){_app.ext.quickstart.a.showContent(routeObj.value, $.extend({'pageType':'cart'}, routeObj.params));});
+_app.router.appendHash({'type':'exact','route':'/cart','callback':'cart'});
+_app.router.appendHash({'type':'exact','route':'/cart/','callback':'cart'});
-//gets executed from app-admin.html as part of controller init process.
-//progress is an object that will get updated as the resources load.
-/*
-'passZeroResourcesLength' : [INT],
-'passZeroResourcesLoaded' : [INT],
-'passZeroTimeout' : null //the timeout instance running within loadResources that updates this object. it will run indef unless clearTimeout run here OR all resources are loaded.
+_app.router.appendHash({'type':'exact','route':'/404','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'templateID':'pageNotFoundTemplate',
+ 'require':'templates.html'
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
-*/
-myApp.u.showProgress = function(progress) {
- function showProgress(attempt) {
- if(progress.passZeroResourcesLength == progress.passZeroResourcesLoaded) {
- //All pass zero resources have loaded.
- //the app will handle hiding the loading screen.
- myApp.u.appInitComplete();
+_app.router.appendHash({'type':'exact','route':'/about_us/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'templateID':'aboutUsTemplate',
+ 'require':['templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.router.appendHash({'type':'exact','route':'/contact_us/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'templateID':'contactUsTemplate',
+ 'require':['templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.router.appendHash({'type':'exact','route':'/frequently_asked_questions/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'templateID':'faqTemplate',
+ 'require':['templates.html']
+ });
+ dump(routeObj.params);
+ routeObj.params.deferred = $.Deferred();
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.u.bindTemplateEvent('faqTemplate','complete.faq',function(event, $context, infoObj){
+ $context.off('complete.faq');
+ dump('in faq complete event');
+ _app.require(['store_crm','templates.html'],function(){
+ _app.ext.store_crm.calls.appFAQsAll.init({'jqObj':$('.faqContent',$context),'deferred':infoObj.deferred,'callback':'showFAQTopics','extension':'store_crm','templateID':'faqTopicTemplate'});
+ _app.model.dispatchThis();
+ });
+ });
+_app.router.appendHash({'type':'exact','route':'/payment_policy/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'templateID':'paymentTemplate',
+ 'require':['templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.router.appendHash({'type':'exact','route':'/privacy_policy/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'templateID':'privacyTemplate',
+ 'require':['templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.router.appendHash({'type':'exact','route':'/return_policy/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'templateID':'returnTemplate',
+ 'require':['templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.router.appendHash({'type':'exact','route':'/shipping_policy/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'templateID':'shippingTemplate',
+ 'require':['templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+
+_app.router.appendHash({'type':'exact','route':'/my_account/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'login' : true,
+ 'templateID':'myAccountTemplate',
+ 'require':['cco','templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.u.bindTemplateEvent('myAccountTemplate','complete.customer',function(event, $context, infoObj){
+ _app.ext.cco.calls.appCheckoutDestinations.init(_app.model.fetchCartID(),{},'mutable'); //needed for country list in address editor.
+ _app.model.addDispatchToQ({"_cmd":"buyerAddressList","_tag":{'callback':'tlc','jqObj':$('.mainColumn',$context),'verb':'translate','datapointer':'buyerAddressList'}},'mutable');
+ _app.model.dispatchThis();
+ });
+_app.router.appendHash({'type':'exact','route':'/my_order_history/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'login' : true,
+ 'templateID':'orderHistoryTemplate',
+ 'require':['templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.u.bindTemplateEvent('orderHistoryTemplate','complete.customer',function(event, $context, infoObj){
+ _app.model.addDispatchToQ({"_cmd":"buyerPurchaseHistory","_tag":{'callback':'tlc','jqObj':$('.mainColumn',$context),'verb':'translate','datapointer':'buyerPurchaseHistory'}},'mutable');
+ _app.model.dispatchThis();
+ });
+_app.router.appendHash({'type':'exact','route':'/change_password/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'login' : true,
+ 'templateID':'changePasswordTemplate',
+ 'require':['templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.u.bindTemplateEvent('changePasswordTemplate','complete.customer',function(event, $context, infoObj){
+ _app.model.addDispatchToQ({"_cmd":"buyerPurchaseHistory","_tag":{
+ "datapointer":"buyerPurchaseHistory",
+ "callback":"tlc",
+ "verb" : "translate",
+ "jqObj" : $("[data-app-role='orderList']",$context).empty()
+ }},"mutable");
+ _app.model.dispatchThis();
+ });
+_app.router.appendHash({'type':'exact','route':'/my_wishlist/','callback':function(routeObj){
+ $.extend(routeObj.params,{
+ 'pageType':'static',
+ 'login' : true,
+ 'templateID':'customerListsTemplate',
+ 'require':['templates.html']
+ });
+ _app.ext.quickstart.a.showContent(routeObj.value,routeObj.params);
+ }});
+_app.u.bindTemplateEvent('customerListsTemplate','complete.customer',function(event, $context, infoObj){
+ _app.model.addDispatchToQ({"_cmd":"buyerProductLists","_tag":{"datapointer":"buyerProductLists",'verb':'translate','jqObj': $('.mainColumn',$context),'callback':'tlc',onComplete : function(rd){
+//data formatting on lists is unlike any other format for product, so a special handler is used.
+ function populateBuyerProdlist(listID,$context) {
+ //add the product list ul here because tlc statement has list ID for bind.
+ $("[data-buyerlistid='"+listID+"']",$context).append("");
+ _app.model.addDispatchToQ({"_cmd":"buyerProductListDetail","listid":listID,"_tag" : {'datapointer':'buyerProductListDetail|'+listID,"listid":listID,'callback':'buyerListAsProdlist','extension':'quickstart', "require":"store_prodlist",'jqObj':$("[data-buyerlistid='"+listID+"'] ul",$context)}},'mutable');
+ }
+
+ var data = _app.data[rd.datapointer]['@lists']; //shortcut
+ var L = data.length;
+ var numRequests = 0;
+ for(var i = 0; i < L; i += 1) {
+ populateBuyerProdlist(data[i].id,rd.jqObj)
+ }
+ _app.model.dispatchThis('mutable');
+ //no sense putting 1 list into an accordion.
+ if(L > 1) {
+ $('.applyAccordion',rd.jqObj).accordion({heightStyle: "content"});
+ }
+ }}},"mutable");
+ _app.model.dispatchThis();
+ });
+
+_app.u.bindTemplateEvent(function(){return true;}, 'complete.routing', function(event, $context, infoObj){
+ if(infoObj){
+ var canonical = "";
+
+ var $routeEle = $('[data-canonical]',$context);
+ if($routeEle.length){ canonical = $routeEle.attr('data-canonical'); }
+ else{
+ canonical = $context.closest('[data-app-uri]').attr('data-app-uri');
}
- else if(attempt > 150) {
- //hhhhmmm.... something must have gone wrong.
- clearTimeout(progress.passZeroTimeout); //end the resource loading timeout.
- $('.appMessaging','#appPreView').anymessage({'message':'Init failed to load all the resources within a reasonable number of attempts.','gMessage':true,'persistent':true});
+
+ var $canonical = $('link[rel=canonical]')
+ if(!$canonical.length){
+ dump('NO CANONICAL IN THE DOCUMENT');
+ $canonical = $('');
+ $('head').append($canonical);
+ }
+ $canonical.attr('href', canonical);
+ }
+ });
+
+_app.extend({
+ "namespace" : "store_tracking",
+ "filename" : "extensions/store_tracking.js"
+ });
+_app.couple('order_create','addOrderCompleteHandler',{
+ 'handler':function(P){
+ _app.require('store_tracking',function(){
+ if(P && P.datapointer && _app.data[P.datapointer] && _app.data[P.datapointer].order){
+ var order = _app.data[P.datapointer].order;
+ var plugins = zGlobals.plugins;
+ // note: order is an object that references the raw (public) cart
+ // order.our.xxxx order[@ITEMS], etc.
+ // data will appear in google analytics immediately after adding it (there is no delay)
+ ga('require', 'ecommerce');
+ //analytics tracking
+ var r = {
+ 'id' : order.our.orderid,
+ 'revenue' : order.sum.items_total,
+ 'shipping' : order.sum.shp_total,
+ 'tax' : order.sum.tax_total
+ };
+ // _app.u.dump(r);
+ ga('ecommerce:addTransaction',r);
+
+ for(var i in order['@ITEMS']){
+ var item = order['@ITEMS'][i];
+ // _app.u.dump(item);
+ ga('ecommerce:addItem', {
+ 'id' : order.our.orderid,
+ 'name' : item.prod_name,
+ 'sku' : item.sku,
+ 'price' : item.base_price,
+ 'quantity' : item.qty,
+ })
+ };
+
+ ga('ecommerce:send');
+ _app.u.dump('FINISHED store_tracking.onSuccess (google analytics)');
+
+ for(var i in plugins){
+ if(_app.ext.store_tracking.trackers[i] && _app.ext.store_tracking.trackers[i].enable){
+ _app.ext.store_tracking.trackers[i](order, plugins[i]);
+ }
+ }
+ }
+ });
+ }
+ });
+
+//Generate meta information
+_app.u.bindTemplateEvent(function(){return true;}, 'complete.metainformation',function(event, $context, infoObj){
+ var defaultTitle = "Chicago Cubs Apparel & Merchandise";
+ var titlePrefix = "";
+ var titlePostfix = " | SportsWorldChicago.com";
+
+ var baseTitle = $('[data-seo-title]', $context).attr('data-seo-title') || defaultTitle;
+ var desc = $('[data-seo-desc]', $context).attr('data-seo-desc') || '';
+
+ document.title = titlePrefix + baseTitle + titlePostfix;
+ $('meta[name=description]').attr('content', desc);
+ });
+
+//Scroll restore
+_app.u.bindTemplateEvent(function(){return true;}, 'complete.scrollrestore',function(event, $context, infoObj){
+ var scroll = $context.data('scroll-restore');
+ if(scroll){
+ $('html, body').animate({scrollTop : scroll}, 300);
+ }
+ else if((infoObj.performJumpToTop === false) ? false : true) {
+ $('html, body').animate({scrollTop : 0}, 300);
+ }
+ else {
+ //do nothing
+ }
+ });
+
+_app.u.bindTemplateEvent(function(){return true;}, 'depart.scrollrestore', function(event, $context, infoObj){
+ var scroll = $('html').scrollTop()
+ $context.data('scroll-restore',scroll);
+ });
+
+// _app.u.bindTemplateEvent('productTemplate', 'complete.invcheck',function(event, $context, infoObj){
+ // if(!$context.attr('data-invcheck')){
+ // $context.attr('data-invcheck','true');
+ // var data = _app.data['appProductGet|'+infoObj.pid];
+ // var variations = data['@variations'];
+ // if(variations.length == 1){
+ // var id = variations[0].id;
+ // $('select[name='+id+'] option', $context).each(function(){
+ // var sku = infoObj.pid+":"+id+""+$(this).attr("value");
+ // dump(sku);
+ // dump(data["@inventory"][sku]);
+ // if(data["@inventory"][sku] && data["@inventory"][sku].AVAILABLE <= 0){
+ // //$(this).attr("disabled","disabled");
+ // $(this).remove();
+ // }
+ // });
+ // }
+ // }
+ // });
+
+_app.extend({
+ "namespace" : "store_prodlist",
+ "filename" : "extensions/store_prodlist.js"
+ });
+
+_app.extend({
+ "namespace" : "prodlist_infinite",
+ "filename" : "extensions/prodlist_infinite.js"
+ });
+
+_app.extend({
+ "namespace" : "store_navcats",
+ "filename" : "extensions/store_navcats.js"
+ });
+
+_app.couple('quickstart','addPageHandler',{
+ "pageType" : "homepage",
+ "require" : ['store_navcats','templates.html','store_routing'],
+ "handler" : function($container, infoObj, require){
+ infoObj.deferred = $.Deferred();
+ infoObj.defPipeline.addDeferred(infoObj.deferred);
+ dump('homepage handler');
+ infoObj.navcat = zGlobals.appSettings.rootcat;
+ _app.require(require,function(){
+ infoObj.templateID = 'homepageTemplate';
+ _app.ext.store_navcats.u.showPage($container, infoObj);
+ });
+ }
+ });
+
+_app.couple('quickstart','addPageHandler',{
+ "pageType" : "category",
+ "require" : ['store_navcats','store_prodlist','prodlist_infinite','templates.html','store_routing'],
+ "handler" : function($container, infoObj, require){
+ infoObj.deferred = $.Deferred();
+ infoObj.defPipeline.addDeferred(infoObj.deferred);
+ if(infoObj.navcat.charAt(0) != '.'){
+ infoObj.navcat = '.'+infoObj.navcat
+ }
+ if(_app.ext.quickstart.vars.session.recentCategories[0] != infoObj.navcat) {
+ _app.ext.quickstart.vars.session.recentCategories.unshift(infoObj.navcat);
+ }
+ _app.require(require,function(){
+ if(infoObj.templateID){}
+ else{infoObj.templateID = 'categoryTemplate';}
+ if(infoObj.templateID = 'categoryTemplate'){
+ infoObj.prodRenderedDeferred = $.Deferred();
+ infoObj.defPipeline.addDeferred(infoObj.prodRenderedDeferred);
+ }
+ _app.ext.store_navcats.u.showPage($container, infoObj);
+ });
+
+ }
+ });
+
+_app.extend({
+ "namespace" : "store_search",
+ "filename" : "extensions/store_search.js"
+ });
+
+_app.couple('store_search','addUniversalFilter',{
+ 'filter' : {"has_child":{"type":"sku","query":{"range":{"available":{"gte":1}}}}}
+ });
+_app.couple('store_search','addUniversalFilter',{
+ 'filter' : {"not":{"term":{"tags":"IS_DISCONTINUED"}}}
+ });
+
+_app.couple('quickstart','addPageHandler',{
+ "pageType" : "search",
+ "require" : ['store_search','templates.html','store_routing'],
+ "handler" : function($container, infoObj, require){
+ infoObj.deferred = $.Deferred();
+ infoObj.defPipeline.addDeferred(infoObj.deferred);
+ _app.require(require,function(){
+ _app.ext.store_search.u.showSearch($container, infoObj);
+ });
+
+ }
+ });
+
+_app.extend({
+ "namespace" : "store_product",
+ "filename" : "extensions/store_product.js"
+ });
+
+
+_app.couple('quickstart','addPageHandler',{
+ "pageType" : "product",
+ "require" : ['store_product','store_navcats', 'store_routing', 'store_search', 'store_crm', 'templates.html'],
+ "handler" : function($container, infoObj, require){
+ infoObj.deferred = $.Deferred();
+ infoObj.defPipeline.addDeferred(infoObj.deferred);
+ if($.inArray(infoObj.pid,_app.ext.quickstart.vars.session.recentlyViewedItems) < 0) {
+ _app.ext.quickstart.vars.session.recentlyViewedItems.unshift(infoObj.pid);
}
else {
- var percentPerInclude = (100 / progress.passZeroResourcesLength);
- var percentComplete = Math.round(progress.passZeroResourcesLength * percentPerInclude); //used to sum how many includes have successfully loaded.
-// dump(" -> percentPerInclude: "+percentPerInclude+" and percentComplete: "+percentComplete);
- $('#appPreViewProgressBar').val(percentComplete);
- $('#appPreViewProgressText').empty().append(percentComplete+"% Complete");
- attempt++;
- setTimeout(function(){showProgress(attempt);},250);
+ _app.ext.quickstart.vars.session.recentlyViewedItems.splice(0, 0, _app.ext.quickstart.vars.session.recentlyViewedItems.splice($.inArray(infoObj.pid, _app.ext.quickstart.vars.session.recentlyViewedItems), 1)[0]);
}
+ //IMPORTANT: requiring every extension needed in order to render the page, including TLC formats in the template
+ _app.require(require, function(){
+ infoObj.templateID = 'productTemplate';
+ _app.ext.store_product.u.showProd($container, infoObj);
+ });
}
- showProgress(0)
- }
+ });
+
+// _app.extend({
+ // "namespace" : "cart_message",
+ // "filename" : "extensions/cart_message/extension.js"
+ // });
+
+_app.extend({
+ "namespace" : "store_crm",
+ "filename" : "extensions/store_crm.js"
+ });
+
+// _app.extend({
+ // "namespace" : "partner_addthis",
+ // "filename" : "extensions/partner_addthis.js"
+ // });
+// _app.u.bindTemplateEvent('productTemplate', 'complete.test', function(event, $context, infoObj){
+ // var $toolbox = $('.socialLinks', $context);
+ // if($toolbox.hasClass('addThisRendered')){
+ // //Already rendered, don't do it again.
+ // }
+ // else {
+ // $toolbox.addClass('addThisRendered').append(
+ // '
What 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');
+ window[_app.vars.analyticsPointer]('send', 'event','Checkout','User Event','Tweeted about order');
+ window[_app.vars.analyticsPointer]('send', 'event','Checkout','User Event','Tweeted about order');
});
//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') {
+ if(_app.u.thisNestedExists("zGlobals.thirdParty.facebook.appId") && typeof FB == 'object') {
$('.ocmFacebookComment',$checkout).click(function(){
- myApp.ext.quickstart.thirdParty.fb.postToWall(cartContentsAsLinks);
+ _app.ext.quickstart.thirdParty.fb.postToWall(cartContentsAsLinks);
ga('send','event','Checkout','User Event','FB message about order');
- window[myApp.vars.analyticsPointer]('send', 'event','Checkout','User Event','FB message about order');
+ window[_app.vars.analyticsPointer]('send', 'event','Checkout','User Event','FB message about order');
});
}
else {$('.ocmFacebookComment').hide()}
});
//Cart Messaging Responses.
- myApp.cmr.push(['chat.join',function(message){
+ _app.cmr.push(['chat.join',function(message){
if(message.FROM == 'ADMIN') {
- var $ui = myApp.ext.quickstart.a.showBuyerCMUI();
+ var $ui = _app.ext.quickstart.a.showBuyerCMUI();
$("[data-app-role='messageInput']",$ui).show();
$("[data-app-role='messageHistory']",$ui).append("