Browse Source

Update all misuses of regexp test

pull/1550/head
jlukic 10 years ago
parent
commit
cd9f4f9e58
4 changed files with 21 additions and 5 deletions
  1. 15
      RELEASE-NOTES.md
  2. 4
      src/definitions/modules/search.js
  3. 3
      src/definitions/modules/sticky.js
  4. 4
      src/definitions/modules/video.js

15
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

4
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);
}
}

3
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)
;

4
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;

Loading…
Cancel
Save