Fix jQuery + fix turni...

This commit is contained in:
Samuele E. Locatelli
2018-02-28 10:41:29 +01:00
parent b06eeb4b96
commit f51621ca8e
13 changed files with 223 additions and 209 deletions
+10 -15
View File
@@ -28,29 +28,24 @@ namespace MoonProTablet
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui-i18n").Include(
"~/Scripts/jquery-ui-i18n.min.js"));
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-2.0.3.min.js"));
bundles.Add(new ScriptBundle("~/bundles/jquerymobile").Include(
"~/Scripts/jquery.mobile-1.3.2.min.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-1.10.3.min.js"));
//bundles.Add(new ScriptBundle("~/bundles/jqueryui-i18n").Include(
// "~/Scripts/jquery-ui-i18n.min.js"));
//bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
// "~/Scripts/jquery-{version}.js"));
// "~/Scripts/jquery-2.0.3.min.js"));
//bundles.Add(new ScriptBundle("~/bundles/jquerymobile").Include(
// "~/Scripts/jquery.mobile-{version}.js"));
// "~/Scripts/jquery.mobile-1.3.2.min.js"));
//bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
// "~/Scripts/jquery-ui-{version}.js"));
// "~/Scripts/jquery-ui-1.10.3.min.js"));
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));
// aggiungo bundle dinamico x less --> css
//bundles.Add(new DynamicFolderBundle("less", "*.less"));
+53
View File
@@ -56,6 +56,59 @@ body .ui-overlay-c {
border-bottom-right-radius: 0;
}
/* END: gestione blocchi base */
/* Gestione switch*/
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
/* Hide default HTML checkbox */
.switch input {
display: none;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #2196F3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
/* zona blocchi Sx/DX */
.divSx {
float: left;
+63
View File
@@ -63,6 +63,69 @@ body {
}
/* END: gestione blocchi base */
/* Gestione switch*/
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
/* Hide default HTML checkbox */
.switch input {
display: none;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #2196F3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
/* zona blocchi Sx/DX */
.divSx {
float: left;
File diff suppressed because one or more lines are too long
+17 -18
View File
@@ -1,42 +1,41 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MoonProTablet
{
namespace MoonProTablet {
public partial class Dichiarazione {
/// <summary>
/// mod_dettMacchina1 control.
/// Controllo mod_dettMacchina1.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina1;
/// <summary>
/// mod_insComm1 control.
/// Controllo mod_insComm1.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_insComm mod_insComm1;
/// <summary>
/// mod_dichiarazione1 control.
/// Controllo mod_dichiarazione1.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_dichiarazione mod_dichiarazione1;
}
-23
View File
@@ -1,23 +0,0 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.Mobile.master.cs" Inherits="MoonProTablet.Site_Mobile" %>
<%@ Register Src="~/ViewSwitcher.ascx" TagPrefix="friendlyUrls" TagName="ViewSwitcher" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="viewport" content="width=device-width" />
<title></title>
<asp:ContentPlaceHolder runat="server" ID="HeadContent" />
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>Mobile Master Page</h1>
<asp:ContentPlaceHolder runat="server" ID="FeaturedContent" />
<section class="content-wrapper main-content clear-fix">
<asp:ContentPlaceHolder runat="server" ID="MainContent" />
</section>
<friendlyUrls:ViewSwitcher runat="server" />
</div>
</form>
</body>
</html>
-12
View File
@@ -1,12 +0,0 @@
using System;
namespace MoonProTablet
{
public partial class Site_Mobile : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-52
View File
@@ -1,52 +0,0 @@
//------------------------------------------------------------------------------
// <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 MoonProTablet
{
public partial class Site_Mobile {
/// <summary>
/// HeadContent 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.ContentPlaceHolder HeadContent;
/// <summary>
/// form1 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.HtmlForm form1;
/// <summary>
/// FeaturedContent 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.ContentPlaceHolder FeaturedContent;
/// <summary>
/// MainContent 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.ContentPlaceHolder MainContent;
}
}
+10 -7
View File
@@ -1,15 +1,18 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" AutoEventWireup="true" CodeBehind="Turni.aspx.cs"
Inherits="MoonProTablet.Turni" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Bootstrap.Master" AutoEventWireup="true" CodeBehind="Turni.aspx.cs"
Inherits="MoonProTablet.Turni" %>
<%@ Register Src="WebUserControls/mod_dettMacchina.ascx" TagName="mod_dettMacchina" TagPrefix="uc1" %>
<%@ Register Src="WebUserControls/mod_turni.ascx" TagName="mod_turni" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="clearDiv" data-role="content">
<div class="container my-3" role="main">
<div class="row">
<div class="col-12 col-sm-6 col-md-4 col-lg-3">
<uc1:mod_dettMacchina ID="mod_dettMacchina1" runat="server" />
</div>
<div class="clearDiv" data-role="content" data-theme="a">
</div>
<div class="col-12 col-sm-6 col-md-8 col-lg-9 align-self-center">
<uc2:mod_turni ID="mod_turni1" runat="server" />
</div>
</div>
</div>
</asp:Content>
+14 -15
View File
@@ -1,33 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MoonProTablet
{
namespace MoonProTablet {
public partial class Turni {
/// <summary>
/// mod_dettMacchina1 control.
/// Controllo mod_dettMacchina1.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina1;
/// <summary>
/// mod_turni1 control.
/// Controllo mod_turni1.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_turni mod_turni1;
}
+28 -39
View File
@@ -1,42 +1,31 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_turni.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_turni" %>
<!-- turni -->
<div data-theme="c">
<div class="ui-grid-a">
<div class="ui-block-a" style="text-align: right; padding-right: 10px; vertical-align: middle;">
<h3>
Turno 1:</h3>
</div>
<div class="ui-block-b">
<asp:DropDownList name="flip-1" runat="server" ID="ddlT1" data-role="slider" AutoPostBack="true" OnSelectedIndexChanged="ddlT1_SelectedIndexChanged">
<asp:ListItem Text="Fermo" Value="False" />
<asp:ListItem Text="Attivo" Value="True" />
</asp:DropDownList>
</div>
</div>
<div class="ui-grid-a">
<div class="ui-block-a" style="text-align: right; padding-right: 10px; vertical-align: middle;">
<h3>
Turno 2:</h3>
</div>
<div class="ui-block-b">
<asp:DropDownList name="flip-2" runat="server" ID="ddlT2" data-role="slider" AutoPostBack="true" OnSelectedIndexChanged="ddlT2_SelectedIndexChanged">
<asp:ListItem Text="Fermo" Value="False" />
<asp:ListItem Text="Attivo" Value="True" />
</asp:DropDownList>
</div>
</div>
<div class="ui-grid-a">
<div class="ui-block-a" style="text-align: right; padding-right: 10px; vertical-align: middle;">
<h3>
Turno 3:</h3>
</div>
<div class="ui-block-b">
<asp:DropDownList name="flip-3" runat="server" ID="ddlT3" data-role="slider" AutoPostBack="true" OnSelectedIndexChanged="ddlT3_SelectedIndexChanged">
<asp:ListItem Text="Fermo" Value="False" />
<asp:ListItem Text="Attivo" Value="True" />
</asp:DropDownList>
</div>
</div>
<div class="row">
<div class="col-6" style="text-align: right; padding-right: 10px; vertical-align: middle;">
<h3>Turno 1:</h3>
</div>
<div class="col-6 dropdown-menu1">
<label class="switch">
<asp:CheckBox runat="server" ID="chkT1" AutoPostBack="true" OnCheckedChanged="chkT1_CheckedChanged" />
<span class="slider round"></span>
</label>
</div>
<div class="col-6" style="text-align: right; padding-right: 10px; vertical-align: middle;">
<h3>Turno 2:</h3>
</div>
<div class="col-6">
<label class="switch">
<asp:CheckBox runat="server" ID="chkT2" AutoPostBack="true" OnCheckedChanged="chkT2_CheckedChanged" />
<span class="slider round"></span>
</label>
</div>
<div class="col-6" style="text-align: right; padding-right: 10px; vertical-align: middle;">
<h3>Turno 3:</h3>
</div>
<div class="col-6">
<label class="switch">
<asp:CheckBox runat="server" ID="chkT3" AutoPostBack="true" OnCheckedChanged="chkT3_CheckedChanged" />
<span class="slider round"></span>
</label>
</div>
</div>
<!-- /turni -->
+7 -6
View File
@@ -38,9 +38,10 @@ namespace MoonProTablet.WebUserControls
try
{
DS_ProdTempi.TurniMacchinaRow rigaTurni = DataLayer.obj.taTurniMacc.getByIdxMacc(idxMacchina.ToString())[0];
ddlT1.SelectedValue = rigaTurni.T1.ToString();
ddlT2.SelectedValue = rigaTurni.T2.ToString();
ddlT3.SelectedValue = rigaTurni.T3.ToString();
// fix checkboxes
chkT1.Checked = rigaTurni.T1;
chkT2.Checked = rigaTurni.T2;
chkT3.Checked = rigaTurni.T3;
}
catch
{ }
@@ -55,17 +56,17 @@ namespace MoonProTablet.WebUserControls
setupTurni();
}
protected void ddlT1_SelectedIndexChanged(object sender, EventArgs e)
protected void chkT1_CheckedChanged(object sender, EventArgs e)
{
toggleTurno(1);
}
protected void ddlT2_SelectedIndexChanged(object sender, EventArgs e)
protected void chkT2_CheckedChanged(object sender, EventArgs e)
{
toggleTurno(2);
}
protected void ddlT3_SelectedIndexChanged(object sender, EventArgs e)
protected void chkT3_CheckedChanged(object sender, EventArgs e)
{
toggleTurno(3);
}
+20 -21
View File
@@ -1,43 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MoonProTablet.WebUserControls
{
namespace MoonProTablet.WebUserControls {
public partial class mod_turni {
/// <summary>
/// ddlT1 control.
/// Controllo chkT1.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlT1;
protected global::System.Web.UI.WebControls.CheckBox chkT1;
/// <summary>
/// ddlT2 control.
/// Controllo chkT2.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlT2;
protected global::System.Web.UI.WebControls.CheckBox chkT2;
/// <summary>
/// ddlT3 control.
/// Controllo chkT3.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlT3;
protected global::System.Web.UI.WebControls.CheckBox chkT3;
}
}