Skip to content

Commit

Permalink
load colorbox if not already loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
btcgear committed Dec 12, 2012
1 parent b12002f commit b833247
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion upload/catalog/view/theme/default/template/payment/bitcoin.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ DEALINGS IN THE SOFTWARE.
</div>
<?php } ?>
<script type="text/javascript"><!--
if (typeof colorbox == 'undefined') {
var e = document.createElement('script');
e.src = 'catalog/view/javascript/jquery/colorbox/jquery.colorbox.js';
e.type = "text/javascript";
document.getElementsByTagName("head")[0].appendChild(e);
e = document.createElement('link');
e.rel = "stylesheet";
e.type = "text/css";
e.href = "catalog/view/javascript/jquery/colorbox/colorbox.css";
e.media = "screen"
document.getElementsByTagName("head")[0].appendChild(e);
}
$('#button-pay').on('click', function() {
html = '<div id="payment-wrapper" style="position:relative;">';
html += ' <div id="payment-left" style="float:left; margin-top:20px;">';
Expand Down Expand Up @@ -67,7 +79,7 @@ $('#button-pay').on('click', function() {
else {
location.href = 'index.php?route=checkout/success';
}
}
}
});
});
function bitcoin_check () {
Expand Down

0 comments on commit b833247

Please sign in to comment.