From: Christoff, K. <kch...@no...> - 2015-12-02 19:29:08
|
Here's the whole exception: com.gargoylesoftware.htmlunit.ScriptException: Error: Mismatched anonymous define() module: function (e, t, n) { return e.extend({init: function (e) { var t = this; t.options = $.extend({}, {container: ".upload-form", iframeElement: "#hiddenIframeForUpload"}, e), t.$container = $(t.options.container), t.getFileInput().change(function (e) { var n = t.getFileInput().val().replace("C:\\fakepath\\", ""); t.getFileNameInput().val(n), t.enableDisableUploadButton(); }), t.getFileNameIcon().click(function (e) { t.showFileSelection(); }), t.getFileNameInput().click(function (e) { t.showFileSelection(); }), t.getUploadButton().click(function (e) { t.upload(); }), t.enableDisableUploadButton(); }, showFileSelection: function () { this.getFileInput().trigger("click"); }, getFileInput: function () { return this.$container.find("input[type=file]"); }, getFileNameIcon: function () { return this.$container.find(".icon-file"); }, getFileNameInput: function () { return this.$container.find("input[type=text]"); }, getUploadButton: function () { return this.$container.find("button.upload-btn"); }, enableDisableUploadButton: function () { var e = this.getFileInput().val(); e === "" ? this.getUploadButton().attr("disabled", "disabled") : this.getUploadButton().removeAttr("disabled"); }, upload: function () { this.$container.submit(), this.clearPostOutput(), this.checkPostOutput(); }, getSuccessContainer: function () { return this.$container.find(".success"); }, getErrorContainer: function () { return this.$container.find(".error"); }, getIFrameContent: function () { return $(this.options.iframeElement).contents(); }, clearPostOutput: function () { var e = this.getIFrameContent(); $.publish("fileUploaded", [!1]), e.find("input[name=error]").val(""), e.find("input[name=message]").val(""); }, checkPostOutput: function () { var e = this, r = e.options, i = e.getIFrameContent(), s = i.find("input[name=error]"), o = i.find("input[name=message]"); if (s.length > 0 && s.val()) { var u = s.val(); u === "false" ? ($.publish("fileUploaded", [!0]), e.getSuccessContainer().show(), e.getErrorContainer().hide()) : (e.getSuccessContainer().hide(), e.getErrorContainer().html(o.val()).show()); } else { t.getTestMode() || n.delay(n.bind(e.checkPostOutput, e), 1000); } }}); } http://requirejs.org/docs/errors.html#mismatch ( http://localhost:7180/static/ext/require.js#141) Kyle |