diff --git a/media/css/img/713 (2).GIF b/media/css/img/713 (2).GIF new file mode 100644 index 0000000000000000000000000000000000000000..7759b7657f4674e8fae260b604de4f4adb66e035 Binary files /dev/null and b/media/css/img/713 (2).GIF differ diff --git a/media/css/img/load.png b/media/css/img/load.png new file mode 100644 index 0000000000000000000000000000000000000000..eb437480238f3ad612c0e5f4abe7e3bf8e0203bd Binary files /dev/null and b/media/css/img/load.png differ diff --git a/media/css/img/sign-check.png b/media/css/img/sign-check.png new file mode 100644 index 0000000000000000000000000000000000000000..aee76c7e414cf0c9eae9aa4aebd56bde9cc225bd Binary files /dev/null and b/media/css/img/sign-check.png differ diff --git a/media/css/img/sign-error.png b/media/css/img/sign-error.png new file mode 100644 index 0000000000000000000000000000000000000000..074578ae7c2ef50c632aed0af0696b078632d6fe Binary files /dev/null and b/media/css/img/sign-error.png differ diff --git a/media/css/img/tick.png b/media/css/img/tick.png new file mode 100644 index 0000000000000000000000000000000000000000..644eea2fbebb87886369ef7256be985c54a10fe3 Binary files /dev/null and b/media/css/img/tick.png differ diff --git a/media/css/img/window-close.png b/media/css/img/window-close.png new file mode 100644 index 0000000000000000000000000000000000000000..ee630b9f9b4e1ade1677c7d53b249bc8f54475fe Binary files /dev/null and b/media/css/img/window-close.png differ diff --git a/media/css/load.css b/media/css/load.css index d53efa077b7f965df8dfb4358b4bd6660136b2c4..535e09611c2506a319ad9fdb63c611826c986338 100644 --- a/media/css/load.css +++ b/media/css/load.css @@ -1,31 +1,49 @@ -.SendButton{ +.SendButton { border: 100px; } + .button-load { width: 37px; height: 37px; margin: 0; padding: 0; border: 0; - background-image: url(http://i.imgur.com/8BgaE65.png); + background-image: url("img/load.png"); text-indent: -1000em; background-position: center; background-repeat: no-repeat; cursor: pointer; } +.button-delete-none { + pointer-events: none; + visibility: hidden; +} + +.button-delete { + width: 37px; + height: 37px; + background-image: url("img/cancel.png"); + background-color: #ffffff; + background-position: center; + background-repeat: no-repeat; + cursor: pointer; +} + .loading { - background-image: url(http://i.imgur.com/n5JjOM9.gif); + background-image: url("img/loading.gif"); pointer-events: none; } .successful-load { - background-image: url(http://i.imgur.com/bzpcH6H.png); + /*background-image: url(http://i.imgur.com/bzpcH6H.png);*/ + background-image: url("img/tick.png"); pointer-events: none; + /*\grade\java\MMCSRatingReports\src\main\webapp\resources\img\tick.png */ } -.error-load{ - background-image: url(http://i.imgur.com/EIz7jt9.png); +.error-load { + background-image: url("img/error.png"); pointer-events: none; } diff --git a/media/js/supportDialog.js b/media/js/supportDialog.js index 173a02f3085e8a18656b6d2d1f9cbbb14208125e..265f6223ee5efc47b3f615d8623701a25cfe9244 100644 --- a/media/js/supportDialog.js +++ b/media/js/supportDialog.js @@ -4,11 +4,8 @@ $(function () { $.get(URLdir + "window/support", initErrorDialog); }); var errReady = true; - - var requestID = -1; - - - + const NULLrequestID = -1; + var requestID = NULLrequestID; function initErrorDialog(data) { wnd.open(JSON.parse(data)); @@ -21,7 +18,12 @@ $(function () { data = $.parseJSON(data); if (data.success === true) { requestID = data.requestID; - $("#imageFile").addClass("successful-load"); + $('#imageFile').addClass("successful-load"); + $('#button-delete').removeClass("button-delete-none"); + $('#button-delete').addClass("button-delete"); + + + } else { EventInspector_ShowMsg(data.error, 'error'); @@ -33,18 +35,25 @@ $(function () { } } + + }); $('#imageFile').change(function () { document.forms["loadPicture"].submit(); - $(this).addClass("loading"); + $(this).addClass("loading") // now result in #hiddenframe :-/ }); - + $('#button-delete').click(function(){ + $('#button-delete').removeClass("button-delete"); + $('#button-delete').addClass("button-delete-none"); + $("#imageFile").removeClass("successful-load loading"); + requestID = NULLrequestID; + }); this.isInit = true; - } initErrorDialog.isInit = false; + $(document) .on('click', '#dialogSendButton', function () { var jMessageTitle = $('#messageTitle'); diff --git a/~dev_rating/application/views/popup/support.twig b/~dev_rating/application/views/popup/support.twig index a70037a7910d9338746159ee3440913a3695b739..de43a23096acc83c438c9ba649da602d3593fdcc 100644 --- a/~dev_rating/application/views/popup/support.twig +++ b/~dev_rating/application/views/popup/support.twig @@ -23,6 +23,9 @@ <input class="button-load" id="imageFile" name="imageFile" type="file" accept="image/jpeg,image/png"> <div id="errormes"></div> </form> + <iframe id="hiddenframe" name="hiddenframe" style="width:0px; height:0px; border:0px"></iframe> + <div id="imageprew" style="float:left; border-width: 10px"> </div> + <button id="button-delete" class="button-delete-none"></button> <button class="defaultForm BlueButton marginBetween SendButton" id="dialogSendButton" style="float:right; width: 170px">Отправить сообщение</button> </div>