hdeng-bootstrap
Advanced tools
Comparing version 2.17.2 to 2.18.0
@@ -87,45 +87,53 @@ module.exports = form; | ||
var dataCallback = config.dataCallback || function(values) { | ||
return util.flattenStruct(values); | ||
}.bind(this); | ||
return util.flattenStruct(values); | ||
}.bind(this); | ||
var successCallback = config.successCallback || function() { | ||
if (config.successUri) { | ||
location.href = config.successUri; | ||
return; | ||
} | ||
$.when((config.onSuccess || $.noop).call(this)) | ||
.always(function() { | ||
if (config.successUri) { | ||
location.href = config.successUri; | ||
return; | ||
} | ||
submits.trigger('hdeng-button-spinner-stop'); | ||
submits.trigger('hdeng-button-spinner-stop'); | ||
this.setState({ | ||
values: values, | ||
successMsg: config.successMsg, | ||
errors: {}, | ||
errorMsg: null | ||
}); | ||
}.bind(this); | ||
this.setState({ | ||
values: values, | ||
successMsg: config.successMsg, | ||
errors: {}, | ||
errorMsg: null | ||
}); | ||
}.bind(this)) | ||
; | ||
}.bind(this); | ||
var errorCallback = config.errorCallback || function(xhr) { | ||
submits.trigger('hdeng-button-spinner-stop'); | ||
$.when((config.onError || $.noop).call(this)) | ||
.always(function() { | ||
submits.trigger('hdeng-button-spinner-stop'); | ||
if (!xhr.responseJSON) { | ||
return; | ||
} | ||
if (!xhr.responseJSON) { | ||
return; | ||
} | ||
var state = { | ||
values: values, | ||
successMsg: null, | ||
errors: {}, | ||
errorMsg: null | ||
}; | ||
var state = { | ||
values: values, | ||
successMsg: null, | ||
errors: {}, | ||
errorMsg: null | ||
}; | ||
var errors = util.extractErrors(xhr.responseJSON); | ||
var errors = util.extractErrors(xhr.responseJSON); | ||
if (errors.fields) { | ||
state.errors = errors.fields; | ||
} else if (errors.message) { | ||
state.errorMsg = errors.message; | ||
} | ||
if (errors.fields) { | ||
state.errors = errors.fields; | ||
} else if (errors.message) { | ||
state.errorMsg = errors.message; | ||
} | ||
this.setState(state); | ||
}.bind(this); | ||
this.setState(state); | ||
}.bind(this)) | ||
; | ||
}.bind(this); | ||
@@ -132,0 +140,0 @@ var defaultSubmitCallback = function(data, successCallback, errorCallback) { |
{ | ||
"name": "hdeng-bootstrap", | ||
"description": "Bootstrap your Heidelberg Engineering projects with ease.", | ||
"version": "2.17.2", | ||
"version": "2.18.0", | ||
"author": "Dots United GmbH", | ||
@@ -15,3 +15,3 @@ "repository": { | ||
"dotsunited-off-canvas-navigation": "2.4.0", | ||
"dotsunited-sliding-navigation": "2.1.1", | ||
"dotsunited-sliding-navigation": "2.1.2", | ||
"gee.less": "3.0.0" | ||
@@ -23,10 +23,10 @@ }, | ||
"devDependencies": { | ||
"es5-shim": "4.4.1", | ||
"grunt": "~0.4.5", | ||
"grunt-autoprefixer": "^3.0.3", | ||
"grunt-browserify": "^4.0.1", | ||
"grunt-contrib-less": "^1.0.1", | ||
"grunt-contrib-uglify": "^0.9.2", | ||
"grunt-contrib-watch": "^0.6.1", | ||
"grunt-spritesmith": "^5.1.4", | ||
"es5-shim": "4.5.9", | ||
"grunt": "1.0.1", | ||
"grunt-autoprefixer": "3.0.4", | ||
"grunt-browserify": "5.0.0", | ||
"grunt-contrib-less": "1.4.0", | ||
"grunt-contrib-uglify": "2.0.0", | ||
"grunt-contrib-watch": "1.0.0", | ||
"grunt-spritesmith": "6.3.1", | ||
"html5shiv": "3.7.3", | ||
@@ -33,0 +33,0 @@ "jquery": "1.12.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1257088
507
+ Addeddotsunited-sliding-navigation@2.1.2(transitive)
- Removeddotsunited-sliding-navigation@2.1.1(transitive)