Move staticfiles and locale inside the package

This commit is contained in:
Raphael Michel
2016-02-16 16:08:37 +01:00
parent b36314b909
commit d4b3c9717c
1382 changed files with 224985 additions and 4 deletions

View File

@@ -0,0 +1,73 @@
/*global $, waitingDialog, default_loading_message */
var async_task_id = null;
var async_task_timeout = null;
var async_task_check_url = null;
function async_task_check() {
"use strict";
$.ajax(
{
'type': 'GET',
'url': async_task_check_url,
'success': async_task_check_callback,
'error': async_task_error,
'context': this,
'dataType': 'json'
}
);
}
function async_task_check_callback(data, jqXHR, status) {
"use strict";
if (data.ready && data.redirect) {
location.href = data.redirect;
return;
}
async_task_timeout = window.setTimeout(async_task_check, 500);
}
function async_task_callback(data, jqXHR, status) {
"use strict";
$(this).data('ajaxing', false);
if (data.redirect) {
location.href = data.redirect;
return;
}
async_task_id = data.async_id;
async_task_check_url = data.check_url;
async_task_timeout = window.setTimeout(async_task_check, 500);
}
function async_task_error(jqXHR, textStatus, errorThrown) {
"use strict";
waitingDialog.hide();
// TODO: Handle status codes != 200
// if(jqXHR.status == 500) {
// } if(jqXHR.status == 403) {
// } if(jqXHR.status == 503) {
// }
}
$(function () {
"use strict";
$("body").on('submit', 'form[data-asynctask]', function (e) {
e.preventDefault();
if ($(this).data('ajaxing')) {
return;
}
$(this).data('ajaxing', true);
waitingDialog.show(default_loading_message);
$.ajax(
{
'type': 'POST',
'url': $(this).attr('action'),
'data': $(this).serialize() + '&ajax=1',
'success': async_task_callback,
'error': async_task_error,
'context': this,
'dataType': 'json'
}
);
});
});

View File

@@ -0,0 +1,33 @@
/*global $ */
$(function () {
"use strict";
$("input[data-toggle=radiocollapse]").change(function () {
$($(this).attr("data-parent")).find(".collapse.in").collapse('hide');
$($(this).attr("data-target")).collapse('show');
});
$(".js-only").removeClass("js-only");
$(".variations").hide();
$("a[data-toggle=variations]").click(function () {
$(this).parent().parent().parent().find(".variations").slideToggle();
});
$(".collapsed").removeClass("collapsed").addClass("collapse");
$("#voucher-box").hide();
$("#voucher-toggle a").click(function () {
$("#voucher-box").slideDown();
$("#voucher-toggle").slideUp();
});
});
var waitingDialog = {
show: function (message) {
"use strict";
$("#loadingmodal").find("h1").html(message);
$("body").addClass("loading");
},
hide: function () {
"use strict";
$("body").removeClass("loading");
}
};

View File

@@ -0,0 +1,86 @@
.product-row {
border-top: 1px solid @table-border-color;
&:last-child {
}
p:last-child {
margin-bottom: 0;
}
.input-item-count {
text-align: center;
}
.availability-box {
text-align: center;
&.gone {
color: @alert-danger-text;
}
&.unavailable {
color: @alert-warning-text;
}
}
.productpicture {
float: left;
margin-right: 10px;
text-decoration: none;
display: block;
}
}
.item-with-variations .product-row.headline, .product-row.simple {
border-top: 2px solid @table-border-color;
}
.item-with-variations:last-child {
border-bottom: 2px solid @table-border-color;
}
.panel-body address:last-child {
margin-bottom: 0;
}
.cart-row, .product-row {
padding: 10px 0;
.count form {
display: inline;
}
.price, .count {
text-align: right;
}
.price small,
.availability-box small {
display: block;
line-height: 1;
}
&.total {
border-top: 1px solid @table-border-color;
}
dl {
padding-left: 20px;
margin-bottom: 0;
dd {
padding-left: 20px;
}
}
}
.panel-contact dl {
margin-bottom: 0;
}
.panel-primary .panel-heading a {
color: white;
}
.checkout-button-row {
padding: 15px 0;
}
@media (max-width: @screen-sm-max) {
.checkout-button-row div {
margin-bottom: 10px;
}
.page-header h1 small {
display: block;
}
}

