Skip to content

Commit

Permalink
Fix disabled option
Browse files Browse the repository at this point in the history
  • Loading branch information
exodusanto committed May 21, 2016
1 parent fa15074 commit 46b258c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,3 +1,4 @@
bower_components/
node_modules/
.DS_Store
.DS_Store
npm-debug.log
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -106,6 +106,9 @@ For all element
This is the incremental percentage of ripple radius (2 => 200% )

## Changelog
Version 0.9.1:

Fix disabled option.

Version 0.9.0:

Expand Down
6 changes: 4 additions & 2 deletions dist/js/ng-ripple.js
Expand Up @@ -32,6 +32,8 @@
inkColor = typeof attributes.rColor !== "undefined" ? attributes.rColor : false;
customOpacity = typeof attributes.rOpacity !== "undefined" ? attributes.rOpacity : null;

console.log(elem,!hasClass(elem,'disabled'));

if(typeof attributes.rDisabled == "undefined" && !hasClass(elem,'disabled')){
elem.addEventListener('mousedown',createRipple);
}
Expand Down Expand Up @@ -128,9 +130,9 @@

function hasClass(e,name){
if (e.classList){
e.classList.contains(name);
return e.classList.contains(name);
}else{
new RegExp('(^| )' + name + '( |$)', 'gi').test(e.className);
return new RegExp('(^| )' + name + '( |$)', 'gi').test(e.className);
}
}

Expand Down
2 changes: 1 addition & 1 deletion dist/js/ng-ripple.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ng-ripple",
"version": "0.9.0",
"version": "0.9.1",
"description": "Ripple effects for angular",
"main": "dist/js/ng-ripple.js",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/js/ng-ripple.js
Expand Up @@ -128,9 +128,9 @@

function hasClass(e,name){
if (e.classList){
e.classList.contains(name);
return e.classList.contains(name);
}else{
new RegExp('(^| )' + name + '( |$)', 'gi').test(e.className);
return new RegExp('(^| )' + name + '( |$)', 'gi').test(e.className);
}
}

Expand Down

0 comments on commit 46b258c

Please sign in to comment.