diff options
author | Gabriel Albo <gabriel@albo.com.br> | 2015-11-04 11:23:50 -0200 |
---|---|---|
committer | Gabriel Albo <gabriel@albo.com.br> | 2015-11-04 11:23:50 -0200 |
commit | 742f6c87b0ff37154b1c2779c0f5a44fd899c34d (patch) | |
tree | 763caa014955576b613c4114cb7962265b37e743 /web-ui/app | |
parent | dccd63fcffe4a5b73282815514fdb0848a0468ed (diff) | |
parent | d79aa00e3c24c5bf5e5ed5ba5a9b976f93034362 (diff) |
Merge branch 'master' of github.com:pixelated-project/pixelated-user-agent
Diffstat (limited to 'web-ui/app')
-rw-r--r-- | web-ui/app/js/helpers/monitored_ajax.js | 2 | ||||
-rw-r--r-- | web-ui/app/js/search/results_highlighter.js | 2 |
2 files changed, 3 insertions, 1 deletions
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)); 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' }); |