From add0b0b23fecbc9ff9a215c790c54e8bc3c32a2e Mon Sep 17 00:00:00 2001 From: fefa4ka Date: Wed, 16 Sep 2015 11:25:27 +0300 Subject: [PATCH] calculator --- app/settings.py | 2 +- djangocms_forms/cms_plugins.py | 3 +- djangocms_forms/forms.py | 1 - .../form_template/default.html | 3 +- ...ff33dd1a58c22e66e4e37cd720b7c89f2799a3.png | Bin 0 -> 9558 bytes ...67bf99cc3d607f34880b7edcd755fbd85e81e4.png | Bin 0 -> 9558 bytes ...cbc0a691a301b2f95d30fa8c19fc9516be7f84.png | Bin 0 -> 9558 bytes ...b0af8fc337db815804a02f0f30af5d572ca1b5.png | Bin 0 -> 9558 bytes ...895441ed550a2829766251d7c07193953c1aab.png | Bin 0 -> 9558 bytes ...c289417c084cc3be67e0ec2f577f520dd83665.png | Bin 0 -> 9558 bytes ...45c4e43106f7ed9aa01717041600d0bca79327.jpg | Bin 0 -> 9273 bytes ...a6dea2aa3250c956443e56013f33f84e384df4.jpg | Bin 0 -> 9273 bytes .../svidetelstvo-na-nmpt.jpg | Bin 0 -> 80052 bytes ...vu_na_tovarnyi_znak_vnesenie_izmenenii.jpg | Bin 0 -> 1041643 bytes .../rf_uvedomlenie_o_vnesenie_izmenenii.jpg | Bin 0 -> 306967 bytes ...skliuchitelnogo_prava_na_tovarnyi_znak.jpg | Bin 0 -> 920917 bytes .../poiski.pdf | Bin 0 -> 80060 bytes ...__16x16_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 411 bytes ...250x350_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 18331 bytes ...__32x32_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 673 bytes ...__48x48_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 1016 bytes ...__64x64_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 1470 bytes ...__16x16_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 382 bytes ...250x353_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 16391 bytes ...__32x32_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 624 bytes ...__48x48_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 920 bytes ...__64x64_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 1306 bytes ...51x2335_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 168843 bytes ...__16x16_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 352 bytes ...250x353_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 8978 bytes ...__32x32_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 508 bytes ...__48x48_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 706 bytes ...__64x64_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 966 bytes ...__16x16_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 381 bytes ...250x353_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 16142 bytes ...__32x32_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 629 bytes ...__48x48_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 925 bytes ...__64x64_q85_crop_subsampling-2_upscale.jpg | Bin 0 -> 1335 bytes zsite/static/less/main.less | 3 ++ zsite/static/less/service.less | 33 ++++++++++++++++++ .../form_template/product_class.html | 22 ++++++++++-- 41 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 media/djangocms_forms/poisk-i-proverka-tovarnogo-znaka-16/Logo-vitek_6cff33dd1a58c22e66e4e37cd720b7c89f2799a3.png create mode 100644 media/djangocms_forms/poisk-i-proverka-tovarnogo-znaka-16/Logo-vitek_a067bf99cc3d607f34880b7edcd755fbd85e81e4.png create mode 100644 media/djangocms_forms/poisk-i-proverka-tovarnogo-znaka-6/Logo-vitek_11cbc0a691a301b2f95d30fa8c19fc9516be7f84.png create mode 100644 media/djangocms_forms/poisk-i-proverka-tovarnogo-znaka-6/Logo-vitek_f7b0af8fc337db815804a02f0f30af5d572ca1b5.png create mode 100644 media/djangocms_forms/poisk-tovarnogo-znaka-6/Logo-vitek_63895441ed550a2829766251d7c07193953c1aab.png create mode 100644 media/djangocms_forms/registratsiia-tovarnogo-znaka-6/Logo-vitek_67c289417c084cc3be67e0ec2f577f520dd83665.png create mode 100644 media/djangocms_forms/registratsiia-tovarnogo-znaka-6/bbk_new_logo_gradient_5d45c4e43106f7ed9aa01717041600d0bca79327.jpg create mode 100644 media/djangocms_forms/registratsiia-tovarnogo-znaka-6/bbk_new_logo_gradient_a3a6dea2aa3250c956443e56013f33f84e384df4.jpg create mode 100644 media/filer_public/07/90/0790cec6-cee7-4b46-842f-d4ef29d665de/svidetelstvo-na-nmpt.jpg create mode 100644 media/filer_public/4b/fa/4bfadaed-10ad-4aa9-b6ce-52cf1170a231/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_vnesenie_izmenenii.jpg create mode 100644 media/filer_public/55/b6/55b619a4-6cd6-4068-8024-0df28a32c54f/rf_uvedomlenie_o_vnesenie_izmenenii.jpg create mode 100644 media/filer_public/7e/e0/7ee08b38-fe46-4b8f-a4b8-a383a433fe67/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_prodlenie_sroka_deistviia_iskliuchitelnogo_prava_na_tovarnyi_znak.jpg create mode 100644 media/filer_public/a3/0e/a30e5a0f-8056-4483-bef3-1602932a9876/poiski.pdf create mode 100644 media/filer_public_thumbnails/filer_public/07/90/0790cec6-cee7-4b46-842f-d4ef29d665de/svidetelstvo-na-nmpt.jpg__16x16_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/07/90/0790cec6-cee7-4b46-842f-d4ef29d665de/svidetelstvo-na-nmpt.jpg__250x350_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/07/90/0790cec6-cee7-4b46-842f-d4ef29d665de/svidetelstvo-na-nmpt.jpg__32x32_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/07/90/0790cec6-cee7-4b46-842f-d4ef29d665de/svidetelstvo-na-nmpt.jpg__48x48_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/07/90/0790cec6-cee7-4b46-842f-d4ef29d665de/svidetelstvo-na-nmpt.jpg__64x64_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/4b/fa/4bfadaed-10ad-4aa9-b6ce-52cf1170a231/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_vnesenie_izmenenii.jpg__16x16_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/4b/fa/4bfadaed-10ad-4aa9-b6ce-52cf1170a231/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_vnesenie_izmenenii.jpg__250x353_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/4b/fa/4bfadaed-10ad-4aa9-b6ce-52cf1170a231/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_vnesenie_izmenenii.jpg__32x32_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/4b/fa/4bfadaed-10ad-4aa9-b6ce-52cf1170a231/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_vnesenie_izmenenii.jpg__48x48_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/4b/fa/4bfadaed-10ad-4aa9-b6ce-52cf1170a231/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_vnesenie_izmenenii.jpg__64x64_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/55/b6/55b619a4-6cd6-4068-8024-0df28a32c54f/rf_uvedomlenie_o_vnesenie_izmenenii.jpg__1651x2335_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/55/b6/55b619a4-6cd6-4068-8024-0df28a32c54f/rf_uvedomlenie_o_vnesenie_izmenenii.jpg__16x16_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/55/b6/55b619a4-6cd6-4068-8024-0df28a32c54f/rf_uvedomlenie_o_vnesenie_izmenenii.jpg__250x353_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/55/b6/55b619a4-6cd6-4068-8024-0df28a32c54f/rf_uvedomlenie_o_vnesenie_izmenenii.jpg__32x32_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/55/b6/55b619a4-6cd6-4068-8024-0df28a32c54f/rf_uvedomlenie_o_vnesenie_izmenenii.jpg__48x48_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/55/b6/55b619a4-6cd6-4068-8024-0df28a32c54f/rf_uvedomlenie_o_vnesenie_izmenenii.jpg__64x64_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/7e/e0/7ee08b38-fe46-4b8f-a4b8-a383a433fe67/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_prodlenie_sroka_deistviia_iskliuchitelnogo_prava_na_tovarnyi_znak.jpg__16x16_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/7e/e0/7ee08b38-fe46-4b8f-a4b8-a383a433fe67/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_prodlenie_sroka_deistviia_iskliuchitelnogo_prava_na_tovarnyi_znak.jpg__250x353_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/7e/e0/7ee08b38-fe46-4b8f-a4b8-a383a433fe67/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_prodlenie_sroka_deistviia_iskliuchitelnogo_prava_na_tovarnyi_znak.jpg__32x32_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/7e/e0/7ee08b38-fe46-4b8f-a4b8-a383a433fe67/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_prodlenie_sroka_deistviia_iskliuchitelnogo_prava_na_tovarnyi_znak.jpg__48x48_q85_crop_subsampling-2_upscale.jpg create mode 100644 media/filer_public_thumbnails/filer_public/7e/e0/7ee08b38-fe46-4b8f-a4b8-a383a433fe67/rf_prilozhenie_k_svidetelsvu_na_tovarnyi_znak_prodlenie_sroka_deistviia_iskliuchitelnogo_prava_na_tovarnyi_znak.jpg__64x64_q85_crop_subsampling-2_upscale.jpg diff --git a/app/settings.py b/app/settings.py index 0e527e3..a0c5394 100644 --- a/app/settings.py +++ b/app/settings.py @@ -245,7 +245,7 @@ INSTALLED_APPS = ( 'blog', 'aldryn_bootstrap3', -'debug_toolbar', +# 'debug_toolbar', 'djangocms_forms', 'smartsnippets', ) diff --git a/djangocms_forms/cms_plugins.py b/djangocms_forms/cms_plugins.py index 247c404..32dcbad 100644 --- a/djangocms_forms/cms_plugins.py +++ b/djangocms_forms/cms_plugins.py @@ -106,6 +106,7 @@ class FormPlugin(CMSPluginBase): form_slug = "form-%d" % instance.plugin_reference.id submission_instance = instance + if request.session.get(form_slug, False): try: submission_instance = FormSubmission.objects.get(id=request.session.get(form_slug, False)) @@ -121,7 +122,7 @@ class FormPlugin(CMSPluginBase): 'form': form, 'results': submission_instance }) - + return context diff --git a/djangocms_forms/forms.py b/djangocms_forms/forms.py index 7e9c5f8..c76569c 100644 --- a/djangocms_forms/forms.py +++ b/djangocms_forms/forms.py @@ -268,7 +268,6 @@ class FormBuilder(forms.Form): # Удаляем сессию, если это последний шаг. Признак последнего шага for data in form_data: if data['name'] == 'end_session': - request.session[form_slug] = None request.session['last-completed-form-id'] = form_instance.id return except (FormSubmission.DoesNotExist): diff --git a/djangocms_forms/templates/djangocms_forms/form_template/default.html b/djangocms_forms/templates/djangocms_forms/form_template/default.html index d780025..4e3520f 100644 --- a/djangocms_forms/templates/djangocms_forms/form_template/default.html +++ b/djangocms_forms/templates/djangocms_forms/form_template/default.html @@ -1,6 +1,7 @@ {% load cms_tags djangocms_forms_tags i18n sekizai_tags staticfiles %} @@ -120,11 +131,18 @@ var form = { scope = angular.element($('.bill')).scope(); if(count == 0) { - count = 1; + if(scope.classes > 0) { + count = scope.classes; + } else { + count = 1; + } } scope.$apply(function () { scope.classes = count; + if(scope.classes > 5) { + scope.extra_classes = scope.classes - 5; + } }); }; });