completata gestioen (grafica) user + auth + stato utente...
This commit is contained in:
@@ -20,6 +20,23 @@
|
||||
.checkKo {
|
||||
color: #5f2121;
|
||||
}
|
||||
.divNumKeyb {
|
||||
float: right;
|
||||
background-color: rgba(128, 255, 128, 0.5);
|
||||
width: 20%;
|
||||
min-width: 100px;
|
||||
min-height: 400px;
|
||||
}
|
||||
.divMain {
|
||||
float: none;
|
||||
}
|
||||
.divMainKeyb {
|
||||
float: right;
|
||||
width: 80%;
|
||||
}
|
||||
.img-thumbnail {
|
||||
max-width: 70%;
|
||||
}
|
||||
/*------------------------------------------------------------------
|
||||
[ navbar / .navbar ]
|
||||
*/
|
||||
@@ -66,6 +83,11 @@
|
||||
.navbar > .container-fluid .navbar-brand {
|
||||
margin-left: 0px;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > .active > a {
|
||||
background: #333;
|
||||
color: #F90;
|
||||
margin: -5px;
|
||||
}
|
||||
/*------------------------------------------------------------------
|
||||
[ Subnavbar / .subnavbar ]
|
||||
*/
|
||||
|
||||
@@ -19,13 +19,34 @@
|
||||
.noShadows {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.checkOk {
|
||||
color: #99FF99;
|
||||
}
|
||||
|
||||
.checkKo {
|
||||
color: #5f2121;
|
||||
}
|
||||
|
||||
.divNumKeyb {
|
||||
float: right;
|
||||
background-color: rgba(128,255,128, 0.5);
|
||||
width: 20%;
|
||||
min-width: 100px;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.divMain {
|
||||
float: none;
|
||||
}
|
||||
.divMainKeyb {
|
||||
float: right;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.img-thumbnail{
|
||||
max-width:70%;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------
|
||||
[ navbar / .navbar ]
|
||||
@@ -82,6 +103,11 @@
|
||||
.navbar > .container-fluid .navbar-brand {
|
||||
margin-left: 0px;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > .active > a {
|
||||
background: #333;
|
||||
color: #F90;
|
||||
margin: -5px;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------
|
||||
[ Subnavbar / .subnavbar ]
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+13
-2
@@ -1,5 +1,8 @@
|
||||
<%@ Master Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="FullPage.master.cs" Inherits="GMW.FullPage" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_numKey.ascx" TagPrefix="uc1" TagName="mod_numKey" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
|
||||
<asp:ContentPlaceHolder runat="server" ID="HeadContent">
|
||||
</asp:ContentPlaceHolder>
|
||||
@@ -9,6 +12,14 @@
|
||||
</asp:ContentPlaceHolder>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="Main" runat="server">
|
||||
<asp:ContentPlaceHolder runat="server" ID="MCon">
|
||||
</asp:ContentPlaceHolder>
|
||||
<div runat="server" id="divNumKeyb" class="divNumKeyb">
|
||||
<br />
|
||||
<br />
|
||||
NUMERIC KEYPAD
|
||||
<uc1:mod_numKey runat="server" id="mod_numKey" />
|
||||
</div>
|
||||
<div runat="server" id="divMain" class="divMain">
|
||||
<asp:ContentPlaceHolder runat="server" ID="MCon">
|
||||
</asp:ContentPlaceHolder>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
+31
-2
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
@@ -11,7 +12,35 @@ namespace GMW
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if(!Page.IsPostBack)
|
||||
{
|
||||
// se è richiesto mostro calcolatrice e di conseguenza imposto DIV... altrimenti
|
||||
if(showCalc)
|
||||
{
|
||||
divMain.Attributes.Remove("class");
|
||||
divMain.Attributes.Add("class", "divMainKeyb");
|
||||
}
|
||||
divNumKeyb.Visible = showCalc;
|
||||
}
|
||||
}
|
||||
|
||||
protected bool showCalc
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
// cerco da sessione SE C'E'...
|
||||
if(memLayer.ML.isInSessionObject("showNumKey"))
|
||||
{
|
||||
answ = memLayer.ML.BoolSessionObj("showNumKey");
|
||||
}
|
||||
else
|
||||
{
|
||||
// cerco da web.config
|
||||
answ = memLayer.ML.CRB("showNumKey");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+27
@@ -30,6 +30,33 @@ namespace GMW {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder FeaturedContent;
|
||||
|
||||
/// <summary>
|
||||
/// divNumKeyb control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divNumKeyb;
|
||||
|
||||
/// <summary>
|
||||
/// mod_numKey control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::GMW.WebUserControls.mod_numKey mod_numKey;
|
||||
|
||||
/// <summary>
|
||||
/// divMain control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divMain;
|
||||
|
||||
/// <summary>
|
||||
/// MCon control.
|
||||
/// </summary>
|
||||
|
||||
@@ -481,6 +481,7 @@
|
||||
<Content Include="WebUserControls\mod_LiqDtAnom.ascx" />
|
||||
<Content Include="WebUserControls\mod_listAL.ascx" />
|
||||
<Content Include="WebUserControls\mod_listDtx.ascx" />
|
||||
<Content Include="WebUserControls\mod_numKey.ascx" />
|
||||
<Content Include="WebUserControls\mod_PostFusioni.ascx" />
|
||||
<Content Include="WebUserControls\mod_postFusioniBCode.ascx" />
|
||||
<Content Include="WebUserControls\mod_PostLiq_DT.ascx" />
|
||||
@@ -1526,6 +1527,13 @@
|
||||
<Compile Include="WebUserControls\mod_metodiNoSearch.ascx.designer.cs">
|
||||
<DependentUpon>mod_metodiNoSearch.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_numKey.ascx.cs">
|
||||
<DependentUpon>mod_numKey.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_numKey.ascx.designer.cs">
|
||||
<DependentUpon>mod_numKey.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_nuovaListaPrelievo.ascx.cs">
|
||||
<DependentUpon>mod_nuovaListaPrelievo.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -70,6 +70,8 @@
|
||||
<!--gestione clock-->
|
||||
<add key="intUpdateClock_ms" value="1000" />
|
||||
<add key="maxRefreshToReload" value="60" />
|
||||
<!--gestione numKey-->
|
||||
<add key="showNumKey" value="false" />
|
||||
<!--area temp-->
|
||||
<add key="maxAgeTempAreaHours" value="24" />
|
||||
<!--area logger-->
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_numKey.ascx.cs" Inherits="GMW.WebUserControls.mod_numKey" %>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">7</div>
|
||||
<div class="col-xs-4">8</div>
|
||||
<div class="col-xs-4">9</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">4</div>
|
||||
<div class="col-xs-4">5</div>
|
||||
<div class="col-xs-4">6</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">1</div>
|
||||
<div class="col-xs-4">2</div>
|
||||
<div class="col-xs-4">3</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">-</div>
|
||||
<div class="col-xs-4">0</div>
|
||||
<div class="col-xs-4">+</div>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_numKey : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_numKey
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -8,23 +8,33 @@
|
||||
<div class="noShadows">
|
||||
<div class="navbar-header">
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li class='<%: liClass("default") %> navbarSep'>
|
||||
<asp:HyperLink runat="server" ID="hlHome" NavigateUrl="~/" CssClass="navbar-brand" ToolTip='<%# SteamWare.memLayer.ML.confReadString("titleApp") %>'>
|
||||
<i class="fa fa-home fa-lg"></i>
|
||||
</asp:HyperLink>
|
||||
<li class='navbarSep'>
|
||||
<asp:HyperLink runat="server" ID="hlHome" NavigateUrl="~/" CssClass="navbar-brand" ToolTip='<%# SteamWare.memLayer.ML.confReadString("titleApp") %>'> <i class="fa fa-home fa-lg"></i></asp:HyperLink>
|
||||
</li>
|
||||
<li class="navbarSep">
|
||||
<asp:HyperLink runat="server" ID="hlUser" NavigateUrl="~/" CssClass="navbar-brand" ToolTip='<%# SteamWare.memLayer.ML.confReadString("titleApp") %>'>
|
||||
<i class="fa fa-user fa-lg <%: usrAuth %>"></i>
|
||||
<asp:Label runat="server" ID="lblMatr" Text="..." />
|
||||
<asp:HyperLink runat="server" ID="hlUser" NavigateUrl="~/" CssClass="navbar-brand" ToolTip='<%# usrAuthToolTip %>'>
|
||||
<i class="fa fa-user fa-lg <%: usrAuthCss %>"></i>
|
||||
<asp:Label runat="server" ID="lblMatr" Text='<%# usrAuthText %>' />
|
||||
</asp:HyperLink>
|
||||
<%--<asp:LinkButton runat="server" ID="lbUser" Text="---" />--%>
|
||||
</li>
|
||||
<li class="active">
|
||||
<asp:LinkButton runat="server" ID="lbnUpdate" class="navbar-brand" OnClick="lbnUpdate_Click">
|
||||
<asp:Label runat="server" ID="lblTitolo" />
|
||||
<i><asp:Label runat="server" ID="lblIconTitolo" /></i>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="lbnUpdate" Text="---" OnClick="lbnUpdate_Click" ToolTip="Update">
|
||||
<%: nomePag %>
|
||||
<i class="fa-lg <%: cssIconPag %>"></i>
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="lbnUpdate2">
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
<%--<li class="active">
|
||||
<asp:LinkButton runat="server" ID="lbnUpdate" class="navbar-brand" OnClick="lbnUpdate_Click">
|
||||
<asp:Label runat="server" ID="lblTitolo" />
|
||||
<i>
|
||||
<asp:Label runat="server" ID="lblIconTitolo" /></i>
|
||||
</asp:LinkButton>
|
||||
</li>--%>
|
||||
</ul>
|
||||
<div class="nav navbar-nav navbar-right">
|
||||
<button type="button" class="navbar-toggle navbar-right" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
@@ -63,9 +73,7 @@
|
||||
</SeparatorTemplate>
|
||||
</asp:Repeater>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="lbShowNumKey" class="navbar-brand" OnClick="lbShowNumKey_Click">
|
||||
<i class="fa fa-calculator fa-lg"></i>
|
||||
</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbShowNumKey" class="navbar-brand" OnClick="lbShowNumKey_Click"> <i class="fa fa-calculator fa-lg"></i></asp:LinkButton>
|
||||
</li>
|
||||
</ul>
|
||||
<asp:XmlDataSource ID="XmlMenu" runat="server" EnableCaching="false"></asp:XmlDataSource>
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace GMW.WebUserControls
|
||||
else
|
||||
{
|
||||
PagCorrente();
|
||||
setPageName();
|
||||
updateTreeMenu();
|
||||
}
|
||||
// fix componenti
|
||||
@@ -36,21 +35,35 @@ namespace GMW.WebUserControls
|
||||
hlUser.DataBind();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// metto icone e traduzione pagina corrente...
|
||||
/// </summary>
|
||||
private void setPageName()
|
||||
|
||||
public string cssIconPag
|
||||
{
|
||||
try
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", user_std.pagCorrente))[0];
|
||||
lblTitolo.Text = traduci(riga.NOME);
|
||||
lblIconTitolo.CssClass = traduci(riga.DESCRIZIONE);
|
||||
lbnUpdate.ToolTip = traduci("Update");
|
||||
try
|
||||
{
|
||||
answ = traduci(riga.DESCRIZIONE);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
catch
|
||||
}
|
||||
public string nomePag
|
||||
{
|
||||
get
|
||||
{
|
||||
lblTitolo.Text = "HOME";
|
||||
string answ = "";
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", user_std.pagCorrente))[0];
|
||||
try
|
||||
{
|
||||
answ = traduci(riga.NOME);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -102,7 +115,67 @@ namespace GMW.WebUserControls
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
public string usrAuth
|
||||
/// <summary>
|
||||
/// tooltip che indica se user autorizzato
|
||||
/// </summary>
|
||||
public string usrAuthToolTip
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
//if (user_std.pagCorrente.IndexOf(nomeElem) >= 0) answ = "active";
|
||||
// !!!FARE!!! controllo se in session/cookie c'è auth utente...
|
||||
|
||||
// FAKE: in base al secondo pari/dispari cambio colore...
|
||||
int resto = 0;
|
||||
Math.DivRem(DateTime.Now.Second, 2, out resto);
|
||||
if (resto != 0)
|
||||
{
|
||||
answ = traduci("UserAuthOk");
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = traduci("UserAuthKo");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// text x user autorizzato
|
||||
/// </summary>
|
||||
public string usrAuthText
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "...";
|
||||
try
|
||||
{
|
||||
//if (user_std.pagCorrente.IndexOf(nomeElem) >= 0) answ = "active";
|
||||
// !!!FARE!!! controllo se in session/cookie c'è auth utente...
|
||||
|
||||
// FAKE: in base al secondo pari/dispari cambio colore...
|
||||
int resto = 0;
|
||||
Math.DivRem(DateTime.Now.Second, 2, out resto);
|
||||
if (resto != 0)
|
||||
{
|
||||
answ = "12345";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "...";
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
public string usrAuthCss
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -129,6 +202,15 @@ namespace GMW.WebUserControls
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
protected bool userAuthOk
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// salva in variabile pagina il nome della pagina corrente
|
||||
/// </summary>
|
||||
|
||||
+2
-11
@@ -67,22 +67,13 @@ namespace GMW.WebUserControls {
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbnUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// lblTitolo control.
|
||||
/// lbnUpdate2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblTitolo;
|
||||
|
||||
/// <summary>
|
||||
/// lblIconTitolo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblIconTitolo;
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbnUpdate2;
|
||||
|
||||
/// <summary>
|
||||
/// itemPlaceholderContainer control.
|
||||
|
||||
Binary file not shown.
@@ -70,6 +70,8 @@
|
||||
<!--gestione clock-->
|
||||
<add key="intUpdateClock_ms" value="1000" />
|
||||
<add key="maxRefreshToReload" value="60" />
|
||||
<!--gestione numKey-->
|
||||
<add key="showNumKey" value="false" />
|
||||
<!--area temp-->
|
||||
<add key="maxAgeTempAreaHours" value="24" />
|
||||
<!--area logger-->
|
||||
|
||||
Reference in New Issue
Block a user