diff --git a/project/static/css/style.css b/project/static/css/style.css index 654cc3e..eb55c7f 100644 --- a/project/static/css/style.css +++ b/project/static/css/style.css @@ -602,12 +602,15 @@ tr.doc-row:hover {cursor:pointer;} #id_boss_surname, #id_boss_name, #id_boss_midname, #id_glavbuh_surname, #id_glavbuh_name, #id_glavbuh_midname{ width: 159px;padding-right: 1px;} #boss_sign, #glavbuh_sign {width:170px;height:65px;float:left;overflow:hidden;cursor: pointer;} +#boss_sign .img_field, #glavbuh_sign .img_field {width:170px;height:65px;} +#stamp .img_field, #logo .img_field {width:170px;height:170px;} #glavbuh_sign {margin-left:30px;} #stamp .profile_field {width:170px;height:170px;cursor: pointer;} #logo .profile_field { width: 170px;height: 170px;margin-left: 30px;cursor: pointer;} .del_image {display:block;width:27px;height:20px;background:url(../img/icon-delete.png)7px center no-repeat;position:absolute;top:0;right:0;} .del_image.hidden {display:none;} -.img_load {text-align:center;} +.img_field {position:relative;} +.img_field img{min-height:1px;top:0;bottom:0;left:0;right:0;position:absolute;margin:auto;} .rel {position:relative;} .img_field {border:1px solid #f2f2f2;} .profile_btns {margin: 10px; padding:10px;} diff --git a/project/static/img/spinner.gif b/project/static/img/spinner.gif new file mode 100644 index 0000000..40f7cb6 Binary files /dev/null and b/project/static/img/spinner.gif differ diff --git a/project/templates/customer/profile/edit.html b/project/templates/customer/profile/edit.html index 10917c0..9c734d2 100644 --- a/project/templates/customer/profile/edit.html +++ b/project/templates/customer/profile/edit.html @@ -507,6 +507,9 @@ $('.img_load input[type=file]').on('change', function(e){ e.preventDefault(); + var this_id = $(this).attr('id').substring(3); + console.log($('#' + this_id + ' img')); + $('#' + this_id + ' img').attr('src', '{{ STATIC_URL }}/img/spinner.gif'); var formData = new FormData(); formData.append($(this).val(), $(this)[0].files[0]); formData.append('elm_id', $(this).attr('id'));