better design
This commit is contained in:
parent
f695d108fb
commit
214f79d935
3 changed files with 61 additions and 35 deletions
|
|
@ -8,13 +8,18 @@ body {
|
||||||
margin-bottom:3em;
|
margin-bottom:3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
main, aside {
|
main {
|
||||||
background-color: rgba(0,0,0,0.8);
|
background-color: rgba(0,0,0,0.8);
|
||||||
|
float:left;
|
||||||
|
margin:.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
aside {
|
aside div {
|
||||||
display:inline;
|
display: block;
|
||||||
max-width:15em;
|
background-color: rgba(32,16,16,0.5);
|
||||||
|
margin: 0.7em;
|
||||||
|
float: left;
|
||||||
|
margin:.5em;
|
||||||
}
|
}
|
||||||
video,img {
|
video,img {
|
||||||
max-width:100%;
|
max-width:100%;
|
||||||
|
|
@ -41,9 +46,10 @@ a {
|
||||||
background-color:rgba(0,30,0,0.5);
|
background-color:rgba(0,30,0,0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
.actionlink:hover {
|
||||||
background-color:rgba(30,0,124,0.5);
|
background-color:rgba(30,0,124,0.5);
|
||||||
border-color: white;
|
border-color: white;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a:visited {
|
a:visited {
|
||||||
|
|
@ -60,8 +66,7 @@ label {
|
||||||
.error {
|
.error {
|
||||||
color: #f88;
|
color: #f88;
|
||||||
font-size: large;
|
font-size: large;
|
||||||
border: solid green;
|
background-color: rgba(128,0,0,0.3);
|
||||||
background-color: rgba(64,0,0,0.1);
|
|
||||||
}
|
}
|
||||||
.validation-summary-errors{
|
.validation-summary-errors{
|
||||||
color: #f88;
|
color: #f88;
|
||||||
|
|
@ -98,6 +103,9 @@ padding-left: 20px;
|
||||||
border-radius:25px;
|
border-radius:25px;
|
||||||
background-color:rgba(0,0,32,0.8);
|
background-color:rgba(0,0,32,0.8);
|
||||||
font-size:x-small;
|
font-size:x-small;
|
||||||
|
z-index:1;
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: 'Arial', cursive;
|
||||||
}
|
}
|
||||||
|
|
||||||
.code {
|
.code {
|
||||||
|
|
@ -138,14 +146,15 @@ padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidcom {
|
.hidcom {
|
||||||
font-size: smaller;
|
display:none; position:fixed; z-index:-1;
|
||||||
display:none;
|
padding:5px; margin:5px;
|
||||||
}
|
|
||||||
.actionlink:hover + .hidcom {
|
|
||||||
display:inline; position:relative; left:0x; top:0px; padding:5px; margin:5px;
|
|
||||||
background-color: rgba(0,0,40,.8);
|
background-color: rgba(0,0,40,.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.actionlink:hover + .hidcom {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
body {background-color:white;color:black;}
|
body {background-color:white;color:black;}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
<% int lc=0;
|
<% int lc=0;
|
||||||
if (Model.Lines!=null)
|
if (Model.Lines!=null)
|
||||||
foreach (Writting wr in Model.Lines) { lc++; %>
|
foreach (Writting wr in Model.Lines) { lc++; %>
|
||||||
<tr class="<%= (lc%2==0)?"odd ":"even " %>row" id="wr<%=wr.Id%>">
|
<tr class="<%= (wr.Id%2==0)?"even ":"odd " %>row" id="wr<%=wr.Id%>">
|
||||||
<td><%=wr.Description%></td>
|
<td><%=wr.Description%></td>
|
||||||
<td><%=wr.ProductReference%></td>
|
<td><%=wr.ProductReference%></td>
|
||||||
<td><%=wr.Count%></td>
|
<td><%=wr.Count%></td>
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ContentPlaceHolderID="MASContent" ID="MASContent1" runat="server">
|
<asp:Content ContentPlaceHolderID="MASContent" ID="MASContent1" runat="server">
|
||||||
|
|
||||||
<div>
|
|
||||||
<% ViewData["EstimateId"]=Model.Id; %>
|
<% ViewData["EstimateId"]=Model.Id; %>
|
||||||
<%= Html.Partial("Writting",new Writting(),new ViewDataDictionary(ViewData)
|
<%= Html.Partial("Writting",new Writting(),new ViewDataDictionary(ViewData)
|
||||||
{
|
{
|
||||||
|
|
@ -67,13 +67,17 @@
|
||||||
HtmlFieldPrefix = ViewData.TemplateInfo.HtmlFieldPrefix==""?"wr":ViewData.TemplateInfo.HtmlFieldPrefix+"_wr"
|
HtmlFieldPrefix = ViewData.TemplateInfo.HtmlFieldPrefix==""?"wr":ViewData.TemplateInfo.HtmlFieldPrefix+"_wr"
|
||||||
}
|
}
|
||||||
}) %>
|
}) %>
|
||||||
|
|
||||||
|
|
||||||
<form>
|
<form>
|
||||||
<input type="button" id="btnnew" value="Nouvelle écriture"/>
|
<div>
|
||||||
<input type="button" id="btncreate" value="Ecrire"/>
|
<input type="button" id="btnnew" value="Nouvelle écriture" class="actionlink"/>
|
||||||
<input type="button" id="btnmodify" value="Modifier" class="hidden"/>
|
<input type="button" id="btncreate" value="Ecrire" class="actionlink"/>
|
||||||
<input type="button" id="btndrop" value="Supprimer" class="hidden"/>
|
<input type="button" id="btnmodify" value="Modifier" class="hidden actionlink"/>
|
||||||
</form>
|
<input type="button" id="btndrop" value="Supprimer" class="hidden actionlink"/>
|
||||||
|
</div> </form>
|
||||||
<tt id="msg" class="hidden message"></tt>
|
<tt id="msg" class="hidden message"></tt>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.row { cursor:pointer; }
|
.row { cursor:pointer; }
|
||||||
table.tablesorter td:hover { background-color: rgba(0,64,0,0.5); }
|
table.tablesorter td:hover { background-color: rgba(0,64,0,0.5); }
|
||||||
|
|
@ -101,12 +105,11 @@
|
||||||
|
|
||||||
function wredit(pwrid)
|
function wredit(pwrid)
|
||||||
{
|
{
|
||||||
|
if (wr_Id.value>0) {
|
||||||
$("#wr"+wr_Id.value).removeClass("selected");
|
$("#wr"+wr_Id.value).removeClass("selected");
|
||||||
$("#wr"+wr_Id.value).addClass((wr_Id.value%2==0)?"even":"odd");
|
$("#wr"+wr_Id.value).addClass((wr_Id.value%2==0)?"even":"odd");
|
||||||
|
}
|
||||||
$("#wr_Id").val(pwrid);
|
$("#wr_Id").val(pwrid);
|
||||||
|
|
||||||
|
|
||||||
if (pwrid>0) {
|
if (pwrid>0) {
|
||||||
$("#btncreate").addClass("hidden");
|
$("#btncreate").addClass("hidden");
|
||||||
$("#btnmodify").removeClass("hidden");
|
$("#btnmodify").removeClass("hidden");
|
||||||
|
|
@ -165,13 +168,19 @@
|
||||||
function addRow(){
|
function addRow(){
|
||||||
var wrt = GetWritting();
|
var wrt = GetWritting();
|
||||||
var estid = parseInt($("#Id").val());
|
var estid = parseInt($("#Id").val());
|
||||||
|
|
||||||
|
$("#Err_wr_Description").text("");
|
||||||
|
$("#Err_wr_ProductReference").text("");
|
||||||
|
$("#Err_wr_UnitaryCost").text("");
|
||||||
|
$("#Err_wr_Count").text("");
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "<%=Url.Content("~/api/WorkFlow/Write?estid=")%>"+estid,
|
url: "<%=Url.Content("~/api/WorkFlow/Write?estid=")%>"+estid,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: wrt,
|
data: wrt,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
wrt.Id = Number(data);
|
wrt.Id = Number(data);
|
||||||
wr_Id.value = wrt.Id;
|
wredit(wrt.Id);
|
||||||
var wridval = 'wr'+wrt.Id;
|
var wridval = 'wr'+wrt.Id;
|
||||||
jQuery('<tr/>', {
|
jQuery('<tr/>', {
|
||||||
id: wridval,
|
id: wridval,
|
||||||
|
|
@ -184,14 +193,19 @@ function addRow(){
|
||||||
$("#"+wridval).click(function(ev){onEditRow(ev);});
|
$("#"+wridval).click(function(ev){onEditRow(ev);});
|
||||||
$(".tablesorter").tablesorter( {sortList: [[0,0], [1,0]]} );
|
$(".tablesorter").tablesorter( {sortList: [[0,0], [1,0]]} );
|
||||||
message(false);
|
message(false);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
dataType: "json",
|
||||||
statusCode: {
|
statusCode: {
|
||||||
400: function(data) {
|
400: function(data) {
|
||||||
alert(JSON.stringify(data));
|
$.each(data.responseJSON, function (key, value) {
|
||||||
|
document.getElementById("Err_" + value.key.replace(".","_")).innerHTML=value.errors.join("<br/>");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (xhr, ajaxOptions, thrownError) {
|
error: function (xhr, ajaxOptions, thrownError) {
|
||||||
message(xhr.status+" : "+xhr.responseText+" / "+thrownError);}});
|
if (xhr.status != 400)
|
||||||
|
message(xhr.status+" : "+xhr.responseText+" / "+thrownError);}});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onEditRow(e) {
|
function onEditRow(e) {
|
||||||
|
|
@ -227,8 +241,8 @@ function addRow(){
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
|
||||||
</form>
|
<div>
|
||||||
<a class="actionlink" href="<%=ViewData["WebApiBase"]%>/FrontOffice/GetEstimTex?estimid=<%=Model.Id%>"><%= LocalizedText.Tex_version %></a>
|
<a class="actionlink" href="<%=ViewData["WebApiBase"]%>/FrontOffice/GetEstimTex?estimid=<%=Model.Id%>"><%= LocalizedText.Tex_version %></a>
|
||||||
<a class="actionlink" href="<%=ViewData["WebApiBase"]%>/FrontOffice/GetEstimPdf?estimid=<%=Model.Id%>"><%= LocalizedText.Pdf_version %></a>
|
<a class="actionlink" href="<%=ViewData["WebApiBase"]%>/FrontOffice/GetEstimPdf?estimid=<%=Model.Id%>"><%= LocalizedText.Pdf_version %></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,23 @@
|
||||||
|
|
||||||
<%= Html.ValidationSummary("Ligne de devis") %>
|
<%= Html.ValidationSummary("Ligne de devis") %>
|
||||||
<% using (Html.BeginForm("Write","WorkFlow")) { %>
|
<% using (Html.BeginForm("Write","WorkFlow")) { %>
|
||||||
|
<div>
|
||||||
<%= Html.Hidden( "Id" ) %>
|
<%= Html.Hidden( "Id" ) %>
|
||||||
<%= Html.Hidden( "EstimateId", (long) ViewData["EstimateId"]) %>
|
<%= Html.Hidden( "EstimateId", (long) ViewData["EstimateId"]) %>
|
||||||
|
|
||||||
<%= Html.LabelFor(model => model.Description) %>:<%= Html.TextBox( "Description" ) %>
|
<%= Html.LabelFor(model => model.Description) %>:<%= Html.TextArea( "Description" ) %>
|
||||||
<%= Html.ValidationMessage("Description", "*") %>
|
<%= Html.ValidationMessage("Description", "*", new { @id="Err_wr_Description", @class="error" }) %>
|
||||||
<br/>
|
<br/>
|
||||||
<%= Html.LabelFor(model => model.ProductReference) %>:<%= Html.TextBox( "ProductReference" ) %>
|
<%= Html.LabelFor(model => model.ProductReference) %>:<%= Html.TextBox( "ProductReference" ) %>
|
||||||
<%= Html.ValidationMessage("ProductReference", "*") %>
|
<%= Html.ValidationMessage("ProductReference", "*", new { @id="Err_wr_ProductReference", @class="error" }) %>
|
||||||
<br/>
|
<br/>
|
||||||
<%= Html.LabelFor(model => model.UnitaryCost) %>:<%= Html.TextBox( "UnitaryCost" ) %>
|
<%= Html.LabelFor(model => model.UnitaryCost) %>:<%= Html.TextBox( "UnitaryCost" ) %>
|
||||||
<%= Html.ValidationMessage("UnitaryCost", "*") %>
|
<%= Html.ValidationMessage("UnitaryCost", "", new { @id="Err_wr_UnitaryCost", @class="error" }) %>
|
||||||
<br/>
|
<br/>
|
||||||
<%= Html.LabelFor(model => model.Count) %>:<%= Html.TextBox( "Count" ) %>
|
<%= Html.LabelFor(model => model.Count) %>:<%= Html.TextBox( "Count" ) %>
|
||||||
<%= Html.ValidationMessage("Count", "*") %><br/>
|
<%= Html.ValidationMessage("Count", "", new { @id="Err_wr_Count" , @class="error"}) %>
|
||||||
|
|
||||||
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue