NavigatorApp.getQuery = function (withoutId) {
- var query = this.filterBarView.getQuery();
- if (!withoutId && this.favoriteFilter.id) {
- query['id'] = this.favoriteFilter.id;
+ if (this.filterBarView) {
+ var query = this.filterBarView.getQuery();
+ if (!withoutId && this.favoriteFilter.id) {
+ query['id'] = this.favoriteFilter.id;
+ }
+ return query;
+ } else {
+ return {};
}
- return query;
};
serializeData: function () {
- var data = Marionette.ItemView.prototype.serializeData.apply(this, arguments);
+ var data = Marionette.ItemView.prototype.serializeData.apply(this, arguments),
+ bulkChangeData = this.options.app.getQuery(true),
+ bulkChangeQuery = _.map(bulkChangeData,function (v, k) {
+ return [k, encodeURIComponent(v)].join('=');
+ }).join('&');
return _.extend(data || {}, {
paging: this.collection.paging,
sorting: this.collection.sorting,
maxResultsReached: this.collection.maxResultsReached,
appState: window.SS.appState.toJSON(),
bulkChangeUrl: baseUrl + '/issues/bulk_change_form',
- query: (Backbone.history.fragment || '').replace(/\|/g, '&')
+ query: bulkChangeQuery
});
}
});