diff --git a/assets/css/extra.css b/assets/css/extra.css index c46e7fb..7a994bc 100644 --- a/assets/css/extra.css +++ b/assets/css/extra.css @@ -243,3 +243,7 @@ li a:active .count-tab, li a:hover .count-tab{ .select2-drop { width: 400px !important; } + +.-bold { + font-weight: bold; +} diff --git a/assets/index.js b/assets/index.js index 6cef85c..33f2417 100644 --- a/assets/index.js +++ b/assets/index.js @@ -163,7 +163,8 @@ $('[data-tooltip]').tooltip({ // TODO: Hardcoded: - specSelects[0].select2('container').closest('.col-lg-3').css('display', workTypeId === 2 ? 'none' : 'block') + specSelects[0].select2('container').closest('.-single-spec-select').css('display', workTypeId === 2 ? 'none' : 'block') + specSelects[1].select2('container').closest('.-single-spec-select').find('.-dynamic-label').first().text(workTypeId === 2 ? 'Перечень услуг' : 'Стадия проекта') return rootSpec @@ -196,9 +197,9 @@ $('[data-tooltip]').tooltip({ specSelects[3].select2('enable', Boolean(specLevel3 && !_.isEmpty(specLevel3.children))) specializationTreeHasLevels(specId).then(function(haveLevels) { - specSelects[1].select2('container').css('display', haveLevels.level2 ? 'block' : 'none') - specSelects[2].select2('container').css('display', haveLevels.level3 ? 'block' : 'none') - specSelects[3].select2('container').css('display', haveLevels.level4 ? 'block' : 'none') + specSelects[1].select2('container').closest('.-single-spec-select').css('display', haveLevels.level2 ? 'block' : 'none') + specSelects[2].select2('container').closest('.-single-spec-select').css('display', haveLevels.level3 ? 'block' : 'none') + specSelects[3].select2('container').closest('.-single-spec-select').css('display', haveLevels.level4 ? 'block' : 'none') }) }) } diff --git a/assets/js/chat.js b/assets/js/chat.js index 4f06bea..66235c7 100644 --- a/assets/js/chat.js +++ b/assets/js/chat.js @@ -29,7 +29,7 @@ window.confirm = function (message, callback, caption) { var SocketHandler = function () { domain = domain.replace(':' + port, ''); - var url = 'ws://' + domain + '/chat/' + userId + '/'; + var url = 'ws://' + domain + ':8888/chat/' + userId + '/'; var sock = new WebSocket(url); var intervalId; sock.onopen = function () { diff --git a/projects/admin.py b/projects/admin.py index be22c8a..475af3d 100644 --- a/projects/admin.py +++ b/projects/admin.py @@ -49,7 +49,7 @@ class StageAdmin(admin.ModelAdmin): admin.site.register(Answer) admin.site.register(Arbitration) -admin.site.register(BuildingClassfication,BuildingClassficationAdmin) +admin.site.register(BuildingClassfication, BuildingClassficationAdmin) admin.site.register(Candidate) admin.site.register(ConstructionType) admin.site.register(Order, OrderAdmin) diff --git a/projects/templates/contractor_portfolio_edit.html b/projects/templates/contractor_portfolio_edit.html index 60721ee..ecb308d 100644 --- a/projects/templates/contractor_portfolio_edit.html +++ b/projects/templates/contractor_portfolio_edit.html @@ -53,22 +53,25 @@
-

Специализации

-
+
+
Стадия проекта {{ form.specialization.errors.as_text }}
-
+
+
Стадия проекта
-
+
+
Раздел
-
+
+
Подраздел
diff --git a/projects/templates/customer_project_create.html b/projects/templates/customer_project_create.html index a6c5ec6..58d54c2 100644 --- a/projects/templates/customer_project_create.html +++ b/projects/templates/customer_project_create.html @@ -83,26 +83,24 @@
-
-
Специализация проекта {{ form.specialization.errors.as_text }}
- -
-
+
+
Стадия проекта {{ form.specialization.errors.as_text }}
-
+
+
Стадия проекта
-
+
+
Раздел
-
+
+
Подраздел
diff --git a/projects/templates/customer_project_edit.html b/projects/templates/customer_project_edit.html index 7cbdefe..3012ce0 100644 --- a/projects/templates/customer_project_edit.html +++ b/projects/templates/customer_project_edit.html @@ -93,26 +93,24 @@
-
-
Специализация проекта {{ form.specialization.errors.as_text }}
- -
-
+
+
Стадия проекта {{ form.specialization.errors.as_text }}
-
+
+
Стадия проекта
-
+
+
Раздел
-
+
+
Подраздел
diff --git a/projects/templates/project_filter.html b/projects/templates/project_filter.html index 1527374..4b85d61 100644 --- a/projects/templates/project_filter.html +++ b/projects/templates/project_filter.html @@ -28,21 +28,23 @@
-
Специализации
-
-
+
+
Стадия проекта {{ form.specialization.errors.as_text }}
-
+
+
Стадия проекта
-
+
+
Раздел
-
+
+
Подраздел
diff --git a/specializations/admin.py b/specializations/admin.py index 27e78ed..a1de7fa 100644 --- a/specializations/admin.py +++ b/specializations/admin.py @@ -3,4 +3,8 @@ from mptt.admin import MPTTModelAdmin from .models import Specialization -admin.site.register(Specialization, MPTTModelAdmin) + +class SpecializationAdmin(MPTTModelAdmin): + readonly_fields = ('pk', 'lft', 'rght', 'tree_id', 'level') + +admin.site.register(Specialization, SpecializationAdmin) diff --git a/templates/partials/base.html b/templates/partials/base.html index 9211d34..d57fb43 100644 --- a/templates/partials/base.html +++ b/templates/partials/base.html @@ -86,7 +86,7 @@ if ((queryString.indexOf('/chat') != 0) && (queryString.indexOf('/users/contractor-office/510/work-projects') != 0)) { domain = domain.replace(':' + port, ''); - var url = 'ws://' + domain + '/chat/' + userId + '/'; + var url = 'ws://' + domain + ':8888/chat/' + userId + '/'; var sock = new WebSocket(url); var intervalId; sock.onopen = function () { diff --git a/users/templates/contractor_filter.html b/users/templates/contractor_filter.html index 42ab1b0..96d13c9 100644 --- a/users/templates/contractor_filter.html +++ b/users/templates/contractor_filter.html @@ -38,20 +38,24 @@
-
Специализации
+
-
+
+
Стадия проекта {{ form.specialization.errors.as_text }}
-
+
+
Стадия проекта
-
+
+
Раздел
-
- +
+
Подраздел
+
diff --git a/users/templates/portfolio_create_form.html b/users/templates/portfolio_create_form.html index e3d8a30..d20e4e5 100644 --- a/users/templates/portfolio_create_form.html +++ b/users/templates/portfolio_create_form.html @@ -31,22 +31,25 @@
-

Специализации

-
+
+
Стадия проекта {{ portfolio_form.specialization.errors.as_text }}
-
+
+
Стадия проекта
-
+
+
Раздел
-
+
+
Подраздел
diff --git a/users/templates/worksell_create_form.html b/users/templates/worksell_create_form.html index c294b5c..714526d 100644 --- a/users/templates/worksell_create_form.html +++ b/users/templates/worksell_create_form.html @@ -26,22 +26,25 @@
-

Специализации

-
+
+
Стадия проекта {{ worksell_form.specialization.errors.as_text }}
-
+
+
Стадия проекта
-
+
+
Раздел
-
+
+
Подраздел
diff --git a/work_sell/templates/worksell_edit.html b/work_sell/templates/worksell_edit.html index 5090f35..47b2401 100644 --- a/work_sell/templates/worksell_edit.html +++ b/work_sell/templates/worksell_edit.html @@ -51,23 +51,26 @@
-

Специализации {{ form.specialization.errors.as_text }}

-
+
+
Стадия проекта {{ form.specialization.errors.as_text }}
-
+
+
Стадия проекта
-
+
+
Раздел
-
+
+
Подраздел