From cd9f4f9e58992930e52d5d77440961c21a5f71cd Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 29 Dec 2014 17:12:55 -0500 Subject: [PATCH] Update all misuses of regexp test --- RELEASE-NOTES.md | 15 ++++++++++++++- src/definitions/modules/search.js | 4 ++-- src/definitions/modules/sticky.js | 3 +++ src/definitions/modules/video.js | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 49d85b9bd..9822d2f51 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,8 +1,21 @@ ## RELEASE NOTES + +### Version 1.5.0 - December 23, 2014 + +**Critical Bugs** +- Concatenated ``dist/`` release included duplicate components when no component array specified. Added default components to ``tasks/default.js`` to allay issues + +**Enhancements* + +- **Progress** - Progress bars now display all intermediary percentage values when animating. Improved performance when progress bar is rapidly updated. + +**Bugs** +- **Dropdown/Search** - Fixed issues with ``ui search`` and ``ui search dropdown`` using ``RegExp test`` which [advances pointer on match](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) causing results to display incorrectly + ### Version 1.4.1 - December 23, 2014 -**Build Tools** +**Build Tools** - ``gulp build`` will now only build `dist/components/` for components selected in install - Fixed bug where interactive installer was not correctly setting components in ``express`` and ``custom`` install diff --git a/src/definitions/modules/search.js b/src/definitions/modules/search.js index 330d39da0..975797e9e 100644 --- a/src/definitions/modules/search.js +++ b/src/definitions/modules/search.js @@ -302,10 +302,10 @@ $.fn.search = function(parameters) { notAlreadyResult = ($.inArray(content, results) == -1 && $.inArray(content, fullTextResults) == -1) ; if(fieldExists && notAlreadyResult) { - if( searchRegExp.test( content[field] ) ) { + if( content[field].match(searchRegExp) ) { results.push(content); } - else if( settings.searchFullText && fullTextRegExp.test( content[field] ) ) { + else if( settings.searchFullText && content[field].match(content[field]) ) { fullTextResults.push(content); } } diff --git a/src/definitions/modules/sticky.js b/src/definitions/modules/sticky.js index 0aff2a409..4f50c235d 100644 --- a/src/definitions/modules/sticky.js +++ b/src/definitions/modules/sticky.js @@ -107,6 +107,9 @@ $.fn.sticky = function(parameters) { destroy: function() { module.verbose('Destroying previous module'); module.reset(); + if(observer) { + observer.disconnect(); + } $window .off('resize' + eventNamespace, module.event.resize) ; diff --git a/src/definitions/modules/video.js b/src/definitions/modules/video.js index d4b62b150..5f890c648 100644 --- a/src/definitions/modules/video.js +++ b/src/definitions/modules/video.js @@ -178,10 +178,10 @@ $.fn.video = function(parameters) { return false; }, id: function(url) { - if(settings.regExp.youtube.test(url)) { + if(url.match(settings.regExp.youtube)) { return url.match(settings.regExp.youtube)[1]; } - else if(settings.regExp.vimeo.test(url)) { + else if(url.match(settings.regExp.vimeo)) { return url.match(settings.regExp.vimeo)[2]; } return false;