expo-33 expo 34 bugs fixed

remotes/origin/1203
pavel 11 years ago
parent ee5f336671
commit a12e03ae63
  1. 238
      templates/client/includes/accounts/current_user.html
  2. 31
      templates/client/static_client/css/main.css
  3. 62
      templates/client/static_client/js/_modules/page.profile.js
  4. 26
      templates/client/static_client/js/main.js
  5. 26
      templates/client/static_client/js/vendor.js
  6. 2
      templates/client/static_client/js_min/_modules/page.profile.min.js
  7. 2
      templates/client/static_client/js_min/vendor.min.js

@ -54,7 +54,7 @@
{# country and city #}
<div class="i-place p-editable">
{% if home_form.instance.country %}
<span>
{% else %}
<span style="display:none;">
{% endif %}
@ -62,7 +62,7 @@
</span>
{% if home_form.instance.city %}
<span>
{% else %}
<span style="display:none;">
{% endif %}
@ -143,137 +143,154 @@
</header>
{# position #}
<div class="i-position p-editable">
<p id="static-work-value">
{{ work_form.position.value }}
{% if work_form.work.value %}
{% trans 'в' %} {{ work_form.work.value }}
{% endif %}
</p>
<div class="work_form-wrap">
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="work_form" action="/profile/update/work/" method="post">{% csrf_token %}
<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-position p-editable hidden">
<p id="static-work-value ">
{{ work_form.position.value }}
{% if work_form.work.value %}
{% trans 'в' %} {{ work_form.work.value }}
{% endif %}
</p>
<div class="ef-body">
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="work_form" action="/profile/update/work/" method="post">{% csrf_token %}
<div class="epfl">
<label>{{ work_form.position.label }}</label>
<div class="epf-field">
{{ work_form.position }}
</div>
</div>
<div class="ef-body">
<div class="epfl">
<label>{{ work_form.work.label }}</label>
<div class="epf-field">
{{ work_form.work }}
<div class="epfl">
<label>{{ work_form.position.label }}</label>
<div class="epf-field">
{{ work_form.position }}
</div>
</div>
</div>
</div>
<div class="epfl">
<label>{{ work_form.work.label }}</label>
<div class="epf-field">
{{ work_form.work }}
</div>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
</div>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</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>
{# END position #}
<hr />
<div class="i-contacts clearfix">
<div class="ic-buttons">
<div class="p-editable">
<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>
<div class="edit-wrap">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" id="social_form" action="/profile/update/social/" method="post">{% csrf_token %}
<div class="ic-buttons dd_width_4">
<div class="social_form-wrap">
<div class="p-editable">
<div class="i-descr add_link_text add_link_text_medium">
<a class="e-btn" 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>
<div class="add_link_text_text"><b>{% trans '+5 за каждый' %}</b></div>
</div>
<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>
</div>
<div class="edit-wrap">
<div class="e-form">
<form class="clearfix update-profile-form" id="social_form" action="/profile/update/social/" method="post">{% csrf_token %}
<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 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>
</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>
</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-twit-w.png' %}" title="Twitter" alt="Twitter" /> {{ social_form.twitter.label }}</label>
<div class="epf-field">
{{ social_form.twitter }}
</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>
</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>
</div>
<div class="ef-buttons">
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
</div>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</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>
{# contacts #}
<div class="ic-links">
@ -459,6 +476,8 @@
EXPO.profile.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
formContainerPostfix:'-wrap',
// text and paths for dynamically rendered selectboxes
selectBox:[
{id:'id_country'},
@ -474,6 +493,7 @@
path:'http://{{ request.get_host }}/company/get-company/'
}
],
editButtonClass:'e-btn',
// we need this id to enable mapping library
phoneBox: 'id_phone',
// some helper text in current language

@ -11801,7 +11801,7 @@ hr + .rq-note {
.add_link_text .edit-wrap { display: inline-block!important; position: relative; left: 0; top: 0; margin: 0 5px 0 0!important; height: 20px;}
.add_link_text a.e-btn {color: #a2a2a2; display: inline-block; padding: 0 0 0 22px; margin: 0 5px 0 0; width: auto; height: auto;font-size: 17px; color: #a2a2a2;font-family:'dindisplay_pro'; font-weight: 500; opacity: 1;
vertical-align: middle;}
.add_link_text a.e-btn:before { content:'';display: inline-block;width:16px;height:17px; background: url(../img/sprites.png) -385px -51px;-webkit-transition: color .3s;-o-transition: color .3s;transition: color .3s; position: absolute; top: 0; left: 0;}
.add_link_text a.e-btn:before { content:'';display: inline-block;width:16px;height:17px; background: url(../img/sprites.png) -385px -52px;-webkit-transition: color .3s;-o-transition: color .3s;transition: color .3s; position: absolute; top: 0; left: 0;}
.add_link_text b { margin-left: 10px;}
.add_link_text b:before {content:'';display:inline-block;width:14px;height:12px;background:url(../img/sprites.png) -365px -53px no-repeat;margin:0 4px 0 0;}
.add_link_text_medium a:before { top: 2px;}
@ -11829,7 +11829,7 @@ hr + .rq-note {
.add_link_text a:hover { color: #ff6600;}
.add_link_text a:hover:before { background-position: -425px -51px;}
.add_link_text a:hover:before { background-position: -425px -52px;}
.add_link_teg .select { float: left; width: 368px; margin: 0 13px 0 0; min-height: 36px;}
@ -12804,11 +12804,6 @@ hr + .rq-note {
margin-left: auto;
margin-right: auto;
}
/*.my-companies-block .company .title:after{*/
/*content: '';*/
/*display: block;*/
/*clear: both;*/
/*}*/
.my-companies-block .company .title{
display: block;
color: #606060;
@ -12833,10 +12828,26 @@ hr + .rq-note {
.add-company-block{
margin-top: 2em;
}
/*.add-company-block .icon-add:before{*/
/*background-position: -425px -52px;*/
/*}*/
.edit-profile .hidden{
display: none;
}
.edit-profile .i-info .i-descr{
margin-top: 1em;
}
.edit-profile .i-info .e-btn{
margin-right: 0;
}
.edit-profile .i-info .add_link_text_text{
vertical-align: middle;
top: 0;
}
.edit-profile .ic-buttons .add_link_text{
display: inline-block;
}
.edit-profile .ic-buttons .p-editable{
padding-left: 0;
}
/************************\
# страница редактирования профиля

@ -9,7 +9,7 @@ if (EXPO.profile){
EXPO.profile = (function() {
// variables
var that = {};
that.settings = {
that.opt = {
updateFormClass:'update-profile-form'
}; //default module setting
//language object
@ -88,7 +88,7 @@ if (EXPO.profile){
$('#id_'+input, $('#'+self.formId)).value(self.formData[input]);
}
if($('#static-'+input).length > 0){
$('#static-'+input).html
$('#static-'+input).html();
}
}
}
@ -293,7 +293,7 @@ if (EXPO.profile){
that.init = function(options) {
$.extend(this.lang, options.lang);
options.lang = null;
$.extend(this.settings, options);
$.extend(this.opt, options);
var self = this,
initMaskedInput = function (inputId) {
@ -329,27 +329,27 @@ if (EXPO.profile){
//start of document.ready
// <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({
$('#'+self.opt.selectBox[1].id).select2({
width: 'element',
placeholder: self.settings.selectBox[1].placeholder,
placeholder: self.opt.selectBox[1].placeholder,
maximumSelectionSize: 3
});
$('#'+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: 'element',
ajax: {
url: self.settings.selectBox[2].path,
url: self.opt.selectBox[2].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};
@ -375,13 +375,13 @@ if (EXPO.profile){
});
$('#'+self.settings.selectBox[3].id).select2({
placeholder: self.settings.selectBox[3].placeholder,
$('#'+self.opt.selectBox[3].id).select2({
placeholder: self.opt.selectBox[3].placeholder,
width: '200px',
minimumInputLength: 1,
ajax: {
url: self.settings.selectBox[3].path,
url: self.opt.selectBox[3].path,
dataType: "json",
quietMillis: 200,
@ -408,13 +408,13 @@ if (EXPO.profile){
}
});
// $('#'+ self.settings.phoneBox);
// 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'),
inputData;
@ -438,6 +438,36 @@ if (EXPO.profile){
});
});
/**
* edit button
*/
$('.'+self.opt.editButtonClass).on('click', function () {
var $switch = $(this),
$wrapper = $switch.closest('.edit-wrap'),
$container = $switch.closest('.p-editable'),
$pForm = $wrapper.children('.e-form'),
$closeBtn = $pForm.find('a.ef-close'),
$eContainers = $('.p-editable.pe-current').not($container);
$eContainers.each(function() {
$(this).removeClass('pe-current');
});
$container.toggleClass('pe-current');
$closeBtn.one('click', function() {
$container.removeClass('pe-current');
return false;
});
$(document).one('click', function(event) {
var targetObj = $(event.target);
if (targetObj.parents().filter('.e-form').length < 1) {
$container.removeClass('pe-current');
}
});
return false;
});
});

@ -995,33 +995,7 @@ function placeInput(width){
return false;
});
$('a.e-btn').on('click', function () {
var $switch = $(this);
var $wrapper = $switch.closest('.edit-wrap');
var $container = $switch.closest('.p-editable');
var $pForm = $wrapper.children('.e-form');
var $closeBtn = $pForm.find('a.ef-close');
var $eContainers = $('.p-editable.pe-current').not($container);
$eContainers.each(function() {
$(this).removeClass('pe-current');
});
$container.toggleClass('pe-current');
$closeBtn.one('click', function() {
$container.removeClass('pe-current');
return false;
});
$(document).one('click', function(event) {
var targetObj = $(event.target);
if (targetObj.parents().filter('.e-form').length < 1) {
$container.removeClass('pe-current');
}
});
return false;
});

@ -2062,33 +2062,7 @@ function placeInput(width){
return false;
});
$('a.e-btn').on('click', function () {
var $switch = $(this);
var $wrapper = $switch.closest('.edit-wrap');
var $container = $switch.closest('.p-editable');
var $pForm = $wrapper.children('.e-form');
var $closeBtn = $pForm.find('a.ef-close');
var $eContainers = $('.p-editable.pe-current').not($container);
$eContainers.each(function() {
$(this).removeClass('pe-current');
});
$container.toggleClass('pe-current');
$closeBtn.one('click', function() {
$container.removeClass('pe-current');
return false;
});
$(document).one('click', function(event) {
var targetObj = $(event.target);
if (targetObj.parents().filter('.e-form').length < 1) {
$container.removeClass('pe-current');
}
});
return false;
});

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