Inizio testing di typeahead

This commit is contained in:
Samuele E. Locatelli
2018-07-18 17:18:19 +02:00
parent 1cc2131966
commit 662ceb331e
3 changed files with 51 additions and 34 deletions
+14
View File
@@ -416,6 +416,8 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Scarti.aspx" />
<Content Include="Scripts\bloodhound.js" />
<Content Include="Scripts\bloodhound.min.js" />
<Content Include="Scripts\bootstrap.bundle.js" />
<Content Include="Scripts\bootstrap.bundle.min.js" />
<Content Include="Scripts\bootstrap.js" />
@@ -441,6 +443,10 @@
<Content Include="Scripts\popper-utils.min.js" />
<Content Include="Scripts\popper.js" />
<Content Include="Scripts\popper.min.js" />
<Content Include="Scripts\typeahead.bundle.js" />
<Content Include="Scripts\typeahead.bundle.min.js" />
<Content Include="Scripts\typeahead.jquery.js" />
<Content Include="Scripts\typeahead.jquery.min.js" />
<Content Include="Scripts\umd\popper-utils.js" />
<Content Include="Scripts\umd\popper-utils.min.js" />
<Content Include="Scripts\umd\popper.js" />
@@ -481,6 +487,7 @@
<Content Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="WebUserControls\cmp_newODL.ascx" />
<Content Include="WebUserControls\mod_checkHttps.ascx" />
<Content Include="WebUserControls\mod_commenti.ascx" />
<Content Include="WebUserControls\mod_confProd.ascx" />
@@ -709,6 +716,13 @@
<Compile Include="WebMasterPages\BootstrapNoUpdPnl.Master.designer.cs">
<DependentUpon>BootstrapNoUpdPnl.Master</DependentUpon>
</Compile>
<Compile Include="WebUserControls\cmp_newODL.ascx.cs">
<DependentUpon>cmp_newODL.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\cmp_newODL.ascx.designer.cs">
<DependentUpon>cmp_newODL.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_checkHttps.ascx.cs">
<DependentUpon>mod_checkHttps.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+37 -7
View File
@@ -1,18 +1,48 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Bootstrap.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="MoonProTablet.Test" %>
<%@ Register Src="~/WebUserControls/mod_controlliProd.ascx" TagPrefix="uc1" TagName="mod_controlliProd" %>
<%--<%@ Register Src="~/WebUserControls/mod_controlliProd.ascx" TagPrefix="uc1" TagName="mod_controlliProd" %>
<%@ Register Src="~/WebUserControls/mod_regScarti.ascx" TagPrefix="uc1" TagName="mod_regScarti" %>
<%@ Register Src="~/WebUserControls/mod_confProd.ascx" TagPrefix="uc1" TagName="mod_confProd" %>
<%@ Register Src="~/WebUserControls/mod_confProd.ascx" TagPrefix="uc1" TagName="mod_confProd" %>--%>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<div class="container">
<uc1:mod_regScarti runat="server" ID="mod_regScarti" />
<%--<uc1:mod_regScarti runat="server" ID="mod_regScarti" />
<uc1:mod_controlliProd runat="server" ID="mod_controlliProd" />
<uc1:mod_confProd runat="server" ID="mod_confProd" />
<uc1:mod_confProd runat="server" ID="mod_confProd" />--%>
Prova typeahead
<div id="bloodhound">
<input class="typeahead" type="text" placeholder="States of USA">
</div>
<script>
var states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California',
'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii',
'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana',
'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota',
'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire',
'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota',
'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island',
'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont',
'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'
];
// constructs the suggestion engine
var states = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace,
queryTokenizer: Bloodhound.tokenizers.whitespace,
// `states` is an array of state names defined in "The Basics"
local: states
});
$('#bloodhound .typeahead').typeahead({
hint: true,
highlight: true,
minLength: 1
},
{
name: 'states',
source: states
});
</script>
</div>
</asp:Content>
-27
View File
@@ -11,32 +11,5 @@ namespace MoonProTablet {
public partial class Test {
/// <summary>
/// Controllo mod_regScarti.
/// </summary>
/// <remarks>
/// 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_regScarti mod_regScarti;
/// <summary>
/// Controllo mod_controlliProd.
/// </summary>
/// <remarks>
/// 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_controlliProd mod_controlliProd;
/// <summary>
/// Controllo mod_confProd.
/// </summary>
/// <remarks>
/// 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_confProd mod_confProd;
}
}