Permalink
Browse files

fixed many things

  • Loading branch information...
Guest007 committed Feb 23, 2014
1 parent 7cbbc35 commit 3f79909bd205abc0e3eee6b4a1b9d843e5273b7f
Showing with 601 additions and 451 deletions.
  1. +23 −27 templates/easy-form.html
  2. +1 −15 templates/fast-form.html
  3. +54 −54 templates/helpers.html
  4. +16 −3 theme/css/template.css
  5. +21 −3 theme/css/template.less
  6. +486 −349 theme/js/init.js
View
@@ -1,5 +1,5 @@
- <form id="easy_form" class="jClever filter calc" action="{% url 'ajax-save-order' step=12 %}" method="POST">
+ <form id="easy_form" class="jClever filter calc" action="{% url 'ajax-save-order' step=12 %}" method="POST" novalidate>
{% csrf_token %}
<input type="hidden" id="id" name="id" class="common" value="{{ object.id }}">
<ul class="visual_first">
@@ -14,7 +14,7 @@
<span></span>
<i class="fa fa-times"></i>
</span>
- <small>
+ <small class="question">
<i class="fa fa-question"></i>
<span class="first_flag"><i class="fa fa-circle"></i></span>
</small>
@@ -31,7 +31,7 @@
<span></span>
<i class="fa fa-times"></i>
</span>
- <small>
+ <small class="question">
<i class="fa fa-question"></i>
<span class="second_flag"><i class="fa fa-circle"></i></span>
</small>
@@ -48,7 +48,7 @@
<span></span>
<i class="fa fa-times"></i>
</span>
- <small>
+ <small class="question">
<i class="fa fa-question"></i>
<span class="third_flag"><span></span><i class="fa fa-circle"></i></span>
</small>
@@ -65,7 +65,7 @@
<span></span>
<i class="fa fa-times"></i>
</span>
- <small>
+ <small class="question">
<i class="fa fa-question"></i>
<span class="fourth_flag"><span></span><i class="fa fa-circle"></i></span>
</small>
@@ -84,7 +84,7 @@
<span></span>
<i class="fa fa-times"></i>
</span>
- <small>
+ <small class="question">
<i class="fa fa-question"></i>
<span class="fifth_flag"><i class="fa fa-circle"></i></span>
</small>
@@ -101,7 +101,7 @@
<span></span>
<i class="fa fa-times"></i>
</span>
- <small>
+ <small class="question">
<i class="fa fa-question"></i>
<span class="sixth_flag"><i class="fa fa-circle"></i></span>
</small>
@@ -118,7 +118,7 @@
<span></span>
<i class="fa fa-times"></i>
</span>
- <small>
+ <small class="question">
<i class="fa fa-question"></i>
<span class="seventh_flag"><i class="fa fa-circle"></i></span>
</small>
@@ -135,36 +135,37 @@
<span></span>
<i class="fa fa-times"></i>
</span>
- <small>
+ <small class="question">
<i class="fa fa-question"></i>
<span class="eighth_flag"><i class="fa fa-circle"></i></span>
</small>
<p>Скрейтч панель</p>
</li>
</ul>
<ul class="order">
+ <li class="prompt">Поля отмеченные звёздочкой - обязательны для заполнения.</li>
<li class="info"></li>
<li class="printing"></li>
<li class="time"></li>
<li>
- <i class="error">Минимальное количество - 500 экземпляров</i>
- <label for="count">Тираж:</label>
- <input type="text" class="edition" id="count" name="count" placeholder="500" value="{{ object.draw }}">
+
+ <label for="i_01"><i class="fa fa-asterisk"></i> Тираж: </label>
+ <input type="text" class="edition for_valid" id="i_01" name="count" placeholder="500" value="{{ object.draw }}">
</li>
<li>
- <label for="color">Цвет:</label>
+ <label for="s_01">Цвет:</label>
<div class="select color">
- <select name="colors" class="calc">
+ <select name="colors" id="s_01">
{% for item in color %}
<option value="{{ item.id }}"{% if templ.color_front and templ.color_front.id == item.id %}selected="selected"{% endif %} data-price="{{ item.cost }}">{{ item.name }}</option>
{% endfor %}
</select>
</div>
</li>
<li>
- <label>Материал:</label>
+ <label for="s_02">Материал:</label>
<div class="select materials">
- <select name="materials" class="calc">
+ <select name="materials" id="s_02">
{% for item in materials %}
<option value="{{ item.id }}" {% if templ.material and templ.material.id == item.id %}selected="selected"{% endif %} data-price="{{ item.cost }}">{{ item.name }}</option>
{% endfor %}
@@ -176,24 +177,19 @@
<p class="sum">0 руб.</p>
</li>
<li>
- <label>ФИО:</label>
- <input type="text" name="user" value="{{ object.fio }}">
+ <label for="i_02"><i class="fa fa-asterisk"></i> ФИО:</label>
+ <input type="text" name="user" id="i_02" value="{{ object.fio }}" class="for_valid">
</li>
<li>
- <label>Телефон:</label>
- <input type="text" name="phone" value="{{ object.phone }}">
+ <label for="i_03"><i class="fa fa-asterisk"></i> Телефон:</label>
+ <input type="text" name="phone_" id="i_03" value="{{ object.phone }}" class="for_valid">
</li>
<li>
- <label>Email:</label>
- <input type="email" name="email" value="{{ object.email }}">
+ <label for="i_04"><i class="fa fa-asterisk"></i> Email:</label>
+ <input type="email" name="email" id="i_04" value="{{ object.email }}" class="for_valid">
</li>
<li>
-<!--
- <a href="#" class="next_step">Заказать</a>
--->
-
<input type="submit" name="order" value="Заказать" class="next_step">
-
</li>
</ul>
<input type="hidden" name="foil" class="flag" value="">
View
@@ -1,5 +1,5 @@
- <form id='fast_form' class="jClever calc" action="{% url 'ajax-save-order' step=2 %}" method="POST" enctype="multipart/form-data">
+ <form id='fast_form' class="jClever calc" action="{% url 'ajax-save-order' step=2 %}" method="POST" enctype="multipart/form-data" novalidate>
{% csrf_token %}
<input type="hidden" id="id" name="id" class="common" value="{{ object.id }}">
@@ -203,19 +203,5 @@
</form>
-<script type="application/javascript">
- $("#file_data").change(function() {
- var options = {
- url: '/uploadfile/',
- replaceTarget: true,
- target: $('#fd'),
- success: function(data) {
- /*alert(data);*/
- }
- };
-
- $('#fast_form').ajaxSubmit(options);
- });
-</script>
View
@@ -1,54 +1,54 @@
-
-<div class="order">
- <span>Ваш заказ<small class="close_order"><i class="fa fa-times"></i></small></span>
- <ul class="info">
- <li>
- <span class="foil"><i class="fa {% if templ.foil %}fa-check{% else %}fa-times{% endif %}"></i>Тиснение фольгой</span>
- <span class="emboss"><i class="fa {% if templ.emboss %}fa-check{% else %}fa-times{% endif %}"></i>Эмбоссирование</span>
- <span class="sign"><i class="fa {% if templ.sign %}fa-check{% else %}fa-times{% endif %}"></i>Полоса для подписи</span>
- <span class="indent"><i class="fa {% if templ.indent %}fa-check{% else %}fa-times{% endif %}"></i>Индент печать</span>
- <span class="print_num"><i class="fa {% if templ.print_num %}fa-check{% else %}fa-times{% endif %}"></i>Печатный номер</span>
- <span class="magnet"><i class="fa {% if templ.magnet %}fa-check{% else %}fa-times{% endif %}"></i>Магнитная полоса</span>
- <span class="barcode"><i class="fa {% if templ.barcode %}fa-check{% else %}fa-times{% endif %}"></i>Штрих код</span>
- <span class="scratch"><i class="fa {% if templ.scratch %}fa-check{% else %}fa-times{% endif %}"></i>Скрейтч панель</span>
- <span class="chip"><i class="fa {% if templ.chip %}fa-check{% else %}fa-times{% endif %}"></i>Карта с чипом</span>
- <span class="uv"><i class="fa {% if templ.uv %}fa-check{% else %}fa-times{% endif %}"></i>Печать УФ краской</span>
- </li>
- <li>
- <span><span>Тираж</span>{{ object.draw }}</span>
- <span><span>Цвета</span>{{ color_front }}{% if color_back %}+{{ color_back }}{% else %}{% endif %}</span>
- <span><span>Материал</span>{{ material }}</span>
- <span><span>Ламинция</span>{% if lamination %}{{ lamination }}{% else %}Нет{% endif %}</span>
- <span><span>ФИО</span>{{ object.FIO }}</span>
- <span><span>Телефон</span>{{ object.phone }}</span>
- <span><span>Email</span>{{ object.email }}</span>
- <span class="full_price"><span>Сумма заказа</span>{{ object.cost }} руб.</span>
- </li>
- </ul>
- <ul>
- <li>
- <span>Способ оплаты</span>
- <div class="radio">
- <input type="radio">
- <label>Физическое лицо</label>
- </div>
- <div class="radio">
- <input type="radio">
- <label>Юридическое лицо</label>
- </div>
- </li>
- <li>
- <div class="select">
- <select>
- <option value="1">Безналичный расчёт</option>
- <option value="2">Наличный расчёт</option>
- </select>
- </div>
- <input type="submit" value="Отправить заказ">
- <!--
- <a href="#" class="next_step">Получить документы</a>
- -->
- </li>
- </ul>
-</div>
-
+<form class="jClever">
+ <div class="order">
+ <span>Ваш заказ<small class="close_order"><i class="fa fa-times"></i></small></span>
+ <ul class="info">
+ <li>
+ <span class="foil"><i class="fa {% if templ.foil %}fa-check{% else %}fa-times{% endif %}"></i>Тиснение фольгой</span>
+ <span class="emboss"><i class="fa {% if templ.emboss %}fa-check{% else %}fa-times{% endif %}"></i>Эмбоссирование</span>
+ <span class="sign"><i class="fa {% if templ.sign %}fa-check{% else %}fa-times{% endif %}"></i>Полоса для подписи</span>
+ <span class="indent"><i class="fa {% if templ.indent %}fa-check{% else %}fa-times{% endif %}"></i>Индент печать</span>
+ <span class="print_num"><i class="fa {% if templ.print_num %}fa-check{% else %}fa-times{% endif %}"></i>Печатный номер</span>
+ <span class="magnet"><i class="fa {% if templ.magnet %}fa-check{% else %}fa-times{% endif %}"></i>Магнитная полоса</span>
+ <span class="barcode"><i class="fa {% if templ.barcode %}fa-check{% else %}fa-times{% endif %}"></i>Штрих код</span>
+ <span class="scratch"><i class="fa {% if templ.scratch %}fa-check{% else %}fa-times{% endif %}"></i>Скрейтч панель</span>
+ <span class="chip"><i class="fa {% if templ.chip %}fa-check{% else %}fa-times{% endif %}"></i>Карта с чипом</span>
+ <span class="uv"><i class="fa {% if templ.uv %}fa-check{% else %}fa-times{% endif %}"></i>Печать УФ краской</span>
+ </li>
+ <li>
+ <span><span>Тираж</span>{{ object.draw }}</span>
+ <span><span>Цвета</span>{{ color_front }}{% if color_back %}+{{ color_back }}{% else %}{% endif %}</span>
+ <span><span>Материал</span>{{ material }}</span>
+ <span><span>Ламинция</span>{% if lamination %}{{ lamination }}{% else %}Нет{% endif %}</span>
+ <span><span>ФИО</span>{{ object.FIO }}</span>
+ <span><span>Телефон</span>{{ object.phone }}</span>
+ <span><span>Email</span>{{ object.email }}</span>
+ <span class="full_price"><span>Сумма заказа</span>{{ object.cost }} руб.</span>
+ </li>
+ </ul>
+ <ul>
+ <li>
+ <span>Способ оплаты</span>
+ <div class="radio">
+ <input type="radio">
+ <label>Физическое лицо</label>
+ </div>
+ <div class="radio">
+ <input type="radio">
+ <label>Юридическое лицо</label>
+ </div>
+ </li>
+ <li>
+ <div class="select">
+ <select>
+ <option value="1">Безналичный расчёт</option>
+ <option value="2">Наличный расчёт</option>
+ </select>
+ </div>
+ <input type="submit" value="Отправить заказ">
+ <!--
+ <a href="#" class="next_step">Получить документы</a>
+ -->
+ </li>
+ </ul>
+ </div>
+</form>
View
@@ -924,6 +924,16 @@ body.under_overlay > div.data_wrap > div > .data_container > .data_checking.file
top: -39px !important;
background: url('../images/order_printing.png') no-repeat center center;
}
+.wrap_all > article > section.order > div > div > form > ul.order > li.prompt {
+ position: absolute !important;
+ bottom: 0;
+ left: 30px;
+ color: #fff;
+ font: 10px/30px 'Open Sans', sans-serif;
+ margin: 0 !important;
+ width: auto;
+ height: auto !important;
+}
.wrap_all > article > section.order > div > div.easy_form {
width: 944px;
padding: 0 29px;
@@ -1163,13 +1173,18 @@ body.under_overlay > div.data_wrap > div > .data_container > .data_checking.file
float: left;
margin: -25px 18px 75px 0;
height: 80px;
- position: relative;
}
.wrap_all > article > section.order > div > div.easy_form > form > ul.order > li > label {
display: block;
font: 600 14px/48px 'Open Sans', sans-serif;
color: #fff;
}
+.wrap_all > article > section.order > div > div.easy_form > form > ul.order > li > label > i {
+ font-size: 10px;
+}
+.wrap_all > article > section.order > div > div.easy_form > form > ul.order > li > label.error {
+ background: #22B77E;
+}
.wrap_all > article > section.order > div > div.easy_form > form > ul.order > li > input {
height: 36px;
display: block;
@@ -1818,10 +1833,8 @@ i.error {
border-radius: 6px 6px 6px 0;
background: #22B77E;
opacity: 0.8;
- width: 200px;
color: #fff;
font: 600 14px/14px 'Open Sans', sans-serif;
- top: -10px;
z-index: 99;
}
i.error.show {
View
@@ -1009,6 +1009,16 @@ body {
top: -39px !important;
background: url('../images/order_printing.png') no-repeat center center;
}
+ &.prompt {
+ position: absolute !important;
+ bottom: 0;
+ left: 30px;
+ color: #fff;
+ font: 10px/30px @main_font;
+ margin: 0 !important;
+ width: auto;
+ height: auto !important;
+ }
}
}
}
@@ -1260,11 +1270,19 @@ body {
float: left;
margin: -25px 18px 75px 0;
height: 80px;
- position: relative;
+ //position: relative;
& > label {
display: block;
font: 600 14px/48px @main_font;
color: #fff;
+ & > i {
+ font-size: 10px;
+
+ }
+ &.error {
+ background: #22B77E;
+
+ }
}
& > input {
height: 36px;
@@ -1988,10 +2006,10 @@ i.error {
border-radius: 6px 6px 6px 0;
background: #22B77E;
opacity: 0.8;
- width: 200px;
+ //width: 200px;
color: #fff;
font: 600 14px/14px @main_font;
- top: -10px;
+ //top: -10px;
z-index: 99;
&.show {
display: inline-block;
Oops, something went wrong.

0 comments on commit 3f79909

Please sign in to comment.