From 8da9557f66bcbaa91f540d44f7175a9e2436fa9b Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Tue, 3 Nov 2015 14:00:14 +0100 Subject: Redirect to / if ajax request returns 401 status - see issue pixelated/project-issues#162 - move test code to monitored_ajax_call.spec.js --- web-ui/app/js/helpers/monitored_ajax.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web-ui/app') diff --git a/web-ui/app/js/helpers/monitored_ajax.js b/web-ui/app/js/helpers/monitored_ajax.js index d05fdc4c..1cb720de 100644 --- a/web-ui/app/js/helpers/monitored_ajax.js +++ b/web-ui/app/js/helpers/monitored_ajax.js @@ -54,6 +54,8 @@ define(['page/events', 'views/i18n', 'helpers/browser'], function (events, i18n, if (xmlhttprequest.status === 302) { var redirectUrl = xmlhttprequest.getResponseHeader('Location'); browser.redirect(redirectUrl); + }else if (xmlhttprequest.status === 401) { + browser.redirect('/'); } }.bind(this)); -- cgit v1.2.3 From 0f84c6354a116fd53628b23a56c1528c5dd3e8ef Mon Sep 17 00:00:00 2001 From: Giovane Date: Tue, 3 Nov 2015 17:59:07 -0200 Subject: [#508] Making search also work with substrings - pairing w/ @pereiragislene --- web-ui/app/js/search/results_highlighter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web-ui/app') diff --git a/web-ui/app/js/search/results_highlighter.js b/web-ui/app/js/search/results_highlighter.js index 2c7d1cc7..9e3ba167 100644 --- a/web-ui/app/js/search/results_highlighter.js +++ b/web-ui/app/js/search/results_highlighter.js @@ -40,7 +40,7 @@ define( var domIdent = data.where; if(this.attr.keywords) { _.each(this.attr.keywords, function (keyword) { - $(domIdent).highlightRegex(new RegExp('\\b' + keyword, 'i'), { + $(domIdent).highlightRegex(new RegExp(keyword, 'i'), { tagType: 'em', className: 'search-highlight' }); -- cgit v1.2.3