pjax-base.js revision 60721add39f50a2f904fa5736c6d04bb7aecdb63
originalRoot = getRoot(),
EVT_NAVIGATE = 'navigate';
function getRoot() {
}
// PjaxBase is a mixin for Controller.
function PjaxBase() {}
// -- Properties -----------------------------------------------------------
_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;
return match;
}
});
},
// -- 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
}
};