View File

@@ -0,0 +1,7 @@
.panel-title .radio {
margin-left: 20px;
}
.form-control + .form-control-feedback {
/* Fix for https://github.com/FortAwesome/Font-Awesome/issues/4313 */
.form-control-feedback;
}

View File

@@ -0,0 +1,28 @@
@import "../../bootstrap/less/bootstrap.less";
@import "../../fontawesome/less/font-awesome.less";
@import "../../pretixbase/less/colors.less";
@fa-font-path: "../../fontawesome/fonts";
body {
background: #ececec;
text-align: center;
padding: 50px 0;
}
.big-rotating-icon {
margin-top: 50px;
-webkit-animation: fa-spin 8s infinite linear;
animation: fa-spin 8s infinite linear;
font-size: 200px;
color: @brand-primary;
}
.logo {
width: 330px;
margin: auto;
display: block;
margin-top: 10%;
height: auto;
max-width: 100%;
}

View File

@@ -0,0 +1,120 @@
@import "../../bootstrap/less/bootstrap.less";
@import "../../fontawesome/less/font-awesome.less";
@import "../../lightbox/css/lightbox.css";
@fa-font-path: "../../fontawesome/fonts";
@import "../../pretixbase/less/colors.less";
@import "event.less";
@import "forms.less";
footer {
text-align: center;
padding: 10px 0;
font-size: 11px;
}
.page-header {
position: relative;
padding-bottom: 9px;
h1 {
margin: 0;
}
.loginbox {
padding-top: 15px;
}
}
.js-only {
display: none;
}
.locales {
display: inline;
a {
text-decoration: none;
}
img {
vertical-align: baseline;
}
}
.huge {
font-size: 40px;
}
a:hover .panel-primary > .panel-heading {
background-color: darken(@btn-primary-bg, 10%);
border-color: darken(@btn-primary-border, 12%);
}
.thank-you {
margin-bottom: 25px;
.fa {
font-size: 150px;
line-height: 170px;
display: block;
color: @brand-success;
}
h2 {
color: @brand-success;
}
}
body.loading .container {
-webkit-filter: blur(2px);
-moz-filter: blur(2px);
-ms-filter: blur(2px);
-o-filter: blur(2px);
filter: blur(2px);
}
#loadingmodal {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(255, 255, 255, .7);
opacity: 0;
text-align: center;
z-index: 900000;
visibility: hidden;
.big-rotating-icon {
margin-top: 50px;
-webkit-animation: fa-spin 8s infinite linear;
animation: fa-spin 8s infinite linear;
font-size: 200px;
color: @brand-primary;
}
}
.loading #loadingmodal {
opacity: 1;
visibility: visible;
transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-webkit-transition: opacity .5s ease-in-out;
}
@media (min-width: @screen-md-min) {
.thank-you {
height: 170px;
width: 70%;
margin: auto;
.fa {
float: left;
margin-right: 30px;
}
h2 {
padding-top: 35px;
}
}
}
@media (max-width: @screen-sm-max) {
.thank-you {
text-align: center;
}
h2 {
margin-top: 0;
}
}

View File

@@ -0,0 +1,19 @@
@import "../../bootstrap/less/bootstrap.less";
@import "../../fontawesome/less/font-awesome.less";
@import "../../pretixbase/less/colors.less";
@fa-font-path: "../../fontawesome/fonts";
body {
background: #ececec;
text-align: center;
padding: 50px 0;
}
.big-rotating-icon {
margin-top: 50px;
-webkit-animation: fa-spin 8s infinite linear;
animation: fa-spin 8s infinite linear;
font-size: 200px;
color: @brand-primary;
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB