expo-16 company cabinet not tested

remotes/origin/1203
pavel 11 years ago
parent 5322a9ef7c
commit ad12fcae21
  1. 96
      templates/client/includes/accounts/current_user.html
  2. 711
      templates/client/includes/company/company_edit.html
  3. 15
      templates/client/static_client/css/main.css
  4. 2
      templates/client/static_client/css_min/main.min.css
  5. 140
      templates/client/static_client/js/_modules/page.company.js
  6. 6
      templates/client/static_client/js/_modules/page.profile.js
  7. 2
      templates/client/static_client/js_min/_modules/page.company.min.js

@ -108,15 +108,15 @@
{# END country and city #}
{# name #}
<div class="form-item-wrap">
<div class="form-item-wrap"> <!-- 1 -->
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title="">{% trans 'Указать' %}</a>
<div class="add_link_text_text">{% trans 'имя и фамилию' %}<b>+10</b></div>
</div>
<div class="i-title p-editable editable-wrap">
<span id="static-name-value" class="static-value">
{{ name_form.get_full_name }}
</span>
<div class="i-title p-editable editable-wrap"> <!-- 2 -->
<span id="static-name-value" class="static-value"><!-- 3 -->
{{ name_form.get_full_name }}
</span>
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
@ -207,50 +207,50 @@
<div class="i-contacts clearfix">
<div class="ic-buttons dd_width_4">
<div class="form-item-wrap">
<div class="form-item-wrap"><!-- 1 -->
<div class="p-editable editable-wrap social">
<div class="i-descr add_link_text add_link_text_medium">
<a class="e-btn no-refresh social" href="#" title="">{% trans 'Добавить' %}</a>
<ul class="soc-media-buttons soc-media-buttons1">
<li>
{% if social_form.facebook.value %}
<a href="{{ social_form.facebook.value }}" target="_blank">
<img id="img-facebook" src="{% static 'client/img/soc-medias/sm-icon-fb.png' %}" title="Facebook" alt="Facebook" />
</a>
{% else %}
<img id="img-facebook" src="{% static 'client/img/soc-medias/sm-icon-fb_hover.png' %}" title="Facebook" alt="Facebook" />
{% endif %}
</li>
<li>
{% if social_form.linkedin.value %}
<a href="{{ social_form.linkedin.value }}" target="_blank">
<img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin.png' %}" title="LinkedIn" alt="LinkedIn" />
</a>
{% else %}
<img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin_hover.png' %}" title="LinkedIn" alt="LinkedIn" />
{% endif %}
<li>
{% if social_form.vk.value %}
<a href="{{ social_form.vk.value }}" target="_blank">
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk.png' %}" title="В контакте" alt="В контакте" />
</a>
{% else %}
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk_hover.png' %}" title="В контакте" alt="В контакте" />
{% endif %}
</li>
<li>
{% if social_form.twitter.value %}
<a href="{{ social_form.twitter.value }}" target="_blank">
<img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit.png' %}" title="Twitter" alt="Twitter" />
</a>
{% else %}
<img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit_hover.png' %}" title="Twitter" alt="Twitter" />
{% endif %}
</li></li>
</ul>
<li>
{% if social_form.facebook.value %}
<a href="{{ social_form.facebook.value }}" target="_blank">
<img id="img-facebook" src="{% static 'client/img/soc-medias/sm-icon-fb.png' %}" title="Facebook" alt="Facebook" />
</a>
{% else %}
<img id="img-facebook" src="{% static 'client/img/soc-medias/sm-icon-fb_hover.png' %}" title="Facebook" alt="Facebook" />
{% endif %}
</li>
<li>
{% if social_form.linkedin.value %}
<a href="{{ social_form.linkedin.value }}" target="_blank">
<img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin.png' %}" title="LinkedIn" alt="LinkedIn" />
</a>
{% else %}
<img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin_hover.png' %}" title="LinkedIn" alt="LinkedIn" />
{% endif %}
<li>
{% if social_form.vk.value %}
<a href="{{ social_form.vk.value }}" target="_blank">
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk.png' %}" title="В контакте" alt="В контакте" />
</a>
{% else %}
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk_hover.png' %}" title="В контакте" alt="В контакте" />
{% endif %}
</li>
<li>
{% if social_form.twitter.value %}
<a href="{{ social_form.twitter.value }}" target="_blank">
<img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit.png' %}" title="Twitter" alt="Twitter" />
</a>
{% else %}
<img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit_hover.png' %}" title="Twitter" alt="Twitter" />
{% endif %}
</li></li>
</ul>
<div class="add_link_text_text"><b>{% trans '+5 за каждый' %}</b></div>
</div>
@ -308,13 +308,15 @@
</div>
{# contacts #}
<div class="ic-links dd_width_5">
<div class="form-item-wrap">
<div class="form-item-wrap"> <!-- 1 -->
<div class="i-descr add_link_text add_link_text_medium">
<a class="e-btn" href="#" title="">{% trans 'Добавить' %}</a>
<div class="add_link_text_text">{% trans 'номер телефона' %} <b>+15</b></div>
</div>
<div class="ic-tel p-editable editable-wrap hidden">
<span id="static-phone-value" class="static-value">{{ phone_form.phone.value|phone }}</span>
<div class="ic-tel p-editable editable-wrap hidden"> <!-- 2 -->
<span id="static-phone-value" class="static-value"> <!-- 3 -->
{{ phone_form.phone.value|phone }}
</span>
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">

@ -19,21 +19,8 @@
<div class="i-info">
<header>
<div class="{% if home_form.instance.country and home_form.instance.city %}i-place p-editable{% else %}i-place p-editable add_link_text add_link_text_medium{% endif %}">
{% if home_form.instance.country and home_form.instance.city %}
<span>
{% else %}
<span style="display:none;">
{% endif %}
<a href="#" id="static-home-country">{{ home_form.instance.country }}</a>
</span>
{% if home_form.instance.country and home_form.instance.city %}
<span>
{% else %}
<span style="display:none;">
{% endif %}
, <a href="#" id="static-home-city">{{ home_form.instance.city }}</a>
</span>
<span><a href="#" id="static-home-country">{{ home_form.instance.country }}</a></span>
,<span><a href="#" id="static-home-city">{{ home_form.instance.city }}</a></span>
<div class="edit-wrap e-left">
{% if home_form.instance.country and home_form.instance.city %}
@ -80,74 +67,76 @@
{{ company.get_permanent_url }}
</a>
</div>
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title="">{% trans 'Указать' %}</a>
<div class="add_link_text_text">{% trans 'название компании' %}<b>+10</b></div>
</div>
<div class="i-title p-editable editable-wrap hidden">
<span id="static-name-value" class="static-value">{{ name_form.name.value }}</span>
<div class="i-title p-editable p-editable">
<span id="static-name-value">{{ name_form.name.value }}</span>
<div class="edit-wrap">
<a class="e-btn" href="#">редактировать</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="name_form" action="/company/update/name/{{ company.url }}/" method="post">{% csrf_token %}
<div class="edit-wrap">
<a class="e-btn" href="#">редактировать</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="name_form" action="/company/update/name/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="ef-body">
<div class="epfl">
<label>{{ name_form.name.label }}</label>
<div class="epf-field">
{{ name_form.name }}
</div>
</div>
<div class="epfl">
<label>{{ name_form.name.label }}</label>
<div class="epf-field">
{{ name_form.name }}
</div>
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
</div>
</header>
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">краткое описание компании <b>+20</b></div>
</div>
<div class="i-position p-editable editable-wrap hidden">
<span id="static-spec-value" class="static-value">{{ spec_form.specialization.value }}</span>
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="spec_form" action="/company/update/specialization/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epf-field">
<label>{{ spec_form.specialization.label }}</label>
<div class="epf-field">
{{ spec_form.specialization }}
</div>
</div>
<div class="{% if spec_form.specialization.value %}i-position p-editable{% else %}i-descr p-editable add_link_text add_link_text_top{% endif %}">
{% if spec_form.specialization.value %}
<span id="static-spec-value">{{ spec_form.specialization.value }}</span>
{% endif %}
<div class="edit-wrap">
{% if spec_form.specialization.value %}
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
{% else %}
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">краткое описание компании <b>+20</b></div>
{% endif %}
<div class="e-form">
<form class="clearfix update-profile-form" id="spec_form" action="/company/update/specialization/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epf-field">
<label>{{ spec_form.specialization.label }}</label>
<div class="epf-field">
{{ spec_form.specialization }}
</div>
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
</div>
{% with themes=company.theme.all %}
<div class="i-area" id="theme-inf" data-theme="{% for th in themes %}{{ th.id }},{% endfor %}">
{% for th in themes %}
@ -157,42 +146,37 @@
{% endwith %}
<hr />
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">адрес компании <b>+15</b></div>
</div>
<div class="ic-tel p-editable editable-wrap hidden">
<span id="static-address-value" class="static-value">{{ address_form.address_inf.value }}</span>
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="address_form" action="/company/update/address/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epf-field">
<label>{{ address_form.address_inf.label }}</label>
{{ address_form.address_inf }}
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
<div class="{% if address_form.address_inf.value %}ic-tel p-editable{% else %}p-editable add_link_text add_link_text_medium{% endif %}">
{% if address_form.address_inf.value %}
<span id="static-address-value">{{ address_form.address_inf.value }}</span>
{% endif %}
<div class="edit-wrap">
{% if address_form.address_inf.value %}
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
{% else %}
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">адрес компании <b>+15</b></div>
{% endif %}
<div class="e-form">
<form class="clearfix update-profile-form" id="address_form" action="/company/update/address/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epf-field">
<label>{{ address_form.address_inf.label }}</label>
{{ address_form.address_inf }}
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
</div>
</div>
<hr />
@ -211,212 +195,212 @@
<div class="ic-buttons ic-buttons_pos dd_width_4">
<div class="ic-buttons_text">Добавить профили в соц.сетях:</div>
<div class="form-item-wrap">
<div class="p-editable editable-wrap social">
<div class="p-editable add_link_text add_link_text_medium soc-media-indent">
<div class="edit-wrap">
<a class="e-btn" href="#" title="">Добавить</a>
<div class="i-descr add_link_text add_link_text_medium soc-media-indent">
<ul class="soc-media-buttons soc-media-buttons1">
<li>
{% if social_form.facebook.value %}
<a class="e-btn no-refresh social" href="#" title="">{% trans 'Добавить' %}</a>
<ul class="soc-media-buttons soc-media-buttons1">
<li>
{% if social_form.facebook.value %}
<a href="{{ social_form.facebook.value }}" target="_blank">
<img id="img-facebook" src="{% static 'client/img/soc-medias/sm-icon-fb.png' %}" title="Facebook" alt="Facebook" />
</a>
{% else %}
<img id="img-facebook" src="{% static 'client/img/soc-medias/icon-fb_hover.png' %}" title="Facebook" alt="Facebook" />
{% endif %}
</li>
<li>
{% if social_form.linkedin.value %}
<a href="{{ social_form.linkedin.value }}" target="_blank">
<img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin.png' %}" title="LinkedIn" alt="LinkedIn" />
</a>
{% else %}
<img id="img-linkedin" src="{% static 'client/img/soc-medias/icon-lin_hover.png' %}" title="LinkedIn" alt="LinkedIn" />
{% endif %}
<li>
{% if social_form.vk.value %}
<a href="{{ social_form.vk.value }}" target="_blank">
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk.png' %}" title="В контакте" alt="В контакте" />
</a>
{% else %}
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk_hover.png' %}" title="В контакте" alt="В контакте" />
{% endif %}
</li>
<li>
{% if social_form.twitter.value %}
{% else %}
<img id="img-facebook" src="{% static 'client/img/soc-medias/icon-fb_hover.png' %}" title="Facebook" alt="Facebook" />
{% endif %}
</li>
<li>
{% if social_form.linkedin.value %}
<a href="{{ social_form.linkedin.value }}" target="_blank">
<img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin.png' %}" title="LinkedIn" alt="LinkedIn" />
</a>
{% else %}
<img id="img-linkedin" src="{% static 'client/img/soc-medias/icon-lin_hover.png' %}" title="LinkedIn" alt="LinkedIn" />
{% endif %}
<li>
{% if social_form.vk.value %}
<a href="{{ social_form.vk.value }}" target="_blank">
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk.png' %}" title="В контакте" alt="В контакте" />
</a>
{% else %}
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk_hover.png' %}" title="В контакте" alt="В контакте" />
{% endif %}
</li>
<li>
{% if social_form.twitter.value %}
<a href="{{ social_form.twitter.value }}" target="_blank">
<img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit.png' %}" title="Twitter" alt="Twitter" />
</a>
{% else %}
<img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit_hover.png' %}" title="Twitter" alt="Twitter" />
{% endif %}
</li>
{% else %}
<img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit_hover.png' %}" title="Twitter" alt="Twitter" />
{% endif %}
</li>
</ul>
</ul>
<div class="add_link_text_text"><b>+5 за каждый</b></div>
<div class="e-form">
<div class="add_link_text_text"><b>{% trans '+5 за каждый' %}</b></div>
</div>
<div class="edit-wrap">
<div class="e-form">
<form class="clearfix update-profile-form" id="social_form" action="/company/update/social/{{ company.url }}/" method="post">{% csrf_token %}
<form class="clearfix update-profile-form" id="social_form" action="/company/update/social/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="ef-body">
<div class="epfl">
<label><img src="{% static 'client/img/soc-medias/sm-icon-fb-w.png' %}" title="Facebook" alt="Facebook" /> {{ social_form.facebook.label }}</label>
<div class="epf-field">
{{ social_form.facebook }}
<div class="epfl">
<label><img src="{% static 'client/img/soc-medias/sm-icon-fb-w.png' %}" title="Facebook" alt="Facebook" /> {{ social_form.facebook.label }}</label>
<div class="epf-field">
{{ social_form.facebook }}
</div>
</div>
</div>
<div class="epfl">
<label><img src="{% static 'client/img/soc-medias/sm-icon-lin-w.png' %}" title="LinkedIn" alt="LinkedIn" /> {{ social_form.linkedin.label }}</label>
<div class="epf-field">
{{ social_form.linkedin }}
</div>
</div>
<div class="epfl">
<label><img src="{% static 'client/img/soc-medias/sm-icon-lin-w.png' %}" title="LinkedIn" alt="LinkedIn" /> {{ social_form.linkedin.label }}</label>
<div class="epf-field">
{{ social_form.linkedin }}
</div>
</div>
<div class="epfl">
<label><img src="{% static 'client/img/soc-medias/sm-icon-vk-w.png' %}" title="В контакте" alt="В контакте" /> {{ social_form.vk.label }}</label>
<div class="epf-field">
{{ social_form.vk }}
<div class="epfl">
<label><img src="{% static 'client/img/soc-medias/sm-icon-vk-w.png' %}" title="В контакте" alt="В контакте" /> {{ social_form.vk.label }}</label>
<div class="epf-field">
{{ social_form.vk }}
</div>
</div>
</div>
<div class="epfl">
<label><img src="{% static 'client/img/soc-medias/sm-icon-twit-w.png' %}" title="Twitter" alt="Twitter" /> {{ social_form.twitter.label }}</label>
<div class="epf-field">
{{ social_form.twitter }}
<div class="epfl">
<label><img src="{% static 'client/img/soc-medias/sm-icon-twit-w.png' %}" title="Twitter" alt="Twitter" /> {{ social_form.twitter.label }}</label>
<div class="epf-field">
{{ social_form.twitter }}
</div>
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
</div>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
</div>
<div class="ic-links ic-links_indent dd_width_5">
<div class="{% if phone_form.phone.value %}ic-tel p-editable{% else %}p-editable add_link_text add_link_text_medium{% endif %}">
{% if phone_form.phone.value %}
<span id="static-phone-value">{{ phone_form.phone.value|phone }}</span>
{% endif %}
<div class="edit-wrap">
{% if phone_form.phone.value %}
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
{% else %}
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">номер телефона <b>+15</b></div>
{% endif %}
<div class="e-form">
<form class="clearfix update-profile-form" id="phone_form" action="/company/update/phone/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epfl">
<label>{{ phone_form.phone.label }}</label>
<div class="epf-field">
{{ phone_form.phone }}
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text add_link_text_medium">
<a class="e-btn" href="#" title="">{% trans 'Добавить' %}</a>
<div class="add_link_text_text">{% trans 'номер телефона' %} <b>+15</b></div>
</div>
<div class="ic-tel p-editable editable-wrap hidden">
<span id="static-phone-value" class="static-value">{{ phone_form.phone.value|phone }}</span>
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="phone_form" action="/company/update/phone/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epfl">
<label>{{ phone_form.phone.label }}</label>
<div class="epf-field">
{{ phone_form.phone }}
</div>
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
<div class="{% if email_form.email.value %}ic-tel p-editable{% else %}p-editable add_link_text add_link_text_medium{% endif %}">
{% if email_form.email.value %}
<div class="ic-mail add_indent ">
<a id="static-email-value" class="icon-mail" href="mailto:{{ email_form.email.value }}">{{ email_form.email.value }}</a>
</div>
{% endif %}
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
</div>
<div class="edit-wrap">
{% if email_form.email.value %}
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
{% else %}
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">email <b>+15</b></div>
{% endif %}
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text add_link_text_medium">
<a class="e-btn" href="#" title="">{% trans 'Добавить' %}</a>
<div class="add_link_text_text">{% trans 'email' %} <b>+15</b></div>
</div>
<div class="ic-tel p-editable editable-wrap hidden">
<div class="e-form">
<form class="clearfix update-profile-form" id="email_form" action="/company/update/email/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="ic-mail add_indent ">
<a id="static-email-value" class="icon-mail static-value" href="mailto:{{ email_form.email.value }}">{{ email_form.email.value }}</a>
</div>
<div class="epfl">
<label>{{ email_form.email.label }}</label>
<div class="epf-field">
{{ email_form.email }}
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="email_form" action="/company/update/email/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epfl">
<label>{{ email_form.email.label }}</label>
<div class="epf-field">
{{ email_form.email }}
</div>
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
</div>
<div class="{% if web_page_form.web_page.value %}ic-site p-editable{% else %}ic-site p-editable add_link_text add_link_text_medium{% endif %}">
{% if web_page_form.web_page.value %}
<a id="static-web-page-value" class="icon-ext-link" href="{% if web_page_form.web_page.value %}{{ web_page_form.web_page.value }}{% else %}#{% endif %}" target="_blank">
{% if web_page_form.web_page.value %}
{{ web_page_form.web_page.value }}
{% endif %}
</a>
{% endif %}
<div class="edit-wrap">
{% if web_page_form.web_page.value %}
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
{% else %}
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">сайт <b>+5</b></div>
{% endif %}
<div class="e-form">
<form class="clearfix update-profile-form" id="web_page_form" action="/company/update/web-page/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epfl">
<label>{{ web_page_form.web_page.label }}</label>
<div class="epf-field">
{{ web_page_form.web_page }}
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text add_link_text_medium">
<a class="e-btn" href="#" title="">{% trans 'Добавить' %}</a>
<div class="add_link_text_text">{% trans 'сайт' %} <b>+5</b></div>
</div>
<div class="ic-site p-editable editable-wrap hidden">
<a id="static-web-page-value" class="icon-ext-link static-value" href="{{ web_page_form.web_page.value }}" target="_blank">
{{ web_page_form.web_page.value }}
</a>
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="web_page_form" action="/company/update/web-page/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epfl">
<label>{{ web_page_form.web_page.label }}</label>
<div class="epf-field">
{{ web_page_form.web_page }}
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
</div>
</div>
@ -426,112 +410,118 @@
<div class="i-additional">
<div class="ia-title">Дополнительная информация</div>
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">год основания <b>+15</b></div>
</div>
<div class="p-editable ic-tel ic-links editable-wrap hidden">
<div class="p-editable {% if found_form.foundation.value %}ic-tel ic-links {% else %}add_link_text add_link_text_medium{% endif %}">
<p id="static-found-value" class="static-value">Год основания: <span>{{ found_form.foundation.value }}</span></p>
<p id="static-found-value" style="{% if found_form.foundation.value == '' or found_form.foundation.value == None %}display:none;{% endif %}">Год основания: <span>{{ found_form.foundation.value }}</span></p>
<div class="edit-wrap">
<div class="edit-wrap">
<a class="e-btn" href="#" >{% trans 'редактировать' %}</a>
<a class="e-btn" href="#" >{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="found_form" action="/company/update/foundation/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div id="static-foundation" style="{% if found_form.foundation.value %} display:none;{% endif %}">
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">год основания <b>+15</b></div>
</div>
<div class="e-form">
<form class="clearfix update-profile-form" id="found_form" action="/company/update/foundation/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epfl">
<label>{{ found_form.foundation.label }}</label>
<div class="epf-field">
{{ found_form.foundation }}
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<div class="epfl">
<label>{{ found_form.foundation.label }}</label>
<div class="epf-field">
{{ found_form.foundation }}
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
</div>
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">к-во сотрудников <b>+15</b></div>
</div>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
<div class="p-editable ic-tel ic-links editable-wrap hidden">
<div class="p-editable {% if staff_form.staff_number.value %}ic-tel ic-links {% else %}add_link_text add_link_text_medium{% endif %}">
<p id="static-staff_number-value" class="static-value">к-во сотрудников: <span id="static-staff-value">{{ staff_form.staff_number.value }}</span></p>
<p id="static-staff_number-value" style="{% if staff_form.staff_number.value == '' or staff_form.staff_number.value == None %}display:none;{% endif %}">к-во сотрудников: <span id="static-staff-value">{{ staff_form.staff_number.value }}</span></p>
<div class="edit-wrap">
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="staff_form" action="/company/update/staff/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="epfl">
<label>{{ staff_form.staff_number.label }}</label>
<div class="epf-field">
{{ staff_form.staff_number }}
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<div id="static-staff_number" style="{% if staff_form.staff_number.value %} display:none;{% endif %}">
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">к-во сотрудников <b>+15</b></div>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
</div>
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">подробное описание компании<b>+15</b></div>
</div>
<div class="e-form">
<form class="clearfix update-profile-form" id="staff_form" action="/company/update/staff/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epfl">
<label>{{ staff_form.staff_number.label }}</label>
<div class="epf-field">
{{ staff_form.staff_number }}
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
<div class="p-editable {% if description_form.description.value %}ic-tel {% else %}add_link_text add_link_text_medium{% endif %}">
<div class="p-editable ic-tel editable-wrap hidden">
<span id="static-description-value" style="{% if description_form.description.value == '' or description_form.description.value == None %}display:none;{% endif %}">{{ description_form.description.value }}</span>
<span id="static-description-value" class="static-value">{{ description_form.description.value }}</span>
<div class="edit-wrap">
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div id="static-description" style="{% if description_form.description.value %} display:none;{% endif %}">
<a class="e-btn" href="#" title="">Добавить</a>
<div class="add_link_text_text">подробное описание компании<b>+15</b></div>
</div>
<div class="e-form">
<form class="clearfix update-profile-form" id="description_form" action="/company/update/description/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="e-form">
<form class="clearfix update-profile-form" id="description_form" action="/company/update/description/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="epfl">
<label>{{ description_form.description.label }}</label>
<div class="epf-field">
{{ description_form.description }}
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
<div class="epfl">
<label>{{ description_form.description.label }}</label>
<div class="epf-field">
{{ description_form.description }}
</div>
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">Сохранить</button>
</div>
</form>
<a class="ef-close" href="#">закрыть</a>
</div>
</div>
</div>
</div>
</div>
@ -558,6 +548,15 @@
EXPO.company.init({
// class selector to identify required forms on page
updateFormClass:'update-profile-form',
// text part that is added to form id to designate its wrapper container
formWrapperClass:'form-item-wrap',
formCurrentClass:'pe-current',
staticValueClass:'static-value',
descriptionClass:'i-descr',
editableClass:'editable-wrap',
closeButtonClass:'ef-close',
editButtonClass:'e-btn',
// text and paths for dynamically rendered selectboxes
selectBox:[
{id:'id_country'},

@ -5,7 +5,6 @@ select,
textarea {
color: #222;
}
body {
font-size: 1em;
line-height: 1.4;
@ -11897,7 +11896,7 @@ hr + .rq-note {
.i-info header { position: relative;}
.site_link { text-align: right; position: absolute; right: 0; width: 201px; top: 41px; font-size: 15px !important; color: #ff6600 !important;font-family:'dindisplay_pro', sans-serif; font-weight: 500; }
.site_link { text-align: right; position: absolute; z-index: 1; right: 0; width: 201px; top: 41px; font-size: 15px !important; color: #ff6600 !important;font-family:'dindisplay_pro', sans-serif; font-weight: 500; }
.site_link a { text-decoration: none !important;color: #ff6600 !important;}
.site_link a:before { content:''; width: 16px; height: 16px; background: url(../img/sprites.png) -426px -73px; display: inline-block; margin: 0 5px 0 0; position: relative; top: 4px;}
@ -12032,12 +12031,12 @@ hr + .rq-note {
margin-top: 0;
}
button.gray{
background: #dbdbdb; /* Old browsers */
background: -moz-linear-gradient(top, #dbdbdb 0%, #bdbdbd 100%); /* FF3.6+ */
background: #dbdbdb; /* Old browsers */ /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dbdbdb), color-stop(100%,#bdbdbd)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #dbdbdb 0%,#bdbdbd 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #dbdbdb 0%,#bdbdbd 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #dbdbdb 0%,#bdbdbd 100%); /* IE10+ */
background: -o-linear-gradient(top, #dbdbdb 0%,#bdbdbd 100%); /* Opera 11.10+ */ /* IE10+ */
background: -webkit-linear-gradient(top, #dbdbdb 0%, #bdbdbd 100%);
background: -o-linear-gradient(top, #dbdbdb 0%, #bdbdbd 100%);
background: linear-gradient(to bottom, #dbdbdb 0%,#bdbdbd 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dbdbdb', endColorstr='#bdbdbd',GradientType=0 ); /* IE6-9 */
@ -12341,7 +12340,6 @@ hr + .rq-note {
.mp-search .search-form-wrap .search-line .sf-field-wrap{
display: inline-block;
word-spacing: normal;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
@ -12716,7 +12714,6 @@ hr + .rq-note {
background-color: #CACACA;
}
.no-events .c-event .ce-wrap{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
height: 60px;
@ -12771,7 +12768,6 @@ hr + .rq-note {
}
.my-companies-block .company{
display: block;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 25%;
@ -12789,7 +12785,6 @@ hr + .rq-note {
display: block;
width: 100%;
height: 180px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-radius: 4px;

File diff suppressed because one or more lines are too long

@ -9,12 +9,12 @@ if (EXPO.company){
EXPO.company = (function() {
// variables
var that = {};
that.settings = {
that.opt = {
updateFormClass:'update-profile-form'
}; //default module setting
that.lang ={};
//dependences
var $waiter;
//private
// factory for on page form objects
function Forms(){}
@ -66,6 +66,22 @@ if (EXPO.company){
};
}
},
/**
* refreshes form state: if value was entered by user, then there will be label with rhis value
* or there will be prompt to enter value
* @function
* @public
*/
refreshState: function () {
if($.trim( this.$staticValue.text()) == '' && this.$wrapper.length && this.refrashable){
this.$editable.addClass('hidden');
this.$description.removeClass('hidden');
}else if(this.$wrapper.length && this.refrashable){
this.$editable.removeClass('hidden');
this.$description.addClass('hidden');
}
}
};
Forms.factory = function (type, ajaxpath) {
@ -90,6 +106,8 @@ if (EXPO.company){
if (data.success){
$('#static-name-value').text($('#id_name').val());
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
this.ajaxPath = path;
@ -100,6 +118,8 @@ if (EXPO.company){
if (data.success){
$('#static-spec-value').text($('#id_specialization').val());
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
this.ajaxPath = path;
@ -110,6 +130,8 @@ if (EXPO.company){
if (data.success){
$('#static-address-value').text($('#id_address_inf').val());
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
this.ajaxPath = path;
@ -120,6 +142,8 @@ if (EXPO.company){
if (data.success){
$('#static-address-value').text($('#id_address_inf').val());
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
this.ajaxPath = path;
@ -167,9 +191,8 @@ if (EXPO.company){
this.pullHandler = function (data) {
if (data.success){
$('#static-phone-value').text($('#id_phone')[0].value);
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
this.ajaxPath = path;
@ -181,8 +204,9 @@ if (EXPO.company){
if (data.success){
mailValue = $('#id_email').val();
$('#static-email-value').attr('href', 'mailto:'+mailValue).text(mailValue);
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
@ -196,6 +220,8 @@ if (EXPO.company){
userLink = $('#id_web_page').val();
$('#static-web-page-value').attr('href',userLink).text(userLink);
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
@ -210,6 +236,8 @@ if (EXPO.company){
$('#static-home-country').text(country);
$('#static-home-city').text(city);
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
this.ajaxPath = path;
@ -240,6 +268,7 @@ if (EXPO.company){
$staticBox.hide();
}
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
@ -271,6 +300,7 @@ if (EXPO.company){
$staticBox.hide();
}
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
@ -301,6 +331,7 @@ if (EXPO.company){
$staticBox.hide();
}
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
$input.on('keypress', function (e) {
@ -319,9 +350,11 @@ if (EXPO.company){
// methods
//инициализация общих свойств
that.init = function(options) {
// todo: убрать одновременное открытие форм
$.extend(this.lang, options.lang);
options.lang = null;
$.extend(this.settings, options);
$.extend(this.opt, options);
var self = this,
initMaskedInput = function (inputId) {
var maskList = $.masksSort($.masksLoad("/static/client/js/plugins/inputmask/phone-codes.json"), ['#'], /[0-9]|#/, "mask"),
@ -333,7 +366,6 @@ if (EXPO.company){
cardinality: 1
}
},
//clearIncomplete: true,
showMaskOnHover: false,
autoUnmask: true
},
@ -342,34 +374,37 @@ if (EXPO.company){
list: maskList,
listKey: "mask",
onMaskChange: function() {
$(this).attr("placeholder", $(this).inputmask("getemptymask"));
$(this).attr("placeholder", '+_(___)___-__-__');
}
},
selector = '#'+inputId;
$(selector).attr('placeholder', '+_(___)___-__-__');
$(selector).inputmasks(maskOpts);
};
this.forms = {};
$(function () {
//start of document.ready
$waiter = $('#wait-ajax').css({'z-index': '8012'});
/**
* <selectbox> styling with 3-rd party libs
*/
$('#'+self.settings.selectBox[0].id).select2({
$('#'+self.opt.selectBox[0].id).select2({
width: 'element'
});
$('#'+self.settings.selectBox[1].id).select2({
placeholder: self.settings.selectBox[1].placeHolder,
$('#'+self.opt.selectBox[1].id).select2({
placeholder: self.opt.selectBox[1].placeHolder,
width: 'element',
ajax: {
url: self.settings.selectBox[1].path,
url: self.opt.selectBox[1].path,
dataType: "json",
quietMillis: 200,
data: function(term, page, country){
var country = $('#'+self.settings.selectBox[0].id).val()
var country = $('#'+self.opt.selectBox[0].id).val()
return {term: term,
page: page,
country: country};
@ -395,14 +430,14 @@ if (EXPO.company){
});
$('#'+self.settings.selectBox[2].id).select2({
placeholder: self.settings.selectBox[2].placeholder,
$('#'+self.opt.selectBox[2].id).select2({
placeholder: self.opt.selectBox[2].placeholder,
width: '368px',
multiple: true,
maximumSelectionSize: 5,
ajax: {
url: self.settings.selectBox[2].path,
url: self.opt.selectBox[2].path,
dataType: "json",
quietMillis: 200,
@ -433,23 +468,82 @@ if (EXPO.company){
});
// make mask on phone field input
initMaskedInput(self.settings.phoneBox);
initMaskedInput(self.opt.phoneBox);
//forms init
$('.'+self.settings.updateFormClass).each(function () {
$('.'+self.opt.updateFormClass).each(function () {
var formName = $(this).attr('id'),
path = $(this).attr('action');
path = $(this).attr('action'),
inputData,
$wrapper = $(this).closest('.'+self.opt.formWrapperClass),
$staticValue = $('.'+self.opt.staticValueClass, $wrapper),
$description = $('.'+self.opt.descriptionClass, $wrapper),
$editable = $('.'+self.opt.editableClass, $wrapper),
$closeButton = $('.'+self.opt.closeButtonClass, $wrapper);
//make and initialize form objects
self.forms[formName] = Forms.factory(formName,path);
if($('.'+self.opt.editButtonClass, $wrapper).hasClass('no-refresh')){
self.forms[formName].refrashable = false;
}else{
self.forms[formName].refrashable = true;
}
self.forms[formName].$form = $(this);
self.forms[formName].$wrapper = $wrapper;
self.forms[formName].$staticValue = $staticValue;
self.forms[formName].$description = $description;
self.forms[formName].$editable = $editable;
self.forms[formName].refreshState();
// submit events handler
$(this).off('submit');
$(this).on('submit', function () {
var serialized = $(this).serialize();
// each form post definitin function
self.forms[formName].pushData(serialized, formName);
//check if formData is supported
$waiter.show();
if ( window.FormData && ("upload" in ($.ajaxSettings.xhr())) ){
inputData = new FormData(this);
self.forms[formName].pushData(inputData, formName);
} else {
inputData = $(this).serialize();
self.forms[formName].pushData(inputData, formName);
}
return false;
});
$closeButton.on('click', function() {
$editable.removeClass(self.opt.formCurrentClass);
self.forms[formName].refreshState();
return false;
});
/**
* edit button
*/
$('.'+self.opt.editButtonClass, $wrapper).on('click', function () {
if(self.forms[formName].refrashable){
$editable.removeClass('hidden');
$description.addClass('hidden');
}else{
}
$editable.each(function() {
$(this).removeClass(self.opt.formCurrentClass);
});
$editable.toggleClass(self.opt.formCurrentClass);
$(document).on('click.form', function(event) {
var targetObj = $(event.target);
if (targetObj.parents().filter('.e-form').length < 1) {
$editable.removeClass(self.opt.formCurrentClass);
self.forms[formName].refreshState();
$(document).off('click.form');
}
});
return false;
});
});

@ -377,6 +377,7 @@ if (EXPO.profile){
// methods
//инициализация общих свойств
that.init = function(options) {
// todo: убрать одновременное открытие форм
$.extend(this.lang, options.lang);
//options.lang = null;
$.extend(this.opt, options);
@ -392,10 +393,8 @@ if (EXPO.profile){
cardinality: 1
}
},
//clearIncomplete: true,
showMaskOnHover: false,
autoUnmask: true//,
//placeholder:'+_(___)___-__-__'
autoUnmask: true
},
match: /[0-9]/,
replace: '#',
@ -408,7 +407,6 @@ if (EXPO.profile){
selector = '#'+inputId;
$(selector).inputmasks(maskOpts);
//$(selector).attr('placeholder', '+_(___)___-__-__');
};
this.forms = {};

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save