remotes/origin/1203
pavel 11 years ago
parent 9f43e5e875
commit efa4724914
  1. 7
      templates/client/includes/accounts/current_user.html
  2. 9
      templates/client/includes/accounts/simple_user.html
  3. 9
      templates/client/includes/company/company_edit.html
  4. 1
      templates/client/static_client/css/main.css
  5. 2
      templates/client/static_client/css_min/main.min.css
  6. 47
      templates/client/static_client/js/_modules/page.company.js
  7. 11
      templates/client/static_client/js/_modules/page.profile.js
  8. 2
      templates/client/static_client/js_min/_modules/page.company.min.js

@ -20,12 +20,13 @@
<div class="i-pict p-editable editable-wrap hidden">
<div id="pick-block" class="pic_block">
{% if request.user.profile.avatar %}
{% thumbnail request.user.profile.avatar "100x100" crop="center" as im %}
<img class="user-avatar" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
{% endthumbnail %}
{% else %}
<img class="user-avatar" src="{% static 'client/img/no-logo.png' %}" width="100" height="100"/>
<img class="user-avatar" src="{% static 'client/img/no-userpic-big.gif' %}" width="100" height="100"/>
{% endif %}
</div>
<div class="edit-wrap">
@ -534,13 +535,13 @@
editButtonClass:'e-btn',
avatarButtonClass:'avatar-btn',
avatarImageClass:'user-avatar',
noImageSrc:"{% static 'client/img/no-logo.png' %}",
noImageSrc:"{% static 'client/img/no-userpic-big.gif' %}",
// text and paths for dynamically rendered selectboxes
addCompanyButtonId:'add-new-company',
selectBox:[
{id:'id_country'},
{id:'id_theme',
placeHolder:'Выберите тематику компании'
placeholder:'Выберите тематику компании'
},
{id:'id_city',
placeholder:'Поиск города',

@ -6,18 +6,15 @@
<div class="m-article outer-profile">
<div class="item-wrap clearfix">
<aside>
{% if member.profile.avatar %}
<div class="i-pict">
{% if member.profile.avatar %}
{% thumbnail member.profile.avatar "100x100" crop="center" as im %}
<img class="user-avatar" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
{% endthumbnail %}
{% else %}
<img class="user-avatar" src="{% static 'client/img/no-logo.png' %}" width="100" height="100"/>
<img class="user-avatar" src="{% static 'client/img/no-userpic-big.gif' %}" width="100" height="100"/>
{% endif %}
</div>
{% endif %}
</aside>
<div class="i-info">
<header>

@ -29,7 +29,7 @@
</div>
<div class="edit-wrap">
<a class="e-btn " href="#">{% trans 'редактировать' %}</a>
<a class="e-btn fa fa-pencil-square-o" href="#">{% trans 'редактировать' %}</a>
<div class="e-form">
<form class="clearfix update-profile-form" enctype="multipart/form-data" id="avatar_form" action="/company/update/logo/{{ company.url }}/" method="post">{% csrf_token %}
<div class="ef-body">
@ -610,9 +610,12 @@
// text and paths for dynamically rendered selectboxes
selectBox:[
{id:'id_country'},
{
id:'id_country',
placeholder:"{% trans 'Выберите Страну' %}"
},
{id:'id_city',
placeHolder:'Search city',
placeHolder:"{% trans 'Выберите город' %}",
path:'http://{{ request.get_host }}/city/get-city/'
},
{id:'id_tag',

@ -8067,6 +8067,7 @@ a.order-button:hover .ob-text,
left: 100%;
top: 5px;
margin: 0 0 0 -30px;
line-height: 1em;
}
.i-title.p-editable .edit-wrap {

File diff suppressed because one or more lines are too long

@ -349,13 +349,6 @@ if (EXPO.company){
this.refreshState();
}
};
//$input.on('keypress', function (e) {
// var keycode = (e.keyCode ? e.keyCode : e.which);
// if(keycode == '13'){
// return false;
// }
//
//});
this.ajaxPath = path;
@ -449,18 +442,42 @@ if (EXPO.company){
this.forms = {};
$(function () {
var $editables = $('.'+self.opt.editableClass);
var $editables = $('.'+self.opt.editableClass),
$country = $('#'+self.opt.selectBox[0].id),
$city = $('#'+self.opt.selectBox[1].id);
//start of document.ready
$waiter = $('#wait-ajax').css({'z-index': '8012'});
/**
* <selectbox> styling with 3-rd party libs
*/
/**
* select country
*/
$country.select2({
width: 'element',
placeholder:self.opt.selectBox[0].placeholder
});
/**
* enable city <select/> when country is chosen
*/
//todo:чтобы работал надо ждать пока Назар сделает нулевой option
$('#'+self.opt.selectBox[0].id).select2({
width: 'element'
$country.on('change', function () {
if($(this).val() != 0 || $(this).val() != ''){
$city.prop('disabled', false);
}
});
$('#'+self.opt.selectBox[1].id).select2({
/**
* select city inside country
*/
/**
* disable city <select/> if country is not chosen
*/
if($country.val() == 0 || $country.val() == ''){
$city.prop('disabled', true);
}
$city.select2({
placeholder: self.opt.selectBox[1].placeHolder,
width: 'element',
ajax: {
@ -470,7 +487,7 @@ if (EXPO.company){
quietMillis: 200,
data: function(term, page, country){
var country = $('#'+self.opt.selectBox[0].id).val()
var country = $('#'+self.opt.selectBox[0].id).val();
return {term: term,
page: page,
country: country};
@ -488,14 +505,16 @@ if (EXPO.company){
}
},
initSelection : function(element, callback) {
var id= $(element).val();
var id= $.trim($(element).val());
var text = $(element).attr('data-init-text');
callback({id: id, text:text});
}
});
/**
* tags
*/
$('#'+self.opt.selectBox[2].id).val('0');
$('#'+self.opt.selectBox[2].id).select2({
placeholder: self.opt.selectBox[2].placeholder,

@ -267,13 +267,6 @@ if (EXPO.profile){
}
};
//$('#id_about').on('keypress', function (e) {
// var keycode = (e.keyCode ? e.keyCode : e.which);
// if(keycode == '13'){
// return false;
// }
//
//});
this.ajaxPath = path;
};
@ -488,7 +481,9 @@ if (EXPO.profile){
placeholder: self.opt.selectBox[1].placeholder,
maximumSelectionSize: 3
});
/**
* country selectbox
*/
$('#'+self.opt.selectBox[2].id).select2({
placeholder: self.opt.selectBox[2].placeholder,
width: 'element',

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