remotes/origin/1203
Назар Котюк 11 years ago
commit 93491dfd90
  1. 2
      templates/client/includes/accounts/current_user.html
  2. 189
      templates/client/includes/company/company_edit.html
  3. 29
      templates/client/static_client/css/main.css
  4. 74
      templates/client/static_client/js/_modules/page.company.js
  5. 2
      templates/client/static_client/js/_modules/page.profile.js
  6. 2
      templates/client/static_client/js_min/_modules/page.company.min.js
  7. 2
      templates/client/static_client/js_min/_modules/page.profile.min.js

@ -267,7 +267,7 @@
<div class="edit-wrap ">
<div class="e-form">
<div class="edit-label"><span>&nbsp;</span></div>
<div class="edit-label"><span class="fa fa-pencil-square-o">&nbsp;</span></div>
<form class="clearfix update-profile-form" id="social_form" action="/profile/update/social/" method="post">{% csrf_token %}

@ -3,7 +3,7 @@
{% load template_filters %}
{% load thumbnail %}
<div class="m-article edit-profile">
<div class="m-article edit-profile company">
<div class="item-wrap clearfix">
<aside>
@ -57,13 +57,11 @@
</div>
</div>
<!--!!-->
<div class="i-rating" title="{% trans 'Рейтинг' %}: {{ company.rating }}" id="profile-rating">{{ company.rating }}</div>
</aside>
<div class="i-info">
<header>
<!--!-->
<div class="form-item-wrap ">
<div class="i-descr add_link_text right">
<a class="e-btn" href="#" title=""><i class="fa fa-plus-circle">&nbsp;</i>{% trans 'Указать' %}</a>
@ -153,7 +151,6 @@
</div>
</header>
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title=""><i class="fa fa-plus-circle">&nbsp;</i>{% trans 'Добавить' %}</a>
@ -197,7 +194,6 @@
{% endwith %}
<hr />
<!--!-->
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title=""> <i class="fa fa-plus-circle">&nbsp;</i>{% trans 'Добавить' %}</a>
@ -233,12 +229,32 @@
<hr />
<div class="add_link_teg">
<div class="form-item-wrap">
<div class="i-tags hidden i-descr">
<a class="e-btn fa fa-pencil-square-o" href="#">{% trans 'редактировать' %}</a>
<p class="tags static-value">
<a href="/members/tag/astrophysics">Астрофизика</a>,
<a href="/members/tag/embedded-computing">Встроенные вычисления</a>,
</p>
</div>
<!---->
<div class="editable-wrap">
<form class="inline-block update-profile-form" id="tag_form" action="/company/update/tag/{{ company.url }}/" method="post">
{% csrf_token %}
<!-- todo: в data-predifined добавить url-->
<div class="tag-select">{{ tag_form.tag }}</div>
</form>
<b class="inline-block label">+5 {% trans 'за каждый' %}</b>
</div>
<div class="initial-position">
</div>
</div>
<!---->
<div class="p-editable editable-wrap hidden">
</div>
<form class="inline-block" id="tag_form" action="/company/update/tag/{{ company.url }}/" method="post">
{% csrf_token %}
<div class="tag-select">{{ tag_form.tag }}</div>
</form>
<b class="inline-block label">+5 {% trans 'за каждый' %}</b>
</div>
<div class="clear"></div>
@ -303,7 +319,7 @@
</div>
<div class="edit-wrap">
<div class="e-form">
<div class="edit-label"><span>&nbsp;</span></div>
<div class="edit-label"><span class="fa fa-pencil-square-o">&nbsp;</span></div>
<form class="clearfix update-profile-form" id="social_form" action="/company/update/social/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
@ -461,117 +477,108 @@
<hr />
<div class="i-additional">
<div class="ia-title">{% trans 'Дополнительная информация' %}</div>
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title=""><i class="fa fa-plus-circle">&nbsp;</i>{% trans 'Добавить' %}</a>
<div class="add_link_text_text">{% trans 'год основания' %} <b>+15</b></div>
</div>
<div class="p-editable ic-tel ic-links editable-wrap hidden">
<p id="static-found-value">{% trans 'Год основания' %}: <span class="static-value">{% if found_form.foundation.value %}{{ found_form.foundation.value }}{% endif %}</span></p>
<div class="edit-wrap">
<a class="e-btn fa fa-pencil-square-o" href="#" >{% trans 'редактировать' %}</a>
<!-- !!! -->
<dl class="add-info">
<div class="form-item-wrap">
<dt><a class="e-btn fa fa-pencil-square-o" href="#" title="">{% trans 'Добавить' %}</a>{% trans 'Год основания' %}:</dt>
<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="p-editable ic-tel ic-links editable-wrap hidden">
<div class="edit-wrap">
<div class="e-form">
<div class="edit-label"><span class="fa fa-pencil-square-o">&nbsp;</span></div>
<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 class="epfl">
<label>{{ found_form.foundation.label }}</label>
<div class="epf-field">
{{ found_form.foundation }}
</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">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">закрыть</a>
<a class="ef-close" href="#">{% trans 'Закрыть' %}</a>
</div>
</div>
</div>
</div>
</div>
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title=""><i class="fa fa-plus-circle">&nbsp;</i>{% trans 'Добавить' %}</a>
<div class="add_link_text_text">{% trans 'к-во сотрудников' %} <b>+15</b></div>
<dd class="static-value">{% if found_form.foundation.value %}{{ found_form.foundation.value }}{% else %}{% trans 'Не заполнено' %}{% endif %}</dd>
</div>
<div class="p-editable ic-tel ic-links editable-wrap hidden">
<p id="static-staff_number-value">{% trans 'к-во сотрудников:' %} <span class="static-value">{% if staff_form.staff_number.value %}{{ staff_form.staff_number.value }}{% endif %}</span></p>
<div class="form-item-wrap">
<dt><a class="e-btn fa fa-pencil-square-o" href="#" title="">{% trans 'Добавить' %}</a>{% trans 'Количество сотрудников' %}:</dt>
<div class="edit-wrap">
<div class="p-editable ic-tel ic-links editable-wrap hidden">
<div class="edit-wrap">
<div class="e-form">
<div class="edit-label"><span class="fa fa-pencil-square-o">&nbsp;</span></div>
<a class="e-btn fa fa-pencil-square-o" 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">
<form class="clearfix update-profile-form" id="staff_form" action="/company/update/foundation/{{ 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 class="epfl">
<label>{{ staff_form.staff_number.label }}</label>
<div class="epf-field">
{{ staff_form.staff_number }}
</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>
</div>
<div class="form-item-wrap">
<div class="i-descr add_link_text ">
<a class="e-btn" href="#" title=""><i class="fa fa-plus-circle">&nbsp;</i>{% trans 'Добавить' %}</a>
<div class="add_link_text_text">{% trans 'подробное описание компании' %}<b>+15</b></div>
</div>
<div class="p-editable ic-tel editable-wrap hidden">
<span id="static-description-value" class="static-value description-text">{{ description_form.description.value }}&nbsp;</span>
<div class="edit-wrap">
<a class="e-btn fa fa-pencil-square-o" href="#">{% trans 'редактировать' %}</a>
<div id="static-description" style="{% if description_form.description.value %} display:none;{% endif %}">
<dd class="static-value">{% if staff_form.staff_number.value %}{{ staff_form.staff_number.value }}{% else %}{% trans 'Не заполнено' %}{% endif %}</dd>
</div>
</div>
<div class="form-item-wrap">
<dt><a class="e-btn fa fa-pencil-square-o" href="#" title="">{% trans 'Добавить' %}</a>{% trans 'О компании' %}:</dt>
<div class="p-editable ic-tel editable-wrap hidden">
<div class="edit-wrap">
<div class="e-form">
<div class="edit-label"><span class="fa fa-pencil-square-o">&nbsp;</span></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">
<form class="clearfix update-profile-form" id="description_form" action="/company/update/foundation/{{ 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 class="epfl">
<label>{{ description_form.description.label }}</label>
<div class="epf-field">
{{ description_form.description }}
</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 class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'Закрыть' %}</a>
</div>
</div>
</div>
<dd class="static-value">{% if description_form.description.value %}{{ description_form.description.value }}{% else %}{% trans 'Не заполнено' %}{% endif %}</dd>
</div>
</div>
</dl>
<!-- !!! -->
</div>
</div>

