diff --git a/media/css/reports.css b/media/css/reports.css index ebd08cf1a80382c64229c0de068397802826d460..f6d4e6c0dda1052e492f20f3db94b299ba5175f5 100644 --- a/media/css/reports.css +++ b/media/css/reports.css @@ -3,7 +3,7 @@ cursor: pointer; } -.repBlock { +.issue { border: solid; border-width: 1px; border-color: #8ba7f6; @@ -11,17 +11,55 @@ margin-bottom: 10px; } -.reqImg { +.issue:hover { + /*background-color: #eef1f2;*/ +} + +.requestImgBlock { float: left; - width: 100px; + max-width: 100px; + max-height: 100px; + margin: 5px; } +img.requestImg { -.repInfo { + max-width:100%; + +} +.requestInfo { display: none; } -/* -select, option { color: #000; } -select.closed, option[value="closed"] { color: #008000; } -select.opened, option[value="opened"] { color: #0000ff; } -select.processed, option[value="processed"] { color: #ffff00; } -*/ + + +.requestStatus { + display: inline-block; + padding: 5px; + border: 1px solid #ddd; + background-color: inherit; + color: #303030; + /*-webkit-appearance: none;*/ + /*-moz-appearance: none;*/ + /*appearance: none;*/ +} + + +.requestStatus:hover { + border: 1px solid #8ba7f6; +} + + +.requestStatus option { + padding: 1px 10px; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px solid; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} + diff --git a/media/js/reports.js b/media/js/reports.js index 37daaaebbbb95e56570d2099a3a4751078275d55..78087db6704688688ae652ef92a820e6ba559fc4 100644 --- a/media/js/reports.js +++ b/media/js/reports.js @@ -1,8 +1,8 @@ $(function () { $(".errTitle").click(function (e) { - var id_click = e.target.id; - var id_id = id_click.replace('errTitle', '#repInfo'); - $(id_id).slideToggle(300); + var currentID = e.target.id; + var descriptionID = currentID.replace('errTitle', '#requestInfo'); + $(descriptionID).slideToggle(300); }); @@ -18,9 +18,6 @@ $(function () { var requestId = e.target.id.replace('requestStatus', ''); var status = $(this).val(); $(this).prop( "disabled", true ); - // $(this).removeClass("opened"); - // $(this).removeClass("closed"); - // $(this).removeClass("processed"); $.ajax({ type: "POST", url: URLdir + "handler/errMessages/setStatus", @@ -40,7 +37,6 @@ $(function () { $(".requestStatus").prop( "disabled", false ); } }); - // $(this).addClass(status); }); }); diff --git a/media/js/supportDialog.js b/media/js/supportDialog.js index 39f37f6dce264e3d4cbac88ff91425e335308dfd..72f8686b187f33f11d7f41aeb0820ddbe152eb84 100644 --- a/media/js/supportDialog.js +++ b/media/js/supportDialog.js @@ -127,6 +127,7 @@ $(function () { jSendBut.removeAttr('disabled'); wnd.hide(); + requestID = NULLrequestID; } }); }); diff --git a/~dev_rating/application/classes/Model/Support.php b/~dev_rating/application/classes/Model/Support.php index 387011548bf4b43e917871817faa5a08a70a8f3b..2903b8fb5c96ddb7365c97f49b8eb405d94c7cab 100644 --- a/~dev_rating/application/classes/Model/Support.php +++ b/~dev_rating/application/classes/Model/Support.php @@ -3,7 +3,7 @@ class Model_Support extends Model { // return request ID - public static function newRequest($accountID, $description, $title, $isImg) { + public static function newRequest($accountID, $title, $description, $isImg) { $sql = "SELECT `CreateRequest`(0, :account, :title, :description, :isImg) AS 'Num';"; return DB::query(Database::SELECT, $sql) ->param(':account', (int) $accountID) @@ -14,7 +14,7 @@ class Model_Support extends Model } // returns status code - public static function updateRequest($requestID, $accountID, $description, $title) { + public static function updateRequest($requestID, $accountID, $title, $description) { $sql = "SELECT `CreateRequest`(:requestID, :account, :title, :description, :isImg) AS 'Num';"; return DB::query(Database::SELECT, $sql) ->param(':requestID', (int) $requestID) diff --git a/~dev_rating/application/views/support/errors.twig b/~dev_rating/application/views/support/errors.twig index cf79a5276d7768246fe709a97dbdc92f8daeff9a..2b4d60f2fa07894c5e8f11e4a5838bb5081e41d8 100644 --- a/~dev_rating/application/views/support/errors.twig +++ b/~dev_rating/application/views/support/errors.twig @@ -12,7 +12,7 @@ {% block main_content %} <div style="padding-bottom: 10px"> - <select id="statusFilter"> + <select id="statusFilter" class="statusFilterSelect"> <option value="all" {% if Filter == 'all'%}selected{% endif %}>all</option> <option value="opened" {% if Filter == 'opened'%}selected{% endif %}>opened</option> <option value="processed" {% if Filter == 'processed'%}selected{% endif %}>processed</option> @@ -22,31 +22,29 @@ <div class="listPage"> {% for req in Requests %} - <div class="repBlock"> + <div class="issue"> <div> <div class="errTitle" id="{{ "errTitle"~req.ID }}" style="float: left">{{ req.Title }}</div> <div style="float: right"> <select class="requestStatus" id={{ "requestStatus"~req.ID }}> - <option value="opened" {% if req.Status == 'opened'%}selected{% endif %}>opened</option> + <option value="opened" {% if req.Status == 'opened'%}selected{% endif %}>opened </option> <option value="processed" {% if req.Status == 'processed'%}selected{% endif %}>processed</option> <option value="closed" {% if req.Status == 'closed'%}selected{% endif %}>closed</option> </select> + {#<b class="caret"></b>#} </div> </div> - {#<div style="float: left">{{ ind }} </div> - <div style="float: left">{{ req.ID }}</div>#} - <div id="{{ "repInfo"~req.ID }}" class="repInfo"> - <div class="reqImg"> + <div id="{{ "requestInfo"~req.ID }}" class="requestInfo"> + <div class="requestImgBlock"> {% if req.IsImage == '1' %} <a href="{{ [URL.site("support/image"), req.ID]|join('/') }}" target="_blank"> - <img src="{{ [URL.site("support/image/preview"), req.ID]|join('/') }}"> + <img class="requestImg" src="{{ [URL.site("support/image/preview"), req.ID]|join('/') }}"> </a> {% endif %} </div> - <div><p>{{ req.Description }}</p></div> + <div><span style="white-space: pre-line">{{ req.Description }}</span></div> </div> - </div> {% endfor %} </div>