remotes/origin/1203
Nazar Kotyuk 11 years ago
commit f335ce32ba
  1. 165
      templates/client/includes/accounts/current_user.html
  2. 2
      templates/client/popups/create_company.html
  3. 74
      templates/client/static_client/js/_modules/page.profile.js
  4. 2
      templates/client/static_client/js_min/_modules/page.profile.min.js

@ -46,7 +46,11 @@
</div>
</div>
</div>
<div class="i-rating" title="Рейтинг: 551">551</div>
<div class="reason_block">
<p>Заполните свой<br>профиль, чтобы<br>повысить рейтинг</p>
<p>Чем выше<br>рейтинг —<br>тем больше<br>преимуществ!</p>
</div>
</aside>
{# END avatar #}
<div class="i-info">
@ -294,36 +298,42 @@
</div>
{# contacts #}
<div class="ic-links dd_width_5">
<div class="ic-tel p-editable">
{% if phone_form.phone.value %}
<div class="phone_form-wrap">
<div class="p-editable 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 hidden">
{% if phone_form.phone.value %}
<span id="static-phone-value">{{ phone_form.phone.value|phone }}</span>
{% endif %}
<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="/profile/update/phone/" method="post">{% csrf_token %}
{% endif %}
<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="/profile/update/phone/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="ef-body">
<div class="epfl">
<label>{{ phone_form.phone.label }}</label>
<div class="epf-field">
{{ phone_form.phone }}
</div>
</div>
<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>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
</div>
<!--
{% comment %}
<div class="ic-mail p-editable">
{% if email_form.email.value %}
<a class="icon-mail" href="mailto:{{ email_form.email.value }}">{{ email_form.email.value }}</a>
@ -353,39 +363,44 @@
</div>
</div>
</div>
-->
<div class="ic-site p-editable">
{% if web_page_form.web_page.value %}
<a class="icon-ext-link" id="static-web-page-value" 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 %}
{% endcomment %}
<div class="web_page_form-wrap">
<div class="ic-site p-editable 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 hidden">
{% if web_page_form.web_page.value %}
<a class="icon-ext-link" id="static-web-page-value" 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">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="web_page_form" action="/profile/update/web-page/" method="post">{% csrf_token %}
<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="/profile/update/web-page/" method="post">{% csrf_token %}
<div class="ef-body">
<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 class="epfl">
<label>{{ web_page_form.web_page.label }}</label>
<div class="epf-field">
{{ web_page_form.web_page }}
</div>
</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>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
</div>
@ -398,32 +413,37 @@
{# about #}
<div class="i-additional">
<div class="ia-title">{% trans 'О себе:' %}</div>
<div class="about_form-wrap">
<div class="p-editable 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="p-editable hidden">
<p id="static-about-value">{{ about_form.about.value }}</p>
<div class="p-editable">
<p id="static-about-value">{{ about_form.about.value }}</p>
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="about_form" action="/profile/update/about/" method="post">{% csrf_token %}
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="about_form" action="/profile/update/about/" method="post">{% csrf_token %}
<div class="ef-body">
<div class="ef-body">
<div class="epfl">
<label>{{ about_form.about.label }}</label>
<div class="epf-field">
{{ about_form.about }}
<div class="epfl">
<label>{{ about_form.about.label }}</label>
<div class="epf-field">
{{ about_form.about }}
</div>
</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>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
</div>
@ -451,7 +471,7 @@
</div>
<div class="add-company-block">
<a class="button icon-add" href="#">{% trans 'Добавить компанию' %}</a>
<a class="button icon-add" href="#" id="add-new-company">{% trans 'Добавить компанию' %}</a>
</div>
{# END companies #}
@ -479,6 +499,7 @@
// text part that is added to form id to designate its wrapper container
formContainerPostfix:'-wrap',
// text and paths for dynamically rendered selectboxes
addCompanyButtonId:'add-new-company',
selectBox:[
{id:'id_country'},
{id:'id_theme',
@ -499,6 +520,10 @@
// some helper text in current language
lang:{
workIn:'в'// there must be 'at' in English
},
addCompany:{
modalId:'pw-company',
formId:'create_company_form'
}
});

@ -6,7 +6,7 @@
<div class="pw-title">{% trans 'Создание компании' %}</div>
</header>
<div class="pw-body clearfix">
<form id="create_company_form" method="post" class="pw-form" action="{{ form.action }}">{% csrf_token %}
<form id="create_company_form" method="post" class="pw-form update-profile-form" action="{{ form.action }}">{% csrf_token %}
<div class="pwf-line">
<div class="pwf-field">
{{ form.name }}

@ -15,8 +15,9 @@ if (EXPO.profile){
//language object
that.lang ={};
//dependences
var com = EXPO.common;
//private
//private
// factory for on page form objects
function Forms(){};
// methods to perform ajax responses to send and receive data from the server
@ -116,6 +117,10 @@ if (EXPO.profile){
Forms.home_form = function (path) {
var self = this;
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
var country = $('#s2id_id_country').find('.select2-chosen').text(),
@ -130,6 +135,10 @@ if (EXPO.profile){
};
Forms.name_form = function (path) {
var self = this;
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
$('#static-name-value').text($('#id_last_name').val()+' '+$('#id_first_name').val());
@ -141,6 +150,10 @@ if (EXPO.profile){
};
Forms.work_form = function (path) {
var self = this;
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
$('#static-work-value').text($('#id_position').val());
@ -152,6 +165,10 @@ if (EXPO.profile){
};
Forms.about_company_form = function (path) {
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
window.location.reload();
@ -162,6 +179,10 @@ if (EXPO.profile){
};
Forms.phone_form = function (path) {
var self = this;
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
$('#static-phone-value').text($('#id_phone')[0].value);
@ -175,6 +196,10 @@ if (EXPO.profile){
};
Forms.web_page_form = function (path) {
var self = this;
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
var userLink = $('#id_web_page').val();
@ -188,6 +213,10 @@ if (EXPO.profile){
};
Forms.about_form = function (path) {
var self = this;
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
$('#static-about-value').text($('#id_about').val());
@ -207,6 +236,10 @@ if (EXPO.profile){
Forms.social_form = function (path) {
var self = this,
$img, imgSrc, $input, inputValue;
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
@ -261,6 +294,10 @@ if (EXPO.profile){
$pickBlock = $('#pick-block'),
$form,
$avatar = $('img',$pickBlock);
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
@ -286,6 +323,26 @@ if (EXPO.profile){
this.ajaxPath = path;
};
/**
* add new company form init
* @param path
*/
Forms.create_company_form = function (path) {
var self = this;
/**
* callback after successful request to the server
* @param data -data object recieved from server
*/
this.pullHandler = function (data) {
if (data.success){
}
};
this.ajaxPath = path;
};
// methods
@ -326,9 +383,9 @@ if (EXPO.profile){
};
this.forms = {};
$(function () {
//start of document.ready
// <selectbox> styling with 3-rd party libs
/**
* <selectbox> styling with 3-rd party libs
*/
$('#'+self.opt.selectBox[0].id).select2({
width: 'element'
});
@ -468,6 +525,15 @@ if (EXPO.profile){
return false;
});
/**
* add new company modal window trigger
*/
$('#'+self.opt.addCompanyButtonId).on('click', function (event) {
event.preventDefault();
$.fancybox.open('#'+ self.opt.addCompany.modalId);
return false;
});
});

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