This repository has been archived by the owner on Aug 5, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Roman Rudenko
committed
Jul 18, 2012
1 parent
1120389
commit eceb559
Showing
33 changed files
with
1,228 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,12 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<title>title</title> | |||
</head> | |||
<body> | |||
<script src="comradeLaikaRocketDog.js"></script> | |||
<img src="comradeLaikaRocketDog.jpg"> | |||
<iframe src="comradeLaikaRocketDog.jpg"></iframe> | |||
|
|||
</body> | |||
</head> |
1 change: 1 addition & 0 deletions
1
test/integration/performance/03.beyondtherack-home/bld/mobify.js
Large diffs are not rendered by default.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
test/integration/performance/03.beyondtherack-home/project.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,9 @@ | |||
{ | |||
"name": "test/03.beyondtherack-home", | |||
"api": "1.1", | |||
"build_directory": "bld", | |||
"plugins": [], | |||
"exclude": [ | |||
"*.tmpl" | |||
] | |||
} |
23 changes: 23 additions & 0 deletions
23
test/integration/performance/03.beyondtherack-home/src/mobify.konf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,23 @@ | |||
{>"/base/lib/base_konf.konf"/} | |||
{<tmpl}{/tmpl} | |||
{<data} { | |||
|
|||
'OUTPUTHTML': function(context) { | |||
var $html = context.data('$html'); | |||
$html.find('iframe, img, script').remove(); | |||
|
|||
var endIteration = document.createElement('script'); | |||
var inject = function() { | |||
location.search = location.search.replace( /([?&]iter=)(\d+)/, function(all, start, index) { | |||
return start + ++index | |||
}).replace(/([?&]perf=)([^&]*)/, function(all, start, value) { | |||
return start + JSON.stringify(Mobify.timing.points); | |||
}); | |||
} | |||
endIteration.textContent = '(' + inject + ')()'; | |||
context.data('$body')[0].appendChild(endIteration); | |||
|
|||
return $html.prop('outerHTML') | |||
} | |||
|
|||
} {/data} |
10 changes: 10 additions & 0 deletions
10
test/integration/performance/03.beyondtherack-home/src/tmpl/404.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,10 @@ | |||
{>base_smartphone/} | |||
|
|||
{<body} | |||
{#content} | |||
|
|||
{image} | |||
|
|||
{/content} | |||
|
|||
{/body} |
5 changes: 5 additions & 0 deletions
5
test/integration/performance/03.beyondtherack-home/src/tmpl/_categorynav.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
{#categorynav} | |||
|
|||
{nav} | |||
|
|||
{/categorynav} |
68 changes: 68 additions & 0 deletions
68
test/integration/performance/03.beyondtherack-home/src/tmpl/_footer.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,68 @@ | |||
{#footer} | |||
{^isCart} | |||
{?isLoggedIn} | |||
|
|||
<div class="x-backtotop"> | |||
<a id="x-backtotop-link" href="#"><span>Back to Top</span></a> | |||
</div> | |||
|
|||
<nav class="x-category-nav"> | |||
{>_categorynav/} | |||
</nav> | |||
|
|||
{?isCart} | |||
|
|||
{:else} | |||
|
|||
<div class="x-row"> | |||
<div class="x-account"> | |||
{account} | |||
</div> | |||
<div class="x-cart"> | |||
<a href="/bag/show"> | |||
{?checkoutButtonNum} | |||
<span class="x-checkout-num"> | |||
{checkoutButtonNum} | |||
</span> | |||
{/checkoutButtonNum} | |||
</a> | |||
</div> | |||
</div> | |||
|
|||
{/isCart} | |||
|
|||
{/isLoggedIn} | |||
|
|||
<nav id="x-bottom-nav"> | |||
<ul> | |||
{#footerLinks} | |||
<li> | |||
{.} | |||
</li> | |||
{/footerLinks} | |||
{?isLoggedIn} | |||
<li>{signOut}</li> | |||
{/isLoggedIn} | |||
</ul> | |||
</nav> | |||
{/isCart} | |||
|
|||
<div class="x-row"> | |||
<!-- <div id="x-full-site"><a onclick="return Mobify.desktop();">View full site</a></div> --> | |||
<div id="x-copyright">{?isLoggedIn}{copyright}{:else}{content.copyright}{/isLoggedIn}</div> | |||
</div> | |||
|
|||
{shoppingbag} | |||
{%script} | |||
(function($) { | |||
// Scroll to top. | |||
$('#x-backtotop-link').bind('click', function(e) { | |||
e.stopPropagation(); | |||
e.preventDefault(); | |||
$('body').animate({scrollTop: 1}, 200); | |||
return false; | |||
}); | |||
})(Mobify.$); | |||
{/script} | |||
|
|||
{/footer} |
86 changes: 86 additions & 0 deletions
86
test/integration/performance/03.beyondtherack-home/src/tmpl/_header.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,86 @@ | |||
{#header} | |||
<ul id="x-header-bar"> | |||
<li class="x-logo"> | |||
<a href="/"> | |||
<img src="{config.configDir}i/logo{HD}.png" alt="Beyond the Rack" /> | |||
</a> | |||
</li> | |||
|
|||
{?isLoggedIn} | |||
|
|||
{?isCart} | |||
{?content.checkout} | |||
|
|||
<li class="x-icon x-modify"> | |||
<a href="/bag/show">Modify cart</a> | |||
</li> | |||
|
|||
{:else} | |||
|
|||
<li class="x-icon x-checkout"> | |||
<a href="/bag/checkout">Checkout now</a> | |||
</li> | |||
|
|||
{/content.checkout} | |||
|
|||
{:else} | |||
|
|||
<li class="x-icon x-nav"> | |||
<a href="#">Nav</a> | |||
</li> | |||
|
|||
<li class="x-icon x-account {?isAccountPage}x-active{/isAccountPage}"> | |||
{account} | |||
</li> | |||
<li class="x-icon x-cart"> | |||
<a href="/bag/show"> | |||
{?checkoutButtonNum} | |||
<span class="x-checkout-num"> | |||
{checkoutButtonNum} | |||
</span> | |||
{/checkoutButtonNum} | |||
</a> | |||
</li> | |||
|
|||
{/isCart} | |||
|
|||
{:else} | |||
|
|||
{?content.login} | |||
|
|||
<li class="x-icon x-signup"> | |||
<a href="/auth/register?r=">Sign up here</a> | |||
</li> | |||
|
|||
{/content.login} | |||
|
|||
{?content.register} | |||
|
|||
<li class="x-icon x-signup"> | |||
<a href="/auth/login?r=">Sign in here</a> | |||
</li> | |||
|
|||
{/content.register} | |||
|
|||
{/isLoggedIn} | |||
</ul> | |||
{?isLoggedIn} | |||
<nav id="x-top-nav" class="x-category-nav"> | |||
{>_categorynav/} | |||
</nav> | |||
{/isLoggedIn} | |||
|
|||
{%script} | |||
(function($) { | |||
// Toggle menu | |||
|
|||
$('li.x-nav a').click(function() { | |||
$('body').toggleClass('x-nav-active').addClass('x-animate'); | |||
$('li.x-nav').toggleClass('x-active'); | |||
//$('#x-top-nav').slideToggle(); | |||
$('#x-top-nav').toggleClass('x-active'); | |||
return false; | |||
}); | |||
})(Mobify.$); | |||
{/script} | |||
{/header} |
23 changes: 23 additions & 0 deletions
23
test/integration/performance/03.beyondtherack-home/src/tmpl/_record_sale_js.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,23 @@ | |||
{%script} | |||
/* GA order tracking */ | |||
(function($) { | |||
var text = $('pre').text() | |||
, orderId = /order no. ([0-9]+)/.exec(text)[1] | |||
, taxRe = /[GQ]ST.*?\$\s*([0-9]+\.[0-9]+)/g | |||
, matchTotal = /Total.*\$\s*([0-9]+\.[0-9]+)/.exec(text) | |||
, tax = 0 | |||
, total = 0 | |||
, match; | |||
|
|||
while (match = taxRe.exec(text)) { | |||
tax += +match[1] || 0; | |||
} | |||
|
|||
if (matchTotal) total = matchTotal[1]; | |||
|
|||
Mobify.analytics = Mobify.analytics || {}; | |||
Mobify.analytics.ga = Mobify.analytics.ga || []; | |||
Mobify.analytics.ga.push(['_addTrans', orderId, 'BTR', total, tax], ['_trackTrans']); | |||
|
|||
})(Mobify.$); | |||
{/script} |
Oops, something went wrong.