@ -6100,7 +6100,7 @@ form.s-message {
color: #a2a2a2;
}
.i-info hr + .i-tags {
.i-info .i-tags {
margin-top: -5px;
}
@ -6170,7 +6170,7 @@ dl.add-info {
dl.add-info dt {
min-height: 15px;
width: 165px;
width: 178px;
float: left;
clear: left;
margin: 0 5px 10px 0;
@ -13014,7 +13014,7 @@ hr + .rq-note {
.p-editable.pe-current.social .e-form:before{
display: none;
}
.p-editable.pe-current.social .edit-label{
.p-editable.pe-current.social .edit-label, .edit-profile.company .add-info .edit-label{
display: block;
width: 24px;
margin-left: -24px;
@ -13031,11 +13031,9 @@ hr + .rq-note {
border-top-right-radius: 0;
}
.p-editable.pe-current.social .edit-label span{
display: block;
width: 18px;
height: 16px;
background: #ff6600 url(../img/sprites.png) -136px -145px no-repeat;
.p-editable.pe-current.social .edit-label .fa, .edit-profile.company .add-info .edit-label .fa{
font-size: 18px;
color: #ffffff;
}
.edit-profile .editable-wrap .static-value.website{
@ -13083,6 +13081,21 @@ hr + .rq-note {
.outer-profile .i-info .i-title{
margin-bottom: 14px;
}
.add_link_teg .tags{
display: inline-block;
font-size: 14px;
}
.add_link_teg .e-btn{
vertical-align: middle;
}
.edit-profile.company .i-additional .e-btn{
vertical-align: middle;
margin-right: 3px;
}
.edit-profile.company .i-additional dl.add-info dd{
min-height: 19px;
padding-top: 5px;
}
/************************\
# about page /about/

@ -314,11 +314,13 @@ if (EXPO.company){
this.$staticValue.text(currValue);
$('.p-editable').removeClass('pe-current');
this.refreshState();
}
};
this.ajaxPath = path;
this.refreshState = function () {
return false;
}
};
Forms.staff_form = function (path) {
@ -401,6 +403,47 @@ if (EXPO.company){
}
};
Forms.tag_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){
//todo: Назар должен возвращать json формат с url, именем каждого выбранного тега
// todo: сделать наполнение
this.refreshState();
}
};
this.ajaxPath = path;
this.$input = $('#id_tag');
this.$initial = $(".initial-position",this.$wrapper);
this.refreshState = function () {
this.formId = this.$form.attr("id");
if( $.trim(this.$input.val()) == ''){
this.$form.detach().appendTo(this.$initial);
this.$initial.removeClass("hidden");
this.$description.addClass("hidden");
}else{
if($('#'+this.formId, this.$editable).length < 0){
this.$form.detach().appendTo(this.$editable);
}
this.$editable.addClass("hidden");
this.$initial.addClass("hidden");
this.$description.removeClass("hidden");
}
}
};
// methods
//инициализация общих свойств
@ -571,32 +614,9 @@ if (EXPO.company){
});
$('#'+self.opt.selectBox[2].id).on('change', function (e) {
var $form = $('#tag_form'),
afterAJAX = function (data) {
console.log('response complete');
console.log(data);
},
doAJAX = function (dataToSend) {
var self = this;
if(!dataToSend){
dataToSend = '';
}
$.ajax({
type: 'POST',
url: $form.attr('action'),
data:dataToSend,
success: function(data) {
afterAJAX(data);
$('#wait-ajax').fadeOut();
}
});
};
doAJAX($form.serialize());
$('#wait-ajax').show();
var $form = $('#tag_form');
$form.submit();
console.log('change complete');
console.log(e.val);
});
// make mask on phone field input
@ -659,7 +679,7 @@ if (EXPO.company){
return false;
});
if($('.'+self.opt.avatarButtonClass).length){
if($('.'+self.opt.avatarButtonClass, $wrapper).length){
/**
* avatar image choose button
*/

@ -629,7 +629,7 @@ if (EXPO.profile){
self.forms[formName].refreshState();
return false;
});
if($('.'+self.opt.avatarButtonClass).length){
if($('.'+self.opt.avatarButtonClass, $wrapper).length){
/**
* avatar image choose button
*/

File diff suppressed because one or more lines are too long

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