Restructure our python module. A lot.

This commit is contained in:
Raphael Michel
2015-02-14 17:55:13 +01:00
parent cf18f3e200
commit 077413f41c
117 changed files with 193 additions and 163 deletions

View File

@@ -0,0 +1,27 @@
"use strict";
$(function () {
$("[data-formset]").formset({
animateForms: true,
reorderMode: 'animate'
});
$(document).on("click", ".variations .variations-select-all", function (e) {
$(this).parent().parent().find("input[type=checkbox]").prop("checked", true).change();
e.stopPropagation();
return false;
});
$(document).on("click", ".variations .variations-select-none", function (e) {
$(this).parent().parent().find("input[type=checkbox]").prop("checked", false).change();
e.stopPropagation();
return false;
});
if ($(".items-on-quota").length) {
$(".items-on-quota .panel").each(function () {
var $panel = $(this);
$panel.toggleClass("panel-success", $panel.find("input:checked").length > 0);
$(this).find("input").change(function () {
$panel.toggleClass("panel-success", $panel.find("input:checked").length > 0);
});
});
}
$('.collapse').collapse();
});

View File

@@ -0,0 +1,28 @@
@import "../../../../base/static/bootstrap/less/bootstrap.less";
body {
background: #eee;
}
footer {
text-align: center;
padding: 10px 0;
font-size: 11px;
}
.form-signin {
.well;
max-width: 330px;
margin: auto;
margin-top: 10%;
padding-bottom: 0;
.control-label {
.sr-only;
}
.buttons {
text-align: right;
}
}

View File

@@ -0,0 +1,78 @@
td > .form-group {
margin-bottom: 0;
}
td > .errorlist {
color: #a94442;
list-style-type: none;
padding: 0;
margin: 0;
}
td > .form-group > .checkbox {
margin-top: 0;
margin-bottom: 0;
}
.has-success .form-control {
border-color: #cccccc;
}
.form-horizontal [data-formset] .form-group {
width: 100%;
}
[data-formset] .form-group:not([data-formset-form-deleted]):last-of-type [data-formset-move-down-button],
[data-formset] .form-group:not([data-formset-form-deleted]):first-of-type [data-formset-move-up-button] {
cursor: not-allowed;
pointer-events: none; // Future-proof disabling of clicks
.opacity(.65);
.box-shadow(none);
}
.form-plugins .panel-title {
line-height: 34px;
}
.restriction-formset .variations label {
margin: 0;
}
.submit-group {
margin: 15px 0 0 0 !important;
padding: 15px;
background: #eeeeee;
text-align: right;
.btn-save {
.btn-lg;
}
.btn-cancel {
.pull-left;
.btn-lg;
}
}
.panel .form-group:last-child {
margin-bottom: 0;
}
.container ul.nav-pills {
margin: 20px 0;
}
.variation-matrix {
td .form-group, .checkbox {
margin: 0;
}
}
.table-quotas td ul {
list-style: none;
margin-left: 0;
padding-left: 0;
}
@media (min-width: @screen-sm-min) {
.variation-matrix > tbody > tr > td {
line-height: 34px;
input[type=checkbox] {
margin-top: 10px;
}
}
}

View File

@@ -0,0 +1,4 @@
@import "../../../../base/static/bootstrap/less/bootstrap.less";
@import "../../../../base/static/fontawesome/less/font-awesome.less";
@fa-font-path: "../../fontawesome/fonts";
@import "forms.less";