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

support page fixes

parent 2a22af42
Branches
Tags
No related merge requests found
......@@ -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;
}
$(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);
});
});
......
......@@ -127,6 +127,7 @@ $(function () {
jSendBut.removeAttr('disabled');
wnd.hide();
requestID = NULLrequestID;
}
});
});
......
......@@ -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)
......
......@@ -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>
......
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