diff --git a/static/css/styles.css b/static/css/styles.css index 9d921eb..52a5e1a 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -498,7 +498,7 @@ footer>div { } .wrapper_header_content{ - max-width: 1280px; + max-width: 1720px; margin: 0 auto; position: relative; } diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js index df8f6fc..8fc48ea 100644 --- a/static/js/user_profile_2.js +++ b/static/js/user_profile_2.js @@ -52,19 +52,11 @@ function select_tab_profile (el,url,owner_type=null, check_orders_required) { let confirm_url_f_lang_ru = '' let confirm_url_f_lang_en = '' if (owner_type){ - window.history.pushState({ prevUrl: window.location.href }, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}`) confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/` confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/` - if(!window.history.state.prevUrl.match(/create/)) { - window.location.reload() - } } else { - window.history.pushState({ prevUrl: window.location.href }, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(url)}/`) confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(url)}/` confirm_url_f_lang_en = `/en/profile/page/${profile_tabs_f_static_map.get(url)}/` - if(window.history.state.prevUrl.match(/create/)) { - window.location.reload() - } } document.querySelector("#ru_lang").href = confirm_url_f_lang_ru document.querySelector("#en_lang").href = confirm_url_f_lang_en diff --git a/static/v2/js/forms/f_make_poster_order.js b/static/v2/js/forms/f_make_poster_order.js index e673f4a..3b4489d 100644 --- a/static/v2/js/forms/f_make_poster_order.js +++ b/static/v2/js/forms/f_make_poster_order.js @@ -12,12 +12,16 @@ function makePosterOrder(form) { }, error: function (res) { - if (res.JSON) return; + if (!res.responseJSON) return; let $parent = form.closest('.b_make_poster_order') let $title = $parent.querySelector(".make_poster_order_title") + let $form = $parent.querySelector(".f_make_poster_order") + $form.remove() + $('body')[0].scrollIntoView({behavior: 'smooth', top: 0}); + $(res.responseJSON.html).insertAfter($($title)) } }) diff --git a/static/v2/js/service/api.js b/static/v2/js/service/api.js index e101010..4d833f6 100644 --- a/static/v2/js/service/api.js +++ b/static/v2/js/service/api.js @@ -5,7 +5,7 @@ class api { this.data_type = props.data_type; this.type = props.type || 'POST'; this.success_callback = props.success; - this.error_callback = props.error_callback; + this.error_callback = props.error; } ajaxRequest (){ diff --git a/templates/v2/forms/f_make_poster_order.html b/templates/v2/forms/f_make_poster_order.html index 6a37d26..41c2da8 100644 --- a/templates/v2/forms/f_make_poster_order.html +++ b/templates/v2/forms/f_make_poster_order.html @@ -8,26 +8,26 @@