Skip to content
Snippets Groups Projects
Commit efa38125 authored by VladimirCherkasov's avatar VladimirCherkasov
Browse files

supportDialog.js improve

parent 67fb5976
Branches
Tags
No related merge requests found
$(function () {
var isInit = false;
$('#errButton').click(function () {
$.get(URLdir + "window/support", function (data) {
wnd.open(JSON.parse(data));
if (!isInit) {
$('#imageFile').change(function () {
document.forms["loadPicture"].submit();
// now result in #hiddenframe :-/
$("#hiddenframe").load(function () {
var ret = this.contentWindow.document.body.innerHTML;
// console.log(ret);
});
});
isInit = true;
}
});
$.get(URLdir + "window/support", initErrorDialog);
});
var errReady = true;
var requestID = -1;
function initErrorDialog(data) {
wnd.open(JSON.parse(data));
if (this.isInit) {
return;
}
$("#hiddenframe").load(function () {
var data = this.contentWindow.document.body.innerHTML;
console.log(data);
if (data.success === true) {
requestID = data.requestID;
}
});
$('#imageFile').change(function () {
document.forms["loadPicture"].submit();
// now result in #hiddenframe :-/
});
this.isInit = true;
}
initErrorDialog.isInit = false;
$(document)
.on('click', '#dialogSendButton', function () {
......@@ -49,7 +57,8 @@ $(function () {
url: URLdir + "handler/ErrMessages/createRequest",
data: {
title: mesTitle,
text: mesText
text: mesText,
requestID: requestID
},
success: function (data) {
errReady = true;
......
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