From ed52b02fad319c041a19347fe4c8e8df945af56f Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 21 Feb 2018 18:05:26 +0100 Subject: [PATCH] Fix file upload... --- CMS_SC/Bootstrap.Master | 1 - CMS_SC/Empty.Master | 132 ++++++++--------- CMS_SC/Empty.Master.cs | 26 ++++ CMS_SC/Empty.Master.designer.cs | 137 +++++++++--------- CMS_SC/FileManager.aspx | 2 +- CMS_SC/FileManager.aspx.cs | 2 +- CMS_SC/WebUserControls/mod_anagTags.ascx | 94 ++++++------ CMS_SC/WebUserControls/mod_fileUpload.ascx | 52 +++---- CMS_SC/WebUserControls/mod_fileUpload.ascx.cs | 50 +++---- .../mod_fileUpload.ascx.designer.cs | 9 ++ CMS_SC/WebUserControls/mod_testata.ascx | 4 +- CMS_SC/WebUserControls/mod_testata.ascx.cs | 23 +-- .../mod_testata.ascx.designer.cs | 9 ++ 13 files changed, 272 insertions(+), 269 deletions(-) diff --git a/CMS_SC/Bootstrap.Master b/CMS_SC/Bootstrap.Master index 90087de..b8ce086 100644 --- a/CMS_SC/Bootstrap.Master +++ b/CMS_SC/Bootstrap.Master @@ -30,7 +30,6 @@
- <%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=272931&clcid=0x409 --%> <%--Framework Scripts--%> diff --git a/CMS_SC/Empty.Master b/CMS_SC/Empty.Master index 815149e..0d08e45 100644 --- a/CMS_SC/Empty.Master +++ b/CMS_SC/Empty.Master @@ -5,87 +5,83 @@ - - - - - - - - <%: Page.Title %> - CMS_SC + + + + + + + + <%: Page.Title %> - CMS_SC - - <%: Scripts.Render("~/bundles/modernizr") %> - <%: Scripts.Render("~/bundles/jquery") %> - <%: Scripts.Render("~/bundles/jqueryui") %> - - - - - - - + + <%: Scripts.Render("~/bundles/modernizr") %> + <%: Scripts.Render("~/bundles/jquery") %> + <%: Scripts.Render("~/bundles/jqueryui") %> + + + + + - - - - <%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=272931&clcid=0x409 --%> - <%--Framework Scripts--%> - - - - - - - - - - - <%--Site Scripts--%> - - - <%-- - - - - - --%> + + + + <%--Framework Scripts--%> + + + + + + + + + + + <%--Site Scripts--%> + + + + + + + + + -
- -
-

hello world!

- Area main content da customizzare -
-
+ + +
+ +
+

hello world!

+ Area main content da customizzare
- - - +
+
+ + +
- - + +
CMS-SC - v.<%: currVersion.ToString() %> | <%: DateTime.Now %>
<%: System.Web.Configuration.WebConfigurationManager.AppSettings["Environment"] %> -
+
Powered by Steamware s.r.l. - © 2007-<%: DateTime.Now.Year %>
- -
-
- - - - <%: Scripts.Render("~/bundles/jSteamware") %> - + + + + + + + <%: Scripts.Render("~/bundles/jSteamware") %> + diff --git a/CMS_SC/Empty.Master.cs b/CMS_SC/Empty.Master.cs index af8c3f9..d490a6d 100644 --- a/CMS_SC/Empty.Master.cs +++ b/CMS_SC/Empty.Master.cs @@ -39,5 +39,31 @@ namespace CMS_SC return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; } } + /// + /// determina visibilità controllo ricerca + /// + public bool showSearch + { + get + { + return mod_testata.pageHasSearch; + } + set + { + mod_testata.pageHasSearch = value; + } + } + + public string searchVal + { + get + { + return mod_testata.searchVal; + } + set + { + mod_testata.searchVal = value; + } + } } } \ No newline at end of file diff --git a/CMS_SC/Empty.Master.designer.cs b/CMS_SC/Empty.Master.designer.cs index 0b6ecb8..fc90161 100644 --- a/CMS_SC/Empty.Master.designer.cs +++ b/CMS_SC/Empty.Master.designer.cs @@ -1,141 +1,140 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ -namespace CMS_SC -{ - - +namespace CMS_SC { + + public partial class Empty { /// - /// PlaceHolder1 control. + /// Controllo PlaceHolder1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder1; /// - /// BundleReference1 control. + /// Controllo BundleReference1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1; /// - /// BundleReference2 control. + /// Controllo BundleReference2. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference2; /// - /// HeadContent control. + /// Controllo HeadContent. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ContentPlaceHolder HeadContent; /// - /// form1 control. + /// Controllo form1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; /// - /// ScriptManager1 control. + /// Controllo ScriptManager1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.ScriptManager ScriptManager1; /// - /// FeaturedContent control. + /// Controllo uppNavbar. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.UpdatePanel uppNavbar; + + /// + /// Controllo mod_testata. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::CMS_SC.WebUserControls.mod_testata mod_testata; + + /// + /// Controllo uppFeatured. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.UpdatePanel uppFeatured; + + /// + /// Controllo FeaturedContent. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ContentPlaceHolder FeaturedContent; /// - /// MainContent control. + /// Controllo MainContent. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent; /// - /// uppFooter control. + /// Controllo uppFooter. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.UpdatePanel uppFooter; /// - /// Timer1 control. + /// Controllo Timer1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.Timer Timer1; /// - /// lblVers control. + /// Controllo PlaceHolder2. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblVers; - - /// - /// lblDateTime control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblDateTime; - - /// - /// updtRicerca control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UpdateProgress updtRicerca; - - /// - /// PlaceHolder2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder2; } diff --git a/CMS_SC/FileManager.aspx b/CMS_SC/FileManager.aspx index c856c8e..5d56beb 100644 --- a/CMS_SC/FileManager.aspx +++ b/CMS_SC/FileManager.aspx @@ -4,7 +4,7 @@
-
+
<%: traduci("FileManager") %>
diff --git a/CMS_SC/FileManager.aspx.cs b/CMS_SC/FileManager.aspx.cs index 5704aba..cdbf766 100644 --- a/CMS_SC/FileManager.aspx.cs +++ b/CMS_SC/FileManager.aspx.cs @@ -9,7 +9,7 @@ namespace CMS_SC { if (!Page.IsPostBack) { - //((Bootstrap)this.Master).showSearch = true; + ((Empty)this.Master).showSearch = false; } // imposto filtKey mod_fileUpload.enableMod = memLayer.ML.QSB("enableMod"); diff --git a/CMS_SC/WebUserControls/mod_anagTags.ascx b/CMS_SC/WebUserControls/mod_anagTags.ascx index cbfcb1c..5ca9d57 100644 --- a/CMS_SC/WebUserControls/mod_anagTags.ascx +++ b/CMS_SC/WebUserControls/mod_anagTags.ascx @@ -1,53 +1,53 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagTags.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_anagTags" %> - - - - - - - -   - - - -   + + + + + + + +   + + + +   - - - <%: traduci("Reset") %> - - - - - - - - - - -   - - - - - - + + + <%: traduci("Reset") %> + + + + + + + + + + +   + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/CMS_SC/WebUserControls/mod_fileUpload.ascx b/CMS_SC/WebUserControls/mod_fileUpload.ascx index 32fbabd..a0e4311 100644 --- a/CMS_SC/WebUserControls/mod_fileUpload.ascx +++ b/CMS_SC/WebUserControls/mod_fileUpload.ascx @@ -5,67 +5,67 @@
<%: traduci("AddNewFile") %> <%: traduci("CaricaFile") %> - <%----%> + <%: traduci("ReplaceFile") %>
- <%: traduci("Cancel") %> - <%----%> + <%: traduci("Cancel") %>
- <%--
- -
-
-
--%>
- + - - - - <%: traduci("NoFileFound") %> - + + + <%: traduci("Reset") %> +
- +
+
-
- - - -
-
- - +
+
+ +
+
+
+ + + +
+
+ + +
+
- +
- +
diff --git a/CMS_SC/WebUserControls/mod_fileUpload.ascx.cs b/CMS_SC/WebUserControls/mod_fileUpload.ascx.cs index 889ad4c..03435e7 100644 --- a/CMS_SC/WebUserControls/mod_fileUpload.ascx.cs +++ b/CMS_SC/WebUserControls/mod_fileUpload.ascx.cs @@ -42,9 +42,6 @@ namespace CMS_SC.WebUserControls grView.DataBind(); } divNewEdit.Visible = isWriteEnabled && enableMod; -#if false - btnAdd.DataBind(); -#endif } /// /// Chiave di filtraggio dati... @@ -95,9 +92,6 @@ namespace CMS_SC.WebUserControls } grView.DataBind(); raiseEvent(); -#if false - Response.Redirect(Request.Url.AbsoluteUri); -#endif } } @@ -125,56 +119,48 @@ namespace CMS_SC.WebUserControls { // mostro controllo x edit... fisVisFU(true); -#if false - btnUpload.Text = "Sostituisci File"; -#endif } - -#if false - protected void btnAdd_Click(object sender, EventArgs e) - { - fisVisFU(true); - btnUpload.Text = "Carica Nuovo File"; - } -#endif + /// /// fix visibilità controllo file upload /// /// mostra controlli add=true oppure nasconde = false private void fisVisFU(bool showAdd) { + bool fileSel = grView.SelectedIndex >= 0; FileUploadControl.Visible = showAdd; lbtAddNew.Visible = !showAdd; - lbtUpload.Visible = showAdd; + lbtUpload.Visible = showAdd && !fileSel; + lbtReplace.Visible = showAdd && fileSel; lbtCancel.Visible = showAdd; -#if false - btnAdd.Visible = !showAdd; - btnCancel.Visible = showAdd; -#endif if (grView.SelectedIndex != -1 && !showAdd) { grView.SelectedIndex = -1; } } - -#if false - protected void btnCancel_Click(object sender, EventArgs e) - { - fisVisFU(false); - } -#endif + protected void lbtAddNew_Click(object sender, EventArgs e) { fisVisFU(true); -#if false - btnUpload.Text = traduci("CaricaFile"); -#endif } protected void lbtCancel_Click(object sender, EventArgs e) { fisVisFU(false); } + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + /// + /// resetto selezione + /// + private void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + fisVisFU(false); + } } } \ No newline at end of file diff --git a/CMS_SC/WebUserControls/mod_fileUpload.ascx.designer.cs b/CMS_SC/WebUserControls/mod_fileUpload.ascx.designer.cs index 2b41b50..3ca62fe 100644 --- a/CMS_SC/WebUserControls/mod_fileUpload.ascx.designer.cs +++ b/CMS_SC/WebUserControls/mod_fileUpload.ascx.designer.cs @@ -39,6 +39,15 @@ namespace CMS_SC.WebUserControls { /// protected global::System.Web.UI.WebControls.LinkButton lbtUpload; + /// + /// Controllo lbtReplace. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtReplace; + /// /// Controllo FileUploadControl. /// diff --git a/CMS_SC/WebUserControls/mod_testata.ascx b/CMS_SC/WebUserControls/mod_testata.ascx index 8a08f90..0f223be 100644 --- a/CMS_SC/WebUserControls/mod_testata.ascx +++ b/CMS_SC/WebUserControls/mod_testata.ascx @@ -9,7 +9,7 @@