' + txt + '. '; }
+
+ var image = $('#image');
+ if (!pid && image.val() == '')
+ {
+ $('#step1')[0].scrollIntoView();
+ image.focus();
+ alert(_text['UP_NOFILE'] + '.');
+ return false;
+ }
+
+ // Проверяем наличие привязок вообще
+ if ($('#links input').length == 0)
+ {
+ $('#step2')[0].scrollIntoView();
+ alert(_text['UP_NOLINKS'] + '.');
+ return false;
+ }
+
+ if ($('#conn_veh .pri-value[value="1"]').length == 0 &&
+ $('#conn_veh .pri-value[value="2"]').length == 0 &&
+ $('#conn_gid tr').length == 0)
+ {
+ $('#step2')[0].scrollIntoView();
+ alert(_text['UP_NO_PRI']);
+ return false;
+ }
+
+
+ // Проверим, указаны ли ракурсы
+ if ($('.view[value="0"]').length > 0)
+ {
+ $('#step2')[0].scrollIntoView();
+ alert(_text['UP_NOVIEW']);
+ return false;
+ }
+
+
+ // Проверим корректность привязки творческой фотографии
+ if ($('#creative').val() == 1 && ($('#conn_veh input[name="nids[]"]').length || $('#conn_gid input[name="gids[]"]').length > 1))
+ {
+ $('#step2')[0].scrollIntoView();
+ alert(_text['UP_CREATIVE']);
+ return false;
+ }
+
+
+ // Проверяем наличие даты
+ if ($('#year').val() == 0 && !confirm(_text['UP_NODATE'] + '.'))
+ {
+ $('#step1')[0].scrollIntoView();
+ return false;
+ }
+
+
+ // Проверяем разрешение на публикацию
+ if ($('#naa_hint').is(':visible') && $('#naa_allow').val().trim() == '')
+ {
+ alert(_text['UP_NAA_ALLOW_NO']);
+ $('#step1')[3].scrollIntoView();
+ return false;
+ }
+
+
+ // Уточняем, правильно ли, что выбрано "города нет в списке"
+ var cid = $('#main-cid').val();
+ if (pid == 0 && cid == 0 && !confirm(_text['UP_NOCITY'])) return false;
+
+ // Уточняем, если город не соответствует привязкам
+ if (cid != 0 && cnames[cid] == undefined && !confirm(_text['UP_OTHERCITY'])) return false;
+
+
+ // Проверяем наличие МС
+ if ($('.view[value="9"], .view[value="10"], .view[value="11"], .view[value="12"]').length == 0 && $('#place').val().trim() == '' && !confirm(_text['UP_NOPLACE'] + '.'))
+ {
+ $('#step3')[0].scrollIntoView();
+ return false;
+ }
+
+
+ // Проверяем правильность указания координат
+ if (!$('#nomap').prop('checked'))
+ {
+ if ($('#lat').val() == 0.0 || $('#lng').val() == 0.0)
+ {
+ $('#step4')[0].scrollIntoView();
+ alert(_text['UP_NOCOORDS']);
+ return false;
+ }
+
+ if ($('#directions input:checked').length == 0)
+ {
+ $('#step4')[0].scrollIntoView();
+ alert(_text['UP_NODIR']);
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
+
+function setDate(d, m, y)
+{
+ $('#day').val(d);
+ $('#month').val(m);
+ $('#year').val(y);
+ $('#pdate_approx').val(0);
+}
+
+
+
+
+document.onclick = function(e)
+{
+ e = e || window.event;
+ E = e.target || e.srcElement;
+ if (E.id != 'phint' && E.parentNode.id != 'phint' && E != _getID('mform').place) $('#phint').slideUp();
+
+ if (E.className != 'searchVehiclesBtn' && E.id != 'vlist_table' && E.className != 'num' && $('#vlist').css('display') == 'block') $('#vlist').hide().html('');
+
+ if ($(E).closest('#views-selector').length == 0) $('#views-selector').hide();
+};
+
+
+
+function showHint(id) { $('#'+id+'_hint').fadeIn() }
+function hideHint(id) { $('#'+id+'_hint').fadeOut() }
+
+function changeColor(sel) { sel.className = sel.options[sel.selectedIndex].className }
+
+
+
+function toggleNAA(wl)
+{
+ if ($('#naa').prop('checked'))
+ {
+ $('#naa_hint').show();
+
+ if (!wl)
+ {
+ $('#pub1_label').hide();
+ $('#pub0').prop('checked', true);
+ }
+ }
+ else
+ {
+ $('#naa_hint').hide();
+ $('#pub1_label').show();
+ }
+}
+
+
+
+function checkSpecialViews()
+{
+ var fields = $('.route, .notes');
+ if (!moderator) fields.add('#place');
+
+ if ($('.view[value="9"], .view[value="10"], .view[value="11"], .view[value="12"]').length > 0)
+ fields.prop('disabled', true).val('');
+ else fields.prop('disabled', false);
+}
\ No newline at end of file
diff --git a/static/js/jquery.form.min.js b/static/js/jquery.form.min.js
new file mode 100644
index 0000000..88edc99
--- /dev/null
+++ b/static/js/jquery.form.min.js
@@ -0,0 +1,7 @@
+/*
+* jQuery Form Plugin; v20131017
+* http://jquery.malsup.com/form/
+* Copyright (c) 2013 M. Alsup; Dual licensed: MIT/GPL
+* https://github.com/malsup/form#copyright-and-license
+*/
+;(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;a.length>i;i++)n.append(a[i].name,a[i].value);if(t.extraData){var o=r(t.extraData);for(i=0;o.length>i;i++)o[i]&&n.append(o[i][0],o[i][1])}t.data=null;var s=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:u||"POST"});t.uploadProgress&&(s.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(100*(a/n))),t.uploadProgress(e,a,n,r)},!1),r}),s.data=null;var l=s.beforeSend;return s.beforeSend=function(e,r){r.data=t.formData?t.formData:n,l&&l.call(this,e,r)},e.ajax(s)}function s(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(r){a("cannot get iframe.contentWindow document: "+r)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function o(){function t(){try{var e=n(g).readyState;a("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(r){a("Server abort: ",r," (",r.name,")"),s(k),j&&clearTimeout(j),j=void 0}}var r=f.attr2("target"),i=f.attr2("action");w.setAttribute("target",d),(!u||/post/i.test(u))&&w.setAttribute("method","POST"),i!=m.url&&w.setAttribute("action",m.url),m.skipEncodingOverride||u&&!/post/i.test(u)||f.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(j=setTimeout(function(){T=!0,s(D)},m.timeout));var o=[];try{if(m.extraData)for(var l in m.extraData)m.extraData.hasOwnProperty(l)&&(e.isPlainObject(m.extraData[l])&&m.extraData[l].hasOwnProperty("name")&&m.extraData[l].hasOwnProperty("value")?o.push(e('').val(m.extraData[l].value).appendTo(w)[0]):o.push(e('').val(m.extraData[l]).appendTo(w)[0]));m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(c){var p=document.createElement("form").submit;p.apply(w)}}finally{w.setAttribute("action",i),r?w.setAttribute("target",r):f.removeAttr("target"),e(o).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),S.reject(x,"timeout"),void 0;if(t==k&&x)return x.abort("server abort"),S.reject(x,"error","server abort"),void 0;if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),setTimeout(s,250),void 0;var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var l=(m.dataType||"").toLowerCase(),c=/(json|script|text)/.test(l);if(c||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(c){var d=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];d?x.responseText=d.textContent?d.textContent:d.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==l&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,l,m)}catch(b){i="parsererror",x.error=r=b||i}}catch(b){a("error caught: ",b),i="error",x.error=r=b||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&300>x.status||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),p&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),p&&e.event.trigger("ajaxError",[x,m,r])),p&&e.event.trigger("ajaxComplete",[x,m]),p&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var l,c,m,p,d,v,g,x,b,y,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(c=0;h.length>c;c++)l=e(h[c]),i?l.prop("disabled",!1):l.removeAttr("disabled");if(m=e.extend(!0,{},e.ajaxSettings,t),m.context=m.context||m,d="jqFormIO"+(new Date).getTime(),m.iframeTarget?(v=e(m.iframeTarget),y=v.attr2("name"),y?d=y:v.attr2("name",d)):(v=e(''),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),p&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},p=m.global,p&&0===e.active++&&e.event.trigger("ajaxStart"),p&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;b=w.clk,b&&(y=b.name,y&&!b.disabled&&(m.extraData=m.extraData||{},m.extraData[y]=b.value,"image"==b.type&&(m.extraData[y+".x"]=w.clk_x,m.extraData[y+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,l,c,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),l=t.url||this.attr2("action"),c="string"==typeof l?e.trim(l):"",c=c||window.location.href||"",c&&(c=(c.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:c,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var p=t.traditional;void 0===p&&(p=e.ajaxSettings.traditional);var d,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,d=e.param(t.data,p)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,p);d&&(g=g?g+"&"+d:d),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var b=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(b,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var y=t.error;t.error=function(e,r,a){var n=t.context||this;y.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;h.length>E;E++)h[E]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n){if(n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var i={s:this.selector,c:this.context};return!e.isReady&&i.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(i.s,i.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",n,t).bind("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r){var a=[];if(0===this.length)return a;var i=this[0],o=t?i.getElementsByTagName("*"):i.elements;if(!o)return a;var s,u,l,c,f,m,p;for(s=0,m=o.length;m>s;s++)if(f=o[s],l=f.name,l&&!f.disabled)if(t&&i.clk&&"image"==f.type)i.clk==f&&(a.push({name:l,value:e(f).val(),type:f.type}),a.push({name:l+".x",value:i.clk_x},{name:l+".y",value:i.clk_y}));else if(c=e.fieldValue(f,!0),c&&c.constructor==Array)for(r&&r.push(f),u=0,p=c.length;p>u;u++)a.push({name:l,value:c[u]});else if(n.fileapi&&"file"==f.type){r&&r.push(f);var d=f.files;if(d.length)for(u=0;d.length>u;u++)a.push({name:l,value:d[u],type:f.type});else a.push({name:l,value:"",type:f.type})}else null!==c&&c!==void 0&&(r&&r.push(f),a.push({name:l,value:c,type:f.type,required:f.required}));if(!t&&i.clk){var h=e(i.clk),v=h[0];l=v.name,l&&!v.disabled&&"image"==v.type&&(a.push({name:l,value:h.val()}),a.push({name:l+".x",value:i.clk_x},{name:l+".y",value:i.clk_y}))}return a},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor==Array)for(var i=0,o=n.length;o>i;i++)r.push({name:a,value:n[i]});else null!==n&&n!==void 0&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||void 0===o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,l="select-one"==n,c=l?o+1:u.length,f=l?o:0;c>f;f++){var m=u[f];if(m.selected){var p=m.value;if(p||(p=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),l)return p;s.push(p)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1})("undefined"!=typeof jQuery?jQuery:window.Zepto);
\ No newline at end of file
diff --git a/static/js/notie.js b/static/js/notie.js
new file mode 100644
index 0000000..c600c80
--- /dev/null
+++ b/static/js/notie.js
@@ -0,0 +1 @@
+!function (e, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.notie = t() : e.notie = t() }(this, function () { return function (e) { var t = {}; function n(s) { if (t[s]) return t[s].exports; var a = t[s] = { i: s, l: !1, exports: {} }; return e[s].call(a.exports, a, a.exports, n), a.l = !0, a.exports } return n.m = e, n.c = t, n.i = function (e) { return e }, n.d = function (e, t, s) { n.o(e, t) || Object.defineProperty(e, t, { configurable: !1, enumerable: !0, get: s }) }, n.n = function (e) { var t = e && e.__esModule ? function () { return e.default } : function () { return e }; return n.d(t, "a", t), t }, n.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, n.p = "", n(n.s = 0) }([function (e, t, n) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, a = Object.assign || function (e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (e[s] = n[s]) } return e }; var i = "top", c = { alertTime: 3, dateMonths: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], overlayClickDismiss: !0, overlayOpacity: .75, transitionCurve: "ease", transitionDuration: .3, transitionSelector: "all", classes: { container: "notie-container", textbox: "notie-textbox", textboxInner: "notie-textbox-inner", button: "notie-button", element: "notie-element", elementHalf: "notie-element-half", elementThird: "notie-element-third", overlay: "notie-overlay", backgroundSuccess: "notie-background-success", backgroundWarning: "notie-background-warning", backgroundError: "notie-background-error", backgroundInfo: "notie-background-info", backgroundNeutral: "notie-background-neutral", backgroundOverlay: "notie-background-overlay", alert: "notie-alert", inputField: "notie-input-field", selectChoiceRepeated: "notie-select-choice-repeated", dateSelectorInner: "notie-date-selector-inner", dateSelectorUp: "notie-date-selector-up" }, ids: { overlay: "notie-overlay" }, positions: { alert: i, force: i, confirm: i, input: i, select: "bottom", date: i } }, o = t.setOptions = function (e) { c = a({}, c, e, { classes: a({}, c.classes, e.classes), ids: a({}, c.ids, e.ids), positions: a({}, c.positions, e.positions) }) }, l = function () { return new Promise(function (e) { return setTimeout(e, 0) }) }, r = function (e) { return new Promise(function (t) { return setTimeout(t, 1e3 * e) }) }, d = function () { document.activeElement && document.activeElement.blur() }, u = function () { return "notie-" + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) { var t = 16 * Math.random() | 0; return ("x" === e ? t : 3 & t | 8).toString(16) }) }, p = { 1: c.classes.backgroundSuccess, success: c.classes.backgroundSuccess, good: c.classes.backgroundSuccess, 2: c.classes.backgroundWarning, warning: c.classes.backgroundWarning, 3: c.classes.backgroundError, error: c.classes.backgroundError, 4: c.classes.backgroundInfo, info: c.classes.backgroundInfo, 5: c.classes.backgroundNeutral, neutral: c.classes.backgroundNeutral }, m = function () { return c.transitionSelector + " " + c.transitionDuration + "s " + c.transitionCurve }, v = function (e) { return 13 === e.keyCode }, f = function (e) { return 27 === e.keyCode }, b = function (e, t) { e.classList.add(c.classes.container), e.style[t] = "-10000px", document.body.appendChild(e), e.style[t] = "-" + e.offsetHeight + "px", e.listener && window.addEventListener("keydown", e.listener), l().then(function () { e.style.transition = m(), e.style[t] = 0 }) }, x = function (e, t) { var n = document.getElementById(e); n && (n.style[t] = "-" + n.offsetHeight + "px", n.listener && window.removeEventListener("keydown", n.listener), r(c.transitionDuration).then(function () { n.parentNode && n.parentNode.removeChild(n) })) }, L = function (e, t) { var n = document.createElement("div"); n.id = c.ids.overlay, n.classList.add(c.classes.overlay), n.classList.add(c.classes.backgroundOverlay), n.style.opacity = 0, e && c.overlayClickDismiss && (n.onclick = function () { x(e.id, t), g() }), document.body.appendChild(n), l().then(function () { n.style.transition = m(), n.style.opacity = c.overlayOpacity }) }, g = function () { var e = document.getElementById(c.ids.overlay); e.style.opacity = 0, r(c.transitionDuration).then(function () { e.parentNode && e.parentNode.removeChild(e) }) }, h = t.hideAlerts = function (e) { var t = document.getElementsByClassName(c.classes.alert); if (t.length) { for (var n = 0; n < t.length; n++) { var s = t[n]; x(s.id, s.position) } e && r(c.transitionDuration).then(function () { return e() }) } }, y = t.alert = function (e) { var t = e.type, n = void 0 === t ? 4 : t, s = e.text, a = e.time, i = void 0 === a ? c.alertTime : a, o = e.stay, l = void 0 !== o && o, m = e.position, L = void 0 === m ? c.positions.alert || L.top : m; d(), h(); var g = document.createElement("div"), y = u(); g.id = y, g.position = L, g.classList.add(c.classes.textbox), g.classList.add(p[n]), g.classList.add(c.classes.alert), g.innerHTML = '
' + s + "
", g.onclick = function () { return x(y, L) }, g.listener = function (e) { (v(e) || f(e)) && h() }, b(g, L), i && i < 1 && (i = 1), !l && i && r(i).then(function () { return x(y, L) }) }, k = t.force = function (e, t) { var n = e.type, s = void 0 === n ? 5 : n, a = e.text, i = e.buttonText, o = void 0 === i ? "OK" : i, l = e.callback, r = e.position, m = void 0 === r ? c.positions.force || m.top : r; d(), h(); var f = document.createElement("div"), y = u(); f.id = y; var k = document.createElement("div"); k.classList.add(c.classes.textbox), k.classList.add(c.classes.backgroundInfo), k.innerHTML = '
' + a + "
"; var C = document.createElement("div"); C.classList.add(c.classes.button), C.classList.add(p[s]), C.innerHTML = o, C.onclick = function () { x(y, m), g(), l ? l() : t && t() }, f.appendChild(k), f.appendChild(C), f.listener = function (e) { v(e) && C.click() }, b(f, m), L() }, C = t.confirm = function (e, t, n) { var s = e.text, a = e.submitText, i = void 0 === a ? "Yes" : a, o = e.cancelText, l = void 0 === o ? "Cancel" : o, r = e.submitCallback, p = e.cancelCallback, m = e.position, y = void 0 === m ? c.positions.confirm || y.top : m; d(), h(); var k = document.createElement("div"), C = u(); k.id = C; var E = document.createElement("div"); E.classList.add(c.classes.textbox), E.classList.add(c.classes.backgroundInfo), E.innerHTML = '
' + s + "
"; var T = document.createElement("div"); T.classList.add(c.classes.button), T.classList.add(c.classes.elementHalf), T.classList.add(c.classes.backgroundSuccess), T.innerHTML = i, T.onclick = function () { x(C, y), g(), r ? r() : t && t() }; var M = document.createElement("div"); M.classList.add(c.classes.button), M.classList.add(c.classes.elementHalf), M.classList.add(c.classes.backgroundError), M.innerHTML = l, M.onclick = function () { x(C, y), g(), p ? p() : n && n() }, k.appendChild(E), k.appendChild(T), k.appendChild(M), k.listener = function (e) { v(e) ? T.click() : f(e) && M.click() }, b(k, y), L(k, y) }, E = function (e, t, n) { var a = e.text, i = e.submitText, o = void 0 === i ? "Submit" : i, l = e.cancelText, r = void 0 === l ? "Cancel" : l, p = e.submitCallback, m = e.cancelCallback, y = e.position, k = void 0 === y ? c.positions.input || k.top : y, C = function (e, t) { var n = {}; for (var s in e) t.indexOf(s) >= 0 || Object.prototype.hasOwnProperty.call(e, s) && (n[s] = e[s]); return n }(e, ["text", "submitText", "cancelText", "submitCallback", "cancelCallback", "position"]); d(), h(); var E = document.createElement("div"), T = u(); E.id = T; var M = document.createElement("div"); M.classList.add(c.classes.textbox), M.classList.add(c.classes.backgroundInfo), M.innerHTML = '
' + a + "
"; var H = document.createElement("input"); H.classList.add(c.classes.inputField), H.setAttribute("autocapitalize", C.autocapitalize || "none"), H.setAttribute("autocomplete", C.autocomplete || "off"), H.setAttribute("autocorrect", C.autocorrect || "off"), H.setAttribute("autofocus", C.autofocus || "true"), H.setAttribute("inputmode", C.inputmode || "verbatim"), H.setAttribute("max", C.max || ""), H.setAttribute("maxlength", C.maxlength || ""), H.setAttribute("min", C.min || ""), H.setAttribute("minlength", C.minlength || ""), H.setAttribute("placeholder", C.placeholder || ""), H.setAttribute("spellcheck", C.spellcheck || "default"), H.setAttribute("step", C.step || "any"), H.setAttribute("type", C.type || "text"), H.value = C.value || "", C.allowed && (H.oninput = function () { var e = void 0; if (Array.isArray(C.allowed)) { for (var t = "", n = C.allowed, a = 0; a < n.length; a++)"an" === n[a] ? t += "0-9a-zA-Z" : "a" === n[a] ? t += "a-zA-Z" : "n" === n[a] && (t += "0-9"), "s" === n[a] && (t += " "); e = new RegExp("[^" + t + "]", "g") } else "object" === s(C.allowed) && (e = C.allowed); H.value = H.value.replace(e, "") }); var S = document.createElement("div"); S.classList.add(c.classes.button), S.classList.add(c.classes.elementHalf), S.classList.add(c.classes.backgroundSuccess), S.innerHTML = o, S.onclick = function () { x(T, k), g(), p ? p(H.value) : t && t(H.value) }; var A = document.createElement("div"); A.classList.add(c.classes.button), A.classList.add(c.classes.elementHalf), A.classList.add(c.classes.backgroundError), A.innerHTML = r, A.onclick = function () { x(T, k), g(), m ? m(H.value) : n && n(H.value) }, E.appendChild(M), E.appendChild(H), E.appendChild(S), E.appendChild(A), E.listener = function (e) { v(e) ? S.click() : f(e) && A.click() }, b(E, k), H.focus(), L(E, k) }; t.input = E; var T = t.select = function (e, t) { var n = e.text, s = e.cancelText, a = void 0 === s ? "Cancel" : s, i = e.cancelCallback, o = e.choices, l = e.position, r = void 0 === l ? c.positions.select || r.top : l; d(), h(); var m = document.createElement("div"), v = u(); m.id = v; var y = document.createElement("div"); y.classList.add(c.classes.textbox), y.classList.add(c.classes.backgroundInfo), y.innerHTML = '
' + n + "
", m.appendChild(y), o.forEach(function (e, t) { var n = e.type, s = void 0 === n ? 1 : n, a = e.text, i = e.handler, l = document.createElement("div"); l.classList.add(p[s]), l.classList.add(c.classes.button), l.classList.add(c.classes.selectChoice); var d = o[t + 1]; d && !d.type && (d.type = 1), d && d.type === s && l.classList.add(c.classes.selectChoiceRepeated), l.innerHTML = a, l.onclick = function () { x(v, r), g(), i() }, m.appendChild(l) }); var k = document.createElement("div"); k.classList.add(c.classes.backgroundNeutral), k.classList.add(c.classes.button), k.innerHTML = a, k.onclick = function () { x(v, r), g(), i ? i() : t && t() }, m.appendChild(k), m.listener = function (e) { f(e) && k.click() }, b(m, r), L(m, r) }, M = t.date = function (e, t, n) { var s = e.value, a = void 0 === s ? new Date : s, i = e.submitText, o = void 0 === i ? "OK" : i, l = e.cancelText, r = void 0 === l ? "Cancel" : l, p = e.submitCallback, m = e.cancelCallback, y = e.position, k = void 0 === y ? c.positions.date || k.top : y; d(), h(); var C = "▾", E = document.createElement("div"), T = document.createElement("div"), M = document.createElement("div"), H = function (e) { E.innerHTML = c.dateMonths[e.getMonth()], T.innerHTML = e.getDate(), M.innerHTML = e.getFullYear() }, S = function (e) { H(a) }, A = function (e) { var t = new Date(a.getFullYear(), a.getMonth() + e + 1, 0).getDate(); a.getDate() > t && a.setDate(t), a.setMonth(a.getMonth() + e), H(a) }, w = function (e) { a.setDate(a.getDate() + e), H(a) }, D = function (e) { a.getFullYear() + e < 0 ? a.setFullYear(0) : a.setFullYear(a.getFullYear() + e), H(a) }, O = document.createElement("div"), I = u(); O.id = I; var N = document.createElement("div"); N.classList.add(c.classes.backgroundInfo); var F = document.createElement("div"); F.classList.add(c.classes.dateSelectorInner); var j = document.createElement("div"); j.classList.add(c.classes.button), j.classList.add(c.classes.elementThird), j.classList.add(c.classes.dateSelectorUp), j.innerHTML = C; var Y = document.createElement("div"); Y.classList.add(c.classes.button), Y.classList.add(c.classes.elementThird), Y.classList.add(c.classes.dateSelectorUp), Y.innerHTML = C; var P = document.createElement("div"); P.classList.add(c.classes.button), P.classList.add(c.classes.elementThird), P.classList.add(c.classes.dateSelectorUp), P.innerHTML = C, E.classList.add(c.classes.element), E.classList.add(c.classes.elementThird), E.innerHTML = c.dateMonths[a.getMonth()], T.classList.add(c.classes.element), T.classList.add(c.classes.elementThird), T.setAttribute("contentEditable", !0), T.addEventListener("input", function (e) { var t = new Date(a.getFullYear(), a.getMonth() + 1, 0).getDate(), n = e.target.textContent.replace(/^0+/, "").replace(/[^\d]/g, "").slice(0, 2); Number(n) > t && (n = t.toString()), e.target.textContent = n, Number(n) < 1 && (n = "1"), a.setDate(Number(n)) }), T.addEventListener("blur", S), T.innerHTML = a.getDate(), M.classList.add(c.classes.element), M.classList.add(c.classes.elementThird), M.setAttribute("contentEditable", !0), M.addEventListener("input", function (e) { var t = e.target.textContent.replace(/^0+/, "").replace(/[^\d]/g, "").slice(0, 4); e.target.textContent = t, a.setFullYear(Number(t)) }), M.addEventListener("blur", S), M.innerHTML = a.getFullYear(); var z = document.createElement("div"); z.classList.add(c.classes.button), z.classList.add(c.classes.elementThird), z.innerHTML = C; var U = document.createElement("div"); U.classList.add(c.classes.button), U.classList.add(c.classes.elementThird), U.innerHTML = C; var _ = document.createElement("div"); _.classList.add(c.classes.button), _.classList.add(c.classes.elementThird), _.innerHTML = C, j.onclick = function () { return A(1) }, Y.onclick = function () { return w(1) }, P.onclick = function () { return D(1) }, z.onclick = function () { return A(-1) }, U.onclick = function () { return w(-1) }, _.onclick = function () { return D(-1) }; var B = document.createElement("div"); B.classList.add(c.classes.button), B.classList.add(c.classes.elementHalf), B.classList.add(c.classes.backgroundSuccess), B.innerHTML = o, B.onclick = function () { x(I, k), g(), p ? p(a) : t && t(a) }; var J = document.createElement("div"); J.classList.add(c.classes.button), J.classList.add(c.classes.elementHalf), J.classList.add(c.classes.backgroundError), J.innerHTML = r, J.onclick = function () { x(I, k), g(), m ? m(a) : n && n(a) }, F.appendChild(j), F.appendChild(Y), F.appendChild(P), F.appendChild(E), F.appendChild(T), F.appendChild(M), F.appendChild(z), F.appendChild(U), F.appendChild(_), N.appendChild(F), O.appendChild(N), O.appendChild(B), O.appendChild(J), O.listener = function (e) { v(e) ? B.click() : f(e) && J.click() }, b(O, k), L(O, k) }; t.default = { alert: y, force: k, confirm: C, input: E, select: T, date: M, setOptions: o, hideAlerts: h } }]) });
\ No newline at end of file
diff --git a/static/js/progressbar.js b/static/js/progressbar.js
new file mode 100644
index 0000000..e76ad5d
--- /dev/null
+++ b/static/js/progressbar.js
@@ -0,0 +1,17 @@
+function scrollProgressBarWidth(number) {
+ var getMax = function() {
+ return $(document).height() - $(window).height();
+ };
+ var progressBar = $(".progress-bard"),
+ max = getMax(),
+ value,
+ width;
+
+ var setWidth = function() {
+ progressBar.css({
+ width: number + '%'
+ });
+ };
+
+ setWidth();
+}
\ No newline at end of file
diff --git a/views/components/LoadHead.php b/views/components/LoadHead.php
index 05647f7..aa0b125 100644
--- a/views/components/LoadHead.php
+++ b/views/components/LoadHead.php
@@ -9,7 +9,46 @@
+
+
-
\ No newline at end of file
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/views/pages/Profile/UploadPhoto.php b/views/pages/Profile/UploadPhoto.php
index d82a659..0cc38af 100644
--- a/views/pages/Profile/UploadPhoto.php
+++ b/views/pages/Profile/UploadPhoto.php
@@ -641,17 +641,7 @@ $user = new User(Auth::userid());
Можно пояснить ценность фотографии, если на ней изображёно что-то редкое или уникальное (ведь фотомодераторам это может быть неизвестно).
-
-
-
-
-
-
-
-
-
Если установить эту галочку, после загрузки фото не будут очищены привязки к ТС и галереям. Установите её, если Вы планируете загрузить еще фото в тот же профиль или галерею.
-
-
+
@@ -670,22 +660,7 @@ $user = new User(Auth::userid());