completato e sistemato editing vocabolario...

This commit is contained in:
Samuele E. Locatelli
2014-04-15 15:11:18 +02:00
parent 84d0abb032
commit be9899c21b
36 changed files with 134 additions and 79 deletions
+6 -7
View File
@@ -37,8 +37,6 @@
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=272931&clcid=0x409 --%>
<%--Framework Scripts--%>
<asp:ScriptReference Name="MsAjaxBundle" />
<%--<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="jquery.ui.combined" />--%>
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
@@ -94,12 +92,12 @@
</asp:UpdatePanel>
<asp:UpdatePanel ID="uppContainer" runat="server">
<ContentTemplate>
<div class="container" role="main">
<asp:ContentPlaceHolder ID="Main" runat="server">
<asp:ContentPlaceHolder ID="Main" runat="server">
<div class="container" role="main">
<h1>hello world!</h1>
Area main content da customizzare
</asp:ContentPlaceHolder>
</div>
</div>
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
<!-- /.container -->
@@ -114,7 +112,8 @@
<p class="navbar-text navbar-right">
<asp:Label runat="server" ID="lblVers" />
<%--<%: string.Format("v.{0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version) %>--%> | Powered by
<a href="http://www.steamware.net" target="_blank"><img src="Images/logoSteamware.png" alt="Steamware" height="24" /></a>
<a href="http://www.steamware.net" target="_blank">
<img src="Images/logoSteamware.png" alt="Steamware" height="24" /></a>
</p>
</div>
</div>
+1 -1
View File
@@ -73,7 +73,7 @@
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.6.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net45\NLog.dll</HintPath>
+8
View File
@@ -6,6 +6,14 @@
.table-striped > tbody > tr:nth-child(odd) > th {
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e2e2e2 100%);
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
padding: 2px;
}
/* fix input group "ridotto" */
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
+31 -21
View File
@@ -9,6 +9,15 @@
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e2e2e2 100%);
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
padding: 2px;
}
/* fix input group "ridotto" */
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
@@ -77,34 +86,35 @@ a {
.navbar {
min-height: 15px;
}
.navbar-text{
.navbar-text {
margin-top: 1px;
margin-bottom: 1px;
}
.navbar.navbar-inverse .navbar-form .search-query {
width: 225px;
margin-top: 2px;
background-color: #333;
font-size: 11px;
font-weight: bold;
line-height: 20px;
border-color: #000;
border-radius: 20px;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
.navbar.navbar-inverse .navbar-form .search-query {
width: 225px;
margin-top: 2px;
background-color: #333;
font-size: 11px;
font-weight: bold;
line-height: 20px;
border-color: #000;
border-radius: 20px;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
}
.navbar.navbar-inverse .navbar-form .search-query:focus {
background-color: #FFF;
}
.navbar.navbar-inverse .navbar-form .search-query:focus {
background-color: #FFF;
}
.navbar.navbar-inverse .navbar-form .search-query::-webkit-input-placeholder {
color: #666;
}
.navbar.navbar-inverse .navbar-form .search-query::-webkit-input-placeholder {
color: #666;
}
.navbar.navbar-inverse .navbar-form .search-query::-moz-placeholder {
color: #666;
}
.navbar.navbar-inverse .navbar-form .search-query::-moz-placeholder {
color: #666;
}
/*------------------------------------------------------------------
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -1
View File
File diff suppressed because one or more lines are too long
+9 -9
View File
@@ -38,12 +38,12 @@ $(function () {
dtStandard();
fixTabs();
});
// oggetto da legare all'update parziale ajax di asp.net
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
// re-bind your jQuery events here
$(function () {
dtStandard();
fixTabs();
});
});
//// oggetto da legare all'update parziale ajax di asp.net
//var prm = Sys.WebForms.PageRequestManager.getInstance();
//prm.add_endRequest(function () {
// // re-bind your jQuery events here
// $(function () {
// dtStandard();
// fixTabs();
// });
//});
+39 -1
View File
@@ -9,9 +9,47 @@ namespace C2P
{
public partial class Vocabolario : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (!Page.IsPostBack)
{
mod_righePag1.numRowPag = 20;
Mod_vocabolario1.pageSize = mod_righePag1.numRowPag;
}
// imposto controlli eventi
Mod_vocabolario1.eh_selezioneValore += new EventHandler(Mod_vocabolario1_eh_selezioneValore);
Mod_vocabolario1.eh_resetSelezione += new EventHandler(Mod_vocabolario1_eh_resetSelezione);
// setto visibilità dettaglio termini
Mod_lemmiVocab1.Visible = false;
mod_righePag1.eh_newNum += mod_righePag1_eh_newNum;
}
/// <summary>
/// aggiornato numero righe datagrid... aggiorno visualizzazione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_righePag1_eh_newNum(object sender, EventArgs e)
{
Mod_vocabolario1.pageSize = mod_righePag1.numRowPag;
}
void Mod_vocabolario1_eh_resetSelezione(object sender, EventArgs e)
{
Mod_lemmiVocab1.Visible = false;
Session.Remove("lemma_sel");
}
void Mod_vocabolario1_eh_selezioneValore(object sender, EventArgs e)
{
Mod_lemmiVocab1.Visible = true;
Mod_lemmiVocab1.doUpdate();
}
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
Mod_vocabolario1.eh_selezioneValore -= new EventHandler(Mod_vocabolario1_eh_selezioneValore);
Mod_vocabolario1.eh_resetSelezione -= new EventHandler(Mod_vocabolario1_eh_resetSelezione);
}
}
}
+3 -3
View File
@@ -41,17 +41,17 @@
</div>
<div class="row" style="height: 3em;">
<div class="col-sm-12">
<uc1:mod_autocomplete runat="server" ID="acClient" contextKey="c" minCharAutocomplete="2" showKey="false" ServicePath="../Services/WS_data.asmx/Clients" placeholder="search" labelRicercaTrad="ac[C]liente" />
<uc1:mod_autocomplete runat="server" ID="acClient" contextKey="c" minCharAutocomplete="2" showKey="false" ServicePath="../Services/WS_data.asmx/Clients" placeholder="search" labelRicercaTrad="acCliente" />
</div>
</div>
<div class="row" style="height: 3em;">
<div class="col-sm-12">
<uc1:mod_autocomplete runat="server" ID="acMaterial" contextKey="l" minCharAutocomplete="2" showKey="false" ServicePath="../Services/WS_data.asmx/RawMat" placeholder="search" labelRicercaTrad="ac[L]ega" />
<uc1:mod_autocomplete runat="server" ID="acMaterial" contextKey="l" minCharAutocomplete="2" showKey="false" ServicePath="../Services/WS_data.asmx/RawMat" placeholder="search" labelRicercaTrad="acLega" />
</div>
</div>
<div class="row" style="height: 3em;">
<div class="col-sm-12">
<uc1:mod_autocomplete runat="server" ID="acItem" contextKey="a" minCharAutocomplete="2" showKey="false" ServicePath="../Services/WS_data.asmx/Items" placeholder="search" labelRicercaTrad="ac[A]rticolo" />
<uc1:mod_autocomplete runat="server" ID="acItem" contextKey="a" minCharAutocomplete="2" showKey="false" ServicePath="../Services/WS_data.asmx/Items" placeholder="search" labelRicercaTrad="acArticolo" />
</div>
</div>
<div class="row" style="height: 3em;">
+4 -4
View File
@@ -2,16 +2,16 @@
<div class="row" style="font-size: 8pt;">
<div class="col-sm-12">
<asp:GridView ID="grView" runat="server" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False"
<asp:GridView ID="grView" runat="server" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False" CssClass="table table-striped table-bordered"
DataKeyNames="Lingua,Lemma" DataSourceID="ods" OnDataBound="grView_DataBound">
<RowStyle CssClass="ctrRowStyle" />
<%--<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
<SelectedRowStyle CssClass="ctrSelRowStyle" />
<FooterStyle CssClass="ctrFooter" />
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />--%>
<EmptyDataTemplate>
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
</EmptyDataTemplate>
@@ -45,7 +45,7 @@
</asp:GridView>
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getVocabolario" TypeName="SteamWare.selDataVoc"
OldValuesParameterFormatString="original_{0}"
OldValuesParameterFormatString="Original_{0}"
FilterExpression="Lemma LIKE '%{0}%'">
<FilterParameters>
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="lemma_sel" />
+3 -3
View File
@@ -30,9 +30,9 @@ namespace C2P.WebUserControls
private void traduciObj()
{
string cKey = acCliente.contextKey;
acCliente.labelRicerca = traduci("ac[C]liente");
acArticolo.labelRicerca = traduci("ac[A]rticolo");
lblLega.Text = traduci("ac[L]ega");
acCliente.labelRicerca = traduci("acCliente");
acArticolo.labelRicerca = traduci("acArticolo");
lblLega.Text = traduci("acLega");
}
/// <summary>
/// wrapper traduzione
+15 -26
View File
@@ -3,44 +3,36 @@
<div class="row" style="font-size: 8pt;">
<div class="col-sm-12">
<asp:Button ID="btnNewLemma" runat="server" OnClick="btnNewLemma_Click" CssClass="btn btn-success btn-xs" />
<asp:Button ID="btnNewLemma" runat="server" OnClick="btnNewLemma_Click" CssClass="btn btn-success" />
<asp:TextBox ID="txtNewLemma" runat="server" placeholder="inserire lemma" />
</div>
<div class="col-sm-12">
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
DataKeyNames="Lingua,Lemma" DataSourceID="ods" OnDataBound="grView_DataBound"
DataKeyNames="Lingua,Lemma" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered"
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowEditing="grView_RowEditing">
<RowStyle CssClass="ctrRowStyle" />
<%-- <RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
<SelectedRowStyle CssClass="ctrSelRowStyle" />
<FooterStyle CssClass="ctrFooter" />
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />--%>
<EmptyDataTemplate>
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False">
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:LinkButton runat="server" ID="LinkButton1" class="btn btn-success" Width="100%" CausesValidation="true" CommandName="Update"><i class="fa fa-check"></i></asp:LinkButton>
<%--<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />--%>
<asp:LinkButton runat="server" ID="LinkButton2" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo"></i></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbUpdate" CausesValidation="true" CommandName="Update"><i class="fa fa-check fa-2x"></i></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbCancel" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo fa-2x"></i></asp:LinkButton>
</EditItemTemplate>
<HeaderTemplate>
<asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default btn-xs" Visible="true"><i class="glyphicon glyphicon-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
<asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default" Visible="true"><i class="glyphicon glyphicon-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton runat="server" ID="LinkButton2" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Select"><i class="fa fa-search"></i></asp:LinkButton>
<%--<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />--%>
<asp:LinkButton runat="server" ID="LinkButton3" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Edit"><i class="fa fa-edit"></i></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbSelect" CausesValidation="false" CommandName="Select"><i class="fa fa-search fa-2x"></i></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbEdit" CausesValidation="false" CommandName="Edit"><i class="fa fa-edit fa-2x"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Lingua" SortExpression="Lingua">
@@ -61,21 +53,18 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="Traduzione" SortExpression="Traduzione">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Traduzione") %>' Width="500px"
TextMode="MultiLine" Height="8em"></asp:TextBox>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Traduzione") %>' Width="30em"
TextMode="MultiLine" Height="4em"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Traduzione") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<%--<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' />--%>
<asp:LinkButton runat="server" ID="LinkButton3" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>'><i class="fa fa-trash-o"></i></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbDelete" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
@@ -84,7 +73,7 @@
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getVocabolario" TypeName="SteamWare.selDataVoc"
UpdateMethod="updateLemmaVoc" DeleteMethod="deleteLemmaVoc" OldValuesParameterFormatString="Original_{0}"
FilterExpression="Traduzione LIKE '%{0}%' OR Lemma LIKE '%{0}%' "
OnUpdated="ods_Updated">
OnUpdated="ods_Updated" OnInserted="ods_Inserted">
<UpdateParameters>
<asp:Parameter Name="Traduzione" Type="String" />
<asp:Parameter Name="Original_Lingua" Type="String" />
+8 -1
View File
@@ -93,7 +93,7 @@ public partial class mod_vocabolario : SteamWare.UserControl
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
lblNumRec.Text = string.Format("{0} ({1})", grView.Rows.Count, totRecord);
}
else
{
@@ -129,6 +129,7 @@ public partial class mod_vocabolario : SteamWare.UserControl
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
{
DataWrap.DW.resetVocabolario();
selezionatoValore();
}
@@ -152,5 +153,11 @@ public partial class mod_vocabolario : SteamWare.UserControl
#endregion
protected void ods_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
{
DataWrap.DW.resetVocabolario();
selezionatoValore();
}
}
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -18,7 +18,7 @@
<package id="Microsoft.AspNet.Web.Optimization.WebForms" version="1.1.3" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.7.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.2" targetFramework="net45" />
<package id="NLog" version="2.1.0" targetFramework="net45" />
<package id="NLog.Config" version="2.1.0" targetFramework="net45" />
<package id="NLog.Schema" version="2.1.0" targetFramework="net45" />
Binary file not shown.
Binary file not shown.