Commit 80e33f52 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

put timer as option

parent 4f64c8fe
......@@ -149,8 +149,7 @@ jQuery.validator.addMethod("mparam", function(value, element, params) {
!function ($) {
"use strict"; // jshint ;_;
var TIMER = 2000,
timer,
var timer,
SIZE_LIMIT_SPLITER = "__sl";
/* WFForm CLASS DEFINITION
......@@ -310,7 +309,7 @@ jQuery.validator.addMethod("mparam", function(value, element, params) {
// execute _uploadProgress to init the display
_uploadProgress($this, true);
// then loop to follow the file upload
timer = setInterval(function() { _uploadProgress($this, false) }, TIMER);
timer = setInterval(function() { _uploadProgress($this, false) }, $this.options.timer);
} else {
$this.$element.trigger('uploaded');
}
......@@ -767,7 +766,8 @@ jQuery.validator.addMethod("mparam", function(value, element, params) {
displayRunButton: true,
displayResetButton: true,
workflow: null,
parameters: {}
parameters: {},
timer: 2000
}
$.fn.wfform.Constructor = WFForm
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment