Skip to content

Commit

Permalink
Use object property bracket notation around Javascript keywords to fi…
Browse files Browse the repository at this point in the history
…x IE8 compatibility issues.

Fixes #20
  • Loading branch information
Ryan Wischkaemper committed Feb 17, 2015
1 parent 636bf0f commit 0d1ca50
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion component/inline/validationInline.dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ xtForm.directive('xtValidationInline', function ($templateCache) {
},
link: function (scope, element, attrs) {

var inputId = attrs.for || attrs.xtValidationInline;
var inputId = attrs['for'] || attrs.xtValidationInline;
if (angular.isUndefined(inputId)) {
throw new Error('The validation input id must be specified eg. for="id"');
}
Expand Down
2 changes: 1 addition & 1 deletion component/inline/validationInline.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('inline validation directive', function () {
expect(function () {
var tmp = '<form xt-form><xt-validation-inline for="el1"></xt-validation-inline></form>';
setTemplate(tmp);
}).toThrow(new Error('Can not find the input element for the validation directive'));
}).toThrow(new Error('Can not find input element for the validation directive'));
});

it('should add xt-validation-inline class to element', function () {
Expand Down
2 changes: 1 addition & 1 deletion component/tooltip/validationTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ xtForm.directive('xtValidationTooltip', function ($timeout) {
function setupNgModel() {

// allow for a different tooltip container that is not on the ngModel element
var ngModelElementId = attrs.for || attrs.xtValidationTooltip;
var ngModelElementId = attrs['for'] || attrs.xtValidationTooltip;
ngModelElement = ngModelElementId ?
angular.element(document.getElementById(ngModelElementId)) :
element;
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function (config) {
basePath: './',

files: [
'bower_components/jquery/jquery.js',
'bower_components/jquery/dist/jquery.js',
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'component/**/*.module.js',
Expand Down

0 comments on commit 0d1ca50

Please sign in to comment.