Comparing version 0.1.2 to 0.1.3
/** | ||
* ____ __ ____ _ _ _ ___ _ ____ | ||
* | _ \ / /_ / ___| (_) ___ _ __ | |_ __ __/ _ \ / | |___ \ | ||
* | | | | '_ \ | | | | |/ _ \ '_ \| __| \ \ / / | | || | __) | | ||
* | |_| | (_) | | |___| | | __/ | | | |_ \ V /| |_| || |_ / __/ | ||
* |____/ \___/ \____|_|_|\___|_| |_|\__| \_/ \___(_)_(_)_____| | ||
* ____ __ ____ _ _ _ ___ _ _____ | ||
* | _ \ / /_ / ___| (_) ___ _ __ | |_ __ __/ _ \ / | |___ / | ||
* | | | | '_ \ | | | | |/ _ \ '_ \| __| \ \ / / | | || | |_ \ | ||
* | |_| | (_) | | |___| | | __/ | | | |_ \ V /| |_| || |_ ___) | | ||
* |____/ \___/ \____|_|_|\___|_| |_|\__| \_/ \___(_)_(_)____/ | ||
* | ||
@@ -1699,2 +1699,6 @@ * | ||
var render = D6._RENDER = function (viewName, context) { | ||
return views[viewName].call(views, context || D6._CONTEXT); | ||
}; | ||
var isReady = false; | ||
@@ -1756,6 +1760,12 @@ | ||
var url = removeHash(form.action || location.href.replace(/\?.*$/, '')); | ||
var enc = getAttribute(form, 'enctype'); | ||
var isGet = (lower(form.method) == 'get'); | ||
if (isSameDomain(url)) { | ||
if (isSameDomain(url) && !/multipart/.test(enc)) { | ||
preventDefault(event); | ||
var isValid = form._VALIDATE ? form._VALIDATE() : true; | ||
if (!isValid) { | ||
return; | ||
} | ||
// Get form data. | ||
@@ -1762,0 +1772,0 @@ var data = []; |
@@ -1,1 +0,1 @@ | ||
!function(n){var t=function(){},e=t,r=t,o=function(){var t=n.XMLHttpRequest,e=n.ActiveXObject;return t?new t:e?new e("Microsoft.XMLHTTP"):!1},i=function(n,t,u,c){tt(t)&&(c=u,u=t,t=0);var a=o();return a&&(c=c||r,u=u||e,a.onreadystatechange=function(){if(4==a.readyState){j('[Jymin] Received response from "'+n+'". ('+i._WAITING+" in progress)."),--i._WAITING;var t=a.status,o=200==t,f=o?u||e:c||r,s=parse(a.responseText);s._STATUS=t,s._REQUEST=a,f(s)}},a.open(t?"POST":"GET",n,!0),a.setRequestHeader("x-requested-with","XMLHttpRequest"),t&&a.setRequestHeader("content-type","application/x-www-form-urlencoded"),a._URL=n,t&&(a._BODY=t),a._TIME=getTime(),i._WAITING=(i._WAITING||0)+1,j('[Jymin] Sending request to "'+n+'". ('+i._WAITING+" in progress)."),a.send(t||null)),!0},u=function(n,t){if(n)for(var e=0,r=f(n);r>e;e++){var o=t(n[e],e,n);if(o===!1)break}},c=function(n,t){if(n)for(var e in n){var r=t(e,n[e],n);if(r===!1)break}},a=function(n,t){return n&&t&&c(t,function(t,e){n[t]=e}),n},f=function(n){return et(n)||nt(n)?n.length:0},s=function(n){return f(n)>1},l=function(n,t){return rt(n)&&n.push(t),t},p=function(n){for(var t=function(t){n.push(t)},e=1,r=arguments.length;r>e;e++)u(arguments[e],t)},v=function(n,t){return f(arguments)<2&&(t=n,n=document),nt(t)?n.getElementById(t):t},d=function(n,t){return f(arguments)<2&&(t=n,n=document),n.getElementsByTagName(t||"*")},m=function(n,t){f(arguments)<2&&(t=n,n=document),t=t.split(".");var e,r=(t[0]||"*").toUpperCase(),o=t[1],i="*"==r;return o?(e=[],n.getElementsByClassName?u(n.getElementsByClassName(o),function(n){(i||n.tagName==r)&&e.push(n)}):u(d(n,r),function(n){L(n,o)&&e.push(n)})):e=d(n,r),e},g=function(n,t){var e=(v(n)||{}).parentNode;return t&&e&&e.tagName!=t&&(e=g(e,t)),e},_=function(n){if(!nt(n))return n;n=n||"";var t=n.split("?"),e=t[0].split("."),r=e.slice(1).join(" "),o=e[0].split("#"),i=o[0]||"div",c=o[1],a=t[1],f=_[i]||(_[i]=document.createElement(i)),s=f.cloneNode(!0);return c&&(s.id=c),r&&(s.className=r),a&&(a=a.split("&"),u(a,function(n){var t=n.split("="),e=Y(t[0]),r=Y(t[1]);s[e]=r,s.setAttribute(e,r)})),s},T=function(n,t,e){var r=_(t);return n&&E(n,r,e),r},h=function(n){return v(n).childNodes},E=function(n,t,e){n=v(n),t=v(t),n&&t&&(Z(e)&&(e=h(n)[e]),n.insertBefore(t,e||null))},D=function(n,t){n=v(n),n&&(n.innerHTML=t)},N=function(n,t){return n=v(n),n?n.getAttribute(t):void 0},R=function(n,t){return N(n,"data-"+t)},A=function(n){return n=v(n),n?n.className:void 0},L=function(n,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(A(n))},y=function(n,t){n=v(n),n&&(n.className+=" "+t)},I=function(n,t){if(n=v(n)){var e=A(n).split(/\s/),r=[];u(e,function(n){n!=t&&r.push(n)}),n.className=r.join(" ")}},C=function(n,t){var e=d("head")[0],r=T(e,"script");t&&(r.onload=t,r.onreadystatechange=function(){w(r)&&t()}),r.src=n},b=function(n,t,e){(!t||tt(t))&&(e=t,t=n,n=document);var r;if(P(t,",")){r=[];var o=V(t);u(o,function(t){var e=b(n,t);f(e)&&p(r,e)})}else if(P(t," ")){var i=t.indexOf(" "),c=t.substr(0,i),a=t.substr(i+1);r=[],b(n,c,function(n){var t=b(n,a);p(r,t)})}else if("#"==t[0]){var s=t.substr(1),l=v(n.ownerDocument||document,s);if(l)for(var d=g(l);d;){if(d===n){r=[l];break}d=g(d)}}else r=m(n,t);return e&&u(r,e),r||[]},S=function(t,e,r,o){var i=rt(c);if(i||P(e," ")){var c=i?e:F(e);return void u(c,function(n){S(t,n,r,o)})}if(t=v(t)){var a=function(i){i=i||n.event;var u=i.target||i.srcElement;3==u.nodeType&&(u=g(u));var c=i.relatedTarget||i.toElement;if("mouseout"==e)for(;c=g(c);)if(c==u)return;var a=r(t,i,u,o);a===!1&&G(i)};t.addEventListener?t.addEventListener(e,a,!0):t.attachEvent?t.attachEvent("on"+e,a):t["on"+e]=a;var f=t._HANDLERS=t._HANDLERS||{},s=f[e]=f[e]||[];l(s,r)}},O=function(n,t,e,r,o){tt(t)?(o=e,r=t,e=n,t="",n=document):tt(e)&&(o=r,r=e,e=t,t=n,n=document);var i=t.split(","),c=function(n,t,e,o){u(i,function(i){var u=!1;if("#"==i[0]&&i==e.id)u=!0;else{var c=i.split("."),a=c[0].toUpperCase(),f=c[1];a&&e.tagName!=a||(!f||L(e,f))&&(u=!0)}if(u){var s=r(e,t,n,o);s===!1&&G(t)}}),e=g(e),e&&c(n,t,e,o)};S(n,e,c,o)},G=function(n){n?n.preventDefault&&n.preventDefault():W("[Jymin] Called preventDefault on a non-event.",n)},w=function(n){var t=n.readyState;return"complete"==t||"script"==n.tagName&&"loaded"==t},H=function(n){if(n=v(n)){var t=n.type[0],e=n.value,r=n.checked,o=n.options;return"c"==t||"r"==t?e=r?e:null:n.multiple?(e=[],u(o,function(n){n.selected&&l(e,n.value)})):o&&(e=o[n.selectedIndex].value),e}},U=function(){var t=n.history||{};return u(["push","replace"],function(n){var e=t[n+"State"];t[n]=function(n){e&&e.apply(t,[null,null,n])}}),t},x=function(n){U().push(n)},k=function(n){U().replace(n)},B=function(t){S(n,"popstate",t)},W=function(){q("error",arguments)},j=function(){q("log",arguments)},q=function(t,e){var r=n.console;r&&r[t]&&r[t].apply(r,e)},M=function(n){return nt(n)?n:""+n},P=function(n,t){return M(n).indexOf(t)>-1},X=function(n,t){return 0==M(n).indexOf(t)},$=function(n){return M(n).replace(/^\s+|\s+$/g,"")},V=function(n){return M(n).split(",")},F=function(n){return M(n).split(" ")},J=function(n,t,e){var r=n.match(t);r&&e.apply(n,r)},K=function(n){return M(n).toLowerCase()},Q=function(n){return encodeURIComponent(n)},Y=function(n){return decodeURIComponent(n)},z=function(n,t){return typeof n==t},Z=function(n){return z(n,"number")},nt=function(n){return z(n,"string")},tt=function(n){return z(n,"function")},et=function(n,t){return n instanceof(t||Object)},rt=function(n){return et(n,Array)};!function(){var t,e=n.D6=function(n){a(r,n),c||f()},r=e._VIEWS={},o=e._CACHE={},c=!1,f=function(){O("a","click",function(n,t){var e=v(n.href);if(e){var r=t.which,o=!r||1==r;p(e)&&o&&(G(t),h(e,0,n))}}),O("a","mouseover",function(n){if(!L(n,"_NOPREFETCH")){var t=v(n.href),e=t!=v(location);e&&p(t)&&T(t)}}),O("input,select,textarea","change",function(n){var t=n.form;t&&(t._LAST_CHANGED=getTime())}),O("input,button","click",function(n){if("submit"==n.type){var t=n.form;t&&t._CLICKED_BUTTON!=n&&(t._CLICKED_BUTTON=n,t._LAST_CHANGED=getTime())}}),O("form","submit",function(n,t){var e=v(n.action||location.href.replace(/\?.*$/,"")),r="get"==K(n.method);if(p(e)){G(t);var o=[];b(n,"input,select,textarea,button",function(t){var e=t.name,r=t.type,i=H(t),c=!e;c=c||"radio"==r&&!i,c=c||"submit"==r&&t!=n._CLICKED_BUTTON,c||(nt(i)?l(o,Q(e)+"="+Q(i)):u(i,function(n){l(o,Q(e)+"="+Q(n))}))}),r?(e+=(P(e,"?")?"&":"?")+o.join("&"),o=0):(e=g(e,n._LAST_CHANGED),o=o.join("&")),h(e,o,n)}});B(function(){h(location)}),c=!0},p=function(n){return X(n,location.protocol+"//"+location.host+"/")},v=function(n){return M(n).replace(/#.*$/,"")},m=function(n){return M(n).replace(/\?.*$/,"")},g=function(n,t){return n+(P(n,"?")?"&":"?")+"d6="+(t||1)},_=function(n){return M(n).replace(/[&\?]d6=[r\d]+/g,"")},T=function(n){o[n]||(j('[D6] Prefetching "'+n+'".'),o[n]=[function(t){j('[D6] Caching contents for prefetched URL "'+n+'".'),o[n]=t;var e=t.ttl||1e4;setTimeout(function(){rt(o[n])||(j('[D6] Removing "'+n+'" from prefetch cache.'),delete o[n])},e)}],E(n))},h=e._LOAD_URL=function(n,t,r){e._LOADING_URL=_(n),e._LOAD_STARTED=getTime();var i=R(r,"_D6_TARGET"),u=R(r,"_D6_VIEW");i&&b(i,function(n){y(n,"_D6_TARGET")}),j('[D6] Loading "'+n+'".'),b("._SPINNER",function(n){y(n,"_LOADING")});var c=function(n,t){N(n,t,i,u)},a=o[n];a?rt(a)?(j('[D6] Queueing callback for "'+n+'".'),l(a,c)):(j('[D6] Found precached response for "'+n+'".'),c(a,n)):(j('[D6] Creating callback queue for "'+n+'".'),o[n]=[c],E(n,t))},E=function(n,t){j('[D6] Fetching response for "'+n+'".');var e=g(n),r=function(t){var e=o[n];o[n]=t,j("[D6] Running "+e.length+' callback(s) for "'+n+'".'),u(e,function(e){e(t,n)})};i(e,t,r,r,1)},N=function(t,i,u,c){e._CONTEXT=t;var a,f=(t._ERROR,_(t.d6u||i)),s=c||t.d6||"error0",l=e._VIEW=r[s];if(i=_(i),i==e._LOADING_URL&&(b("._SPINNER,._D6_TARGET",function(n){I(n,"_LOADING")}),"<"==$(t)[0]?(a=t,j("[D6] Rendering HTML string")):l?(a=l.call(r,t),j('[D6] Rendering view "'+s+'".')):(W('[D6] View "'+s+'" not found. Changing location.'),n.location=f)),a){A(a,u);var p=m(f)==m(location.href),v=p?k:x;v(f),delete o[i]}},A=function(n,t){var e=document.body;J(n,/<title.*?>([\s\S]+)<\/title>/,function(n,t){document.title=t});var r=[];n=n.replace(/<script.*?>([\s\S]*?)<\/script>/g,function(n,t){return t&&(r.push(t),n=""),n}),t?(b(t,function(t){D(t,n)}),u(r,execute),b(t,function(n){onReady(n)})):(J(n,/<body.*?>([\s\S]+)<\/body>/,function(n,t){D(e,t),e.scrollTop=0}),u(r,execute),onReady(document))},S=d("script");u(S,function(n){var e=M(n.src).split("?");s(e)&&(t=e[1])}),C("/d6.js?"+t)}()}(window); | ||
!function(n){var t=function(){},e=t,r=t,o=function(){var t=n.XMLHttpRequest,e=n.ActiveXObject;return t?new t:e?new e("Microsoft.XMLHTTP"):!1},i=function(n,t,u,c){tt(t)&&(c=u,u=t,t=0);var a=o();return a&&(c=c||r,u=u||e,a.onreadystatechange=function(){if(4==a.readyState){j('[Jymin] Received response from "'+n+'". ('+i._WAITING+" in progress)."),--i._WAITING;var t=a.status,o=200==t,f=o?u||e:c||r,s=parse(a.responseText);s._STATUS=t,s._REQUEST=a,f(s)}},a.open(t?"POST":"GET",n,!0),a.setRequestHeader("x-requested-with","XMLHttpRequest"),t&&a.setRequestHeader("content-type","application/x-www-form-urlencoded"),a._URL=n,t&&(a._BODY=t),a._TIME=getTime(),i._WAITING=(i._WAITING||0)+1,j('[Jymin] Sending request to "'+n+'". ('+i._WAITING+" in progress)."),a.send(t||null)),!0},u=function(n,t){if(n)for(var e=0,r=f(n);r>e;e++){var o=t(n[e],e,n);if(o===!1)break}},c=function(n,t){if(n)for(var e in n){var r=t(e,n[e],n);if(r===!1)break}},a=function(n,t){return n&&t&&c(t,function(t,e){n[t]=e}),n},f=function(n){return et(n)||nt(n)?n.length:0},s=function(n){return f(n)>1},l=function(n,t){return rt(n)&&n.push(t),t},p=function(n){for(var t=function(t){n.push(t)},e=1,r=arguments.length;r>e;e++)u(arguments[e],t)},v=function(n,t){return f(arguments)<2&&(t=n,n=document),nt(t)?n.getElementById(t):t},d=function(n,t){return f(arguments)<2&&(t=n,n=document),n.getElementsByTagName(t||"*")},m=function(n,t){f(arguments)<2&&(t=n,n=document),t=t.split(".");var e,r=(t[0]||"*").toUpperCase(),o=t[1],i="*"==r;return o?(e=[],n.getElementsByClassName?u(n.getElementsByClassName(o),function(n){(i||n.tagName==r)&&e.push(n)}):u(d(n,r),function(n){L(n,o)&&e.push(n)})):e=d(n,r),e},_=function(n,t){var e=(v(n)||{}).parentNode;return t&&e&&e.tagName!=t&&(e=_(e,t)),e},g=function(n){if(!nt(n))return n;n=n||"";var t=n.split("?"),e=t[0].split("."),r=e.slice(1).join(" "),o=e[0].split("#"),i=o[0]||"div",c=o[1],a=t[1],f=g[i]||(g[i]=document.createElement(i)),s=f.cloneNode(!0);return c&&(s.id=c),r&&(s.className=r),a&&(a=a.split("&"),u(a,function(n){var t=n.split("="),e=Y(t[0]),r=Y(t[1]);s[e]=r,s.setAttribute(e,r)})),s},T=function(n,t,e){var r=g(t);return n&&D(n,r,e),r},E=function(n){return v(n).childNodes},D=function(n,t,e){n=v(n),t=v(t),n&&t&&(Z(e)&&(e=E(n)[e]),n.insertBefore(t,e||null))},N=function(n,t){n=v(n),n&&(n.innerHTML=t)},h=function(n,t){return n=v(n),n?n.getAttribute(t):void 0},R=function(n,t){return h(n,"data-"+t)},A=function(n){return n=v(n),n?n.className:void 0},L=function(n,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(A(n))},I=function(n,t){n=v(n),n&&(n.className+=" "+t)},y=function(n,t){if(n=v(n)){var e=A(n).split(/\s/),r=[];u(e,function(n){n!=t&&r.push(n)}),n.className=r.join(" ")}},C=function(n,t){var e=d("head")[0],r=T(e,"script");t&&(r.onload=t,r.onreadystatechange=function(){w(r)&&t()}),r.src=n},b=function(n,t,e){(!t||tt(t))&&(e=t,t=n,n=document);var r;if(P(t,",")){r=[];var o=$(t);u(o,function(t){var e=b(n,t);f(e)&&p(r,e)})}else if(P(t," ")){var i=t.indexOf(" "),c=t.substr(0,i),a=t.substr(i+1);r=[],b(n,c,function(n){var t=b(n,a);p(r,t)})}else if("#"==t[0]){var s=t.substr(1),l=v(n.ownerDocument||document,s);if(l)for(var d=_(l);d;){if(d===n){r=[l];break}d=_(d)}}else r=m(n,t);return e&&u(r,e),r||[]},O=function(t,e,r,o){var i=rt(c);if(i||P(e," ")){var c=i?e:F(e);return void u(c,function(n){O(t,n,r,o)})}if(t=v(t)){var a=function(i){i=i||n.event;var u=i.target||i.srcElement;3==u.nodeType&&(u=_(u));var c=i.relatedTarget||i.toElement;if("mouseout"==e)for(;c=_(c);)if(c==u)return;var a=r(t,i,u,o);a===!1&&G(i)};t.addEventListener?t.addEventListener(e,a,!0):t.attachEvent?t.attachEvent("on"+e,a):t["on"+e]=a;var f=t._HANDLERS=t._HANDLERS||{},s=f[e]=f[e]||[];l(s,r)}},S=function(n,t,e,r,o){tt(t)?(o=e,r=t,e=n,t="",n=document):tt(e)&&(o=r,r=e,e=t,t=n,n=document);var i=t.split(","),c=function(n,t,e,o){u(i,function(i){var u=!1;if("#"==i[0]&&i==e.id)u=!0;else{var c=i.split("."),a=c[0].toUpperCase(),f=c[1];a&&e.tagName!=a||(!f||L(e,f))&&(u=!0)}if(u){var s=r(e,t,n,o);s===!1&&G(t)}}),e=_(e),e&&c(n,t,e,o)};O(n,e,c,o)},G=function(n){n?n.preventDefault&&n.preventDefault():W("[Jymin] Called preventDefault on a non-event.",n)},w=function(n){var t=n.readyState;return"complete"==t||"script"==n.tagName&&"loaded"==t},H=function(n){if(n=v(n)){var t=n.type[0],e=n.value,r=n.checked,o=n.options;return"c"==t||"r"==t?e=r?e:null:n.multiple?(e=[],u(o,function(n){n.selected&&l(e,n.value)})):o&&(e=o[n.selectedIndex].value),e}},U=function(){var t=n.history||{};return u(["push","replace"],function(n){var e=t[n+"State"];t[n]=function(n){e&&e.apply(t,[null,null,n])}}),t},x=function(n){U().push(n)},k=function(n){U().replace(n)},B=function(t){O(n,"popstate",t)},W=function(){q("error",arguments)},j=function(){q("log",arguments)},q=function(t,e){var r=n.console;r&&r[t]&&r[t].apply(r,e)},M=function(n){return nt(n)?n:""+n},P=function(n,t){return M(n).indexOf(t)>-1},V=function(n,t){return 0==M(n).indexOf(t)},X=function(n){return M(n).replace(/^\s+|\s+$/g,"")},$=function(n){return M(n).split(",")},F=function(n){return M(n).split(" ")},J=function(n,t,e){var r=n.match(t);r&&e.apply(n,r)},K=function(n){return M(n).toLowerCase()},Q=function(n){return encodeURIComponent(n)},Y=function(n){return decodeURIComponent(n)},z=function(n,t){return typeof n==t},Z=function(n){return z(n,"number")},nt=function(n){return z(n,"string")},tt=function(n){return z(n,"function")},et=function(n,t){return n instanceof(t||Object)},rt=function(n){return et(n,Array)};!function(){var t,e=n.D6=function(n){a(r,n),c||f()},r=e._VIEWS={},o=e._CACHE={},c=(e._RENDER=function(n,t){return r[n].call(r,t||e._CONTEXT)},!1),f=function(){S("a","click",function(n,t){var e=v(n.href);if(e){var r=t.which,o=!r||1==r;p(e)&&o&&(G(t),E(e,0,n))}}),S("a","mouseover",function(n){if(!L(n,"_NOPREFETCH")){var t=v(n.href),e=t!=v(location);e&&p(t)&&T(t)}}),S("input,select,textarea","change",function(n){var t=n.form;t&&(t._LAST_CHANGED=getTime())}),S("input,button","click",function(n){if("submit"==n.type){var t=n.form;t&&t._CLICKED_BUTTON!=n&&(t._CLICKED_BUTTON=n,t._LAST_CHANGED=getTime())}}),S("form","submit",function(n,t){var e=v(n.action||location.href.replace(/\?.*$/,"")),r=h(n,"enctype"),o="get"==K(n.method);if(p(e)&&!/multipart/.test(r)){G(t);var i=n._VALIDATE?n._VALIDATE():!0;if(!i)return;var c=[];b(n,"input,select,textarea,button",function(t){var e=t.name,r=t.type,o=H(t),i=!e;i=i||"radio"==r&&!o,i=i||"submit"==r&&t!=n._CLICKED_BUTTON,i||(nt(o)?l(c,Q(e)+"="+Q(o)):u(o,function(n){l(c,Q(e)+"="+Q(n))}))}),o?(e+=(P(e,"?")?"&":"?")+c.join("&"),c=0):(e=_(e,n._LAST_CHANGED),c=c.join("&")),E(e,c,n)}});B(function(){E(location)}),c=!0},p=function(n){return V(n,location.protocol+"//"+location.host+"/")},v=function(n){return M(n).replace(/#.*$/,"")},m=function(n){return M(n).replace(/\?.*$/,"")},_=function(n,t){return n+(P(n,"?")?"&":"?")+"d6="+(t||1)},g=function(n){return M(n).replace(/[&\?]d6=[r\d]+/g,"")},T=function(n){o[n]||(j('[D6] Prefetching "'+n+'".'),o[n]=[function(t){j('[D6] Caching contents for prefetched URL "'+n+'".'),o[n]=t;var e=t.ttl||1e4;setTimeout(function(){rt(o[n])||(j('[D6] Removing "'+n+'" from prefetch cache.'),delete o[n])},e)}],D(n))},E=e._LOAD_URL=function(n,t,r){e._LOADING_URL=g(n),e._LOAD_STARTED=getTime();var i=R(r,"_D6_TARGET"),u=R(r,"_D6_VIEW");i&&b(i,function(n){I(n,"_D6_TARGET")}),j('[D6] Loading "'+n+'".'),b("._SPINNER",function(n){I(n,"_LOADING")});var c=function(n,t){A(n,t,i,u)},a=o[n];a?rt(a)?(j('[D6] Queueing callback for "'+n+'".'),l(a,c)):(j('[D6] Found precached response for "'+n+'".'),c(a,n)):(j('[D6] Creating callback queue for "'+n+'".'),o[n]=[c],D(n,t))},D=function(n,t){j('[D6] Fetching response for "'+n+'".');var e=_(n),r=function(t){var e=o[n];o[n]=t,j("[D6] Running "+e.length+' callback(s) for "'+n+'".'),u(e,function(e){e(t,n)})};i(e,t,r,r,1)},A=function(t,i,u,c){e._CONTEXT=t;var a,f=(t._ERROR,g(t.d6u||i)),s=c||t.d6||"error0",l=e._VIEW=r[s];if(i=g(i),i==e._LOADING_URL&&(b("._SPINNER,._D6_TARGET",function(n){y(n,"_LOADING")}),"<"==X(t)[0]?(a=t,j("[D6] Rendering HTML string")):l?(a=l.call(r,t),j('[D6] Rendering view "'+s+'".')):(W('[D6] View "'+s+'" not found. Changing location.'),n.location=f)),a){O(a,u);var p=m(f)==m(location.href),v=p?k:x;v(f),delete o[i]}},O=function(n,t){var e=document.body;J(n,/<title.*?>([\s\S]+)<\/title>/,function(n,t){document.title=t});var r=[];n=n.replace(/<script.*?>([\s\S]*?)<\/script>/g,function(n,t){return t&&(r.push(t),n=""),n}),t?(b(t,function(t){N(t,n)}),u(r,execute),b(t,function(n){onReady(n)})):(J(n,/<body.*?>([\s\S]+)<\/body>/,function(n,t){N(e,t),e.scrollTop=0}),u(r,execute),onReady(document))},w=d("script");u(w,function(n){var e=M(n.src).split("?");s(e)&&(t=e[1])}),C("/d6.js?"+t)}()}(window); |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "d6.js", | ||
@@ -10,0 +10,0 @@ "homepage": "http://lighter.io/d6", |
@@ -24,2 +24,6 @@ /** | ||
var render = D6._RENDER = function (viewName, context) { | ||
return views[viewName].call(views, context || D6._CONTEXT); | ||
}; | ||
var isReady = false; | ||
@@ -81,6 +85,12 @@ | ||
var url = removeHash(form.action || location.href.replace(/\?.*$/, '')); | ||
var enc = getAttribute(form, 'enctype'); | ||
var isGet = (lower(form.method) == 'get'); | ||
if (isSameDomain(url)) { | ||
if (isSameDomain(url) && !/multipart/.test(enc)) { | ||
preventDefault(event); | ||
var isValid = form._VALIDATE ? form._VALIDATE() : true; | ||
if (!isValid) { | ||
return; | ||
} | ||
// Get form data. | ||
@@ -87,0 +97,0 @@ var data = []; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76571
2324