pjax-base.js revision dff8d056ecfb52c863b7ad28e8ecea3a3789ad92
originalRoot = getRoot(),
EVT_NAVIGATE = 'navigate';
function getRoot() {
}
// PjaxBase is a mixin for Controller.
function PjaxBase() {}
// -- Properties -----------------------------------------------------------
_resolved: {},
_regexUrl: /^((?:([^:]+):(?:\/\/)?|\/\/)[^\/]*)?([^?#]*)(.*)$/i,
// -- Lifecycle Methods ----------------------------------------------------
initializer: function () {
this._pjaxRoot = originalRoot;
this._pjaxBindUI();
},
destructor: function () {
},
// -- Public Prototype Methods ---------------------------------------------
// Scroll to the top of the page. The timeout ensures that the
// scroll happens after navigation begins, so that the current
// scroll position will be restored if the user clicks the back
// button.
setTimeout(function () {
}, 1);
}
},
// -- Protected Prototype Methods ------------------------------------------
_normalizePath: function (path) {
var dots = '..',
slash = '/',
if (!path) {
return path;
}
stack = [];
} else if (part) {
}
}
// Append a slash if necessary.
normalized += slash;
}
return normalized;
},
_pjaxBindUI: function () {
if (this.html5) {
}
},
_resolvePath: function (path) {
if (!path) {
return root;
}
// Path is host relative.
return path;
}
},
_resolveUrl: function (url) {
var self = this,
if (resolvedUrl) {
return resolvedUrl;
}
return match;
}
}
// Cache resolved URL.
return resolvedUrl;
},
// -- Protected Event Handlers ---------------------------------------------
_defNavigateFn: function (e) {
},
_onLinkClick: function (e) {
// Allow the native behavior on middle/right-click, or when Ctrl or
// Command are pressed.
// Do nothing if there's no matching route for this URL.
e.preventDefault();
this.fire(EVT_NAVIGATE, {
originEvent: e,
});
}
};
linkSelector: {
writeOnce: 'initOnly'
},
scrollToTop: {
value: true
}
};