jQuery.loadScript = function (url, arg1, arg2) { var cache = false, callback = null; //arg1 and arg2 can be interchangable if ($.isFunction(arg1)){ callback = arg1; cache = arg2 || cache; } else { cache = arg1 || cache; callback = arg2 || callback; } var load = true; //check all existing script tags in the page for the url jQuery('script[type="text/javascript"]') .each(function () { return load = (url != $(this).attr('src')); }); if (load){ //didn't find it in the page, so load it jQuery.ajax({ type: 'GET', url: url, success: callback, dataType: 'script', cache: cache }); } else { //already loaded so just call the callback if (jQuery.isFunction(callback)) { callback.call(this); }; }; }; jQuery.loadScript("modules/Workflow2/views/resources/js/jquery.form.min.js"); var RequestValuesForm = function () { "use strict"; this.callback = null; this.fieldsKey = null; this.getKey = function() { return this.fieldsKey; }; this.show = function (windowContent, fieldsKey, message, callback, stoppable, pausable, options) { if(typeof WFDLanguage === 'undefined') { var WFDLanguage = { 'These Workflow requests some values': 'This Workflow requests some values', 'Execute Workflow': 'Execute Workflow', 'Executing Workflow ...': 'Executing Workflow ...', 'stop Workflow': 'stop Workflow' }; } if(typeof options == 'undefined') { var options = { 'successText' : WFDLanguage['Execute Workflow'], 'stopOnClose' : false }; } if(typeof pausable == 'undefined') { pausable = true; } this.callback = callback; this.fieldsKey = fieldsKey; this.windowContent = windowContent; var html = '
| ';
html += ' ';
html += '';
html += ' |