Download:
child 49:e6635397502b
parent 47:9caed822ea2c
48:84bab688fcab
Anton Shestakov <av6@dwimlabs.net>, Sun, 27 Mar 2016 12:05:37 +0800
validation: remove unused files

3 файлов изменено, 0 вставок(+), 79 удалений(-) [+]
coffee/validation.coffee file | annotate | diff | comparison | revisions
js/validation.js file | annotate | diff | comparison | revisions
js/validation.js.map file | annotate | diff | comparison | revisions
--- a/coffee/validation.coffee Sun Mar 27 12:01:52 2016 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-Tram.validation =
- setError: ($field, message) ->
- $el = $('<div class="uk-text-danger"></div>').text(message)
- $field.addClass('uk-form-danger')
- $field.after($el)
-
- unsetError: ($field) ->
- $field.removeClass('uk-form-danger').siblings('.uk-text-danger').remove()
-
- validateRequired: (field, trim) ->
- $field = $(field)
- val = $field.val()
- val = val.trim() if trim
- if val is ''
- @setError $field, 'This field is required.'
- return false
- else
- return true
-
- validatePasswords: (field1, field2) ->
- $field1 = $(field1)
- $field2 = $(field2)
- if $field1.val() isnt $field2.val()
- @setError $field2, 'Passwords must match.'
- return false
- else
- return true
--- a/js/validation.js Sun Mar 27 12:01:52 2016 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-// Generated by CoffeeScript 1.10.0
-(function() {
- Tram.validation = {
- setError: function($field, message) {
- var $el;
- $el = $('<div class="uk-text-danger"></div>').text(message);
- $field.addClass('uk-form-danger');
- return $field.after($el);
- },
- unsetError: function($field) {
- return $field.removeClass('uk-form-danger').siblings('.uk-text-danger').remove();
- },
- validateRequired: function(field, trim) {
- var $field, val;
- $field = $(field);
- val = $field.val();
- if (trim) {
- val = val.trim();
- }
- if (val === '') {
- this.setError($field, 'This field is required.');
- return false;
- } else {
- return true;
- }
- },
- validatePasswords: function(field1, field2) {
- var $field1, $field2;
- $field1 = $(field1);
- $field2 = $(field2);
- if ($field1.val() !== $field2.val()) {
- this.setError($field2, 'Passwords must match.');
- return false;
- } else {
- return true;
- }
- }
- };
-
-}).call(this);
-
-//# sourceMappingURL=validation.js.map
--- a/js/validation.js.map Sun Mar 27 12:01:52 2016 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-{
- "version": 3,
- "file": "validation.js",
- "sourceRoot": "..",
- "sources": [
- "coffee/validation.coffee"
- ],
- "names": [],
- "mappings": ";AAAA;EAAA,IAAI,CAAC,UAAL,GACE;IAAA,QAAA,EAAU,SAAC,MAAD,EAAS,OAAT;AACR,UAAA;MAAA,GAAA,GAAM,CAAA,CAAE,oCAAF,CAAuC,CAAC,IAAxC,CAA6C,OAA7C;MACN,MAAM,CAAC,QAAP,CAAgB,gBAAhB;aACA,MAAM,CAAC,KAAP,CAAa,GAAb;IAHQ,CAAV;IAKA,UAAA,EAAY,SAAC,MAAD;aACV,MAAM,CAAC,WAAP,CAAmB,gBAAnB,CAAoC,CAAC,QAArC,CAA8C,iBAA9C,CAAgE,CAAC,MAAjE,CAAA;IADU,CALZ;IAQA,gBAAA,EAAkB,SAAC,KAAD,EAAQ,IAAR;AAChB,UAAA;MAAA,MAAA,GAAS,CAAA,CAAE,KAAF;MACT,GAAA,GAAM,MAAM,CAAC,GAAP,CAAA;MACN,IAAoB,IAApB;QAAA,GAAA,GAAM,GAAG,CAAC,IAAJ,CAAA,EAAN;;MACA,IAAG,GAAA,KAAO,EAAV;QACE,IAAC,CAAA,QAAD,CAAU,MAAV,EAAkB,yBAAlB;AACA,eAAO,MAFT;OAAA,MAAA;AAIE,eAAO,KAJT;;IAJgB,CARlB;IAkBA,iBAAA,EAAmB,SAAC,MAAD,EAAS,MAAT;AACjB,UAAA;MAAA,OAAA,GAAU,CAAA,CAAE,MAAF;MACV,OAAA,GAAU,CAAA,CAAE,MAAF;MACV,IAAG,OAAO,CAAC,GAAR,CAAA,CAAA,KAAmB,OAAO,CAAC,GAAR,CAAA,CAAtB;QACE,IAAC,CAAA,QAAD,CAAU,OAAV,EAAmB,uBAAnB;AACA,eAAO,MAFT;OAAA,MAAA;AAIE,eAAO,KAJT;;IAHiB,CAlBnB;;AADF"
-}
\ No newline at end of file