Skip to content

Commit 9baea0c

Browse files
author
Tom Hanoldt
committed
remove gz build
1 parent 22315b2 commit 9baea0c

File tree

5 files changed

+12
-20
lines changed

5 files changed

+12
-20
lines changed

Gruntfile.coffee

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ module.exports = (grunt) ->
2929
banner: '/*! <%= pkg.name %> v<%= pkg.version %> | <%= pkg.license %> */\n'
3030
build:
3131
files: 'dist/jquery.input.validator.min.js': 'dist/jquery.input.validator.js'
32-
compress:
33-
main:
34-
options:
35-
mode: 'gzip'
36-
files: [ {
37-
src: [ 'dist/jquery.input.validator.min.js' ]
38-
dest: 'dist/jquery.input.validator.js.gz'
39-
}]
4032
jasmine:
4133
specs:
4234
src: 'dist/jquery.input.validator.js'
@@ -62,7 +54,6 @@ module.exports = (grunt) ->
6254
'coffee'
6355
'jasmine'
6456
'uglify'
65-
'compress'
6657
]
6758

6859
grunt.registerTask 'test', [

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ It also exposes the class `InputValidator` for manual instantiating.
161161
## Changelog
162162
### WIP: 1.0.3
163163
* refactor `onBuildErrorHint`
164+
* clear input events
164165

165166
### 1.0.2
166167
* fix error hint

dist/jquery.input.validator.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
config = {};
148148
}
149149
this.messageFor = bind(this.messageFor, this);
150-
this.elements = bind(this.elements, this);
150+
this.elementsFor = bind(this.elementsFor, this);
151151
this.resetElement = bind(this.resetElement, this);
152152
this.reset = bind(this.reset, this);
153153
this.validateElement = bind(this.validateElement, this);
@@ -170,30 +170,31 @@
170170
};
171171

172172
InputValidator.prototype.prepareElements = function(context) {
173-
var $elements;
173+
var $elements, ns;
174174
if (context == null) {
175175
context = null;
176176
}
177177
if (context == null) {
178178
context = this.context;
179179
}
180-
$elements = this.elements(context);
180+
ns = 'inputvalidator';
181+
$elements = this.elementsFor(context);
181182
if (this.config.validateOnFocusOut) {
182-
$elements.focusout((function(_this) {
183+
$elements.off("focusout." + ns).on("focusout." + ns, (function(_this) {
183184
return function(e) {
184185
return _this.validateElement(e.target);
185186
};
186187
})(this));
187188
}
188189
if (this.config.removeHintOnFocus) {
189-
$elements.focus((function(_this) {
190+
$elements.off("focus." + ns).on("focus." + ns, (function(_this) {
190191
return function(e) {
191192
return _this.resetElement(e.target);
192193
};
193194
})(this));
194195
}
195196
if (this.config.validateOnKeyUp) {
196-
$elements.keyup((function(_this) {
197+
$elements.off("keyup." + ns).on("keyup." + ns, (function(_this) {
197198
return function(e) {
198199
if ($(e.target).data('invalid')) {
199200
return _this.validateElement(e.target);
@@ -202,7 +203,7 @@
202203
})(this));
203204
}
204205
if (this.config.validateOnClick) {
205-
return $elements.click((function(_this) {
206+
return $elements.off("click." + ns).on("click." + ns, (function(_this) {
206207
return function(e) {
207208
return _this.validateElement(e.target);
208209
};
@@ -216,7 +217,7 @@
216217
context = null;
217218
}
218219
errors = [];
219-
$elements = this.elements(context);
220+
$elements = this.elementsFor(context);
220221
ref = $elements.get();
221222
for (i = 0, len = ref.length; i < len; i++) {
222223
element = ref[i];
@@ -259,14 +260,14 @@
259260
if (context == null) {
260261
context = null;
261262
}
262-
return this.resetElement(this.elements(context));
263+
return this.resetElement(this.elementsFor(context));
263264
};
264265

265266
InputValidator.prototype.resetElement = function($element) {
266267
return this.config.handler.onResetIntern(this, $element);
267268
};
268269

269-
InputValidator.prototype.elements = function(context) {
270+
InputValidator.prototype.elementsFor = function(context) {
270271
if (context == null) {
271272
context = null;
272273
}

dist/jquery.input.validator.js.gz

-1.81 KB
Binary file not shown.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"grunt": "^1.0.2",
1616
"grunt-coffeelint": "0.0.16",
1717
"grunt-contrib-coffee": "^1.0.0",
18-
"grunt-contrib-compress": "^1.4.3",
1918
"grunt-contrib-jasmine": "^1.1.0",
2019
"grunt-contrib-uglify": "^3.0.1",
2120
"grunt-contrib-watch": "^1.0.0",

0 commit comments

Comments
 (0)