Permalink
Browse files

Namespaced classnames for showHide

  • Loading branch information...
1 parent 1889201 commit 4f8cccc25dc26cda25609a6dccd247b4f7f076cc Dean Sofer committed Mar 30, 2012
Showing with 19 additions and 19 deletions.
  1. +9 −9 lib/angular-ui.js
  2. +1 −1 lib/angular-ui.min.js
  3. +9 −9 src/js/directives/showhide.js
View
@@ -181,7 +181,7 @@ angular.module('ui.directives').directive('uiScrollfix', [function() {
/**
* uiShow Directive
*
- * Adds a 'show' class to the element instead of display:block
+ * Adds a 'ui-show' class to the element instead of display:block
* Created to allow tighter control of CSS without bulkier directives
*
* @param expression {boolean} evaluated expression to determine if the class should be added
@@ -191,9 +191,9 @@ angular.module('ui.directives').directive('uiShow', [function() {
return function(scope, elm, attrs) {
scope.$watch(attrs.uiShow, function(newVal, oldVal){
if (newVal) {
- elm.addClass('show');
+ elm.addClass('ui-show');
} else {
- elm.removeClass('show');
+ elm.removeClass('ui-show');
}
});
};
@@ -202,7 +202,7 @@ angular.module('ui.directives').directive('uiShow', [function() {
/**
* uiHide Directive
*
- * Adds a 'hide' class to the element instead of display:block
+ * Adds a 'ui-hide' class to the element instead of display:block
* Created to allow tighter control of CSS without bulkier directives
*
* @param expression {boolean} evaluated expression to determine if the class should be added
@@ -212,9 +212,9 @@ angular.module('ui.directives').directive('uiHide', [function() {
return function(scope, elm, attrs) {
scope.$watch(attrs.uiHide, function(newVal, oldVal){
if (newVal) {
- elm.addClass('hide');
+ elm.addClass('ui-hide');
} else {
- elm.removeClass('hide');
+ elm.removeClass('ui-hide');
}
});
};
@@ -223,7 +223,7 @@ angular.module('ui.directives').directive('uiHide', [function() {
/**
* uiToggle Directive
*
- * Adds a class 'show' if true, and a 'hide' if false to the element instead of display:block/display:none
+ * Adds a class 'ui-show' if true, and a 'ui-hide' if false to the element instead of display:block/display:none
* Created to allow tighter control of CSS without bulkier directives. This also allows you to override the
* default visibility of the element using either class.
*
@@ -234,9 +234,9 @@ angular.module('ui.directives').directive('uiToggle', [function() {
return function(scope, elm, attrs) {
scope.$watch(attrs.uiToggle, function(newVal, oldVal){
if (newVal) {
- elm.switchClass('show', 'hide');
+ elm.switchClass('ui-show', 'ui-hide');
} else {
- elm.removeClass('hide', 'show');
+ elm.removeClass('ui-hide', 'ui-show');
}
});
};
View
Oops, something went wrong.
@@ -6,7 +6,7 @@
/**
* uiShow Directive
*
- * Adds a 'show' class to the element instead of display:block
+ * Adds a 'ui-show' class to the element instead of display:block
* Created to allow tighter control of CSS without bulkier directives
*
* @param expression {boolean} evaluated expression to determine if the class should be added
@@ -16,9 +16,9 @@ angular.module('ui.directives').directive('uiShow', [function() {
return function(scope, elm, attrs) {
scope.$watch(attrs.uiShow, function(newVal, oldVal){
if (newVal) {
- elm.addClass('show');
+ elm.addClass('ui-show');
} else {
- elm.removeClass('show');
+ elm.removeClass('ui-show');
}
});
};
@@ -27,7 +27,7 @@ angular.module('ui.directives').directive('uiShow', [function() {
/**
* uiHide Directive
*
- * Adds a 'hide' class to the element instead of display:block
+ * Adds a 'ui-hide' class to the element instead of display:block
* Created to allow tighter control of CSS without bulkier directives
*
* @param expression {boolean} evaluated expression to determine if the class should be added
@@ -37,9 +37,9 @@ angular.module('ui.directives').directive('uiHide', [function() {
return function(scope, elm, attrs) {
scope.$watch(attrs.uiHide, function(newVal, oldVal){
if (newVal) {
- elm.addClass('hide');
+ elm.addClass('ui-hide');
} else {
- elm.removeClass('hide');
+ elm.removeClass('ui-hide');
}
});
};
@@ -48,7 +48,7 @@ angular.module('ui.directives').directive('uiHide', [function() {
/**
* uiToggle Directive
*
- * Adds a class 'show' if true, and a 'hide' if false to the element instead of display:block/display:none
+ * Adds a class 'ui-show' if true, and a 'ui-hide' if false to the element instead of display:block/display:none
* Created to allow tighter control of CSS without bulkier directives. This also allows you to override the
* default visibility of the element using either class.
*
@@ -59,9 +59,9 @@ angular.module('ui.directives').directive('uiToggle', [function() {
return function(scope, elm, attrs) {
scope.$watch(attrs.uiToggle, function(newVal, oldVal){
if (newVal) {
- elm.switchClass('show', 'hide');
+ elm.switchClass('ui-show', 'ui-hide');
} else {
- elm.removeClass('hide', 'show');
+ elm.removeClass('ui-hide', 'ui-show');
}
});
};

0 comments on commit 4f8cccc

Please sign in to comment.