Merge remote-tracking branch 'origin/rewrite' into rewrite
This commit is contained in:
commit
64ce1b891c
2 changed files with 2 additions and 2 deletions
|
|
@ -1143,7 +1143,7 @@ var _20 = function($window, redrawService0) {
|
|||
m.route = _20(window, redrawService)
|
||||
m.withAttr = function(attrName, callback1, context) {
|
||||
return function(e) {
|
||||
return callback1.call(context || this, attrName in e.currentTarget ? e.currentTarget[attrName] : e.currentTarget.getAttribute(attrName))
|
||||
callback1.call(context || this, attrName in e.currentTarget ? e.currentTarget[attrName] : e.currentTarget.getAttribute(attrName))
|
||||
}
|
||||
}
|
||||
var _28 = coreRenderer(window)
|
||||
|
|
|
|||
2
mithril.min.js
vendored
2
mithril.min.js
vendored
|
|
@ -38,5 +38,5 @@ m="function"===typeof setImmediate?setImmediate:setTimeout,l,p={prefix:"#!",getP
|
|||
h?(m=k?k.state:null,v=k?k.title:null,a.onpopstate(),k&&k.replace?a.history.replaceState(m,v,p.prefix+c):a.history.pushState(m,v,p.prefix+c)):a.location.href=p.prefix+c},defineRoutes:function(c,l,m){function b(){var b=p.getPath(),h={},k=d(b,h,h),u=a.history.state;if(null!=u)for(var q in u)h[q]=u[q];for(var r in c)if(u=new RegExp("^"+r.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$"),u.test(k)){k.replace(u,function(){for(var a=r.match(/:[^\/]+/g)||[],d=[].slice.call(arguments,
|
||||
1,-2),k=0;k<a.length;k++)h[a[k].replace(/:|\./g,"")]=decodeURIComponent(d[k]);l(c[r],h,b,r)});return}m(b,h)}h?a.onpopstate=k(b):"#"===p.prefix.charAt(0)&&(a.onhashchange=b);b()}};return p};B.route=function(a,c){var k=R(a),d=function(a){return a},h,m,l,p,r,q=function(a,b,q){if(null==a)throw Error("Ensure the DOM element that was passed to `m.route` is not undefined");var u=function(){null!=h&&c.render(a,h(x(m,l.key,l)))},w=function(){k.setPath(b,null,{replace:!0})};k.defineRoutes(q,function(a,b,c){var k=
|
||||
r=function(a,n){k===r&&(m=null!=n&&"function"===typeof n.view?n:"div",l=b,p=c,r=null,h=(a.render||d).bind(a),u())};a.view?k({},a):a.onmatch?Q.resolve(a.onmatch(b,c)).then(function(b){k(a,b)},w):k(a,"div")},w);c.subscribe(a,u)};q.set=function(a,b,c){null!=r&&(c={replace:!0});r=null;k.setPath(a,b,c)};q.get=function(){return p};q.prefix=function(a){k.prefix=a};q.link=function(a){a.dom.setAttribute("href",k.prefix+a.attrs.href);a.dom.onclick=function(a){a.ctrlKey||a.metaKey||a.shiftKey||2===a.which||
|
||||
(a.preventDefault(),a.redraw=!1,a=this.getAttribute("href"),0===a.indexOf(k.prefix)&&(a=a.slice(k.prefix.length)),q.set(a,void 0,void 0))}};q.param=function(a){return"undefined"!==typeof l&&"undefined"!==typeof a?l[a]:l};return q}(window,F);B.withAttr=function(a,c,k){return function(d){return c.call(k||this,a in d.currentTarget?d.currentTarget[a]:d.currentTarget.getAttribute(a))}};var S=M(window);B.render=S.render;B.redraw=F.redraw;B.request=I.request;B.jsonp=I.jsonp;B.parseQueryString=J;B.buildQueryString=
|
||||
(a.preventDefault(),a.redraw=!1,a=this.getAttribute("href"),0===a.indexOf(k.prefix)&&(a=a.slice(k.prefix.length)),q.set(a,void 0,void 0))}};q.param=function(a){return"undefined"!==typeof l&&"undefined"!==typeof a?l[a]:l};return q}(window,F);B.withAttr=function(a,c,k){return function(d){c.call(k||this,a in d.currentTarget?d.currentTarget[a]:d.currentTarget.getAttribute(a))}};var S=M(window);B.render=S.render;B.redraw=F.redraw;B.request=I.request;B.jsonp=I.jsonp;B.parseQueryString=J;B.buildQueryString=
|
||||
E;B.version="1.0.0-rc.8";B.vnode=x;"undefined"!==typeof module?module.exports=B:window.m=B};
|
||||
Loading…
Add table
Add a link
Reference in a new issue