-
{{ about_form.about.value }}
+
{{ about_form.about.value }}
{% block scripts %}
+
+
+
+
+
+
+
{% endblock %}
\ No newline at end of file
diff --git a/templates/client/includes/accounts/simple_user.html b/templates/client/includes/accounts/simple_user.html
index b13efb3a..0af9aa08 100644
--- a/templates/client/includes/accounts/simple_user.html
+++ b/templates/client/includes/accounts/simple_user.html
@@ -8,7 +8,8 @@
diff --git a/templates/client/static_client/css/main.css b/templates/client/static_client/css/main.css
index 02972407..c0aded53 100644
--- a/templates/client/static_client/css/main.css
+++ b/templates/client/static_client/css/main.css
@@ -8045,6 +8045,7 @@ a.order-button:hover .ob-text,
margin: -1px 0 0 -6px;
}
+
.i-pict.p-editable .edit-wrap {
left: 100%;
top: 5px;
@@ -8152,7 +8153,7 @@ a.order-button:hover .ob-text,
left: 28px;
top: 0;
width: 600px;
- z-index: 1000;
+ z-index: 2;
font-family: 'dindisplay_pro', Arial, sans-serif;
font-size: 12px;
line-height: 15px;
@@ -12615,3 +12616,26 @@ hr + .rq-note {
.calenadar-body{
overflow: hidden;
}
+
+/************************\
+# страница редактирования профиля
+\***********************/
+
+ .edit-profile .edit-wrap{
+ display: block;
+ }
+ .edit-profile .pe-current .e-form{
+ display: block;
+ }
+ .edit-profile .p-editable{
+ padding-left: 22px;
+ }
+ .edit-profile .p-editable.i-place{
+ padding-left: 36px;
+ }
+ .edit-profile .i-pict.p-editable{
+ padding: 0;
+ }
+ .edit-profile .i-pict.p-editable img{
+ z-index: 0;
+ }
diff --git a/templates/client/static_client/js/_modules/page.profile.js b/templates/client/static_client/js/_modules/page.profile.js
index c48a40d4..c031ae3f 100644
--- a/templates/client/static_client/js/_modules/page.profile.js
+++ b/templates/client/static_client/js/_modules/page.profile.js
@@ -54,7 +54,8 @@ if (EXPO.profile){
if(typeof handler == 'function'){
// if particular data change required
- handler(data);
+ this.formData = handler(data, formName);
+ this.getajax(data);
$('#wait-ajax').show();
} else{
this.getajax(data);
@@ -142,8 +143,7 @@ if (EXPO.profile){
var self = this;
this.pullHandler = function (data) {
if (data.success){
- var company = $('#s2id_id_company').find('.select2-chosen').text();
- $('#static-work-value').html($('#id_position').val()+' '+EXPO.profile.lang.workIn+'
"'+ company+'"');
+ $('#static-work-value').text($('#id_position').val());
$('.p-editable').removeClass('pe-current');
}
@@ -159,15 +159,6 @@ if (EXPO.profile){
};
this.ajaxPath = path;
- };
- Forms.social_form = function (path) {
- this.pullHandler = function (data) {
- if (data.success){
- window.location.reload();
- }
- };
- this.ajaxPath = path;
-
};
Forms.phone_form = function (path) {
var self = this;
@@ -250,6 +241,15 @@ if (EXPO.profile){
}
$('.p-editable').removeClass('pe-current');
}
+ };
+ this.pushHandler = function (data, formName){
+ var formData = $('#'+formName).serialize();
+
+ return JSON.parse('{"' + decodeURI(formData).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g,'":"') + '"}');
+
+
+
+
};
this.ajaxPath = path;
@@ -260,18 +260,13 @@ if (EXPO.profile){
$editPhoto = $('#pic-edit-photo'),
$pickBlock = $('#pick-block'),
$form,
- $avatar = $('.pic_block img');
+ $avatar = $('img',$pickBlock);
this.pullHandler = function (data) {
if (data.success){
if($avatar.length){
$avatar.attr('src', data.url);
- }else{
- $pickBlock.removeClass('add_pic_block').addClass('pic_block');
- $('.add-wrapper', $pickBlock).remove();
- $('
![]()
').attr('src', data.url).prependTo($pickBlock);
}
- // $('#static-about-value').text($('#id_about').val());
$('.p-editable').removeClass('pe-current');
}
};
@@ -288,16 +283,10 @@ if (EXPO.profile){
$input.on('change', function () {
$(this).parents('form').submit();
});
- $editPhoto.on('click', function () {
- $input.trigger('click');
- });
- // pick-block
- this.ajaxPath = path;
- }
- $(function () {
+ this.ajaxPath = path;
+ };
- });
// methods
//инициализация общих свойств