Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions davis.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,9 @@ Davis.listener = function () {
* @memberOf listener
*/
this.listen = function () {
Davis.$(document).delegate(this.settings.formSelector, 'submit', submitHandler)
Davis.$(document).delegate(this.settings.linkSelector, 'click', clickHandler)
// Commenting these out because they are causing issues when we use 'forceHashRouting=true'
//Davis.$(document).delegate(this.settings.formSelector, 'submit', submitHandler)
//Davis.$(document).delegate(this.settings.linkSelector, 'click', clickHandler)
}

/**
Expand All @@ -364,8 +365,9 @@ Davis.listener = function () {
* @memberOf listener
*/
this.unlisten = function () {
Davis.$(document).undelegate(this.settings.linkSelector, 'click', clickHandler)
Davis.$(document).undelegate(this.settings.formSelector, 'submit', submitHandler)
// Commenting these out because they are causing issues when we use 'forceHashRouting=true'
//Davis.$(document).undelegate(this.settings.linkSelector, 'click', clickHandler)
//Davis.$(document).undelegate(this.settings.formSelector, 'submit', submitHandler)
}
}
/*!
Expand Down Expand Up @@ -1783,7 +1785,7 @@ Davis.App = (function () {
var bindToInternalEvents = function () {
self
.bind('runRoute', function (request) {
self.logger.info("runRoute: " + request.toString());
//self.logger.info("runRoute: " + request.toString());
})
.bind('routeNotFound', function (request) {
if (!self.settings.handleRouteNotFound && !request.isForPageLoad) {
Expand All @@ -1793,10 +1795,10 @@ Davis.App = (function () {
self.logger.warn("routeNotFound: " + request.toString());
})
.bind('start', function () {
self.logger.info("application started")
//self.logger.debug("application started")
})
.bind('stop', function () {
self.logger.info("application stopped")
//self.logger.debug("application stopped")
})
.bind('routeError', function (request, route, error) {
if (self.settings.throwErrors) throw(error)
Expand Down
3 changes: 2 additions & 1 deletion lib/extensions/davis.hashRouting.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ Davis.hashRouting = function(options) {
* @params {Request} the request to set the current location to.
*/
var wrapper = function(request, opts, setter) {
setter("#" + options.prefix + request.location());
var location = request.location();
setter( (location.match(/^\/?#/) ? '': '#') + options.prefix + location);
lastPolledLocation = getLocation();
if (opts && opts.silent) return
invokeCallbacks(request);
Expand Down
1 change: 0 additions & 1 deletion tests/src

This file was deleted.