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 #} {# country and city #}
<div class="i-place p-editable"> <div class="i-place p-editable">
{% if home_form.instance.country %} {% if home_form.instance.country %}
<span>
{% else %} {% else %}
<span style="display:none;"> <span style="display:none;">
{% endif %} {% endif %}
@ -62,7 +62,7 @@
</span> </span>
{% if home_form.instance.city %} {% if home_form.instance.city %}
<span>
{% else %} {% else %}
<span style="display:none;"> <span style="display:none;">
{% endif %} {% endif %}
@ -143,137 +143,154 @@
</header> </header>
{# position #} {# position #}
<div class="i-position p-editable"> <div class="work_form-wrap">
<p id="static-work-value">
{{ work_form.position.value }}
{% if work_form.work.value %}
{% trans 'в' %} {{ work_form.work.value }}
{% endif %}
</p>
<div class="edit-wrap"> <div class="i-descr add_link_text ">
<a class="e-btn" href="#">{% trans 'редактировать' %}</a> <a class="e-btn" href="#" title="">{% trans 'Указать' %}</a>
<div class="e-form"> <div class="add_link_text_text">{% trans 'свою должность и место работы' %}<b>+10</b></div>
<form class="clearfix update-profile-form" id="work_form" action="/profile/update/work/" method="post">{% csrf_token %} </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"> <div class="ef-body">
<label>{{ work_form.position.label }}</label>
<div class="epf-field">
{{ work_form.position }}
</div>
</div>
<div class="epfl"> <div class="epfl">
<label>{{ work_form.work.label }}</label> <label>{{ work_form.position.label }}</label>
<div class="epf-field"> <div class="epf-field">
{{ work_form.work }} {{ work_form.position }}
</div>
</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"> </div>
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a> <div class="ef-buttons">
</div> <button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div> </div>
</div> </div>
{# END position #} {# END position #}
<hr /> <hr />
<div class="i-contacts clearfix"> <div class="i-contacts clearfix">
<div class="ic-buttons"> <div class="ic-buttons dd_width_4">
<div class="p-editable"> <div class="social_form-wrap">
<ul class="soc-media-buttons soc-media-buttons1"> <div class="p-editable">
<li> <div class="i-descr add_link_text add_link_text_medium">
{% if social_form.facebook.value %} <a class="e-btn" href="#" title="">{% trans 'Добавить' %}</a>
<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" /> <ul class="soc-media-buttons soc-media-buttons1">
</a> <li>
{% else %} {% if social_form.facebook.value %}
<img id="img-facebook" src="{% static 'client/img/soc-medias/sm-icon-fb_hover.png' %}" title="Facebook" alt="Facebook" /> <a href="{{ social_form.facebook.value }}" target="_blank">
{% endif %} <img id="img-facebook" src="{% static 'client/img/soc-medias/sm-icon-fb.png' %}" title="Facebook" alt="Facebook" />
</li> </a>
<li> {% else %}
{% if social_form.linkedin.value %} <img id="img-facebook" src="{% static 'client/img/soc-medias/sm-icon-fb_hover.png' %}" title="Facebook" alt="Facebook" />
<a href="{{ social_form.linkedin.value }}" target="_blank"> {% endif %}
<img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin.png' %}" title="LinkedIn" alt="LinkedIn" /> </li>
</a> <li>
{% else %} {% if social_form.linkedin.value %}
<img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin_hover.png' %}" title="LinkedIn" alt="LinkedIn" /> <a href="{{ social_form.linkedin.value }}" target="_blank">
{% endif %} <img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin.png' %}" title="LinkedIn" alt="LinkedIn" />
</a>
<li> {% else %}
{% if social_form.vk.value %} <img id="img-linkedin" src="{% static 'client/img/soc-medias/sm-icon-lin_hover.png' %}" title="LinkedIn" alt="LinkedIn" />
<a href="{{ social_form.vk.value }}" target="_blank"> {% endif %}
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk.png' %}" title="В контакте" alt="В контакте" />
</a> <li>
{% else %} {% if social_form.vk.value %}
<img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk_hover.png' %}" title="В контакте" alt="В контакте" /> <a href="{{ social_form.vk.value }}" target="_blank">
{% endif %} <img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk.png' %}" title="В контакте" alt="В контакте" />
</li> </a>
{% else %}
<li> <img id="img-vk" src="{% static 'client/img/soc-medias/sm-icon-vk_hover.png' %}" title="В контакте" alt="В контакте" />
{% if social_form.twitter.value %} {% endif %}
<a href="{{ social_form.twitter.value }}" target="_blank"> </li>
<img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit.png' %}" title="Twitter" alt="Twitter" />
</a> <li>
{% else %} {% if social_form.twitter.value %}
<img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit_hover.png' %}" title="Twitter" alt="Twitter" /> <a href="{{ social_form.twitter.value }}" target="_blank">
{% endif %} <img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit.png' %}" title="Twitter" alt="Twitter" />
</li></li> </a>
</ul> {% else %}
<div class="edit-wrap"> <img id="img-twitter" src="{% static 'client/img/soc-medias/sm-icon-twit_hover.png' %}" title="Twitter" alt="Twitter" />
<a class="e-btn" href="#">{% trans 'редактировать' %}</a> {% endif %}
<div class="e-form"> </li></li>
<form class="clearfix update-profile-form" id="social_form" action="/profile/update/social/" method="post">{% csrf_token %} </ul>
<div class="add_link_text_text"><b>{% trans '+5 за каждый' %}</b></div>
</div>
<div class="ef-body">
<div class="epfl"> <div class="edit-wrap">
<label><img src="{% static 'client/img/soc-medias/sm-icon-fb-w.png' %}" title="Facebook" alt="Facebook" /> {{ social_form.facebook.label }}</label> <div class="e-form">
<div class="epf-field"> <form class="clearfix update-profile-form" id="social_form" action="/profile/update/social/" method="post">{% csrf_token %}
{{ social_form.facebook }}
</div>
</div>
<div class="epfl"> <div class="ef-body">
<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"> <div class="epfl">
{{ social_form.linkedin }} <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>
<div class="epfl"> <div class="epfl">
<label><img src="{% static 'client/img/soc-medias/sm-icon-vk-w.png' %}" title="В контакте" alt="В контакте" /> {{ social_form.vk.label }}</label> <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"> <div class="epf-field">
{{ social_form.vk }} {{ social_form.linkedin }}
</div> </div>
</div> </div>
<div class="epfl"> <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> <label><img src="{% static 'client/img/soc-medias/sm-icon-vk-w.png' %}" title="В контакте" alt="В контакте" /> {{ social_form.vk.label }}</label>
<div class="epf-field"> <div class="epf-field">
{{ social_form.twitter }} {{ social_form.vk }}
</div> </div>
</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"> </div>
<button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a> <div class="ef-buttons">
</div> <button type="submit" class="lnk icon-save">{% trans 'Сохранить' %}</button>
</div> </div>
</form>
<a class="ef-close" href="#">{% trans 'закрыть' %}</a>
</div>
</div>
</div>
</div> </div>
</div> </div>
{# contacts #} {# contacts #}
<div class="ic-links"> <div class="ic-links">
@ -459,6 +476,8 @@
EXPO.profile.init({ EXPO.profile.init({
// class selector to identify required forms on page // class selector to identify required forms on page
updateFormClass:'update-profile-form', 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 // text and paths for dynamically rendered selectboxes
selectBox:[ selectBox:[
{id:'id_country'}, {id:'id_country'},
@ -474,6 +493,7 @@
path:'http://{{ request.get_host }}/company/get-company/' path:'http://{{ request.get_host }}/company/get-company/'
} }
], ],
editButtonClass:'e-btn',
// we need this id to enable mapping library // we need this id to enable mapping library
phoneBox: 'id_phone', phoneBox: 'id_phone',
// some helper text in current language // 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 .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; .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;} 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 { 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 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;} .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 { 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;} .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-left: auto;
margin-right: auto; margin-right: auto;
} }
/*.my-companies-block .company .title:after{*/
/*content: '';*/
/*display: block;*/
/*clear: both;*/
/*}*/
.my-companies-block .company .title{ .my-companies-block .company .title{
display: block; display: block;
color: #606060; color: #606060;
@ -12833,10 +12828,26 @@ hr + .rq-note {
.add-company-block{ .add-company-block{
margin-top: 2em; margin-top: 2em;
} }
/*.add-company-block .icon-add:before{*/ .edit-profile .hidden{
/*background-position: -425px -52px;*/ 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() { EXPO.profile = (function() {
// variables // variables
var that = {}; var that = {};
that.settings = { that.opt = {
updateFormClass:'update-profile-form' updateFormClass:'update-profile-form'
}; //default module setting }; //default module setting
//language object //language object
@ -88,7 +88,7 @@ if (EXPO.profile){
$('#id_'+input, $('#'+self.formId)).value(self.formData[input]); $('#id_'+input, $('#'+self.formId)).value(self.formData[input]);
} }
if($('#static-'+input).length > 0){ if($('#static-'+input).length > 0){
$('#static-'+input).html $('#static-'+input).html();
} }
} }
} }
@ -293,7 +293,7 @@ if (EXPO.profile){
that.init = function(options) { that.init = function(options) {
$.extend(this.lang, options.lang); $.extend(this.lang, options.lang);
options.lang = null; options.lang = null;
$.extend(this.settings, options); $.extend(this.opt, options);
var self = this, var self = this,
initMaskedInput = function (inputId) { initMaskedInput = function (inputId) {
@ -329,27 +329,27 @@ if (EXPO.profile){
//start of document.ready //start of document.ready
// <selectbox> styling with 3-rd party libs // <selectbox> styling with 3-rd party libs
$('#'+self.settings.selectBox[0].id).select2({ $('#'+self.opt.selectBox[0].id).select2({
width: 'element' width: 'element'
}); });
$('#'+self.settings.selectBox[1].id).select2({ $('#'+self.opt.selectBox[1].id).select2({
width: 'element', width: 'element',
placeholder: self.settings.selectBox[1].placeholder, placeholder: self.opt.selectBox[1].placeholder,
maximumSelectionSize: 3 maximumSelectionSize: 3
}); });
$('#'+self.settings.selectBox[2].id).select2({ $('#'+self.opt.selectBox[2].id).select2({
placeholder: self.settings.selectBox[2].placeholder, placeholder: self.opt.selectBox[2].placeholder,
width: 'element', width: 'element',
ajax: { ajax: {
url: self.settings.selectBox[2].path, url: self.opt.selectBox[2].path,
dataType: "json", dataType: "json",
quietMillis: 200, quietMillis: 200,
data: function(term, page, country){ data: function(term, page, country){
var country = $('#'+self.settings.selectBox[0].id).val(); var country = $('#'+self.opt.selectBox[0].id).val();
return {term: term, return {term: term,
page: page, page: page,
country: country}; country: country};
@ -375,13 +375,13 @@ if (EXPO.profile){
}); });
$('#'+self.settings.selectBox[3].id).select2({ $('#'+self.opt.selectBox[3].id).select2({
placeholder: self.settings.selectBox[3].placeholder, placeholder: self.opt.selectBox[3].placeholder,
width: '200px', width: '200px',
minimumInputLength: 1, minimumInputLength: 1,
ajax: { ajax: {
url: self.settings.selectBox[3].path, url: self.opt.selectBox[3].path,
dataType: "json", dataType: "json",
quietMillis: 200, quietMillis: 200,
@ -408,13 +408,13 @@ if (EXPO.profile){
} }
}); });
// $('#'+ self.settings.phoneBox);
// make mask on phone field input // make mask on phone field input
initMaskedInput(self.settings.phoneBox); initMaskedInput(self.opt.phoneBox);
//forms init //forms init
$('.'+self.settings.updateFormClass).each(function () { $('.'+self.opt.updateFormClass).each(function () {
var formName = $(this).attr('id'), var formName = $(this).attr('id'),
path = $(this).attr('action'), path = $(this).attr('action'),
inputData; 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; 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; 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