mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 20:04:09 +03:00
tree@8c94e48 - further fix mailto: links
This commit is contained in:
parent
40365667c7
commit
dfc77aa29a
@ -86,8 +86,11 @@ module.exports = {
|
||||
loc: loc
|
||||
}, "write-plan-info", "hood");
|
||||
},
|
||||
setCurr: function(path) {
|
||||
_initialLoad = false;
|
||||
setCurr: function(path, init) {
|
||||
if (init == null) {
|
||||
init = true;
|
||||
}
|
||||
_initialLoad &= init;
|
||||
return TreeDispatcher.handleViewAction({
|
||||
type: "setCurr",
|
||||
path: path
|
||||
@ -1517,18 +1520,19 @@ module.exports = query({
|
||||
TreeStore.addChangeListener(this._onChangeStore);
|
||||
_this = this;
|
||||
$('body').on('click', 'a', function(e) {
|
||||
var href, url;
|
||||
var basepath, href, url;
|
||||
href = $(this).attr('href');
|
||||
if ((href != null ? href[0] : void 0) === "#") {
|
||||
return true;
|
||||
}
|
||||
if (href && !/^https?:\/\//i.test(href)) {
|
||||
e.preventDefault();
|
||||
url = new URL(this.href);
|
||||
if (!/http/.test(url.protocol)) {
|
||||
return;
|
||||
}
|
||||
if (urb.util.basepath("", url.pathname) !== urb.util.basepath("", document.location.pathname)) {
|
||||
e.preventDefault();
|
||||
basepath = urb.util.basepath;
|
||||
if (basepath("", url.pathname) !== basepath("", document.location.pathname)) {
|
||||
document.location = this.href;
|
||||
return;
|
||||
}
|
||||
@ -2500,7 +2504,7 @@ $(function() {
|
||||
window.tree.actions = require('./actions/TreeActions.coffee');
|
||||
window.tree.actions.addVirtual(require('./components/Components.coffee'));
|
||||
frag = util.fragpath(window.location.pathname.replace(/\.[^\/]*$/, ''));
|
||||
window.tree.actions.setCurr(frag);
|
||||
window.tree.actions.setCurr(frag, true);
|
||||
window.tree.actions.loadPath(frag, window.tree.data);
|
||||
if (window.tree.sein != null) {
|
||||
window.tree.actions.loadSein(frag, window.tree.sein);
|
||||
|
Loading…
Reference in New Issue
Block a user