M$ AspNet.WebApi 2.2
Testé avec mono current sous Debian Sid: l'import AspNet.WebApi 2.2
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ITContentProvider.csproj: ajout d'une configuration de
|
||||
debuggage pour Lua
|
||||
|
||||
2015-12-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* packages.config:
|
||||
* ITContentProvider.csproj: mise à niveau Npgsql
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ITContentProvider.csproj: ...
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ITContentProvider.csproj: nouvelles configurations de
|
||||
déploiement
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ITContentProvider.csproj: adds a build target named "Lua"
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>ITContentProvider</RootNamespace>
|
||||
<AssemblyName>ITContentProvider</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -65,12 +65,9 @@
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Web.Mvc" />
|
||||
<Reference Include="System.Web.Http" />
|
||||
<Reference Include="System.Web.Http.WebHost" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="Npgsql">
|
||||
<HintPath>..\packages\Npgsql.3.0.4\lib\net45\Npgsql.dll</HintPath>
|
||||
<HintPath>..\packages\Npgsql.3.0.5\lib\net45\Npgsql.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Npgsql" version="3.0.4" targetFramework="net45" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Npgsql" version="3.0.5" targetFramework="net451" />
|
||||
</packages>
|
@ -1,57 +0,0 @@
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.csproj: ajout d'une configuration de
|
||||
debuggage pour Lua
|
||||
|
||||
2015-12-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* packages.config:
|
||||
* NpgsqlBlogProvider.csproj: mise à niveau Npgsql
|
||||
|
||||
2015-12-09 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.cs: Corrige la méthode pour enlever un
|
||||
tag à un article ...
|
||||
|
||||
* NpgsqlBlogProvider.csproj: .
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.cs: implémente le compteur de billet en
|
||||
base de données
|
||||
|
||||
* NpgsqlBlogProvider.csproj: ...
|
||||
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.cs: xml doc
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.csproj: nouvelles configurations de
|
||||
déploiement
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.csproj: adds a build target named "Lua"
|
||||
|
||||
2015-11-14 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.cs: Bill ranking, and delivering hidden
|
||||
content to owner
|
||||
|
||||
2015-11-11 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.cs: refactoring
|
||||
|
||||
2015-11-06 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.cs: refactorisation, to render Tags and
|
||||
Circles on each entry type.
|
||||
Fixes the `Find` Method using the `MatchTag` search flag
|
||||
|
||||
* NpgsqlBlogProvider.csproj: cleanning
|
||||
|
||||
* ChangeLog:
|
||||
* NpgsqlTagInfo.cs:
|
||||
|
@ -74,7 +74,7 @@
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="Npgsql">
|
||||
<HintPath>..\packages\Npgsql.3.0.4\lib\net45\Npgsql.dll</HintPath>
|
||||
<HintPath>..\packages\Npgsql.3.0.5\lib\net45\Npgsql.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Npgsql" version="3.0.4" targetFramework="net451" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Npgsql" version="3.0.5" targetFramework="net451" />
|
||||
</packages>
|
@ -1,86 +0,0 @@
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.csproj: ajout d'une configuration de
|
||||
debuggage pour Lua
|
||||
|
||||
2015-12-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.cs: stocke la classe de commande
|
||||
|
||||
* packages.config:
|
||||
* NpgsqlContentProvider.csproj: mise à niveau Npgsql
|
||||
|
||||
2015-12-15 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.cs: bug fix
|
||||
|
||||
2015-12-09 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlCircleProvider.cs: liste les cercles auquels
|
||||
appartient un utilisateur.
|
||||
|
||||
* NpgsqlContentProvider.cs: Les commandes sont fortement
|
||||
typée.
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.csproj: ...
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.cs: Renseigne le code APE et la côte
|
||||
au profile préstataire
|
||||
|
||||
* NpgsqlSkillProvider.cs: refabrication
|
||||
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.cs: implemente un listing des
|
||||
prestataire du code APE en base.
|
||||
|
||||
* NpgsqlSkillProvider.cs: implemente un listing des domaines
|
||||
de compétence du préstataire en base.
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.csproj: nouvelles configurations de
|
||||
déploiement
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.cs: reccupère la photo activité en
|
||||
base de données
|
||||
|
||||
2015-11-25 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.cs: implemente la gestion des
|
||||
activités côté base de donnée Npgsql
|
||||
|
||||
2015-11-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlSkillProvider.cs: refactorisation (-Skill+SkillEntity)
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.csproj: adds a build target named
|
||||
"Lua"
|
||||
|
||||
2015-11-17 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlSkillProvider.cs: User's skills profile object now
|
||||
implements an `Id` property,
|
||||
in order to be rated, perhaps ranked in a near future. It's
|
||||
implemented as the legay profile id.
|
||||
|
||||
2015-11-17 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlSkillProvider.cs: implements a skill provider
|
||||
|
||||
* NpgsqlContentProvider.csproj: Imports the
|
||||
`NpgsqlSkillProvider` class
|
||||
|
||||
2015-11-08 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ChangeLog: this file should not be maintained as a git
|
||||
respository legacy file
|
||||
|
@ -22,7 +22,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Configuration;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
using Npgsql;
|
||||
using NpgsqlTypes;
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>WorkFlowProvider</RootNamespace>
|
||||
<AssemblyName>NpgsqlContentProvider</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -64,14 +64,15 @@
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Web.Mvc" />
|
||||
<Reference Include="System.Net.Http.Formatting" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Npgsql">
|
||||
<HintPath>..\packages\Npgsql.3.0.4\lib\net45\Npgsql.dll</HintPath>
|
||||
<HintPath>..\packages\Npgsql.3.0.5\lib\net45\Npgsql.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -1,4 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Npgsql" version="3.0.4" targetFramework="net45" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net451" />
|
||||
<package id="Newtonsoft.Json" version="8.0.1" targetFramework="net451" />
|
||||
<package id="Npgsql" version="3.0.5" targetFramework="net451" />
|
||||
</packages>
|
@ -1,70 +0,0 @@
|
||||
2015-12-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMembershipProvider.cs: ne pas crasher à la lecture en
|
||||
base de la question de
|
||||
recupération du mot de passe quand elle est nulle.
|
||||
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMRPProviders.csproj: ajout d'une configuration de
|
||||
debuggage pour Lua
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMRPProviders.csproj: ...
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMRPProviders.csproj: nouvelles configurations de
|
||||
déploiement
|
||||
|
||||
2015-11-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlProfileProvider.cs: Fixe un bug introduit avec
|
||||
l'implementation des profiles anonymes.
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMRPProviders.csproj: adds a build target named "Lua"
|
||||
|
||||
2015-11-11 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlProfileProvider.cs: return the default value in the
|
||||
targeted Type, in case of DBNull
|
||||
|
||||
2015-11-06 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlProfileProvider.cs: nicer code
|
||||
|
||||
2015-11-04 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlProfileProvider.cs:
|
||||
* NpgsqlMembershipProvider.cs:
|
||||
|
||||
2015-11-03 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMembershipProvider.cs: Fixes the latest commit
|
||||
concerning account creation and removal
|
||||
|
||||
2015-11-03 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMembershipProvider.cs: insert a profile record before
|
||||
inserting the users record,
|
||||
to ensure a new foreign key constraint
|
||||
|
||||
* NpgsqlProfileProvider.cs: better comments
|
||||
|
||||
2015-11-01 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlMembershipProvider.cs: xmldoc
|
||||
|
||||
* NpgsqlProfileProvider.cs: use default values from
|
||||
configuration
|
||||
|
||||
* NpgsqlUserNameProvider.cs: Fixes the username detection
|
||||
|
||||
2015-10-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlProfileProvider.cs: Fixes the defaultValue
|
||||
specification from config file
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Npgsql.Web</RootNamespace>
|
||||
<AssemblyName>NpgsqlMRPProviders</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -78,7 +78,7 @@
|
||||
<Reference Include="System.Data.Linq" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Npgsql">
|
||||
<HintPath>..\packages\Npgsql.3.0.3\lib\net45\Npgsql.dll</HintPath>
|
||||
<HintPath>..\packages\Npgsql.3.0.5\lib\net45\Npgsql.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Npgsql" version="3.0.3" targetFramework="net45" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Npgsql" version="3.0.5" targetFramework="net451" />
|
||||
</packages>
|
@ -1,27 +0,0 @@
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Presta.csproj: ajout d'une configuration de debuggage pour
|
||||
Lua
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Presta.csproj: ...
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Presta.csproj: nouvelles configurations de déploiement
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Presta.csproj: adds a build target named "Lua"
|
||||
|
||||
2015-08-20 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Presta.csproj: The new `Presta` project ...
|
||||
|
||||
2015-08-20 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Presta.csproj: A first class
|
||||
|
||||
* AssemblyInfo.cs: initial commit
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Presta</RootNamespace>
|
||||
<AssemblyName>Presta</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
@ -1,43 +0,0 @@
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* SalesCatalog.csproj: ajout d'une configuration de debuggage
|
||||
pour Lua
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* SalesCatalog.csproj: ...
|
||||
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* XmlCatalogProvider.cs: Le catalogue de vente implémente
|
||||
mainenant l'interface d'un fournisseur de donnée comme les
|
||||
autres.
|
||||
Il pourrait par exemple vouloir définir des activité et des
|
||||
compétences.
|
||||
Pour l'instant, il n'est pas activé par la configuration, et
|
||||
reste le fournisseur du catalogue legacy (voir
|
||||
</FrontOffice/Catalog> ).
|
||||
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* SalesCatalog.csproj: nouvelles configurations de déploiement
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* SalesCatalog.csproj: adds a build target named "Lua"
|
||||
|
||||
2015-11-04 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* TestCatalogInit.cs:
|
||||
|
||||
2015-10-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* XmlCatalog.cs:
|
||||
* XmlCatalogProvider.cs: refactoring: a dedicated name space
|
||||
for the catalog
|
||||
|
||||
2015-07-15 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* SalesCatalog.csproj: Moves to Mono framework
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>SalesCatalog</RootNamespace>
|
||||
<AssemblyName>SalesCatalog</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -66,7 +66,27 @@
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Mvc" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure">
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
@ -87,6 +107,7 @@
|
||||
</ProjectExtensions>
|
||||
<ItemGroup>
|
||||
<None Include="catalog.xsd" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="XmlImplementation\" />
|
||||
|
7
SalesCatalog/packages.config
Normal file
7
SalesCatalog/packages.config
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net451" />
|
||||
</packages>
|
@ -23,7 +23,7 @@ using NUnit.Framework;
|
||||
using System;
|
||||
using Yavsc.Model.Blogs;
|
||||
using Yavsc.Controllers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
using System.Web.Configuration;
|
||||
using System.Configuration;
|
||||
@ -39,7 +39,7 @@ namespace Yavsc
|
||||
{
|
||||
[Suite]
|
||||
public static IEnumerable Suite
|
||||
{
|
||||
{
|
||||
get
|
||||
{
|
||||
ArrayList suite = new ArrayList ();
|
||||
|
@ -1,46 +0,0 @@
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* TestAPI.csproj: ajout d'une configuration de debuggage pour
|
||||
Lua
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* TestAPI.csproj: ...
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* TestAPI.csproj: nouvelles configurations de déploiement
|
||||
|
||||
2015-11-25 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* TestAPI.csproj: ... une référence au framework 4.5.1 en
|
||||
moins ...
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* TestAPI.csproj: adds a build target named "Lua"
|
||||
|
||||
2015-11-14 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* TestAPI.csproj: nothing to view
|
||||
|
||||
2015-11-04 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* test-domain-TestAPI.config:
|
||||
|
||||
2015-11-01 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* test-domain-TestAPI.config: profile dates must be returned
|
||||
as DateTime
|
||||
|
||||
2015-10-17 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* AllTests.cs:
|
||||
* HelloWorld.cs:
|
||||
* DebugServer.cs:
|
||||
* TestAPI.csproj:
|
||||
* TestAutomate.cs:
|
||||
* ServerTestCase.cs:
|
||||
* BlogUnitTestCase.cs:
|
||||
* test-domain-TestAPI.config:
|
||||
|
@ -70,9 +70,6 @@
|
||||
<Reference Include="Machine.Specifications.Runner.Utility">
|
||||
<HintPath>..\packages\Machine.Specifications.Runner.Utility.0.9.0\lib\net45\Machine.Specifications.Runner.Utility.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.6.3.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
<Package>nunit</Package>
|
||||
</Reference>
|
||||
<Reference Include="Machine.Specifications.Should">
|
||||
<HintPath>..\packages\Machine.Specifications.Should.0.8.0\lib\net45\Machine.Specifications.Should.dll</HintPath>
|
||||
</Reference>
|
||||
@ -85,12 +82,10 @@
|
||||
<Reference Include="Spark">
|
||||
<HintPath>..\packages\Spark.1.8.1.0\lib\NET45\Spark.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Web.Http" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Net" />
|
||||
@ -100,27 +95,54 @@
|
||||
<Reference Include="xsp4">
|
||||
<HintPath>..\..\..\..\..\usr\lib\mono\4.5\xsp4.exe</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.util, Version=2.6.3.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
<Package>nunit</Package>
|
||||
</Reference>
|
||||
<Reference Include="nunit.mocks, Version=2.6.3.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
<Package>nunit</Package>
|
||||
</Reference>
|
||||
<Reference Include="nunit-console-runner, Version=2.6.3.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
|
||||
<Package>nunit</Package>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<Reference Include="Microsoft.Web.XmlTransform, Version=1.0.0.0, Culture=neutral">
|
||||
<Package>nuget-core</Package>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Build.Utilities.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath>..\packages\NUnit.3.0.1\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure">
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Web.Http">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TestAutomate.cs" />
|
||||
<Compile Include="BlogUnitTestCase.cs" />
|
||||
<Compile Include="TestByteA.cs" />
|
||||
<Compile Include="AllTests.cs" />
|
||||
<Compile Include="HelloWorld.cs" />
|
||||
<Compile Include="ServerTestCase.cs" />
|
||||
<Compile Include="DebugServer.cs" />
|
||||
|
@ -1,8 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Machine.Specifications" version="0.9.3" targetFramework="net45" />
|
||||
<package id="Machine.Specifications.Reporting" version="0.9.1" targetFramework="net45" />
|
||||
<package id="Machine.Specifications.Runner.Utility" version="0.9.0" targetFramework="net45" />
|
||||
<package id="Machine.Specifications.Should" version="0.8.0" targetFramework="net45" />
|
||||
<package id="Spark" version="1.8.1.0" targetFramework="net45" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Machine.Specifications" version="0.9.3" targetFramework="net45" />
|
||||
<package id="Machine.Specifications.Reporting" version="0.9.1" targetFramework="net45" />
|
||||
<package id="Machine.Specifications.Runner.Utility" version="0.9.0" targetFramework="net45" />
|
||||
<package id="Machine.Specifications.Should" version="0.8.0" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net451" />
|
||||
<package id="Newtonsoft.Json" version="8.0.1" targetFramework="net451" />
|
||||
<package id="NUnit" version="3.0.1" targetFramework="net451" />
|
||||
<package id="Spark" version="1.8.1.0" targetFramework="net45" />
|
||||
</packages>
|
@ -1,80 +0,0 @@
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* WebControls.csproj: ajout d'une configuration de debuggage
|
||||
pour Lua
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* WebControls.csproj: ...
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ResultPages.cs: ajoute une classe css au bloc de liens vers
|
||||
les autres pages de resultat
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* WebControls.csproj: nouvelles configurations de déploiement
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* WebControls.csproj: Lua config
|
||||
|
||||
2015-11-17 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* RateControl.cs: refactorization
|
||||
|
||||
2015-11-14 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* RateControl.cs: Uses its data model, and moves to the
|
||||
general name space.
|
||||
|
||||
* WebControls.csproj: Implements a server side rating control
|
||||
|
||||
2015-10-13 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ResultPages.cs: A multi-pages result meta info when one page
|
||||
only
|
||||
|
||||
2015-10-04 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ResultPages.cs: .
|
||||
|
||||
2015-09-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* InputUserName.cs: formatting
|
||||
|
||||
2015-09-10 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* InputCircle.cs: using the new CircleBase class
|
||||
|
||||
* ResultPages.cs: Using a new "None" attribute
|
||||
|
||||
2015-08-22 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* InputCircle.cs: this class is about to be removed
|
||||
|
||||
2015-08-20 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* InputCircle.cs: fixes the new CircleManager interface usage
|
||||
|
||||
2015-07-15 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* WebControls.csproj: Moves to Mono framework
|
||||
|
||||
2015-07-02 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* UserCard.cs:
|
||||
* InputCircle.cs:
|
||||
|
||||
2015-06-10 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* InputCircle.cs: An input control specialized for circle
|
||||
selection
|
||||
|
||||
* UserCard.cs: Displays user informations on a little div
|
||||
|
||||
* InputUserName.cs: Fixes the ToolBoxData attribute
|
||||
|
||||
* WebControls.csproj:
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>WebControls</RootNamespace>
|
||||
<AssemblyName>Yavsc.WebControls</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -66,10 +66,30 @@
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Mvc" />
|
||||
<Reference Include="System.Web.Http" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure">
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@ -86,4 +106,7 @@
|
||||
<Name>YavscModel</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
</Project>
|
7
WebControls/packages.config
Normal file
7
WebControls/packages.config
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net451" />
|
||||
</packages>
|
@ -1,25 +0,0 @@
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* fortune.csproj: ajout d'une configuration de debuggage pour
|
||||
Lua
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* fortune.csproj: ...
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* fortune.csproj: nouvelles configurations de déploiement
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* fortune.csproj: adds a build target named "Lua"
|
||||
|
||||
2015-08-04 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* MyClass.cs: refactoring from Yavsc.Model
|
||||
|
||||
2015-07-15 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* fortune.csproj: Moves to Mono framework
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>fortune</RootNamespace>
|
||||
<AssemblyName>fortune</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -63,7 +63,6 @@
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Web.Mvc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MyClass.cs" />
|
||||
|
@ -26,14 +26,493 @@ using System.Web.Security;
|
||||
using System.Web.Profile;
|
||||
using Yavsc.Helpers;
|
||||
using System.Collections.Specialized;
|
||||
using Yavsc.App_Start;
|
||||
using Microsoft.Owin.Security;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Yavsc.Models.Identity;
|
||||
using Microsoft.Owin.Security.Cookies;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.Owin.Security.OAuth;
|
||||
using Yavsc.Providers;
|
||||
using System.Security.Cryptography;
|
||||
using System.Web;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Account controller.
|
||||
/// </summary>
|
||||
public class AccountController : YavscController
|
||||
[Authorize]
|
||||
[RoutePrefix("api/Account")]
|
||||
public class AccountController : ApiController
|
||||
{
|
||||
private const string LocalLoginProvider = "Local";
|
||||
private ApplicationUserManager _userManager;
|
||||
|
||||
public AccountController()
|
||||
{
|
||||
}
|
||||
|
||||
public AccountController(ApplicationUserManager userManager,
|
||||
ISecureDataFormat<AuthenticationTicket> accessTokenFormat)
|
||||
{
|
||||
UserManager = userManager;
|
||||
AccessTokenFormat = accessTokenFormat;
|
||||
}
|
||||
|
||||
public ApplicationUserManager UserManager
|
||||
{
|
||||
get
|
||||
{
|
||||
return _userManager ?? Request.GetOwinContext().GetUserManager<ApplicationUserManager>();
|
||||
}
|
||||
private set
|
||||
{
|
||||
_userManager = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ISecureDataFormat<AuthenticationTicket> AccessTokenFormat { get; private set; }
|
||||
|
||||
// GET api/Account/UserInfo
|
||||
[HostAuthentication(DefaultAuthenticationTypes.ExternalBearer)]
|
||||
[Route("UserInfo")]
|
||||
public UserInfoViewModel GetUserInfo()
|
||||
{
|
||||
ExternalLoginData externalLogin = ExternalLoginData.FromIdentity(User.Identity as ClaimsIdentity);
|
||||
|
||||
return new UserInfoViewModel
|
||||
{
|
||||
Email = User.Identity.GetUserName(),
|
||||
HasRegistered = externalLogin == null,
|
||||
LoginProvider = externalLogin != null ? externalLogin.LoginProvider : null
|
||||
};
|
||||
}
|
||||
|
||||
// POST api/Account/Logout
|
||||
[Route("Logout")]
|
||||
public IHttpActionResult Logout()
|
||||
{
|
||||
Authentication.SignOut(CookieAuthenticationDefaults.AuthenticationType);
|
||||
return Ok();
|
||||
}
|
||||
|
||||
// GET api/Account/ManageInfo?returnUrl=%2F&generateState=true
|
||||
[Route("ManageInfo")]
|
||||
public async Task<ManageInfoViewModel> GetManageInfo(string returnUrl, bool generateState = false)
|
||||
{
|
||||
IdentityUser user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
List<UserLoginInfoViewModel> logins = new List<UserLoginInfoViewModel>();
|
||||
|
||||
foreach (IdentityUserLogin linkedAccount in user.Logins)
|
||||
{
|
||||
logins.Add(new UserLoginInfoViewModel
|
||||
{
|
||||
LoginProvider = linkedAccount.LoginProvider,
|
||||
ProviderKey = linkedAccount.ProviderKey
|
||||
});
|
||||
}
|
||||
|
||||
if (user.PasswordHash != null)
|
||||
{
|
||||
logins.Add(new UserLoginInfoViewModel
|
||||
{
|
||||
LoginProvider = LocalLoginProvider,
|
||||
ProviderKey = user.UserName,
|
||||
});
|
||||
}
|
||||
|
||||
return new ManageInfoViewModel
|
||||
{
|
||||
LocalLoginProvider = LocalLoginProvider,
|
||||
Email = user.UserName,
|
||||
Logins = logins,
|
||||
ExternalLoginProviders = GetExternalLogins(returnUrl, generateState)
|
||||
};
|
||||
}
|
||||
|
||||
// POST api/Account/ChangePassword
|
||||
[Route("ChangePassword")]
|
||||
public async Task<IHttpActionResult> ChangePassword(ChangePasswordBindingModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
IdentityResult result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.OldPassword,
|
||||
model.NewPassword);
|
||||
|
||||
if (!result.Succeeded)
|
||||
{
|
||||
return GetErrorResult(result);
|
||||
}
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
// POST api/Account/SetPassword
|
||||
[Route("SetPassword")]
|
||||
public async Task<IHttpActionResult> SetPassword(SetPasswordBindingModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
IdentityResult result = await UserManager.AddPasswordAsync(User.Identity.GetUserId(), model.NewPassword);
|
||||
|
||||
if (!result.Succeeded)
|
||||
{
|
||||
return GetErrorResult(result);
|
||||
}
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
// POST api/Account/AddExternalLogin
|
||||
[Route("AddExternalLogin")]
|
||||
public async Task<IHttpActionResult> AddExternalLogin(AddExternalLoginBindingModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
Authentication.SignOut(DefaultAuthenticationTypes.ExternalCookie);
|
||||
|
||||
AuthenticationTicket ticket = AccessTokenFormat.Unprotect(model.ExternalAccessToken);
|
||||
|
||||
if (ticket == null || ticket.Identity == null || (ticket.Properties != null
|
||||
&& ticket.Properties.ExpiresUtc.HasValue
|
||||
&& ticket.Properties.ExpiresUtc.Value < DateTimeOffset.UtcNow))
|
||||
{
|
||||
return BadRequest("External login failure.");
|
||||
}
|
||||
|
||||
ExternalLoginData externalData = ExternalLoginData.FromIdentity(ticket.Identity);
|
||||
|
||||
if (externalData == null)
|
||||
{
|
||||
return BadRequest("The external login is already associated with an account.");
|
||||
}
|
||||
|
||||
IdentityResult result = await UserManager.AddLoginAsync(User.Identity.GetUserId(),
|
||||
new UserLoginInfo(externalData.LoginProvider, externalData.ProviderKey));
|
||||
|
||||
if (!result.Succeeded)
|
||||
{
|
||||
return GetErrorResult(result);
|
||||
}
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
// POST api/Account/RemoveLogin
|
||||
[Route("RemoveLogin")]
|
||||
public async Task<IHttpActionResult> RemoveLogin(RemoveLoginBindingModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
IdentityResult result;
|
||||
|
||||
if (model.LoginProvider == LocalLoginProvider)
|
||||
{
|
||||
result = await UserManager.RemovePasswordAsync(User.Identity.GetUserId());
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await UserManager.RemoveLoginAsync(User.Identity.GetUserId(),
|
||||
new UserLoginInfo(model.LoginProvider, model.ProviderKey));
|
||||
}
|
||||
|
||||
if (!result.Succeeded)
|
||||
{
|
||||
return GetErrorResult(result);
|
||||
}
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
// GET api/Account/ExternalLogin
|
||||
[OverrideAuthentication]
|
||||
[HostAuthentication(DefaultAuthenticationTypes.ExternalCookie)]
|
||||
[AllowAnonymous]
|
||||
[Route("ExternalLogin", Name = "ExternalLogin")]
|
||||
public async Task<IHttpActionResult> GetExternalLogin(string provider, string error = null)
|
||||
{
|
||||
if (error != null)
|
||||
{
|
||||
return Redirect(Url.Content("~/") + "#error=" + Uri.EscapeDataString(error));
|
||||
}
|
||||
|
||||
if (!User.Identity.IsAuthenticated)
|
||||
{
|
||||
return new ChallengeResult(provider, this);
|
||||
}
|
||||
|
||||
ExternalLoginData externalLogin = ExternalLoginData.FromIdentity(User.Identity as ClaimsIdentity);
|
||||
|
||||
if (externalLogin == null)
|
||||
{
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
if (externalLogin.LoginProvider != provider)
|
||||
{
|
||||
Authentication.SignOut(DefaultAuthenticationTypes.ExternalCookie);
|
||||
return new ChallengeResult(provider, this);
|
||||
}
|
||||
|
||||
ApplicationUser user = await UserManager.FindAsync(new UserLoginInfo(externalLogin.LoginProvider,
|
||||
externalLogin.ProviderKey));
|
||||
|
||||
bool hasRegistered = user != null;
|
||||
|
||||
if (hasRegistered)
|
||||
{
|
||||
Authentication.SignOut(DefaultAuthenticationTypes.ExternalCookie);
|
||||
|
||||
ClaimsIdentity oAuthIdentity = await user.GenerateUserIdentityAsync(UserManager,
|
||||
OAuthDefaults.AuthenticationType);
|
||||
ClaimsIdentity cookieIdentity = await user.GenerateUserIdentityAsync(UserManager,
|
||||
CookieAuthenticationDefaults.AuthenticationType);
|
||||
|
||||
AuthenticationProperties properties = ApplicationOAuthProvider.CreateProperties(user.UserName);
|
||||
Authentication.SignIn(properties, oAuthIdentity, cookieIdentity);
|
||||
}
|
||||
else
|
||||
{
|
||||
IEnumerable<Claim> claims = externalLogin.GetClaims();
|
||||
ClaimsIdentity identity = new ClaimsIdentity(claims, OAuthDefaults.AuthenticationType);
|
||||
Authentication.SignIn(identity);
|
||||
}
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
// GET api/Account/ExternalLogins?returnUrl=%2F&generateState=true
|
||||
[AllowAnonymous]
|
||||
[Route("ExternalLogins")]
|
||||
public IEnumerable<ExternalLoginViewModel> GetExternalLogins(string returnUrl, bool generateState = false)
|
||||
{
|
||||
IEnumerable<AuthenticationDescription> descriptions = Authentication.GetExternalAuthenticationTypes();
|
||||
List<ExternalLoginViewModel> logins = new List<ExternalLoginViewModel>();
|
||||
|
||||
string state;
|
||||
|
||||
if (generateState)
|
||||
{
|
||||
const int strengthInBits = 256;
|
||||
state = RandomOAuthStateGenerator.Generate(strengthInBits);
|
||||
}
|
||||
else
|
||||
{
|
||||
state = null;
|
||||
}
|
||||
|
||||
foreach (AuthenticationDescription description in descriptions)
|
||||
{
|
||||
ExternalLoginViewModel login = new ExternalLoginViewModel
|
||||
{
|
||||
Name = description.Caption,
|
||||
Url = Url.Route("ExternalLogin", new
|
||||
{
|
||||
provider = description.AuthenticationType,
|
||||
response_type = "token",
|
||||
client_id = Startup.PublicClientId,
|
||||
redirect_uri = new Uri(Request.RequestUri, returnUrl).AbsoluteUri,
|
||||
state = state
|
||||
}),
|
||||
State = state
|
||||
};
|
||||
logins.Add(login);
|
||||
}
|
||||
|
||||
return logins;
|
||||
}
|
||||
|
||||
// POST api/Account/Register
|
||||
[AllowAnonymous]
|
||||
[Route("Register")]
|
||||
public async Task<IHttpActionResult> Register(RegisterBindingModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
var user = new ApplicationUser() { UserName = model.Email, Email = model.Email };
|
||||
|
||||
IdentityResult result = await UserManager.CreateAsync(user, model.Password);
|
||||
|
||||
if (!result.Succeeded)
|
||||
{
|
||||
return GetErrorResult(result);
|
||||
}
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
// POST api/Account/RegisterExternal
|
||||
[OverrideAuthentication]
|
||||
[HostAuthentication(DefaultAuthenticationTypes.ExternalBearer)]
|
||||
[Route("RegisterExternal")]
|
||||
public async Task<IHttpActionResult> RegisterExternal(RegisterExternalBindingModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
var info = await Authentication.GetExternalLoginInfoAsync();
|
||||
if (info == null)
|
||||
{
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
var user = new ApplicationUser() { UserName = model.Email, Email = model.Email };
|
||||
|
||||
IdentityResult result = await UserManager.CreateAsync(user);
|
||||
if (!result.Succeeded)
|
||||
{
|
||||
return GetErrorResult(result);
|
||||
}
|
||||
|
||||
result = await UserManager.AddLoginAsync(user.Id, info.Login);
|
||||
if (!result.Succeeded)
|
||||
{
|
||||
return GetErrorResult(result);
|
||||
}
|
||||
return Ok();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
UserManager.Dispose();
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Helpers
|
||||
|
||||
private IAuthenticationManager Authentication
|
||||
{
|
||||
get { return Request.GetOwinContext().Authentication; }
|
||||
}
|
||||
|
||||
private IHttpActionResult GetErrorResult(IdentityResult result)
|
||||
{
|
||||
if (result == null)
|
||||
{
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
if (!result.Succeeded)
|
||||
{
|
||||
if (result.Errors != null)
|
||||
{
|
||||
foreach (string error in result.Errors)
|
||||
{
|
||||
ModelState.AddModelError("", error);
|
||||
}
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
// No ModelState errors are available to send, so just return an empty BadRequest.
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private class ExternalLoginData
|
||||
{
|
||||
public string LoginProvider { get; set; }
|
||||
public string ProviderKey { get; set; }
|
||||
public string UserName { get; set; }
|
||||
|
||||
public IList<Claim> GetClaims()
|
||||
{
|
||||
IList<Claim> claims = new List<Claim>();
|
||||
claims.Add(new Claim(ClaimTypes.NameIdentifier, ProviderKey, null, LoginProvider));
|
||||
|
||||
if (UserName != null)
|
||||
{
|
||||
claims.Add(new Claim(ClaimTypes.Name, UserName, null, LoginProvider));
|
||||
}
|
||||
|
||||
return claims;
|
||||
}
|
||||
|
||||
public static ExternalLoginData FromIdentity(ClaimsIdentity identity)
|
||||
{
|
||||
if (identity == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Claim providerKeyClaim = identity.FindFirst(ClaimTypes.NameIdentifier);
|
||||
|
||||
if (providerKeyClaim == null || String.IsNullOrEmpty(providerKeyClaim.Issuer)
|
||||
|| String.IsNullOrEmpty(providerKeyClaim.Value))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (providerKeyClaim.Issuer == ClaimsIdentity.DefaultIssuer)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ExternalLoginData
|
||||
{
|
||||
LoginProvider = providerKeyClaim.Issuer,
|
||||
ProviderKey = providerKeyClaim.Value,
|
||||
UserName = identity.FindFirstValue(ClaimTypes.Name)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private static class RandomOAuthStateGenerator
|
||||
{
|
||||
private static RandomNumberGenerator _random = new RNGCryptoServiceProvider();
|
||||
|
||||
public static string Generate(int strengthInBits)
|
||||
{
|
||||
const int bitsPerByte = 8;
|
||||
|
||||
if (strengthInBits % bitsPerByte != 0)
|
||||
{
|
||||
throw new ArgumentException("strengthInBits must be evenly divisible by 8.", "strengthInBits");
|
||||
}
|
||||
|
||||
int strengthInBytes = strengthInBits / bitsPerByte;
|
||||
|
||||
byte[] data = new byte[strengthInBytes];
|
||||
_random.GetBytes(data);
|
||||
return HttpServerUtility.UrlTokenEncode(data);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Register the specified model.
|
||||
@ -41,7 +520,7 @@ namespace Yavsc.ApiControllers
|
||||
/// <param name="model">Model.</param>
|
||||
[Authorize ()]
|
||||
[ValidateAjaxAttribute]
|
||||
public HttpResponseMessage Register ([FromBody] RegisterClientModel model)
|
||||
public void Register ([FromBody] RegisterClientModel model)
|
||||
{
|
||||
|
||||
if (ModelState.IsValid) {
|
||||
@ -51,7 +530,7 @@ namespace Yavsc.ApiControllers
|
||||
ModelState.AddModelError ("Register",
|
||||
"Since you're not member of Admin or FrontOffice groups, " +
|
||||
"you cannot ask for a pre-approuved registration");
|
||||
return DefaultResponse ();
|
||||
return ;
|
||||
}
|
||||
MembershipCreateStatus mcs;
|
||||
var user = Membership.CreateUser (
|
||||
@ -86,7 +565,6 @@ namespace Yavsc.ApiControllers
|
||||
break;
|
||||
}
|
||||
}
|
||||
return DefaultResponse ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -96,7 +574,8 @@ namespace Yavsc.ApiControllers
|
||||
[ValidateAjax]
|
||||
public void ResetPassword (LostPasswordModel model)
|
||||
{
|
||||
if (ModelState.IsValid) {
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
StringDictionary errors;
|
||||
MembershipUser user;
|
||||
YavscHelpers.ValidatePasswordReset (model, out errors, out user);
|
||||
@ -107,6 +586,10 @@ namespace Yavsc.ApiControllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Login the specified model.
|
||||
/// </summary>
|
||||
/// <param name="model">Model.</param>
|
||||
[ValidateAjax]
|
||||
public void Login(LoginModel model)
|
||||
{
|
||||
|
@ -41,14 +41,15 @@ namespace Yavsc.ApiControllers
|
||||
/// <summary>
|
||||
/// Authorization denied.
|
||||
/// </summary>
|
||||
public class AuthorizationDenied : HttpRequestException {
|
||||
public class AuthorizationDenied : HttpResponseException {
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the Yavsc.ApiControllers.AuthorizationDenied class.
|
||||
/// </summary>
|
||||
/// <param name="msg">Message.</param>
|
||||
public AuthorizationDenied(string msg) : base(msg)
|
||||
public AuthorizationDenied() : base(HttpStatusCode.Forbidden)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ namespace Yavsc.ApiControllers
|
||||
public void RemoveTitle(string user, string title) {
|
||||
if (Membership.GetUser ().UserName != user)
|
||||
if (!Roles.IsUserInRole("Admin"))
|
||||
throw new AuthorizationDenied (user);
|
||||
throw new AuthorizationDenied ();
|
||||
BlogManager.RemoveTitle (user, title);
|
||||
}
|
||||
|
||||
@ -103,9 +103,13 @@ namespace Yavsc.ApiControllers
|
||||
public async Task<HttpResponseMessage> PostFile(long id) {
|
||||
if (!(Request.Content.Headers.ContentType.MediaType=="multipart/form-data"))
|
||||
throw new HttpRequestException ("not a multipart/form-data request");
|
||||
if (id == 0) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
BlogEntry be = BlogManager.GetPost (id);
|
||||
if (be.Author != Membership.GetUser ().UserName)
|
||||
throw new AuthorizationDenied ("b"+id);
|
||||
throw new AuthorizationDenied ();
|
||||
string root = HttpContext.Current.Server.MapPath("~/bfiles/"+id);
|
||||
DirectoryInfo di = new DirectoryInfo (root);
|
||||
if (!di.Exists) di.Create ();
|
||||
@ -116,14 +120,11 @@ namespace Yavsc.ApiControllers
|
||||
// Read the form data.
|
||||
await Request.Content.ReadAsMultipartAsync(provider) ;
|
||||
var invalidChars = Path.GetInvalidFileNameChars();
|
||||
foreach (string fkey in provider.BodyPartFileNames.Keys)
|
||||
foreach (var file in provider.FileData)
|
||||
{
|
||||
string filename = provider.BodyPartFileNames[fkey];
|
||||
string filename = file.LocalFileName;
|
||||
Trace.WriteLine(filename);
|
||||
|
||||
string nicename = HttpUtility.UrlDecode(fkey) ;
|
||||
if (fkey.StartsWith("\"") && fkey.EndsWith("\"") && fkey.Length > 2)
|
||||
nicename = fkey.Substring(1,fkey.Length-2);
|
||||
string nicename = file.Headers.ContentDisposition.FileName ;
|
||||
nicename = new string (nicename.Where( x=> !invalidChars.Contains(x)).ToArray());
|
||||
nicename = nicename.Replace(' ','_');
|
||||
var dest = Path.Combine(root,nicename);
|
||||
@ -217,7 +218,7 @@ namespace Yavsc.ApiControllers
|
||||
throw new HttpRequestException ("not a multipart/form-data request");
|
||||
BlogEntry be = BlogManager.GetPost (id);
|
||||
if (be.Author != Membership.GetUser ().UserName)
|
||||
throw new AuthorizationDenied ("post: "+id);
|
||||
throw new AuthorizationDenied ();
|
||||
string root = HttpContext.Current.Server.MapPath("~/bfiles/"+id);
|
||||
DirectoryInfo di = new DirectoryInfo (root);
|
||||
if (!di.Exists) di.Create ();
|
||||
@ -231,11 +232,11 @@ namespace Yavsc.ApiControllers
|
||||
var invalidChars = Path.GetInvalidFileNameChars();
|
||||
List<string> bodies = new List<string>();
|
||||
|
||||
foreach (string fkey in provider.BodyPartFileNames.Keys)
|
||||
foreach (var file in provider.FileData)
|
||||
{
|
||||
string filename = provider.BodyPartFileNames[fkey];
|
||||
string filename = file.LocalFileName;
|
||||
|
||||
string nicename=fkey;
|
||||
string nicename= file.Headers.ContentDisposition.FileName;
|
||||
var filtered = new string (nicename.Where( x=> !invalidChars.Contains(x)).ToArray());
|
||||
|
||||
FileInfo fi = new FileInfo(filtered);
|
||||
|
@ -29,6 +29,7 @@ using Yavsc.Model.Circles;
|
||||
using Yavsc.Model.Calendar;
|
||||
using System.Web.Http.Routing;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Model.Maps;
|
||||
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
@ -44,7 +45,8 @@ namespace Yavsc.ApiControllers
|
||||
new YaEvent () {
|
||||
Description = "Test Descr",
|
||||
Title = "Night club special bubble party",
|
||||
Location = new Position () {
|
||||
Location = new Location () {
|
||||
Address = "2 bd A Bri",
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
}
|
||||
@ -52,7 +54,7 @@ namespace Yavsc.ApiControllers
|
||||
new YaEvent () {
|
||||
Title = "Test2",
|
||||
Photo = "http://bla/im.png",
|
||||
Location = new Position () {
|
||||
Location = new Location () {
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
}
|
||||
@ -60,7 +62,7 @@ namespace Yavsc.ApiControllers
|
||||
new YaEvent () {
|
||||
Description = "Test Descr",
|
||||
Title = "Night club special bubble party",
|
||||
Location = new Position () {
|
||||
Location = new Location () {
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
}
|
||||
@ -68,7 +70,7 @@ namespace Yavsc.ApiControllers
|
||||
new YaEvent () {
|
||||
Title = "Test2",
|
||||
Photo = "http://bla/im.png",
|
||||
Location = new Position () {
|
||||
Location = new Location () {
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
}
|
||||
|
53
web/ApiControllers/ChallengeResult.cs
Normal file
53
web/ApiControllers/ChallengeResult.cs
Normal file
@ -0,0 +1,53 @@
|
||||
//
|
||||
// AccountController.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015 GNU GPL
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using Owin;
|
||||
using Microsoft.Owin.Extensions;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
public class ChallengeResult : IHttpActionResult
|
||||
{
|
||||
public ChallengeResult(string loginProvider, ApiController controller)
|
||||
{
|
||||
LoginProvider = loginProvider;
|
||||
Request = controller.Request;
|
||||
}
|
||||
|
||||
public string LoginProvider { get; set; }
|
||||
public HttpRequestMessage Request { get; set; }
|
||||
|
||||
public Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
Request.GetOwinContext().Authentication.Challenge(LoginProvider);
|
||||
|
||||
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.Unauthorized);
|
||||
response.RequestMessage = Request;
|
||||
return Task.FromResult(response);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -129,7 +129,7 @@ namespace Yavsc.ApiControllers
|
||||
string user = Membership.GetUser ().UserName;
|
||||
CircleBase current = CircleManager.DefaultProvider.Get (circle.Id);
|
||||
if (current.Owner != user)
|
||||
throw new AuthorizationDenied ("Your not owner of circle at id "+circle.Id);
|
||||
throw new AuthorizationDenied ();
|
||||
CircleManager.DefaultProvider.UpdateCircle (circle);
|
||||
}
|
||||
|
||||
|
@ -84,10 +84,7 @@ namespace Yavsc.ApiControllers
|
||||
if (est.Client != username)
|
||||
if (!Roles.IsUserInRole("Admin"))
|
||||
if (!Roles.IsUserInRole("FrontOffice"))
|
||||
throw new AuthorizationDenied (
|
||||
string.Format (
|
||||
"Auth denied to eid {1} for:{2}",
|
||||
id, username));
|
||||
throw new AuthorizationDenied ();
|
||||
return est;
|
||||
}
|
||||
|
||||
|
@ -55,17 +55,6 @@ namespace Yavsc.ApiControllers
|
||||
pr.Save ();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Defaults the response.
|
||||
/// </summary>
|
||||
/// <returns>The response.</returns>
|
||||
protected HttpResponseMessage DefaultResponse()
|
||||
{
|
||||
return ModelState.IsValid ?
|
||||
Request.CreateResponse (System.Net.HttpStatusCode.OK) :
|
||||
Request.CreateResponse (System.Net.HttpStatusCode.BadRequest,
|
||||
ValidateAjaxAttribute.GetErrorModelObject (ModelState));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ namespace Yavsc
|
||||
protected void Application_Start ()
|
||||
{
|
||||
AreaRegistration.RegisterAllAreas ();
|
||||
WebApiConfig.Register (GlobalConfiguration.Configuration);
|
||||
GlobalConfiguration.Configure (WebApiConfig.Register);
|
||||
RegisterRoutes (RouteTable.Routes);
|
||||
AjaxHelper.GlobalizationScriptPath = "~/Scripts/globalize";
|
||||
|
||||
|
45
web/App_Start/IdentityConfig.cs
Normal file
45
web/App_Start/IdentityConfig.cs
Normal file
@ -0,0 +1,45 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
using Microsoft.Owin;
|
||||
using Yavsc.Models.Identity;
|
||||
|
||||
namespace Yavsc.App_Start
|
||||
{
|
||||
// Configure the application user manager used in this application. UserManager is defined in ASP.NET Identity and is used by the application.
|
||||
|
||||
public class ApplicationUserManager : UserManager<ApplicationUser>
|
||||
{
|
||||
public ApplicationUserManager(IUserStore<ApplicationUser> store)
|
||||
: base(store)
|
||||
{
|
||||
}
|
||||
|
||||
public static ApplicationUserManager Create(IdentityFactoryOptions<ApplicationUserManager> options, IOwinContext context)
|
||||
{
|
||||
var manager = new ApplicationUserManager(new UserStore<ApplicationUser>(context.Get<ApplicationDbContext>()));
|
||||
// Configure validation logic for usernames
|
||||
manager.UserValidator = new UserValidator<ApplicationUser>(manager)
|
||||
{
|
||||
AllowOnlyAlphanumericUserNames = false,
|
||||
RequireUniqueEmail = true
|
||||
};
|
||||
// Configure validation logic for passwords
|
||||
manager.PasswordValidator = new PasswordValidator
|
||||
{
|
||||
RequiredLength = 6,
|
||||
RequireNonLetterOrDigit = true,
|
||||
RequireDigit = true,
|
||||
RequireLowercase = true,
|
||||
RequireUppercase = true,
|
||||
};
|
||||
var dataProtectionProvider = options.DataProtectionProvider;
|
||||
if (dataProtectionProvider != null)
|
||||
{
|
||||
manager.UserTokenProvider = new DataProtectorTokenProvider<ApplicationUser>(dataProtectionProvider.Create("ASP.NET Identity"));
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
}
|
||||
}
|
68
web/App_Start/Startup.Auth.cs
Normal file
68
web/App_Start/Startup.Auth.cs
Normal file
@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.Owin;
|
||||
using Microsoft.Owin.Security.Cookies;
|
||||
using Microsoft.Owin.Security.Google;
|
||||
using Microsoft.Owin.Security.OAuth;
|
||||
using Owin;
|
||||
using Yavsc.Models.Identity;
|
||||
using Yavsc.Providers;
|
||||
|
||||
namespace Yavsc.App_Start
|
||||
{
|
||||
public partial class Startup
|
||||
{
|
||||
public static OAuthAuthorizationServerOptions OAuthOptions { get; private set; }
|
||||
|
||||
public static string PublicClientId { get; private set; }
|
||||
|
||||
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
|
||||
public void ConfigureAuth(IAppBuilder app)
|
||||
{
|
||||
// Configure the db context and user manager to use a single instance per request
|
||||
app.CreatePerOwinContext(ApplicationDbContext.Create);
|
||||
app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
|
||||
|
||||
// Enable the application to use a cookie to store information for the signed in user
|
||||
// and to use a cookie to temporarily store information about a user logging in with a third party login provider
|
||||
app.UseCookieAuthentication(new CookieAuthenticationOptions());
|
||||
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
|
||||
|
||||
// Configure the application for OAuth based flow
|
||||
PublicClientId = "self";
|
||||
OAuthOptions = new OAuthAuthorizationServerOptions
|
||||
{
|
||||
TokenEndpointPath = new PathString("/Token"),
|
||||
Provider = new ApplicationOAuthProvider(PublicClientId),
|
||||
AuthorizeEndpointPath = new PathString("/api/Account/ExternalLogin"),
|
||||
AccessTokenExpireTimeSpan = TimeSpan.FromDays(14),
|
||||
AllowInsecureHttp = true
|
||||
};
|
||||
|
||||
// Enable the application to use bearer tokens to authenticate users
|
||||
app.UseOAuthBearerTokens(OAuthOptions);
|
||||
|
||||
// Uncomment the following lines to enable logging in with third party login providers
|
||||
//app.UseMicrosoftAccountAuthentication(
|
||||
// clientId: "",
|
||||
// clientSecret: "");
|
||||
|
||||
//app.UseTwitterAuthentication(
|
||||
// consumerKey: "",
|
||||
// consumerSecret: "");
|
||||
|
||||
//app.UseFacebookAuthentication(
|
||||
// appId: "",
|
||||
// appSecret: "");
|
||||
|
||||
//app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
|
||||
//{
|
||||
// ClientId = "",
|
||||
// ClientSecret = ""
|
||||
//});
|
||||
}
|
||||
}
|
||||
}
|
38
web/App_Start/Startup.cs
Normal file
38
web/App_Start/Startup.cs
Normal file
@ -0,0 +1,38 @@
|
||||
//
|
||||
// Startup.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015 GNU GPL
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using Microsoft.Owin;
|
||||
using Owin;
|
||||
|
||||
|
||||
[assembly: OwinStartup(typeof(Yavsc.App_Start.Startup))]
|
||||
namespace Yavsc.App_Start
|
||||
{
|
||||
public partial class Startup
|
||||
{
|
||||
public void Configuration(IAppBuilder app)
|
||||
{
|
||||
ConfigureAuth (app);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1927
web/ChangeLog
1927
web/ChangeLog
File diff suppressed because it is too large
Load Diff
@ -373,7 +373,7 @@ namespace Yavsc.Controllers
|
||||
|
||||
if (Membership.GetUser ().UserName != user)
|
||||
if (!Roles.IsUserInRole("Admin"))
|
||||
throw new AuthorizationDenied (user);
|
||||
throw new AuthorizationDenied ();
|
||||
if (!confirm)
|
||||
return View ("RemoveTitle");
|
||||
BlogManager.RemoveTitle (user, title);
|
||||
|
@ -71,7 +71,7 @@ namespace Yavsc.Formatters
|
||||
/// <param name="value">Value.</param>
|
||||
/// <param name="stream">Stream.</param>
|
||||
/// <param name="contentHeaders">Content headers.</param>
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContentHeaders contentHeaders)
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContent contentHeaders)
|
||||
{
|
||||
// TODO create a type containing T4 parameters, and generate from them
|
||||
using (var writer = new StreamWriter(stream))
|
||||
|
@ -70,7 +70,6 @@ namespace Yavsc.Formatters
|
||||
return enumerableType.IsAssignableFrom(type);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes synchronously to the buffered stream.
|
||||
/// </summary>
|
||||
@ -78,7 +77,7 @@ namespace Yavsc.Formatters
|
||||
/// <param name="value">Value.</param>
|
||||
/// <param name="stream">Stream.</param>
|
||||
/// <param name="contentHeaders">Content headers.</param>
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContentHeaders contentHeaders)
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContent contentHeaders)
|
||||
{
|
||||
// TODO create a type containing generation parameters, including a template path, and generate from them
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace Yavsc.Formatters
|
||||
/// <param name="value">Value.</param>
|
||||
/// <param name="stream">Stream.</param>
|
||||
/// <param name="contentHeaders">Content headers.</param>
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContentHeaders contentHeaders)
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContent contentHeaders)
|
||||
{
|
||||
RssFeedsChannel feeds = value as RssFeedsChannel;
|
||||
using (var writer = new StreamWriter (stream)) {
|
||||
|
@ -75,7 +75,7 @@ namespace Yavsc.Formatters
|
||||
/// <param name="value">Value.</param>
|
||||
/// <param name="stream">Stream.</param>
|
||||
/// <param name="contentHeaders">Content headers.</param>
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContentHeaders contentHeaders)
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContent contentHeaders)
|
||||
{
|
||||
// TODO create a type containing T4 parameters, and generate from them
|
||||
using (var writer = new StreamWriter(stream))
|
||||
|
@ -75,7 +75,7 @@ namespace Yavsc.Formatters
|
||||
/// <param name="value">Value.</param>
|
||||
/// <param name="stream">Stream.</param>
|
||||
/// <param name="contentHeaders">Content headers.</param>
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContentHeaders contentHeaders)
|
||||
public override void WriteToStream (Type type, object value, Stream stream, HttpContent contentHeaders)
|
||||
{
|
||||
string temp = Path.GetTempPath ();
|
||||
string cntStr = value as string;
|
||||
@ -126,8 +126,8 @@ namespace Yavsc.Formatters
|
||||
/// </summary>
|
||||
/// <param name="contentHeaders">Content headers.</param>
|
||||
/// <param name="basename">Basename.</param>
|
||||
public static void SetFileName(HttpContentHeaders contentHeaders, string basename) {
|
||||
contentHeaders.ContentDisposition = new ContentDispositionHeaderValue ("attachment") {
|
||||
public static void SetFileName(HttpContent contentHeaders, string basename) {
|
||||
contentHeaders.Headers.ContentDisposition = new ContentDispositionHeaderValue ("attachment") {
|
||||
FileName = "doc-" + basename + ".pdf"
|
||||
};
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ using Yavsc.Model.Circles;
|
||||
using System.Web.UI;
|
||||
using System.Linq.Expressions;
|
||||
using System.Web.Profile;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Web.Mvc;
|
||||
using System.Text.RegularExpressions;
|
||||
using Yavsc.Model.Messaging;
|
||||
@ -21,6 +20,7 @@ using System.Reflection;
|
||||
using System.Web.Routing;
|
||||
using Yavsc.Model.FrontOffice;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
using System.Web.Script.Serialization;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
@ -571,15 +571,8 @@ namespace Yavsc.Helpers
|
||||
writer.Write (text);
|
||||
writer.RenderEndTag ();
|
||||
return new MvcHtmlString(strwr.ToString());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
84
web/Models/Identity/AccountBindingModels.cs
Normal file
84
web/Models/Identity/AccountBindingModels.cs
Normal file
@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Identity
|
||||
{
|
||||
// Models used as parameters to AccountController actions.
|
||||
|
||||
public class AddExternalLoginBindingModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "External access token")]
|
||||
public string ExternalAccessToken { get; set; }
|
||||
}
|
||||
|
||||
public class ChangePasswordBindingModel
|
||||
{
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Current password")]
|
||||
public string OldPassword { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "New password")]
|
||||
public string NewPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm new password")]
|
||||
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
|
||||
public class RegisterBindingModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Password")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm password")]
|
||||
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
|
||||
public class RegisterExternalBindingModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
}
|
||||
|
||||
public class RemoveLoginBindingModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Login provider")]
|
||||
public string LoginProvider { get; set; }
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Provider key")]
|
||||
public string ProviderKey { get; set; }
|
||||
}
|
||||
|
||||
public class SetPasswordBindingModel
|
||||
{
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "New password")]
|
||||
public string NewPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm new password")]
|
||||
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
}
|
43
web/Models/Identity/AccountViewModels.cs
Normal file
43
web/Models/Identity/AccountViewModels.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models.Identity
|
||||
{
|
||||
// Models returned by AccountController actions.
|
||||
|
||||
public class ExternalLoginViewModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Url { get; set; }
|
||||
|
||||
public string State { get; set; }
|
||||
}
|
||||
|
||||
public class ManageInfoViewModel
|
||||
{
|
||||
public string LocalLoginProvider { get; set; }
|
||||
|
||||
public string Email { get; set; }
|
||||
|
||||
public IEnumerable<UserLoginInfoViewModel> Logins { get; set; }
|
||||
|
||||
public IEnumerable<ExternalLoginViewModel> ExternalLoginProviders { get; set; }
|
||||
}
|
||||
|
||||
public class UserInfoViewModel
|
||||
{
|
||||
public string Email { get; set; }
|
||||
|
||||
public bool HasRegistered { get; set; }
|
||||
|
||||
public string LoginProvider { get; set; }
|
||||
}
|
||||
|
||||
public class UserLoginInfoViewModel
|
||||
{
|
||||
public string LoginProvider { get; set; }
|
||||
|
||||
public string ProviderKey { get; set; }
|
||||
}
|
||||
}
|
33
web/Models/Identity/IdentityModels.cs
Normal file
33
web/Models/Identity/IdentityModels.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
|
||||
namespace Yavsc.Models.Identity
|
||||
{
|
||||
// You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
|
||||
public class ApplicationUser : IdentityUser
|
||||
{
|
||||
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager, string authenticationType)
|
||||
{
|
||||
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
|
||||
var userIdentity = await manager.CreateIdentityAsync(this, authenticationType);
|
||||
// Add custom user claims here
|
||||
return userIdentity;
|
||||
}
|
||||
}
|
||||
|
||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||
{
|
||||
public ApplicationDbContext()
|
||||
: base("DefaultConnection", throwIfV1Schema: false)
|
||||
{
|
||||
}
|
||||
|
||||
public static ApplicationDbContext Create()
|
||||
{
|
||||
return new ApplicationDbContext();
|
||||
}
|
||||
}
|
||||
}
|
99
web/Providers/ApplicationOAuthProvider.cs
Normal file
99
web/Providers/ApplicationOAuthProvider.cs
Normal file
@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
using Microsoft.Owin.Security;
|
||||
using Microsoft.Owin.Security.Cookies;
|
||||
using Microsoft.Owin.Security.OAuth;
|
||||
using Yavsc.App_Start;
|
||||
using Yavsc.Models.Identity;
|
||||
|
||||
namespace Yavsc.Providers
|
||||
{
|
||||
public class ApplicationOAuthProvider : OAuthAuthorizationServerProvider
|
||||
{
|
||||
private readonly string _publicClientId;
|
||||
|
||||
public ApplicationOAuthProvider(string publicClientId)
|
||||
{
|
||||
if (publicClientId == null)
|
||||
{
|
||||
throw new ArgumentNullException("publicClientId");
|
||||
}
|
||||
|
||||
_publicClientId = publicClientId;
|
||||
}
|
||||
|
||||
public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context)
|
||||
{
|
||||
var userManager = context.OwinContext.GetUserManager<ApplicationUserManager>();
|
||||
|
||||
ApplicationUser user = await userManager.FindAsync(context.UserName, context.Password);
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
context.SetError("invalid_grant", "The user name or password is incorrect.");
|
||||
return;
|
||||
}
|
||||
|
||||
ClaimsIdentity oAuthIdentity = await user.GenerateUserIdentityAsync(userManager,
|
||||
OAuthDefaults.AuthenticationType);
|
||||
ClaimsIdentity cookiesIdentity = await user.GenerateUserIdentityAsync(userManager,
|
||||
CookieAuthenticationDefaults.AuthenticationType);
|
||||
|
||||
AuthenticationProperties properties = CreateProperties(user.UserName);
|
||||
AuthenticationTicket ticket = new AuthenticationTicket(oAuthIdentity, properties);
|
||||
context.Validated(ticket);
|
||||
context.Request.Context.Authentication.SignIn(cookiesIdentity);
|
||||
}
|
||||
|
||||
public override Task TokenEndpoint(OAuthTokenEndpointContext context)
|
||||
{
|
||||
foreach (KeyValuePair<string, string> property in context.Properties.Dictionary)
|
||||
{
|
||||
context.AdditionalResponseParameters.Add(property.Key, property.Value);
|
||||
}
|
||||
|
||||
return Task.FromResult<object>(null);
|
||||
}
|
||||
|
||||
public override Task ValidateClientAuthentication(OAuthValidateClientAuthenticationContext context)
|
||||
{
|
||||
// Resource owner password credentials does not provide a client ID.
|
||||
if (context.ClientId == null)
|
||||
{
|
||||
context.Validated();
|
||||
}
|
||||
|
||||
return Task.FromResult<object>(null);
|
||||
}
|
||||
|
||||
public override Task ValidateClientRedirectUri(OAuthValidateClientRedirectUriContext context)
|
||||
{
|
||||
if (context.ClientId == _publicClientId)
|
||||
{
|
||||
Uri expectedRootUri = new Uri(context.Request.Uri, "/");
|
||||
|
||||
if (expectedRootUri.AbsoluteUri == context.RedirectUri)
|
||||
{
|
||||
context.Validated();
|
||||
}
|
||||
}
|
||||
|
||||
return Task.FromResult<object>(null);
|
||||
}
|
||||
|
||||
public static AuthenticationProperties CreateProperties(string userName)
|
||||
{
|
||||
IDictionary<string, string> data = new Dictionary<string, string>
|
||||
{
|
||||
{ "userName", userName }
|
||||
};
|
||||
return new AuthenticationProperties(data);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,413 +0,0 @@
|
||||
/*!
|
||||
* Globalize v1.0.0
|
||||
*
|
||||
* http://github.com/jquery/globalize
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2015-04-23T12:02Z
|
||||
*/
|
||||
(function( root, factory ) {
|
||||
|
||||
// UMD returnExports
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD
|
||||
define([
|
||||
"cldr",
|
||||
"../globalize",
|
||||
"./number",
|
||||
"cldr/event",
|
||||
"cldr/supplemental"
|
||||
], factory );
|
||||
} else if ( typeof exports === "object" ) {
|
||||
|
||||
// Node, CommonJS
|
||||
module.exports = factory( require( "cldrjs" ), require( "globalize" ) );
|
||||
} else {
|
||||
|
||||
// Global
|
||||
factory( root.Cldr, root.Globalize );
|
||||
}
|
||||
}(this, function( Cldr, Globalize ) {
|
||||
|
||||
var alwaysArray = Globalize._alwaysArray,
|
||||
formatMessage = Globalize._formatMessage,
|
||||
numberNumberingSystem = Globalize._numberNumberingSystem,
|
||||
numberPattern = Globalize._numberPattern,
|
||||
stringPad = Globalize._stringPad,
|
||||
validate = Globalize._validate,
|
||||
validateCldr = Globalize._validateCldr,
|
||||
validateDefaultLocale = Globalize._validateDefaultLocale,
|
||||
validateParameterPresence = Globalize._validateParameterPresence,
|
||||
validateParameterType = Globalize._validateParameterType,
|
||||
validateParameterTypeNumber = Globalize._validateParameterTypeNumber,
|
||||
validateParameterTypePlainObject = Globalize._validateParameterTypePlainObject;
|
||||
|
||||
|
||||
var validateParameterTypeCurrency = function( value, name ) {
|
||||
validateParameterType(
|
||||
value,
|
||||
name,
|
||||
value === undefined || typeof value === "string" && ( /^[A-Za-z]{3}$/ ).test( value ),
|
||||
"3-letter currency code string as defined by ISO 4217"
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var validatePluralModulePresence = function() {
|
||||
validate( "E_MISSING_PLURAL_MODULE", "Plural module not loaded.",
|
||||
Globalize.plural !== undefined, {} );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* supplementalOverride( currency, pattern, cldr )
|
||||
*
|
||||
* Return pattern with fraction digits overriden by supplemental currency data.
|
||||
*/
|
||||
var currencySupplementalOverride = function( currency, pattern, cldr ) {
|
||||
var digits,
|
||||
fraction = cldr.supplemental([ "currencyData/fractions", currency ]) ||
|
||||
cldr.supplemental( "currencyData/fractions/DEFAULT" );
|
||||
|
||||
digits = +fraction._digits;
|
||||
|
||||
if ( digits ) {
|
||||
fraction = "." + stringPad( "0", digits ).slice( 0, -1 ) + fraction._rounding;
|
||||
} else {
|
||||
fraction = "";
|
||||
}
|
||||
|
||||
return pattern.replace( /\.(#+|0*[0-9]|0+[0-9]?)/g, fraction );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var objectFilter = function( object, testRe ) {
|
||||
var key,
|
||||
copy = {};
|
||||
|
||||
for ( key in object ) {
|
||||
if ( testRe.test( key ) ) {
|
||||
copy[ key ] = object[ key ];
|
||||
}
|
||||
}
|
||||
|
||||
return copy;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var currencyUnitPatterns = function( cldr ) {
|
||||
return objectFilter( cldr.main([
|
||||
"numbers",
|
||||
"currencyFormats-numberSystem-" + numberNumberingSystem( cldr )
|
||||
]), /^unitPattern/ );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* codeProperties( currency, cldr )
|
||||
*
|
||||
* Return number pattern with the appropriate currency code in as literal.
|
||||
*/
|
||||
var currencyCodeProperties = function( currency, cldr ) {
|
||||
var pattern = numberPattern( "decimal", cldr );
|
||||
|
||||
// The number of decimal places and the rounding for each currency is not locale-specific. Those
|
||||
// values overridden by Supplemental Currency Data.
|
||||
pattern = currencySupplementalOverride( currency, pattern, cldr );
|
||||
|
||||
return {
|
||||
currency: currency,
|
||||
pattern: pattern,
|
||||
unitPatterns: currencyUnitPatterns( cldr )
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* nameFormat( formattedNumber, pluralForm, properties )
|
||||
*
|
||||
* Return the appropriate name form currency format.
|
||||
*/
|
||||
var currencyNameFormat = function( formattedNumber, pluralForm, properties ) {
|
||||
var displayName, unitPattern,
|
||||
displayNames = properties.displayNames || {},
|
||||
unitPatterns = properties.unitPatterns;
|
||||
|
||||
displayName = displayNames[ "displayName-count-" + pluralForm ] ||
|
||||
displayNames[ "displayName-count-other" ] ||
|
||||
displayNames.displayName ||
|
||||
properties.currency;
|
||||
unitPattern = unitPatterns[ "unitPattern-count-" + pluralForm ] ||
|
||||
unitPatterns[ "unitPattern-count-other" ];
|
||||
|
||||
return formatMessage( unitPattern, [ formattedNumber, displayName ]);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* nameProperties( currency, cldr )
|
||||
*
|
||||
* Return number pattern with the appropriate currency code in as literal.
|
||||
*/
|
||||
var currencyNameProperties = function( currency, cldr ) {
|
||||
var properties = currencyCodeProperties( currency, cldr );
|
||||
|
||||
properties.displayNames = objectFilter( cldr.main([
|
||||
"numbers/currencies",
|
||||
currency
|
||||
]), /^displayName/ );
|
||||
|
||||
return properties;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Unicode regular expression for: everything except math symbols, currency signs, dingbats, and
|
||||
* box-drawing characters.
|
||||
*
|
||||
* Generated by:
|
||||
*
|
||||
* regenerate()
|
||||
* .addRange( 0x0, 0x10FFFF )
|
||||
* .remove( require( "unicode-7.0.0/categories/S/symbols" ) ).toString();
|
||||
*
|
||||
* https://github.com/mathiasbynens/regenerate
|
||||
* https://github.com/mathiasbynens/unicode-7.0.0
|
||||
*/
|
||||
var regexpNotS = /[\0-#%-\*,-;\?-\]_a-\{\}\x7F-\xA1\xA7\xAA\xAB\xAD\xB2\xB3\xB5-\xB7\xB9-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u0383\u0386-\u03F5\u03F7-\u0481\u0483-\u058C\u0590-\u0605\u0609\u060A\u060C\u060D\u0610-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF-\u07F5\u07F7-\u09F1\u09F4-\u09F9\u09FC-\u0AF0\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C7E\u0C80-\u0D78\u0D7A-\u0E3E\u0E40-\u0F00\u0F04-\u0F12\u0F14\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39-\u0FBD\u0FC6\u0FCD\u0FD0-\u0FD4\u0FD9-\u109D\u10A0-\u138F\u139A-\u17DA\u17DC-\u193F\u1941-\u19DD\u1A00-\u1B60\u1B6B-\u1B73\u1B7D-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF-\u2043\u2045-\u2051\u2053-\u2079\u207D-\u2089\u208D-\u209F\u20BE-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u218F\u2308-\u230B\u2329\u232A\u23FB-\u23FF\u2427-\u243F\u244B-\u249B\u24EA-\u24FF\u2768-\u2793\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2B74\u2B75\u2B96\u2B97\u2BBA-\u2BBC\u2BC9\u2BD2-\u2CE4\u2CEB-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u3003\u3005-\u3011\u3014-\u301F\u3021-\u3035\u3038-\u303D\u3040-\u309A\u309D-\u318F\u3192-\u3195\u31A0-\u31BF\u31E4-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u32FF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uAA76\uAA7A-\uAB5A\uAB5C-\uD7FF\uDC00-\uFB28\uFB2A-\uFBB1\uFBC2-\uFDFB\uFDFE-\uFE61\uFE63\uFE67\uFE68\uFE6A-\uFF03\uFF05-\uFF0A\uFF0C-\uFF1B\uFF1F-\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5F-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8D-\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDFFF]|[\uD801\uD803-\uD819\uD81B-\uD82E\uD830-\uD833\uD836-\uD83A\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD802[\uDC00-\uDC76\uDC79-\uDEC7\uDEC9-\uDFFF]|\uD81A[\uDC00-\uDF3B\uDF40-\uDF44\uDF46-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDDE-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD83B[\uDC00-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0F\uDD2F\uDD6C-\uDD6F\uDD9B-\uDDE5\uDE03-\uDE0F\uDE3B-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF\uDF2D-\uDF2F\uDF7E\uDF7F\uDFCF-\uDFD3\uDFF8-\uDFFF]|\uD83D[\uDCFF\uDD4B-\uDD4F\uDD7A\uDDA4\uDE43\uDE44\uDED0-\uDEDF\uDEED-\uDEEF\uDEF4-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDFFF]|[\uD800-\uDBFF]/;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* symbolProperties( currency, cldr )
|
||||
*
|
||||
* Return pattern replacing `¤` with the appropriate currency symbol literal.
|
||||
*/
|
||||
var currencySymbolProperties = function( currency, cldr, options ) {
|
||||
var currencySpacing, pattern,
|
||||
regexp = {
|
||||
"[:digit:]": /\d/,
|
||||
"[:^S:]": regexpNotS
|
||||
},
|
||||
symbol = cldr.main([
|
||||
"numbers/currencies",
|
||||
currency,
|
||||
"symbol"
|
||||
]);
|
||||
|
||||
currencySpacing = [ "beforeCurrency", "afterCurrency" ].map(function( position ) {
|
||||
return cldr.main([
|
||||
"numbers",
|
||||
"currencyFormats-numberSystem-" + numberNumberingSystem( cldr ),
|
||||
"currencySpacing",
|
||||
position
|
||||
]);
|
||||
});
|
||||
|
||||
pattern = cldr.main([
|
||||
"numbers",
|
||||
"currencyFormats-numberSystem-" + numberNumberingSystem( cldr ),
|
||||
options.style === "accounting" ? "accounting" : "standard"
|
||||
]);
|
||||
|
||||
pattern =
|
||||
|
||||
// The number of decimal places and the rounding for each currency is not locale-specific.
|
||||
// Those values are overridden by Supplemental Currency Data.
|
||||
currencySupplementalOverride( currency, pattern, cldr )
|
||||
|
||||
// Replace "¤" (\u00A4) with the appropriate symbol literal.
|
||||
.split( ";" ).map(function( pattern ) {
|
||||
|
||||
return pattern.split( "\u00A4" ).map(function( part, i ) {
|
||||
var currencyMatch = regexp[ currencySpacing[ i ].currencyMatch ],
|
||||
surroundingMatch = regexp[ currencySpacing[ i ].surroundingMatch ],
|
||||
insertBetween = "";
|
||||
|
||||
// For currencyMatch and surroundingMatch definitions, read [1].
|
||||
// When i === 0, beforeCurrency is being handled. Otherwise, afterCurrency.
|
||||
// 1: http://www.unicode.org/reports/tr35/tr35-numbers.html#Currencies
|
||||
currencyMatch = currencyMatch.test( symbol.charAt( i ? symbol.length - 1 : 0 ) );
|
||||
surroundingMatch = surroundingMatch.test(
|
||||
part.charAt( i ? 0 : part.length - 1 ).replace( /[#@,.]/g, "0" )
|
||||
);
|
||||
|
||||
if ( currencyMatch && part && surroundingMatch ) {
|
||||
insertBetween = currencySpacing[ i ].insertBetween;
|
||||
}
|
||||
|
||||
return ( i ? insertBetween : "" ) + part + ( i ? "" : insertBetween );
|
||||
}).join( "'" + symbol + "'" );
|
||||
}).join( ";" );
|
||||
|
||||
return {
|
||||
pattern: pattern
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* objectOmit( object, keys )
|
||||
*
|
||||
* Return a copy of the object, filtered to omit the blacklisted key or array of keys.
|
||||
*/
|
||||
var objectOmit = function( object, keys ) {
|
||||
var key,
|
||||
copy = {};
|
||||
|
||||
keys = alwaysArray( keys );
|
||||
|
||||
for ( key in object ) {
|
||||
if ( keys.indexOf( key ) === -1 ) {
|
||||
copy[ key ] = object[ key ];
|
||||
}
|
||||
}
|
||||
|
||||
return copy;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
function validateRequiredCldr( path, value ) {
|
||||
validateCldr( path, value, {
|
||||
skip: [ /supplemental\/currencyData\/fractions\/[A-Za-z]{3}$/ ]
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* .currencyFormatter( currency [, options] )
|
||||
*
|
||||
* @currency [String] 3-letter currency code as defined by ISO 4217.
|
||||
*
|
||||
* @options [Object]:
|
||||
* - style: [String] "symbol" (default), "accounting", "code" or "name".
|
||||
* - see also number/format options.
|
||||
*
|
||||
* Return a function that formats a currency according to the given options and default/instance
|
||||
* locale.
|
||||
*/
|
||||
Globalize.currencyFormatter =
|
||||
Globalize.prototype.currencyFormatter = function( currency, options ) {
|
||||
var cldr, numberFormatter, plural, properties, style;
|
||||
|
||||
validateParameterPresence( currency, "currency" );
|
||||
validateParameterTypeCurrency( currency, "currency" );
|
||||
|
||||
validateParameterTypePlainObject( options, "options" );
|
||||
|
||||
options = options || {};
|
||||
style = options.style || "symbol";
|
||||
cldr = this.cldr;
|
||||
|
||||
validateDefaultLocale( cldr );
|
||||
|
||||
// Get properties given style ("symbol" default, "code" or "name").
|
||||
cldr.on( "get", validateRequiredCldr );
|
||||
properties = ({
|
||||
accounting: currencySymbolProperties,
|
||||
code: currencyCodeProperties,
|
||||
name: currencyNameProperties,
|
||||
symbol: currencySymbolProperties
|
||||
}[ style ] )( currency, cldr, options );
|
||||
cldr.off( "get", validateRequiredCldr );
|
||||
|
||||
// options = options minus style, plus raw pattern.
|
||||
options = objectOmit( options, "style" );
|
||||
options.raw = properties.pattern;
|
||||
|
||||
// Return formatter when style is "symbol" or "accounting".
|
||||
if ( style === "symbol" || style === "accounting" ) {
|
||||
return this.numberFormatter( options );
|
||||
}
|
||||
|
||||
// Return formatter when style is "code" or "name".
|
||||
validatePluralModulePresence();
|
||||
numberFormatter = this.numberFormatter( options );
|
||||
plural = this.pluralGenerator();
|
||||
return function( value ) {
|
||||
validateParameterPresence( value, "value" );
|
||||
validateParameterTypeNumber( value, "value" );
|
||||
return currencyNameFormat( numberFormatter( value ), plural( value ), properties );
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* .currencyParser( currency [, options] )
|
||||
*
|
||||
* @currency [String] 3-letter currency code as defined by ISO 4217.
|
||||
*
|
||||
* @options [Object] see currencyFormatter.
|
||||
*
|
||||
* Return the currency parser according to the given options and the default/instance locale.
|
||||
*/
|
||||
Globalize.currencyParser =
|
||||
Globalize.prototype.currencyParser = function( /* currency, options */ ) {
|
||||
|
||||
// TODO implement parser.
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* .formatCurrency( value, currency [, options] )
|
||||
*
|
||||
* @value [Number] number to be formatted.
|
||||
*
|
||||
* @currency [String] 3-letter currency code as defined by ISO 4217.
|
||||
*
|
||||
* @options [Object] see currencyFormatter.
|
||||
*
|
||||
* Format a currency according to the given options and the default/instance locale.
|
||||
*/
|
||||
Globalize.formatCurrency =
|
||||
Globalize.prototype.formatCurrency = function( value, currency, options ) {
|
||||
validateParameterPresence( value, "value" );
|
||||
validateParameterTypeNumber( value, "value" );
|
||||
|
||||
return this.currencyFormatter( currency, options )( value );
|
||||
};
|
||||
|
||||
/**
|
||||
* .parseCurrency( value, currency [, options] )
|
||||
*
|
||||
* @value [String]
|
||||
*
|
||||
* @currency [String] 3-letter currency code as defined by ISO 4217.
|
||||
*
|
||||
* @options [Object]: See currencyFormatter.
|
||||
*
|
||||
* Return the parsed currency or NaN when value is invalid.
|
||||
*/
|
||||
Globalize.parseCurrency =
|
||||
Globalize.prototype.parseCurrency = function( /* value, currency, options */ ) {
|
||||
};
|
||||
|
||||
return Globalize;
|
||||
|
||||
|
||||
|
||||
|
||||
}));
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,359 +0,0 @@
|
||||
/**
|
||||
* Globalize v1.0.0
|
||||
*
|
||||
* http://github.com/jquery/globalize
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2015-04-23T12:02Z
|
||||
*/
|
||||
/*!
|
||||
* Globalize v1.0.0 2015-04-23T12:02Z Released under the MIT license
|
||||
* http://git.io/TrdQbw
|
||||
*/
|
||||
(function( root, factory ) {
|
||||
|
||||
// UMD returnExports
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD
|
||||
define([
|
||||
"cldr",
|
||||
"../globalize",
|
||||
"cldr/event",
|
||||
"cldr/supplemental"
|
||||
], factory );
|
||||
} else if ( typeof exports === "object" ) {
|
||||
|
||||
// Node, CommonJS
|
||||
module.exports = factory( require( "cldrjs" ), require( "globalize" ) );
|
||||
} else {
|
||||
|
||||
// Global
|
||||
factory( root.Cldr, root.Globalize );
|
||||
}
|
||||
}(this, function( Cldr, Globalize ) {
|
||||
|
||||
var validateCldr = Globalize._validateCldr,
|
||||
validateDefaultLocale = Globalize._validateDefaultLocale,
|
||||
validateParameterPresence = Globalize._validateParameterPresence,
|
||||
validateParameterType = Globalize._validateParameterType,
|
||||
validateParameterTypePlainObject = Globalize._validateParameterTypePlainObject;
|
||||
var MakePlural;
|
||||
/* jshint ignore:start */
|
||||
MakePlural = (function() {
|
||||
|
||||
|
||||
var _toArray = function (arr) { return Array.isArray(arr) ? arr : Array.from(arr); };
|
||||
|
||||
var _toConsumableArray = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } };
|
||||
|
||||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
|
||||
|
||||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
||||
|
||||
|
||||
/**
|
||||
* make-plural.js -- https://github.com/eemeli/make-plural.js/
|
||||
* Copyright (c) 2014-2015 by Eemeli Aro <eemeli@gmail.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* The software is provided "as is" and the author disclaims all warranties
|
||||
* with regard to this software including all implied warranties of
|
||||
* merchantability and fitness. In no event shall the author be liable for
|
||||
* any special, direct, indirect, or consequential damages or any damages
|
||||
* whatsoever resulting from loss of use, data or profits, whether in an
|
||||
* action of contract, negligence or other tortious action, arising out of
|
||||
* or in connection with the use or performance of this software.
|
||||
*/
|
||||
|
||||
var Parser = (function () {
|
||||
function Parser() {
|
||||
_classCallCheck(this, Parser);
|
||||
}
|
||||
|
||||
_createClass(Parser, [{
|
||||
key: 'parse',
|
||||
value: function parse(cond) {
|
||||
var _this = this;
|
||||
|
||||
if (cond === 'i = 0 or n = 1') {
|
||||
return 'n >= 0 && n <= 1';
|
||||
}if (cond === 'i = 0,1') {
|
||||
return 'n >= 0 && n < 2';
|
||||
}if (cond === 'i = 1 and v = 0') {
|
||||
this.v0 = 1;
|
||||
return 'n == 1 && v0';
|
||||
}
|
||||
return cond.replace(/([tv]) (!?)= 0/g, function (m, sym, noteq) {
|
||||
var sn = sym + '0';
|
||||
_this[sn] = 1;
|
||||
return noteq ? '!' + sn : sn;
|
||||
}).replace(/\b[fintv]\b/g, function (m) {
|
||||
_this[m] = 1;
|
||||
return m;
|
||||
}).replace(/([fin]) % (10+)/g, function (m, sym, num) {
|
||||
var sn = sym + num;
|
||||
_this[sn] = 1;
|
||||
return sn;
|
||||
}).replace(/n10+ = 0/g, 't0 && $&').replace(/(\w+ (!?)= )([0-9.]+,[0-9.,]+)/g, function (m, se, noteq, x) {
|
||||
if (m === 'n = 0,1') return '(n == 0 || n == 1)';
|
||||
if (noteq) return se + x.split(',').join(' && ' + se);
|
||||
return '(' + se + x.split(',').join(' || ' + se) + ')';
|
||||
}).replace(/(\w+) (!?)= ([0-9]+)\.\.([0-9]+)/g, function (m, sym, noteq, x0, x1) {
|
||||
if (Number(x0) + 1 === Number(x1)) {
|
||||
if (noteq) return '' + sym + ' != ' + x0 + ' && ' + sym + ' != ' + x1;
|
||||
return '(' + sym + ' == ' + x0 + ' || ' + sym + ' == ' + x1 + ')';
|
||||
}
|
||||
if (noteq) return '(' + sym + ' < ' + x0 + ' || ' + sym + ' > ' + x1 + ')';
|
||||
if (sym === 'n') {
|
||||
_this.t0 = 1;return '(t0 && n >= ' + x0 + ' && n <= ' + x1 + ')';
|
||||
}
|
||||
return '(' + sym + ' >= ' + x0 + ' && ' + sym + ' <= ' + x1 + ')';
|
||||
}).replace(/ and /g, ' && ').replace(/ or /g, ' || ').replace(/ = /g, ' == ');
|
||||
}
|
||||
}, {
|
||||
key: 'vars',
|
||||
value: (function (_vars) {
|
||||
function vars() {
|
||||
return _vars.apply(this, arguments);
|
||||
}
|
||||
|
||||
vars.toString = function () {
|
||||
return _vars.toString();
|
||||
};
|
||||
|
||||
return vars;
|
||||
})(function () {
|
||||
var vars = [];
|
||||
if (this.i) vars.push('i = s[0]');
|
||||
if (this.f || this.v) vars.push('f = s[1] || \'\'');
|
||||
if (this.t) vars.push('t = (s[1] || \'\').replace(/0+$/, \'\')');
|
||||
if (this.v) vars.push('v = f.length');
|
||||
if (this.v0) vars.push('v0 = !s[1]');
|
||||
if (this.t0 || this.n10 || this.n100) vars.push('t0 = Number(s[0]) == n');
|
||||
for (var k in this) {
|
||||
if (/^.10+$/.test(k)) {
|
||||
var k0 = k[0] === 'n' ? 't0 && s[0]' : k[0];
|
||||
vars.push('' + k + ' = ' + k0 + '.slice(-' + k.substr(2).length + ')');
|
||||
}
|
||||
}if (!vars.length) return '';
|
||||
return 'var ' + ['s = String(n).split(\'.\')'].concat(vars).join(', ');
|
||||
})
|
||||
}]);
|
||||
|
||||
return Parser;
|
||||
})();
|
||||
|
||||
|
||||
|
||||
var MakePlural = (function () {
|
||||
function MakePlural(lc) {
|
||||
var _ref = arguments[1] === undefined ? MakePlural : arguments[1];
|
||||
|
||||
var cardinals = _ref.cardinals;
|
||||
var ordinals = _ref.ordinals;
|
||||
|
||||
_classCallCheck(this, MakePlural);
|
||||
|
||||
if (!cardinals && !ordinals) throw new Error('At least one type of plural is required');
|
||||
this.lc = lc;
|
||||
this.categories = { cardinal: [], ordinal: [] };
|
||||
this.parser = new Parser();
|
||||
|
||||
this.fn = this.buildFunction(cardinals, ordinals);
|
||||
this.fn._obj = this;
|
||||
this.fn.categories = this.categories;
|
||||
|
||||
this.fn.toString = this.fnToString.bind(this);
|
||||
return this.fn;
|
||||
}
|
||||
|
||||
_createClass(MakePlural, [{
|
||||
key: 'compile',
|
||||
value: function compile(type, req) {
|
||||
var cases = [];
|
||||
var rules = MakePlural.rules[type][this.lc];
|
||||
if (!rules) {
|
||||
if (req) throw new Error('Locale "' + this.lc + '" ' + type + ' rules not found');
|
||||
this.categories[type] = ['other'];
|
||||
return '\'other\'';
|
||||
}
|
||||
for (var r in rules) {
|
||||
var _rules$r$trim$split = rules[r].trim().split(/\s*@\w*/);
|
||||
|
||||
var _rules$r$trim$split2 = _toArray(_rules$r$trim$split);
|
||||
|
||||
var cond = _rules$r$trim$split2[0];
|
||||
var examples = _rules$r$trim$split2.slice(1);
|
||||
var cat = r.replace('pluralRule-count-', '');
|
||||
if (cond) cases.push([this.parser.parse(cond), cat]);
|
||||
|
||||
}
|
||||
this.categories[type] = cases.map(function (c) {
|
||||
return c[1];
|
||||
}).concat('other');
|
||||
if (cases.length === 1) {
|
||||
return '(' + cases[0][0] + ') ? \'' + cases[0][1] + '\' : \'other\'';
|
||||
} else {
|
||||
return [].concat(_toConsumableArray(cases.map(function (c) {
|
||||
return '(' + c[0] + ') ? \'' + c[1] + '\'';
|
||||
})), ['\'other\'']).join('\n : ');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'buildFunction',
|
||||
value: function buildFunction(cardinals, ordinals) {
|
||||
var _this3 = this;
|
||||
|
||||
var compile = function compile(c) {
|
||||
return c ? (c[1] ? 'return ' : 'if (ord) return ') + _this3.compile.apply(_this3, _toConsumableArray(c)) : '';
|
||||
},
|
||||
fold = { vars: function vars(str) {
|
||||
return (' ' + str + ';').replace(/(.{1,78})(,|$) ?/g, '$1$2\n ');
|
||||
},
|
||||
cond: function cond(str) {
|
||||
return (' ' + str + ';').replace(/(.{1,78}) (\|\| |$) ?/gm, '$1\n $2');
|
||||
} },
|
||||
cond = [ordinals && ['ordinal', !cardinals], cardinals && ['cardinal', true]].map(compile).map(fold.cond),
|
||||
body = [fold.vars(this.parser.vars())].concat(_toConsumableArray(cond)).join('\n').replace(/\s+$/gm, '').replace(/^[\s;]*[\r\n]+/gm, ''),
|
||||
args = ordinals && cardinals ? 'n, ord' : 'n';
|
||||
return new Function(args, body);
|
||||
}
|
||||
}, {
|
||||
key: 'fnToString',
|
||||
value: function fnToString(name) {
|
||||
return Function.prototype.toString.call(this.fn).replace(/^function( \w+)?/, name ? 'function ' + name : 'function').replace('\n/**/', '');
|
||||
}
|
||||
}], [{
|
||||
key: 'load',
|
||||
value: function load() {
|
||||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
args.forEach(function (cldr) {
|
||||
var data = cldr && cldr.supplemental || null;
|
||||
if (!data) throw new Error('Data does not appear to be CLDR data');
|
||||
MakePlural.rules = {
|
||||
cardinal: data['plurals-type-cardinal'] || MakePlural.rules.cardinal,
|
||||
ordinal: data['plurals-type-ordinal'] || MakePlural.rules.ordinal
|
||||
};
|
||||
});
|
||||
return MakePlural;
|
||||
}
|
||||
}]);
|
||||
|
||||
return MakePlural;
|
||||
})();
|
||||
|
||||
|
||||
|
||||
MakePlural.cardinals = true;
|
||||
MakePlural.ordinals = false;
|
||||
MakePlural.rules = { cardinal: {}, ordinal: {} };
|
||||
|
||||
|
||||
return MakePlural;
|
||||
}());
|
||||
/* jshint ignore:end */
|
||||
|
||||
|
||||
var validateParameterTypeNumber = function( value, name ) {
|
||||
validateParameterType(
|
||||
value,
|
||||
name,
|
||||
value === undefined || typeof value === "number",
|
||||
"Number"
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var validateParameterTypePluralType = function( value, name ) {
|
||||
validateParameterType(
|
||||
value,
|
||||
name,
|
||||
value === undefined || value === "cardinal" || value === "ordinal",
|
||||
"String \"cardinal\" or \"ordinal\""
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* .plural( value )
|
||||
*
|
||||
* @value [Number]
|
||||
*
|
||||
* Return the corresponding form (zero | one | two | few | many | other) of a
|
||||
* value given locale.
|
||||
*/
|
||||
Globalize.plural =
|
||||
Globalize.prototype.plural = function( value, options ) {
|
||||
validateParameterPresence( value, "value" );
|
||||
validateParameterTypeNumber( value, "value" );
|
||||
return this.pluralGenerator( options )( value );
|
||||
};
|
||||
|
||||
/**
|
||||
* .pluralGenerator( [options] )
|
||||
*
|
||||
* Return a plural function (of the form below).
|
||||
*
|
||||
* fn( value )
|
||||
*
|
||||
* @value [Number]
|
||||
*
|
||||
* Return the corresponding form (zero | one | two | few | many | other) of a value given the
|
||||
* default/instance locale.
|
||||
*/
|
||||
Globalize.pluralGenerator =
|
||||
Globalize.prototype.pluralGenerator = function( options ) {
|
||||
var cldr, isOrdinal, plural, type;
|
||||
|
||||
validateParameterTypePlainObject( options, "options" );
|
||||
|
||||
options = options || {};
|
||||
type = options.type || "cardinal";
|
||||
cldr = this.cldr;
|
||||
|
||||
validateParameterTypePluralType( options.type, "options.type" );
|
||||
|
||||
validateDefaultLocale( cldr );
|
||||
|
||||
isOrdinal = type === "ordinal";
|
||||
|
||||
cldr.on( "get", validateCldr );
|
||||
cldr.supplemental([ "plurals-type-" + type, "{language}" ]);
|
||||
cldr.off( "get", validateCldr );
|
||||
|
||||
MakePlural.rules = {};
|
||||
MakePlural.rules[ type ] = cldr.supplemental( "plurals-type-" + type );
|
||||
|
||||
plural = new MakePlural( cldr.attributes.language, {
|
||||
"ordinals": isOrdinal,
|
||||
"cardinals": !isOrdinal
|
||||
});
|
||||
|
||||
return function( value ) {
|
||||
validateParameterPresence( value, "value" );
|
||||
validateParameterTypeNumber( value, "value" );
|
||||
|
||||
return plural( value );
|
||||
};
|
||||
};
|
||||
|
||||
return Globalize;
|
||||
|
||||
|
||||
|
||||
|
||||
}));
|
@ -1,187 +0,0 @@
|
||||
/**
|
||||
* Globalize v1.0.0
|
||||
*
|
||||
* http://github.com/jquery/globalize
|
||||
*
|
||||
* Copyright 2010, 2014 jQuery Foundation, Inc. and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2015-04-23T12:02Z
|
||||
*/
|
||||
/*!
|
||||
* Globalize v1.0.0 2015-04-23T12:02Z Released under the MIT license
|
||||
* http://git.io/TrdQbw
|
||||
*/
|
||||
(function( root, factory ) {
|
||||
|
||||
// UMD returnExports
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD
|
||||
define([
|
||||
"cldr",
|
||||
"../globalize",
|
||||
"./number",
|
||||
"./plural",
|
||||
"cldr/event",
|
||||
"cldr/supplemental"
|
||||
], factory );
|
||||
} else if ( typeof exports === "object" ) {
|
||||
|
||||
// Node, CommonJS
|
||||
module.exports = factory( require( "cldrjs" ), require( "globalize" ) );
|
||||
} else {
|
||||
|
||||
// Extend global
|
||||
factory( root.Cldr, root.Globalize );
|
||||
}
|
||||
}(this, function( Cldr, Globalize ) {
|
||||
|
||||
var formatMessage = Globalize._formatMessage,
|
||||
validateCldr = Globalize._validateCldr,
|
||||
validateDefaultLocale = Globalize._validateDefaultLocale,
|
||||
validateParameterPresence = Globalize._validateParameterPresence,
|
||||
validateParameterTypeString = Globalize._validateParameterTypeString,
|
||||
validateParameterTypeNumber = Globalize._validateParameterTypeNumber;
|
||||
|
||||
|
||||
/**
|
||||
* format( value, numberFormatter, pluralGenerator, properties )
|
||||
*
|
||||
* @value [Number] The number to format
|
||||
*
|
||||
* @numberFormatter [String] A numberFormatter from Globalize.numberFormatter
|
||||
*
|
||||
* @pluralGenerator [String] A pluralGenerator from Globalize.pluralGenerator
|
||||
*
|
||||
* @properties [Object] containing relative time plural message.
|
||||
*
|
||||
* Format relative time.
|
||||
*/
|
||||
var relativeTimeFormat = function( value, numberFormatter, pluralGenerator, properties ) {
|
||||
|
||||
var relativeTime,
|
||||
message = properties[ "relative-type-" + value ];
|
||||
|
||||
if ( message ) {
|
||||
return message;
|
||||
}
|
||||
|
||||
relativeTime = value <= 0 ? properties[ "relativeTime-type-past" ]
|
||||
: properties[ "relativeTime-type-future" ];
|
||||
|
||||
value = Math.abs( value );
|
||||
|
||||
message = relativeTime[ "relativeTimePattern-count-" + pluralGenerator( value ) ];
|
||||
return formatMessage( message, [ numberFormatter( value ) ] );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* properties( unit, cldr, options )
|
||||
*
|
||||
* @unit [String] eg. "day", "week", "month", etc.
|
||||
*
|
||||
* @cldr [Cldr instance].
|
||||
*
|
||||
* @options [Object]
|
||||
* - form: [String] eg. "short" or "narrow". Or falsy for default long form.
|
||||
*
|
||||
* Return relative time properties.
|
||||
*/
|
||||
var relativeTimeProperties = function( unit, cldr, options ) {
|
||||
|
||||
var form = options.form,
|
||||
raw, properties, key, match;
|
||||
|
||||
if ( form ) {
|
||||
unit = unit + "-" + form;
|
||||
}
|
||||
|
||||
raw = cldr.main( [ "dates", "fields", unit ] );
|
||||
properties = {
|
||||
"relativeTime-type-future": raw[ "relativeTime-type-future" ],
|
||||
"relativeTime-type-past": raw[ "relativeTime-type-past" ]
|
||||
};
|
||||
for ( key in raw ) {
|
||||
if ( raw.hasOwnProperty( key ) ) {
|
||||
match = /relative-type-(-?[0-9]+)/.exec( key );
|
||||
if ( match ) {
|
||||
properties[ key ] = raw[ key ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return properties;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* .formatRelativeTime( value, unit [, options] )
|
||||
*
|
||||
* @value [Number] The number of unit to format.
|
||||
*
|
||||
* @unit [String] see .relativeTimeFormatter() for details.
|
||||
*
|
||||
* @options [Object] see .relativeTimeFormatter() for details.
|
||||
*
|
||||
* Formats a relative time according to the given unit, options, and the default/instance locale.
|
||||
*/
|
||||
Globalize.formatRelativeTime =
|
||||
Globalize.prototype.formatRelativeTime = function( value, unit, options ) {
|
||||
|
||||
validateParameterPresence( value, "value" );
|
||||
validateParameterTypeNumber( value, "value" );
|
||||
|
||||
return this.relativeTimeFormatter( unit, options )( value );
|
||||
};
|
||||
|
||||
/**
|
||||
* .relativeTimeFormatter( unit [, options ])
|
||||
*
|
||||
* @unit [String] String value indicating the unit to be formatted. eg. "day", "week", "month", etc.
|
||||
*
|
||||
* @options [Object]
|
||||
* - form: [String] eg. "short" or "narrow". Or falsy for default long form.
|
||||
*
|
||||
* Returns a function that formats a relative time according to the given unit, options, and the
|
||||
* default/instance locale.
|
||||
*/
|
||||
Globalize.relativeTimeFormatter =
|
||||
Globalize.prototype.relativeTimeFormatter = function( unit, options ) {
|
||||
var cldr, numberFormatter, pluralGenerator, properties;
|
||||
|
||||
validateParameterPresence( unit, "unit" );
|
||||
validateParameterTypeString( unit, "unit" );
|
||||
|
||||
cldr = this.cldr;
|
||||
options = options || {};
|
||||
|
||||
validateDefaultLocale( cldr );
|
||||
|
||||
cldr.on( "get", validateCldr );
|
||||
properties = relativeTimeProperties( unit, cldr, options );
|
||||
cldr.off( "get", validateCldr );
|
||||
|
||||
numberFormatter = this.numberFormatter( options );
|
||||
pluralGenerator = this.pluralGenerator();
|
||||
|
||||
return function( value ) {
|
||||
validateParameterPresence( value, "value" );
|
||||
validateParameterTypeNumber( value, "value" );
|
||||
|
||||
return relativeTimeFormat( value, numberFormatter, pluralGenerator, properties );
|
||||
};
|
||||
};
|
||||
|
||||
return Globalize;
|
||||
|
||||
|
||||
|
||||
|
||||
}));
|
5871
web/Scripts/knockout-3.4.0.debug.js
vendored
Normal file
5871
web/Scripts/knockout-3.4.0.debug.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
123
web/Scripts/knockout-3.4.0.js
vendored
Normal file
123
web/Scripts/knockout-3.4.0.js
vendored
Normal file
@ -0,0 +1,123 @@
|
||||
/*!
|
||||
* Knockout JavaScript library v3.4.0
|
||||
* (c) Steven Sanderson - http://knockoutjs.com/
|
||||
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
(function() {(function(n){var x=this||(0,eval)("this"),u=x.document,M=x.navigator,v=x.jQuery,F=x.JSON;(function(n){"function"===typeof define&&define.amd?define(["exports","require"],n):"object"===typeof exports&&"object"===typeof module?n(module.exports||exports):n(x.ko={})})(function(N,O){function J(a,c){return null===a||typeof a in T?a===c:!1}function U(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=n;b()},c))}}function V(b,c){var d;return function(){clearTimeout(d);d=a.a.setTimeout(b,c)}}function W(a,
|
||||
c){c&&c!==I?"beforeChange"===c?this.Kb(a):this.Ha(a,c):this.Lb(a)}function X(a,c){null!==c&&c.k&&c.k()}function Y(a,c){var d=this.Hc,e=d[s];e.R||(this.lb&&this.Ma[c]?(d.Pb(c,a,this.Ma[c]),this.Ma[c]=null,--this.lb):e.r[c]||d.Pb(c,a,e.s?{ia:a}:d.uc(a)))}function K(b,c,d,e){a.d[b]={init:function(b,g,k,l,m){var h,r;a.m(function(){var q=a.a.c(g()),p=!d!==!q,A=!r;if(A||c||p!==h)A&&a.va.Aa()&&(r=a.a.ua(a.f.childNodes(b),!0)),p?(A||a.f.da(b,a.a.ua(r)),a.eb(e?e(m,q):m,b)):a.f.xa(b),h=p},null,{i:b});return{controlsDescendantBindings:!0}}};
|
||||
a.h.ta[b]=!1;a.f.Z[b]=!0}var a="undefined"!==typeof N?N:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=c};a.G=function(a,c,d){a[c]=d};a.version="3.4.0";a.b("version",a.version);a.options={deferUpdates:!1,useOnlyNativeEvents:!1};a.a=function(){function b(a,b){for(var c in a)a.hasOwnProperty(c)&&b(c,a[c])}function c(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function d(a,b){a.__proto__=b;return a}function e(b,c,d,e){var h=b[c].match(r)||
|
||||
[];a.a.q(d.match(r),function(b){a.a.pa(h,b,e)});b[c]=h.join(" ")}var f={__proto__:[]}instanceof Array,g="function"===typeof Symbol,k={},l={};k[M&&/Firefox\/2/i.test(M.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];k.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");b(k,function(a,b){if(b.length)for(var c=0,d=b.length;c<d;c++)l[b[c]]=a});var m={propertychange:!0},h=u&&function(){for(var a=3,b=u.createElement("div"),c=
|
||||
b.getElementsByTagName("i");b.innerHTML="\x3c!--[if gt IE "+ ++a+"]><i></i><![endif]--\x3e",c[0];);return 4<a?a:n}(),r=/\S+/g;return{cc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],q:function(a,b){for(var c=0,d=a.length;c<d;c++)b(a[c],c)},o:function(a,b){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b);for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},Sb:function(a,b,c){for(var d=0,e=a.length;d<e;d++)if(b.call(c,a[d],d))return a[d];
|
||||
return null},La:function(b,c){var d=a.a.o(b,c);0<d?b.splice(d,1):0===d&&b.shift()},Tb:function(b){b=b||[];for(var c=[],d=0,e=b.length;d<e;d++)0>a.a.o(c,b[d])&&c.push(b[d]);return c},fb:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;d<e;d++)c.push(b(a[d],d));return c},Ka:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;d<e;d++)b(a[d],d)&&c.push(a[d]);return c},ra:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var c=0,d=b.length;c<d;c++)a.push(b[c]);return a},pa:function(b,c,d){var e=
|
||||
a.a.o(a.a.zb(b),c);0>e?d&&b.push(c):d||b.splice(e,1)},ka:f,extend:c,Xa:d,Ya:f?d:c,D:b,Ca:function(a,b){if(!a)return a;var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d],d,a));return c},ob:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},jc:function(b){b=a.a.V(b);for(var c=(b[0]&&b[0].ownerDocument||u).createElement("div"),d=0,e=b.length;d<e;d++)c.appendChild(a.$(b[d]));return c},ua:function(b,c){for(var d=0,e=b.length,h=[];d<e;d++){var m=b[d].cloneNode(!0);h.push(c?a.$(m):m)}return h},
|
||||
da:function(b,c){a.a.ob(b);if(c)for(var d=0,e=c.length;d<e;d++)b.appendChild(c[d])},qc:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length){for(var e=d[0],h=e.parentNode,m=0,l=c.length;m<l;m++)h.insertBefore(c[m],e);m=0;for(l=d.length;m<l;m++)a.removeNode(d[m])}},za:function(a,b){if(a.length){for(b=8===b.nodeType&&b.parentNode||b;a.length&&a[0].parentNode!==b;)a.splice(0,1);for(;1<a.length&&a[a.length-1].parentNode!==b;)a.length--;if(1<a.length){var c=a[0],d=a[a.length-1];for(a.length=0;c!==d;)a.push(c),
|
||||
c=c.nextSibling;a.push(d)}}return a},sc:function(a,b){7>h?a.setAttribute("selected",b):a.selected=b},$a:function(a){return null===a||a===n?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},nd:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},Mc:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(3===a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a&&a!=
|
||||
b;)a=a.parentNode;return!!a},nb:function(b){return a.a.Mc(b,b.ownerDocument.documentElement)},Qb:function(b){return!!a.a.Sb(b,a.a.nb)},A:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},Wb:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.Wb(b),c)},$b:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},p:function(b,c,d){var e=a.a.Wb(d);d=h&&m[c];if(a.options.useOnlyNativeEvents||
|
||||
d||!v)if(d||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var l=function(a){e.call(b,a)},f="on"+c;b.attachEvent(f,l);a.a.F.oa(b,function(){b.detachEvent(f,l)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else b.addEventListener(c,e,!1);else v(b).bind(c,e)},Da:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.A(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==
|
||||
d||"radio"==d):d=!1;if(a.options.useOnlyNativeEvents||!v||d)if("function"==typeof u.createEvent)if("function"==typeof b.dispatchEvent)d=u.createEvent(l[c]||"HTMLEvents"),d.initEvent(c,!0,!0,x,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");else v(b).trigger(c)},c:function(b){return a.H(b)?
|
||||
b():b},zb:function(b){return a.H(b)?b.t():b},bb:function(b,c,d){var h;c&&("object"===typeof b.classList?(h=b.classList[d?"add":"remove"],a.a.q(c.match(r),function(a){h.call(b.classList,a)})):"string"===typeof b.className.baseVal?e(b.className,"baseVal",c,d):e(b,"className",c,d))},Za:function(b,c){var d=a.a.c(c);if(null===d||d===n)d="";var e=a.f.firstChild(b);!e||3!=e.nodeType||a.f.nextSibling(e)?a.f.da(b,[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.Rc(b)},rc:function(a,b){a.name=b;if(7>=h)try{a.mergeAttributes(u.createElement("<input name='"+
|
||||
a.name+"'/>"),!1)}catch(c){}},Rc:function(a){9<=h&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},Nc:function(a){if(h){var b=a.style.width;a.style.width=0;a.style.width=b}},hd:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},V:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return b},Yb:function(a){return g?Symbol(a):a},rd:6===h,sd:7===h,C:h,ec:function(b,c){for(var d=a.a.V(b.getElementsByTagName("input")).concat(a.a.V(b.getElementsByTagName("textarea"))),
|
||||
e="string"==typeof c?function(a){return a.name===c}:function(a){return c.test(a.name)},h=[],m=d.length-1;0<=m;m--)e(d[m])&&h.push(d[m]);return h},ed:function(b){return"string"==typeof b&&(b=a.a.$a(b))?F&&F.parse?F.parse(b):(new Function("return "+b))():null},Eb:function(b,c,d){if(!F||!F.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");
|
||||
return F.stringify(a.a.c(b),c,d)},fd:function(c,d,e){e=e||{};var h=e.params||{},m=e.includeFields||this.cc,l=c;if("object"==typeof c&&"form"===a.a.A(c))for(var l=c.action,f=m.length-1;0<=f;f--)for(var g=a.a.ec(c,m[f]),k=g.length-1;0<=k;k--)h[g[k].name]=g[k].value;d=a.a.c(d);var r=u.createElement("form");r.style.display="none";r.action=l;r.method="post";for(var n in d)c=u.createElement("input"),c.type="hidden",c.name=n,c.value=a.a.Eb(a.a.c(d[n])),r.appendChild(c);b(h,function(a,b){var c=u.createElement("input");
|
||||
c.type="hidden";c.name=a;c.value=b;r.appendChild(c)});u.body.appendChild(r);e.submitter?e.submitter(r):r.submit();setTimeout(function(){r.parentNode.removeChild(r)},0)}}}();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.q);a.b("utils.arrayFirst",a.a.Sb);a.b("utils.arrayFilter",a.a.Ka);a.b("utils.arrayGetDistinctValues",a.a.Tb);a.b("utils.arrayIndexOf",a.a.o);a.b("utils.arrayMap",a.a.fb);a.b("utils.arrayPushAll",a.a.ra);a.b("utils.arrayRemoveItem",a.a.La);a.b("utils.extend",a.a.extend);a.b("utils.fieldsIncludedWithJsonPost",
|
||||
a.a.cc);a.b("utils.getFormFields",a.a.ec);a.b("utils.peekObservable",a.a.zb);a.b("utils.postJson",a.a.fd);a.b("utils.parseJson",a.a.ed);a.b("utils.registerEventHandler",a.a.p);a.b("utils.stringifyJson",a.a.Eb);a.b("utils.range",a.a.hd);a.b("utils.toggleDomNodeCssClass",a.a.bb);a.b("utils.triggerEvent",a.a.Da);a.b("utils.unwrapObservable",a.a.c);a.b("utils.objectForEach",a.a.D);a.b("utils.addOrRemoveItem",a.a.pa);a.b("utils.setTextContent",a.a.Za);a.b("unwrap",a.a.c);Function.prototype.bind||(Function.prototype.bind=
|
||||
function(a){var c=this;if(1===arguments.length)return function(){return c.apply(a,arguments)};var d=Array.prototype.slice.call(arguments,1);return function(){var e=d.slice(0);e.push.apply(e,arguments);return c.apply(a,e)}});a.a.e=new function(){function a(b,g){var k=b[d];if(!k||"null"===k||!e[k]){if(!g)return n;k=b[d]="ko"+c++;e[k]={}}return e[k]}var c=0,d="__ko__"+(new Date).getTime(),e={};return{get:function(c,d){var e=a(c,!1);return e===n?n:e[d]},set:function(c,d,e){if(e!==n||a(c,!1)!==n)a(c,!0)[d]=
|
||||
e},clear:function(a){var b=a[d];return b?(delete e[b],a[d]=null,!0):!1},I:function(){return c++ +d}}};a.b("utils.domData",a.a.e);a.b("utils.domData.clear",a.a.e.clear);a.a.F=new function(){function b(b,c){var e=a.a.e.get(b,d);e===n&&c&&(e=[],a.a.e.set(b,d,e));return e}function c(d){var e=b(d,!1);if(e)for(var e=e.slice(0),l=0;l<e.length;l++)e[l](d);a.a.e.clear(d);a.a.F.cleanExternalData(d);if(f[d.nodeType])for(e=d.firstChild;d=e;)e=d.nextSibling,8===d.nodeType&&c(d)}var d=a.a.e.I(),e={1:!0,8:!0,9:!0},
|
||||
f={1:!0,9:!0};return{oa:function(a,c){if("function"!=typeof c)throw Error("Callback must be a function");b(a,!0).push(c)},pc:function(c,e){var l=b(c,!1);l&&(a.a.La(l,e),0==l.length&&a.a.e.set(c,d,n))},$:function(b){if(e[b.nodeType]&&(c(b),f[b.nodeType])){var d=[];a.a.ra(d,b.getElementsByTagName("*"));for(var l=0,m=d.length;l<m;l++)c(d[l])}return b},removeNode:function(b){a.$(b);b.parentNode&&b.parentNode.removeChild(b)},cleanExternalData:function(a){v&&"function"==typeof v.cleanData&&v.cleanData([a])}}};
|
||||
a.$=a.a.F.$;a.removeNode=a.a.F.removeNode;a.b("cleanNode",a.$);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.F);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.F.oa);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.F.pc);(function(){var b=[0,"",""],c=[1,"<table>","</table>"],d=[3,"<table><tbody><tr>","</tr></tbody></table>"],e=[1,"<select multiple='multiple'>","</select>"],f={thead:c,tbody:c,tfoot:c,tr:[2,"<table><tbody>","</tbody></table>"],td:d,th:d,option:e,optgroup:e},
|
||||
g=8>=a.a.C;a.a.ma=function(c,d){var e;if(v)if(v.parseHTML)e=v.parseHTML(c,d)||[];else{if((e=v.clean([c],d))&&e[0]){for(var h=e[0];h.parentNode&&11!==h.parentNode.nodeType;)h=h.parentNode;h.parentNode&&h.parentNode.removeChild(h)}}else{(e=d)||(e=u);var h=e.parentWindow||e.defaultView||x,r=a.a.$a(c).toLowerCase(),q=e.createElement("div"),p;p=(r=r.match(/^<([a-z]+)[ >]/))&&f[r[1]]||b;r=p[0];p="ignored<div>"+p[1]+c+p[2]+"</div>";"function"==typeof h.innerShiv?q.appendChild(h.innerShiv(p)):(g&&e.appendChild(q),
|
||||
q.innerHTML=p,g&&q.parentNode.removeChild(q));for(;r--;)q=q.lastChild;e=a.a.V(q.lastChild.childNodes)}return e};a.a.Cb=function(b,c){a.a.ob(b);c=a.a.c(c);if(null!==c&&c!==n)if("string"!=typeof c&&(c=c.toString()),v)v(b).html(c);else for(var d=a.a.ma(c,b.ownerDocument),e=0;e<d.length;e++)b.appendChild(d[e])}})();a.b("utils.parseHtmlFragment",a.a.ma);a.b("utils.setHtml",a.a.Cb);a.M=function(){function b(c,e){if(c)if(8==c.nodeType){var f=a.M.lc(c.nodeValue);null!=f&&e.push({Lc:c,cd:f})}else if(1==c.nodeType)for(var f=
|
||||
0,g=c.childNodes,k=g.length;f<k;f++)b(g[f],e)}var c={};return{wb:function(a){if("function"!=typeof a)throw Error("You can only pass a function to ko.memoization.memoize()");var b=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);c[b]=a;return"\x3c!--[ko_memo:"+b+"]--\x3e"},xc:function(a,b){var f=c[a];if(f===n)throw Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return f.apply(null,b||[]),
|
||||
!0}finally{delete c[a]}},yc:function(c,e){var f=[];b(c,f);for(var g=0,k=f.length;g<k;g++){var l=f[g].Lc,m=[l];e&&a.a.ra(m,e);a.M.xc(f[g].cd,m);l.nodeValue="";l.parentNode&&l.parentNode.removeChild(l)}},lc:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}();a.b("memoization",a.M);a.b("memoization.memoize",a.M.wb);a.b("memoization.unmemoize",a.M.xc);a.b("memoization.parseMemoText",a.M.lc);a.b("memoization.unmemoizeDomNodeAndDescendants",a.M.yc);a.Y=function(){function b(){if(e)for(var b=
|
||||
e,c=0,m;g<e;)if(m=d[g++]){if(g>b){if(5E3<=++c){g=e;a.a.$b(Error("'Too much recursion' after processing "+c+" task groups."));break}b=e}try{m()}catch(h){a.a.$b(h)}}}function c(){b();g=e=d.length=0}var d=[],e=0,f=1,g=0;return{scheduler:x.MutationObserver?function(a){var b=u.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c):u&&"onreadystatechange"in u.createElement("script")?function(a){var b=u.createElement("script");b.onreadystatechange=
|
||||
function(){b.onreadystatechange=null;u.documentElement.removeChild(b);b=null;a()};u.documentElement.appendChild(b)}:function(a){setTimeout(a,0)},Wa:function(b){e||a.Y.scheduler(c);d[e++]=b;return f++},cancel:function(a){a-=f-e;a>=g&&a<e&&(d[a]=null)},resetForTesting:function(){var a=e-g;g=e=d.length=0;return a},md:b}}();a.b("tasks",a.Y);a.b("tasks.schedule",a.Y.Wa);a.b("tasks.runEarly",a.Y.md);a.ya={throttle:function(b,c){b.throttleEvaluation=c;var d=null;return a.B({read:b,write:function(e){clearTimeout(d);
|
||||
d=a.a.setTimeout(function(){b(e)},c)}})},rateLimit:function(a,c){var d,e,f;"number"==typeof c?d=c:(d=c.timeout,e=c.method);a.cb=!1;f="notifyWhenChangesStop"==e?V:U;a.Ta(function(a){return f(a,d)})},deferred:function(b,c){if(!0!==c)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");b.cb||(b.cb=!0,b.Ta(function(c){var e;return function(){a.Y.cancel(e);e=a.Y.Wa(c);b.notifySubscribers(n,"dirty")}}))},notify:function(a,c){a.equalityComparer=
|
||||
"always"==c?null:J}};var T={undefined:1,"boolean":1,number:1,string:1};a.b("extenders",a.ya);a.vc=function(b,c,d){this.ia=b;this.gb=c;this.Kc=d;this.R=!1;a.G(this,"dispose",this.k)};a.vc.prototype.k=function(){this.R=!0;this.Kc()};a.J=function(){a.a.Ya(this,D);D.rb(this)};var I="change",D={rb:function(a){a.K={};a.Nb=1},X:function(b,c,d){var e=this;d=d||I;var f=new a.vc(e,c?b.bind(c):b,function(){a.a.La(e.K[d],f);e.Ia&&e.Ia(d)});e.sa&&e.sa(d);e.K[d]||(e.K[d]=[]);e.K[d].push(f);return f},notifySubscribers:function(b,
|
||||
c){c=c||I;c===I&&this.zc();if(this.Pa(c))try{a.l.Ub();for(var d=this.K[c].slice(0),e=0,f;f=d[e];++e)f.R||f.gb(b)}finally{a.l.end()}},Na:function(){return this.Nb},Uc:function(a){return this.Na()!==a},zc:function(){++this.Nb},Ta:function(b){var c=this,d=a.H(c),e,f,g;c.Ha||(c.Ha=c.notifySubscribers,c.notifySubscribers=W);var k=b(function(){c.Mb=!1;d&&g===c&&(g=c());e=!1;c.tb(f,g)&&c.Ha(f=g)});c.Lb=function(a){c.Mb=e=!0;g=a;k()};c.Kb=function(a){e||(f=a,c.Ha(a,"beforeChange"))}},Pa:function(a){return this.K[a]&&
|
||||
this.K[a].length},Sc:function(b){if(b)return this.K[b]&&this.K[b].length||0;var c=0;a.a.D(this.K,function(a,b){"dirty"!==a&&(c+=b.length)});return c},tb:function(a,c){return!this.equalityComparer||!this.equalityComparer(a,c)},extend:function(b){var c=this;b&&a.a.D(b,function(b,e){var f=a.ya[b];"function"==typeof f&&(c=f(c,e)||c)});return c}};a.G(D,"subscribe",D.X);a.G(D,"extend",D.extend);a.G(D,"getSubscriptionsCount",D.Sc);a.a.ka&&a.a.Xa(D,Function.prototype);a.J.fn=D;a.hc=function(a){return null!=
|
||||
a&&"function"==typeof a.X&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.J);a.b("isSubscribable",a.hc);a.va=a.l=function(){function b(a){d.push(e);e=a}function c(){e=d.pop()}var d=[],e,f=0;return{Ub:b,end:c,oc:function(b){if(e){if(!a.hc(b))throw Error("Only subscribable things can act as dependencies");e.gb.call(e.Gc,b,b.Cc||(b.Cc=++f))}},w:function(a,d,e){try{return b(),a.apply(d,e||[])}finally{c()}},Aa:function(){if(e)return e.m.Aa()},Sa:function(){if(e)return e.Sa}}}();a.b("computedContext",
|
||||
a.va);a.b("computedContext.getDependenciesCount",a.va.Aa);a.b("computedContext.isInitial",a.va.Sa);a.b("ignoreDependencies",a.qd=a.l.w);var E=a.a.Yb("_latestValue");a.N=function(b){function c(){if(0<arguments.length)return c.tb(c[E],arguments[0])&&(c.ga(),c[E]=arguments[0],c.fa()),this;a.l.oc(c);return c[E]}c[E]=b;a.a.ka||a.a.extend(c,a.J.fn);a.J.fn.rb(c);a.a.Ya(c,B);a.options.deferUpdates&&a.ya.deferred(c,!0);return c};var B={equalityComparer:J,t:function(){return this[E]},fa:function(){this.notifySubscribers(this[E])},
|
||||
ga:function(){this.notifySubscribers(this[E],"beforeChange")}};a.a.ka&&a.a.Xa(B,a.J.fn);var H=a.N.gd="__ko_proto__";B[H]=a.N;a.Oa=function(b,c){return null===b||b===n||b[H]===n?!1:b[H]===c?!0:a.Oa(b[H],c)};a.H=function(b){return a.Oa(b,a.N)};a.Ba=function(b){return"function"==typeof b&&b[H]===a.N||"function"==typeof b&&b[H]===a.B&&b.Vc?!0:!1};a.b("observable",a.N);a.b("isObservable",a.H);a.b("isWriteableObservable",a.Ba);a.b("isWritableObservable",a.Ba);a.b("observable.fn",B);a.G(B,"peek",B.t);a.G(B,
|
||||
"valueHasMutated",B.fa);a.G(B,"valueWillMutate",B.ga);a.la=function(b){b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");b=a.N(b);a.a.Ya(b,a.la.fn);return b.extend({trackArrayChanges:!0})};a.la.fn={remove:function(b){for(var c=this.t(),d=[],e="function"!=typeof b||a.H(b)?function(a){return a===b}:b,f=0;f<c.length;f++){var g=c[f];e(g)&&(0===d.length&&this.ga(),d.push(g),c.splice(f,1),f--)}d.length&&
|
||||
this.fa();return d},removeAll:function(b){if(b===n){var c=this.t(),d=c.slice(0);this.ga();c.splice(0,c.length);this.fa();return d}return b?this.remove(function(c){return 0<=a.a.o(b,c)}):[]},destroy:function(b){var c=this.t(),d="function"!=typeof b||a.H(b)?function(a){return a===b}:b;this.ga();for(var e=c.length-1;0<=e;e--)d(c[e])&&(c[e]._destroy=!0);this.fa()},destroyAll:function(b){return b===n?this.destroy(function(){return!0}):b?this.destroy(function(c){return 0<=a.a.o(b,c)}):[]},indexOf:function(b){var c=
|
||||
this();return a.a.o(c,b)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.ga(),this.t()[d]=c,this.fa())}};a.a.ka&&a.a.Xa(a.la.fn,a.N.fn);a.a.q("pop push reverse shift sort splice unshift".split(" "),function(b){a.la.fn[b]=function(){var a=this.t();this.ga();this.Vb(a,b,arguments);var d=a[b].apply(a,arguments);this.fa();return d===a?this:d}});a.a.q(["slice"],function(b){a.la.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.b("observableArray",a.la);a.ya.trackArrayChanges=function(b,
|
||||
c){function d(){if(!e){e=!0;var c=b.notifySubscribers;b.notifySubscribers=function(a,b){b&&b!==I||++k;return c.apply(this,arguments)};var d=[].concat(b.t()||[]);f=null;g=b.X(function(c){c=[].concat(c||[]);if(b.Pa("arrayChange")){var e;if(!f||1<k)f=a.a.ib(d,c,b.hb);e=f}d=c;f=null;k=0;e&&e.length&&b.notifySubscribers(e,"arrayChange")})}}b.hb={};c&&"object"==typeof c&&a.a.extend(b.hb,c);b.hb.sparse=!0;if(!b.Vb){var e=!1,f=null,g,k=0,l=b.sa,m=b.Ia;b.sa=function(a){l&&l.call(b,a);"arrayChange"===a&&d()};
|
||||
b.Ia=function(a){m&&m.call(b,a);"arrayChange"!==a||b.Pa("arrayChange")||(g.k(),e=!1)};b.Vb=function(b,c,d){function m(a,b,c){return l[l.length]={status:a,value:b,index:c}}if(e&&!k){var l=[],g=b.length,t=d.length,G=0;switch(c){case "push":G=g;case "unshift":for(c=0;c<t;c++)m("added",d[c],G+c);break;case "pop":G=g-1;case "shift":g&&m("deleted",b[G],G);break;case "splice":c=Math.min(Math.max(0,0>d[0]?g+d[0]:d[0]),g);for(var g=1===t?g:Math.min(c+(d[1]||0),g),t=c+t-2,G=Math.max(g,t),P=[],n=[],Q=2;c<G;++c,
|
||||
++Q)c<g&&n.push(m("deleted",b[c],c)),c<t&&P.push(m("added",d[Q],c));a.a.dc(n,P);break;default:return}f=l}}}};var s=a.a.Yb("_state");a.m=a.B=function(b,c,d){function e(){if(0<arguments.length){if("function"===typeof f)f.apply(g.pb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}a.l.oc(e);(g.S||g.s&&e.Qa())&&e.aa();return g.T}"object"===typeof b?d=b:(d=d||{},b&&(d.read=
|
||||
b));if("function"!=typeof d.read)throw Error("Pass a function that returns the value of the ko.computed");var f=d.write,g={T:n,S:!0,Ra:!1,Fb:!1,R:!1,Va:!1,s:!1,jd:d.read,pb:c||d.owner,i:d.disposeWhenNodeIsRemoved||d.i||null,wa:d.disposeWhen||d.wa,mb:null,r:{},L:0,bc:null};e[s]=g;e.Vc="function"===typeof f;a.a.ka||a.a.extend(e,a.J.fn);a.J.fn.rb(e);a.a.Ya(e,z);d.pure?(g.Va=!0,g.s=!0,a.a.extend(e,$)):d.deferEvaluation&&a.a.extend(e,aa);a.options.deferUpdates&&a.ya.deferred(e,!0);g.i&&(g.Fb=!0,g.i.nodeType||
|
||||
(g.i=null));g.s||d.deferEvaluation||e.aa();g.i&&e.ba()&&a.a.F.oa(g.i,g.mb=function(){e.k()});return e};var z={equalityComparer:J,Aa:function(){return this[s].L},Pb:function(a,c,d){if(this[s].Va&&c===this)throw Error("A 'pure' computed must not be called recursively");this[s].r[a]=d;d.Ga=this[s].L++;d.na=c.Na()},Qa:function(){var a,c,d=this[s].r;for(a in d)if(d.hasOwnProperty(a)&&(c=d[a],c.ia.Uc(c.na)))return!0},bd:function(){this.Fa&&!this[s].Ra&&this.Fa()},ba:function(){return this[s].S||0<this[s].L},
|
||||
ld:function(){this.Mb||this.ac()},uc:function(a){if(a.cb&&!this[s].i){var c=a.X(this.bd,this,"dirty"),d=a.X(this.ld,this);return{ia:a,k:function(){c.k();d.k()}}}return a.X(this.ac,this)},ac:function(){var b=this,c=b.throttleEvaluation;c&&0<=c?(clearTimeout(this[s].bc),this[s].bc=a.a.setTimeout(function(){b.aa(!0)},c)):b.Fa?b.Fa():b.aa(!0)},aa:function(b){var c=this[s],d=c.wa;if(!c.Ra&&!c.R){if(c.i&&!a.a.nb(c.i)||d&&d()){if(!c.Fb){this.k();return}}else c.Fb=!1;c.Ra=!0;try{this.Qc(b)}finally{c.Ra=!1}c.L||
|
||||
this.k()}},Qc:function(b){var c=this[s],d=c.Va?n:!c.L,e={Hc:this,Ma:c.r,lb:c.L};a.l.Ub({Gc:e,gb:Y,m:this,Sa:d});c.r={};c.L=0;e=this.Pc(c,e);this.tb(c.T,e)&&(c.s||this.notifySubscribers(c.T,"beforeChange"),c.T=e,c.s?this.zc():b&&this.notifySubscribers(c.T));d&&this.notifySubscribers(c.T,"awake")},Pc:function(b,c){try{var d=b.jd;return b.pb?d.call(b.pb):d()}finally{a.l.end(),c.lb&&!b.s&&a.a.D(c.Ma,X),b.S=!1}},t:function(){var a=this[s];(a.S&&!a.L||a.s&&this.Qa())&&this.aa();return a.T},Ta:function(b){a.J.fn.Ta.call(this,
|
||||
b);this.Fa=function(){this.Kb(this[s].T);this[s].S=!0;this.Lb(this)}},k:function(){var b=this[s];!b.s&&b.r&&a.a.D(b.r,function(a,b){b.k&&b.k()});b.i&&b.mb&&a.a.F.pc(b.i,b.mb);b.r=null;b.L=0;b.R=!0;b.S=!1;b.s=!1;b.i=null}},$={sa:function(b){var c=this,d=c[s];if(!d.R&&d.s&&"change"==b){d.s=!1;if(d.S||c.Qa())d.r=null,d.L=0,d.S=!0,c.aa();else{var e=[];a.a.D(d.r,function(a,b){e[b.Ga]=a});a.a.q(e,function(a,b){var e=d.r[a],l=c.uc(e.ia);l.Ga=b;l.na=e.na;d.r[a]=l})}d.R||c.notifySubscribers(d.T,"awake")}},
|
||||
Ia:function(b){var c=this[s];c.R||"change"!=b||this.Pa("change")||(a.a.D(c.r,function(a,b){b.k&&(c.r[a]={ia:b.ia,Ga:b.Ga,na:b.na},b.k())}),c.s=!0,this.notifySubscribers(n,"asleep"))},Na:function(){var b=this[s];b.s&&(b.S||this.Qa())&&this.aa();return a.J.fn.Na.call(this)}},aa={sa:function(a){"change"!=a&&"beforeChange"!=a||this.t()}};a.a.ka&&a.a.Xa(z,a.J.fn);var R=a.N.gd;a.m[R]=a.N;z[R]=a.m;a.Xc=function(b){return a.Oa(b,a.m)};a.Yc=function(b){return a.Oa(b,a.m)&&b[s]&&b[s].Va};a.b("computed",a.m);
|
||||
a.b("dependentObservable",a.m);a.b("isComputed",a.Xc);a.b("isPureComputed",a.Yc);a.b("computed.fn",z);a.G(z,"peek",z.t);a.G(z,"dispose",z.k);a.G(z,"isActive",z.ba);a.G(z,"getDependenciesCount",z.Aa);a.nc=function(b,c){if("function"===typeof b)return a.m(b,c,{pure:!0});b=a.a.extend({},b);b.pure=!0;return a.m(b,c)};a.b("pureComputed",a.nc);(function(){function b(a,f,g){g=g||new d;a=f(a);if("object"!=typeof a||null===a||a===n||a instanceof RegExp||a instanceof Date||a instanceof String||a instanceof
|
||||
Number||a instanceof Boolean)return a;var k=a instanceof Array?[]:{};g.save(a,k);c(a,function(c){var d=f(a[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":k[c]=d;break;case "object":case "undefined":var h=g.get(d);k[c]=h!==n?h:b(d,f,g)}});return k}function c(a,b){if(a instanceof Array){for(var c=0;c<a.length;c++)b(c);"function"==typeof a.toJSON&&b("toJSON")}else for(c in a)b(c)}function d(){this.keys=[];this.Ib=[]}a.wc=function(c){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");
|
||||
return b(c,function(b){for(var c=0;a.H(b)&&10>c;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.wc(b);return a.a.Eb(b,c,d)};d.prototype={save:function(b,c){var d=a.a.o(this.keys,b);0<=d?this.Ib[d]=c:(this.keys.push(b),this.Ib.push(c))},get:function(b){b=a.a.o(this.keys,b);return 0<=b?this.Ib[b]:n}}})();a.b("toJS",a.wc);a.b("toJSON",a.toJSON);(function(){a.j={u:function(b){switch(a.a.A(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.e.get(b,a.d.options.xb):7>=a.a.C?b.getAttributeNode("value")&&
|
||||
b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.j.u(b.options[b.selectedIndex]):n;default:return b.value}},ha:function(b,c,d){switch(a.a.A(b)){case "option":switch(typeof c){case "string":a.a.e.set(b,a.d.options.xb,n);"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__;b.value=c;break;default:a.a.e.set(b,a.d.options.xb,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:""}break;case "select":if(""===c||
|
||||
null===c)c=n;for(var e=-1,f=0,g=b.options.length,k;f<g;++f)if(k=a.j.u(b.options[f]),k==c||""==k&&c===n){e=f;break}if(d||0<=e||c===n&&1<b.size)b.selectedIndex=e;break;default:if(null===c||c===n)c="";b.value=c}}}})();a.b("selectExtensions",a.j);a.b("selectExtensions.readValue",a.j.u);a.b("selectExtensions.writeValue",a.j.ha);a.h=function(){function b(b){b=a.a.$a(b);123===b.charCodeAt(0)&&(b=b.slice(1,-1));var c=[],d=b.match(e),r,k=[],p=0;if(d){d.push(",");for(var A=0,y;y=d[A];++A){var t=y.charCodeAt(0);
|
||||
if(44===t){if(0>=p){c.push(r&&k.length?{key:r,value:k.join("")}:{unknown:r||k.join("")});r=p=0;k=[];continue}}else if(58===t){if(!p&&!r&&1===k.length){r=k.pop();continue}}else 47===t&&A&&1<y.length?(t=d[A-1].match(f))&&!g[t[0]]&&(b=b.substr(b.indexOf(y)+1),d=b.match(e),d.push(","),A=-1,y="/"):40===t||123===t||91===t?++p:41===t||125===t||93===t?--p:r||k.length||34!==t&&39!==t||(y=y.slice(1,-1));k.push(y)}}return c}var c=["true","false","null","undefined"],d=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,
|
||||
e=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),f=/[\])"'A-Za-z0-9_$]+$/,g={"in":1,"return":1,"typeof":1},k={};return{ta:[],ea:k,yb:b,Ua:function(e,m){function h(b,e){var m;if(!A){var l=a.getBindingHandler(b);if(l&&l.preprocess&&!(e=l.preprocess(e,b,h)))return;if(l=k[b])m=e,0<=a.a.o(c,m)?m=!1:(l=m.match(d),m=null===l?!1:l[1]?"Object("+l[1]+")"+l[2]:m),l=m;l&&g.push("'"+b+"':function(_z){"+m+"=_z}")}p&&(e=
|
||||
"function(){return "+e+" }");f.push("'"+b+"':"+e)}m=m||{};var f=[],g=[],p=m.valueAccessors,A=m.bindingParams,y="string"===typeof e?b(e):e;a.a.q(y,function(a){h(a.key||a.unknown,a.value)});g.length&&h("_ko_property_writers","{"+g.join(",")+" }");return f.join(",")},ad:function(a,b){for(var c=0;c<a.length;c++)if(a[c].key==b)return!0;return!1},Ea:function(b,c,d,e,f){if(b&&a.H(b))!a.Ba(b)||f&&b.t()===e||b(e);else if((b=c.get("_ko_property_writers"))&&b[d])b[d](e)}}}();a.b("expressionRewriting",a.h);a.b("expressionRewriting.bindingRewriteValidators",
|
||||
a.h.ta);a.b("expressionRewriting.parseObjectLiteral",a.h.yb);a.b("expressionRewriting.preProcessBindings",a.h.Ua);a.b("expressionRewriting._twoWayBindings",a.h.ea);a.b("jsonExpressionRewriting",a.h);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",a.h.Ua);(function(){function b(a){return 8==a.nodeType&&g.test(f?a.text:a.nodeValue)}function c(a){return 8==a.nodeType&&k.test(f?a.text:a.nodeValue)}function d(a,d){for(var e=a,f=1,l=[];e=e.nextSibling;){if(c(e)&&(f--,0===f))return l;l.push(e);
|
||||
b(e)&&f++}if(!d)throw Error("Cannot find closing comment tag to match: "+a.nodeValue);return null}function e(a,b){var c=d(a,b);return c?0<c.length?c[c.length-1].nextSibling:a.nextSibling:null}var f=u&&"\x3c!--test--\x3e"===u.createComment("test").text,g=f?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,k=f?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0};a.f={Z:{},childNodes:function(a){return b(a)?d(a):a.childNodes},xa:function(c){if(b(c)){c=a.f.childNodes(c);for(var d=
|
||||
0,e=c.length;d<e;d++)a.removeNode(c[d])}else a.a.ob(c)},da:function(c,d){if(b(c)){a.f.xa(c);for(var e=c.nextSibling,f=0,l=d.length;f<l;f++)e.parentNode.insertBefore(d[f],e)}else a.a.da(c,d)},mc:function(a,c){b(a)?a.parentNode.insertBefore(c,a.nextSibling):a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)},gc:function(c,d,e){e?b(c)?c.parentNode.insertBefore(d,e.nextSibling):e.nextSibling?c.insertBefore(d,e.nextSibling):c.appendChild(d):a.f.mc(c,d)},firstChild:function(a){return b(a)?!a.nextSibling||
|
||||
c(a.nextSibling)?null:a.nextSibling:a.firstChild},nextSibling:function(a){b(a)&&(a=e(a));return a.nextSibling&&c(a.nextSibling)?null:a.nextSibling},Tc:b,pd:function(a){return(a=(f?a.text:a.nodeValue).match(g))?a[1]:null},kc:function(d){if(l[a.a.A(d)]){var h=d.firstChild;if(h){do if(1===h.nodeType){var f;f=h.firstChild;var g=null;if(f){do if(g)g.push(f);else if(b(f)){var k=e(f,!0);k?f=k:g=[f]}else c(f)&&(g=[f]);while(f=f.nextSibling)}if(f=g)for(g=h.nextSibling,k=0;k<f.length;k++)g?d.insertBefore(f[k],
|
||||
g):d.appendChild(f[k])}while(h=h.nextSibling)}}}}})();a.b("virtualElements",a.f);a.b("virtualElements.allowedBindings",a.f.Z);a.b("virtualElements.emptyNode",a.f.xa);a.b("virtualElements.insertAfter",a.f.gc);a.b("virtualElements.prepend",a.f.mc);a.b("virtualElements.setDomNodeChildren",a.f.da);(function(){a.Q=function(){this.Fc={}};a.a.extend(a.Q.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=b.getAttribute("data-bind")||a.g.getComponentNameForNode(b);case 8:return a.f.Tc(b);
|
||||
default:return!1}},getBindings:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b):null;return a.g.Ob(d,b,c,!1)},getBindingAccessors:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b,{valueAccessors:!0}):null;return a.g.Ob(d,b,c,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.f.pd(b);default:return null}},parseBindingsString:function(b,c,d,e){try{var f=this.Fc,g=b+(e&&e.valueAccessors||
|
||||
""),k;if(!(k=f[g])){var l,m="with($context){with($data||{}){return{"+a.h.Ua(b,e)+"}}}";l=new Function("$context","$element",m);k=f[g]=l}return k(c,d)}catch(h){throw h.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+h.message,h;}}});a.Q.instance=new a.Q})();a.b("bindingProvider",a.Q);(function(){function b(a){return function(){return a}}function c(a){return a()}function d(b){return a.a.Ca(a.l.w(b),function(a,c){return function(){return b()[c]}})}function e(c,e,h){return"function"===
|
||||
typeof c?d(c.bind(null,e,h)):a.a.Ca(c,b)}function f(a,b){return d(this.getBindings.bind(this,a,b))}function g(b,c,d){var e,h=a.f.firstChild(c),f=a.Q.instance,m=f.preprocessNode;if(m){for(;e=h;)h=a.f.nextSibling(e),m.call(f,e);h=a.f.firstChild(c)}for(;e=h;)h=a.f.nextSibling(e),k(b,e,d)}function k(b,c,d){var e=!0,h=1===c.nodeType;h&&a.f.kc(c);if(h&&d||a.Q.instance.nodeHasBindings(c))e=m(c,null,b,d).shouldBindDescendants;e&&!r[a.a.A(c)]&&g(b,c,!h)}function l(b){var c=[],d={},e=[];a.a.D(b,function Z(h){if(!d[h]){var f=
|
||||
a.getBindingHandler(h);f&&(f.after&&(e.push(h),a.a.q(f.after,function(c){if(b[c]){if(-1!==a.a.o(e,c))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+e.join(", "));Z(c)}}),e.length--),c.push({key:h,fc:f}));d[h]=!0}});return c}function m(b,d,e,h){var m=a.a.e.get(b,q);if(!d){if(m)throw Error("You cannot apply bindings multiple times to the same element.");a.a.e.set(b,q,!0)}!m&&h&&a.tc(b,e);var g;if(d&&"function"!==typeof d)g=d;else{var k=a.Q.instance,r=k.getBindingAccessors||
|
||||
f,p=a.B(function(){(g=d?d(e,b):r.call(k,b,e))&&e.P&&e.P();return g},null,{i:b});g&&p.ba()||(p=null)}var u;if(g){var v=p?function(a){return function(){return c(p()[a])}}:function(a){return g[a]},s=function(){return a.a.Ca(p?p():g,c)};s.get=function(a){return g[a]&&c(v(a))};s.has=function(a){return a in g};h=l(g);a.a.q(h,function(c){var d=c.fc.init,h=c.fc.update,f=c.key;if(8===b.nodeType&&!a.f.Z[f])throw Error("The binding '"+f+"' cannot be used with virtual elements");try{"function"==typeof d&&a.l.w(function(){var a=
|
||||
d(b,v(f),s,e.$data,e);if(a&&a.controlsDescendantBindings){if(u!==n)throw Error("Multiple bindings ("+u+" and "+f+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");u=f}}),"function"==typeof h&&a.B(function(){h(b,v(f),s,e.$data,e)},null,{i:b})}catch(m){throw m.message='Unable to process binding "'+f+": "+g[f]+'"\nMessage: '+m.message,m;}})}return{shouldBindDescendants:u===n}}function h(b){return b&&b instanceof a.U?b:new a.U(b)}
|
||||
a.d={};var r={script:!0,textarea:!0,template:!0};a.getBindingHandler=function(b){return a.d[b]};a.U=function(b,c,d,e){var h=this,f="function"==typeof b&&!a.H(b),m,g=a.B(function(){var m=f?b():b,l=a.a.c(m);c?(c.P&&c.P(),a.a.extend(h,c),g&&(h.P=g)):(h.$parents=[],h.$root=l,h.ko=a);h.$rawData=m;h.$data=l;d&&(h[d]=l);e&&e(h,c,l);return h.$data},null,{wa:function(){return m&&!a.a.Qb(m)},i:!0});g.ba()&&(h.P=g,g.equalityComparer=null,m=[],g.Ac=function(b){m.push(b);a.a.F.oa(b,function(b){a.a.La(m,b);m.length||
|
||||
(g.k(),h.P=g=n)})})};a.U.prototype.createChildContext=function(b,c,d){return new a.U(b,this,c,function(a,b){a.$parentContext=b;a.$parent=b.$data;a.$parents=(b.$parents||[]).slice(0);a.$parents.unshift(a.$parent);d&&d(a)})};a.U.prototype.extend=function(b){return new a.U(this.P||this.$data,this,null,function(c,d){c.$rawData=d.$rawData;a.a.extend(c,"function"==typeof b?b():b)})};var q=a.a.e.I(),p=a.a.e.I();a.tc=function(b,c){if(2==arguments.length)a.a.e.set(b,p,c),c.P&&c.P.Ac(b);else return a.a.e.get(b,
|
||||
p)};a.Ja=function(b,c,d){1===b.nodeType&&a.f.kc(b);return m(b,c,h(d),!0)};a.Dc=function(b,c,d){d=h(d);return a.Ja(b,e(c,d,b),d)};a.eb=function(a,b){1!==b.nodeType&&8!==b.nodeType||g(h(a),b,!0)};a.Rb=function(a,b){!v&&x.jQuery&&(v=x.jQuery);if(b&&1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");b=b||x.document.body;k(h(a),b,!0)};a.kb=function(b){switch(b.nodeType){case 1:case 8:var c=a.tc(b);if(c)return c;
|
||||
if(b.parentNode)return a.kb(b.parentNode)}return n};a.Jc=function(b){return(b=a.kb(b))?b.$data:n};a.b("bindingHandlers",a.d);a.b("applyBindings",a.Rb);a.b("applyBindingsToDescendants",a.eb);a.b("applyBindingAccessorsToNode",a.Ja);a.b("applyBindingsToNode",a.Dc);a.b("contextFor",a.kb);a.b("dataFor",a.Jc)})();(function(b){function c(c,e){var m=f.hasOwnProperty(c)?f[c]:b,h;m?m.X(e):(m=f[c]=new a.J,m.X(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,Zc:e};delete f[c];h||e?m.notifySubscribers(b):
|
||||
a.Y.Wa(function(){m.notifySubscribers(b)})}),h=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a,c)}):b(null,null)})}function e(c,d,f,h){h||(h=a.g.loaders.slice(0));var g=h.shift();if(g){var q=g[c];if(q){var p=!1;if(q.apply(g,d.concat(function(a){p?f(null):null!==a?f(a):e(c,d,f,h)}))!==b&&(p=!0,!g.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else e(c,d,f,h)}else f(null)}
|
||||
var f={},g={};a.g={get:function(d,e){var f=g.hasOwnProperty(d)?g[d]:b;f?f.Zc?a.l.w(function(){e(f.definition)}):a.Y.Wa(function(){e(f.definition)}):c(d,e)},Xb:function(a){delete g[a]},Jb:e};a.g.loaders=[];a.b("components",a.g);a.b("components.get",a.g.get);a.b("components.clearCachedDefinition",a.g.Xb)})();(function(){function b(b,c,d,e){function g(){0===--y&&e(k)}var k={},y=2,t=d.template;d=d.viewModel;t?f(c,t,function(c){a.g.Jb("loadTemplate",[b,c],function(a){k.template=a;g()})}):g();d?f(c,d,function(c){a.g.Jb("loadViewModel",
|
||||
[b,c],function(a){k[l]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)});else if("function"===typeof b[l])d(b[l]);else if("instance"in b){var e=b.instance;d(function(){return e})}else"viewModel"in b?c(a,b.viewModel,d):a("Unknown viewModel value: "+b)}function d(b){switch(a.a.A(b)){case "script":return a.a.ma(b.text);case "textarea":return a.a.ma(b.value);case "template":if(e(b.content))return a.a.ua(b.content.childNodes)}return a.a.ua(b.childNodes)}function e(a){return x.DocumentFragment?
|
||||
a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require?O||x.require?(O||x.require)([b.require],c):a("Uses require, but no AMD loader is present"):c(b)}function g(a){return function(b){throw Error("Component '"+a+"': "+b);}}var k={};a.g.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.g.ub(b))throw Error("Component "+b+" is already registered");k[b]=c};a.g.ub=function(a){return k.hasOwnProperty(a)};a.g.od=function(b){delete k[b];
|
||||
a.g.Xb(b)};a.g.Zb={getConfig:function(a,b){b(k.hasOwnProperty(a)?k[a]:null)},loadComponent:function(a,c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if("string"===typeof c)f(a.a.ma(c));else if(c instanceof Array)f(c);else if(e(c))f(a.a.V(c.childNodes));else if(c.element)if(c=c.element,x.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if("string"===typeof c){var l=u.getElementById(c);l?f(d(l)):b("Cannot find element with ID "+c)}else b("Unknown element type: "+
|
||||
c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(g(a),b,d)}};var l="createViewModel";a.b("components.register",a.g.register);a.b("components.isRegistered",a.g.ub);a.b("components.unregister",a.g.od);a.b("components.defaultLoader",a.g.Zb);a.g.loaders.push(a.g.Zb);a.g.Bc=k})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.Ca(f,function(c){return a.m(c,null,{i:b})}),g=a.a.Ca(f,function(c){var e=
|
||||
c.t();return c.ba()?a.m({read:function(){return a.a.c(c())},write:a.Ba(e)&&function(a){c()(a)},i:b}):e});g.hasOwnProperty("$raw")||(g.$raw=f);return g}return{$raw:{}}}a.g.getComponentNameForNode=function(b){var c=a.a.A(b);if(a.g.ub(c)&&(-1!=c.indexOf("-")||"[object HTMLUnknownElement]"==""+b||8>=a.a.C&&b.tagName===c))return c};a.g.Ob=function(c,e,f,g){if(1===e.nodeType){var k=a.g.getComponentNameForNode(e);if(k){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');
|
||||
var l={name:k,params:b(e,f)};c.component=g?function(){return l}:l}}return c};var c=new a.Q;9>a.a.C&&(a.g.register=function(a){return function(b){u.createElement(b);return a.apply(this,arguments)}}(a.g.register),u.createDocumentFragment=function(b){return function(){var c=b(),f=a.g.Bc,g;for(g in f)f.hasOwnProperty(g)&&c.createElement(g);return c}}(u.createDocumentFragment))})();(function(b){function c(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.ua(c);a.f.da(d,b)}
|
||||
function d(a,b,c,d){var e=a.createViewModel;return e?e.call(a,d,{element:b,templateNodes:c}):d}var e=0;a.d.component={init:function(f,g,k,l,m){function h(){var a=r&&r.dispose;"function"===typeof a&&a.call(r);q=r=null}var r,q,p=a.a.V(a.f.childNodes(f));a.a.F.oa(f,h);a.m(function(){var l=a.a.c(g()),k,t;"string"===typeof l?k=l:(k=a.a.c(l.name),t=a.a.c(l.params));if(!k)throw Error("No component name specified");var n=q=++e;a.g.get(k,function(e){if(q===n){h();if(!e)throw Error("Unknown component '"+k+
|
||||
"'");c(k,e,f);var g=d(e,f,p,t);e=m.createChildContext(g,b,function(a){a.$component=g;a.$componentTemplateNodes=p});r=g;a.eb(e,f)}})},null,{i:f});return{controlsDescendantBindings:!0}}};a.f.Z.component=!0})();var S={"class":"className","for":"htmlFor"};a.d.attr={update:function(b,c){var d=a.a.c(c())||{};a.a.D(d,function(c,d){d=a.a.c(d);var g=!1===d||null===d||d===n;g&&b.removeAttribute(c);8>=a.a.C&&c in S?(c=S[c],g?b.removeAttribute(c):b[c]=d):g||b.setAttribute(c,d.toString());"name"===c&&a.a.rc(b,
|
||||
g?"":d.toString())})}};(function(){a.d.checked={after:["value","attr"],init:function(b,c,d){function e(){var e=b.checked,f=p?g():e;if(!a.va.Sa()&&(!l||e)){var m=a.l.w(c);if(h){var k=r?m.t():m;q!==f?(e&&(a.a.pa(k,f,!0),a.a.pa(k,q,!1)),q=f):a.a.pa(k,f,e);r&&a.Ba(m)&&m(k)}else a.h.Ea(m,d,"checked",f,!0)}}function f(){var d=a.a.c(c());b.checked=h?0<=a.a.o(d,g()):k?d:g()===d}var g=a.nc(function(){return d.has("checkedValue")?a.a.c(d.get("checkedValue")):d.has("value")?a.a.c(d.get("value")):b.value}),k=
|
||||
"checkbox"==b.type,l="radio"==b.type;if(k||l){var m=c(),h=k&&a.a.c(m)instanceof Array,r=!(h&&m.push&&m.splice),q=h?g():n,p=l||h;l&&!b.name&&a.d.uniqueName.init(b,function(){return!0});a.m(e,null,{i:b});a.a.p(b,"click",e);a.m(f,null,{i:b});m=n}}};a.h.ea.checked=!0;a.d.checkedValue={update:function(b,c){b.value=a.a.c(c())}}})();a.d.css={update:function(b,c){var d=a.a.c(c());null!==d&&"object"==typeof d?a.a.D(d,function(c,d){d=a.a.c(d);a.a.bb(b,c,d)}):(d=a.a.$a(String(d||"")),a.a.bb(b,b.__ko__cssValue,
|
||||
!1),b.__ko__cssValue=d,a.a.bb(b,d,!0))}};a.d.enable={update:function(b,c){var d=a.a.c(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.d.disable={update:function(b,c){a.d.enable.update(b,function(){return!a.a.c(c())})}};a.d.event={init:function(b,c,d,e,f){var g=c()||{};a.a.D(g,function(g){"string"==typeof g&&a.a.p(b,g,function(b){var m,h=c()[g];if(h){try{var r=a.a.V(arguments);e=f.$data;r.unshift(e);m=h.apply(e,r)}finally{!0!==m&&(b.preventDefault?b.preventDefault():
|
||||
b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.d.foreach={ic:function(b){return function(){var c=b(),d=a.a.zb(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.W.sb};a.a.c(c);return{foreach:d.data,as:d.as,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.W.sb}}},init:function(b,c){return a.d.template.init(b,
|
||||
a.d.foreach.ic(c))},update:function(b,c,d,e,f){return a.d.template.update(b,a.d.foreach.ic(c),d,e,f)}};a.h.ta.foreach=!1;a.f.Z.foreach=!0;a.d.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var g;try{g=f.activeElement}catch(h){g=f.body}e=g===b}f=c();a.h.Ea(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.p(b,"focus",f);a.a.p(b,"focusin",f);a.a.p(b,"blur",g);a.a.p(b,
|
||||
"focusout",g)},update:function(b,c){var d=!!a.a.c(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.l.w(a.a.Da,null,[b,d?"focusin":"focusout"]))}};a.h.ea.hasfocus=!0;a.d.hasFocus=a.d.hasfocus;a.h.ea.hasFocus=!0;a.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.Cb(b,c())}};K("if");K("ifnot",!1,!0);K("with",!0,!1,function(a,c){return a.createChildContext(c)});var L={};
|
||||
a.d.options={init:function(b){if("select"!==a.a.A(b))throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,c,d){function e(){return a.a.Ka(b.options,function(a){return a.selected})}function f(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c}function g(c,e){if(A&&h)a.j.ha(b,a.a.c(d.get("value")),!0);else if(p.length){var f=0<=a.a.o(p,a.j.u(e[0]));a.a.sc(e[0],f);A&&!f&&a.l.w(a.a.Da,null,[b,
|
||||
"change"])}}var k=b.multiple,l=0!=b.length&&k?b.scrollTop:null,m=a.a.c(c()),h=d.get("valueAllowUnset")&&d.has("value"),r=d.get("optionsIncludeDestroyed");c={};var q,p=[];h||(k?p=a.a.fb(e(),a.j.u):0<=b.selectedIndex&&p.push(a.j.u(b.options[b.selectedIndex])));m&&("undefined"==typeof m.length&&(m=[m]),q=a.a.Ka(m,function(b){return r||b===n||null===b||!a.a.c(b._destroy)}),d.has("optionsCaption")&&(m=a.a.c(d.get("optionsCaption")),null!==m&&m!==n&&q.unshift(L)));var A=!1;c.beforeRemove=function(a){b.removeChild(a)};
|
||||
m=g;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(m=function(b,c){g(0,c);a.l.w(d.get("optionsAfterRender"),null,[c[0],b!==L?b:n])});a.a.Bb(b,q,function(c,e,g){g.length&&(p=!h&&g[0].selected?[a.j.u(g[0])]:[],A=!0);e=b.ownerDocument.createElement("option");c===L?(a.a.Za(e,d.get("optionsCaption")),a.j.ha(e,n)):(g=f(c,d.get("optionsValue"),c),a.j.ha(e,a.a.c(g)),c=f(c,d.get("optionsText"),g),a.a.Za(e,c));return[e]},c,m);a.l.w(function(){h?a.j.ha(b,a.a.c(d.get("value")),
|
||||
!0):(k?p.length&&e().length<p.length:p.length&&0<=b.selectedIndex?a.j.u(b.options[b.selectedIndex])!==p[0]:p.length||0<=b.selectedIndex)&&a.a.Da(b,"change")});a.a.Nc(b);l&&20<Math.abs(l-b.scrollTop)&&(b.scrollTop=l)}};a.d.options.xb=a.a.e.I();a.d.selectedOptions={after:["options","foreach"],init:function(b,c,d){a.a.p(b,"change",function(){var e=c(),f=[];a.a.q(b.getElementsByTagName("option"),function(b){b.selected&&f.push(a.j.u(b))});a.h.Ea(e,d,"selectedOptions",f)})},update:function(b,c){if("select"!=
|
||||
a.a.A(b))throw Error("values binding applies only to SELECT elements");var d=a.a.c(c()),e=b.scrollTop;d&&"number"==typeof d.length&&a.a.q(b.getElementsByTagName("option"),function(b){var c=0<=a.a.o(d,a.j.u(b));b.selected!=c&&a.a.sc(b,c)});b.scrollTop=e}};a.h.ea.selectedOptions=!0;a.d.style={update:function(b,c){var d=a.a.c(c()||{});a.a.D(d,function(c,d){d=a.a.c(d);if(null===d||d===n||!1===d)d="";b.style[c]=d})}};a.d.submit={init:function(b,c,d,e,f){if("function"!=typeof c())throw Error("The value for a submit binding must be a function");
|
||||
a.a.p(b,"submit",function(a){var d,e=c();try{d=e.call(f.$data,b)}finally{!0!==d&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}})}};a.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.Za(b,c())}};a.f.Z.text=!0;(function(){if(x&&x.navigator)var b=function(a){if(a)return parseFloat(a[1])},c=x.opera&&x.opera.version&&parseInt(x.opera.version()),d=x.navigator.userAgent,e=b(d.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),f=b(d.match(/Firefox\/([^ ]*)/));
|
||||
if(10>a.a.C)var g=a.a.e.I(),k=a.a.e.I(),l=function(b){var c=this.activeElement;(c=c&&a.a.e.get(c,k))&&c(b)},m=function(b,c){var d=b.ownerDocument;a.a.e.get(d,g)||(a.a.e.set(d,g,!0),a.a.p(d,"selectionchange",l));a.a.e.set(b,k,c)};a.d.textInput={init:function(b,d,g){function l(c,d){a.a.p(b,c,d)}function k(){var c=a.a.c(d());if(null===c||c===n)c="";v!==n&&c===v?a.a.setTimeout(k,4):b.value!==c&&(u=c,b.value=c)}function y(){s||(v=b.value,s=a.a.setTimeout(t,4))}function t(){clearTimeout(s);v=s=n;var c=
|
||||
b.value;u!==c&&(u=c,a.h.Ea(d(),g,"textInput",c))}var u=b.value,s,v,x=9==a.a.C?y:t;10>a.a.C?(l("propertychange",function(a){"value"===a.propertyName&&x(a)}),8==a.a.C&&(l("keyup",t),l("keydown",t)),8<=a.a.C&&(m(b,x),l("dragend",y))):(l("input",t),5>e&&"textarea"===a.a.A(b)?(l("keydown",y),l("paste",y),l("cut",y)):11>c?l("keydown",y):4>f&&(l("DOMAutoComplete",t),l("dragdrop",t),l("drop",t)));l("change",t);a.m(k,null,{i:b})}};a.h.ea.textInput=!0;a.d.textinput={preprocess:function(a,b,c){c("textInput",
|
||||
a)}}})();a.d.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ ++a.d.uniqueName.Ic;a.a.rc(b,d)}}};a.d.uniqueName.Ic=0;a.d.value={after:["options","foreach"],init:function(b,c,d){if("input"!=b.tagName.toLowerCase()||"checkbox"!=b.type&&"radio"!=b.type){var e=["change"],f=d.get("valueUpdate"),g=!1,k=null;f&&("string"==typeof f&&(f=[f]),a.a.ra(e,f),e=a.a.Tb(e));var l=function(){k=null;g=!1;var e=c(),f=a.j.u(b);a.h.Ea(e,d,"value",f)};!a.a.C||"input"!=b.tagName.toLowerCase()||"text"!=b.type||
|
||||
"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.o(e,"propertychange")||(a.a.p(b,"propertychange",function(){g=!0}),a.a.p(b,"focus",function(){g=!1}),a.a.p(b,"blur",function(){g&&l()}));a.a.q(e,function(c){var d=l;a.a.nd(c,"after")&&(d=function(){k=a.j.u(b);a.a.setTimeout(l,0)},c=c.substring(5));a.a.p(b,c,d)});var m=function(){var e=a.a.c(c()),f=a.j.u(b);if(null!==k&&e===k)a.a.setTimeout(m,0);else if(e!==f)if("select"===a.a.A(b)){var g=d.get("valueAllowUnset"),f=function(){a.j.ha(b,
|
||||
e,g)};f();g||e===a.j.u(b)?a.a.setTimeout(f,0):a.l.w(a.a.Da,null,[b,"change"])}else a.j.ha(b,e)};a.m(m,null,{i:b})}else a.Ja(b,{checkedValue:c})},update:function(){}};a.h.ea.value=!0;a.d.visible={update:function(b,c){var d=a.a.c(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};(function(b){a.d[b]={init:function(c,d,e,f,g){return a.d.event.init.call(this,c,function(){var a={};a[b]=d();return a},e,f,g)}}})("click");a.O=function(){};a.O.prototype.renderTemplateSource=
|
||||
function(){throw Error("Override renderTemplateSource");};a.O.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};a.O.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||u;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.v.n(d)}if(1==b.nodeType||8==b.nodeType)return new a.v.qa(b);throw Error("Unknown template type: "+b);};a.O.prototype.renderTemplate=function(a,c,d,e){a=this.makeTemplateSource(a,
|
||||
e);return this.renderTemplateSource(a,c,d,e)};a.O.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.O.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.O);a.Gb=function(){function b(b,c,d,k){b=a.h.yb(b);for(var l=a.h.ta,m=0;m<b.length;m++){var h=b[m].key;if(l.hasOwnProperty(h)){var r=l[h];if("function"===typeof r){if(h=
|
||||
r(b[m].value))throw Error(h);}else if(!r)throw Error("This template engine does not support the '"+h+"' binding within its templates");}}d="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+a.h.Ua(b,{valueAccessors:!0})+" } })()},'"+d.toLowerCase()+"')";return k.createJavaScriptEvaluatorBlock(d)+c}var c=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Oc:function(b,
|
||||
c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.Gb.dd(b,c)},d)},dd:function(a,f){return a.replace(c,function(a,c,d,e,h){return b(h,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",f)})},Ec:function(b,c){return a.M.wb(function(d,k){var l=d.nextSibling;l&&l.nodeName.toLowerCase()===c&&a.Ja(l,b,k)})}}}();a.b("__tr_ambtns",a.Gb.Ec);(function(){a.v={};a.v.n=function(b){if(this.n=b){var c=a.a.A(b);this.ab="script"===c?1:"textarea"===c?2:"template"==c&&
|
||||
b.content&&11===b.content.nodeType?3:4}};a.v.n.prototype.text=function(){var b=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.n[b];var c=arguments[0];"innerHTML"===b?a.a.Cb(this.n,c):this.n[b]=c};var b=a.a.e.I()+"_";a.v.n.prototype.data=function(c){if(1===arguments.length)return a.a.e.get(this.n,b+c);a.a.e.set(this.n,b+c,arguments[1])};var c=a.a.e.I();a.v.n.prototype.nodes=function(){var b=this.n;if(0==arguments.length)return(a.a.e.get(b,c)||{}).jb||(3===this.ab?
|
||||
b.content:4===this.ab?b:n);a.a.e.set(b,c,{jb:arguments[0]})};a.v.qa=function(a){this.n=a};a.v.qa.prototype=new a.v.n;a.v.qa.prototype.text=function(){if(0==arguments.length){var b=a.a.e.get(this.n,c)||{};b.Hb===n&&b.jb&&(b.Hb=b.jb.innerHTML);return b.Hb}a.a.e.set(this.n,c,{Hb:arguments[0]})};a.b("templateSources",a.v);a.b("templateSources.domElement",a.v.n);a.b("templateSources.anonymousTemplate",a.v.qa)})();(function(){function b(b,c,d){var e;for(c=a.f.nextSibling(c);b&&(e=b)!==c;)b=a.f.nextSibling(e),
|
||||
d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,k=a.Q.instance,n=k.preprocessNode;if(n){b(e,f,function(a,b){var c=a.previousSibling,d=n.call(k,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.za(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.Rb(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.M.yc(b,[d])});a.a.za(c,g)}}function d(a){return a.nodeType?a:0<a.length?a[0]:null}function e(b,
|
||||
e,f,k,q){q=q||{};var p=(b&&d(b)||f||{}).ownerDocument,n=q.templateEngine||g;a.Gb.Oc(f,n,p);f=n.renderTemplate(f,k,q,p);if("number"!=typeof f.length||0<f.length&&"number"!=typeof f[0].nodeType)throw Error("Template engine must return an array of DOM nodes");p=!1;switch(e){case "replaceChildren":a.f.da(b,f);p=!0;break;case "replaceNode":a.a.qc(b,f);p=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+e);}p&&(c(f,k),q.afterRender&&a.l.w(q.afterRender,null,[f,k.$data]));
|
||||
return f}function f(b,c,d){return a.H(b)?b():"function"===typeof b?b(c,d):b}var g;a.Db=function(b){if(b!=n&&!(b instanceof a.O))throw Error("templateEngine must inherit from ko.templateEngine");g=b};a.Ab=function(b,c,h,k,q){h=h||{};if((h.templateEngine||g)==n)throw Error("Set a template engine before calling renderTemplate");q=q||"replaceChildren";if(k){var p=d(k);return a.B(function(){var g=c&&c instanceof a.U?c:new a.U(a.a.c(c)),n=f(b,g.$data,g),g=e(k,q,n,g,h);"replaceNode"==q&&(k=g,p=d(k))},null,
|
||||
{wa:function(){return!p||!a.a.nb(p)},i:p&&"replaceNode"==q?p.parentNode:p})}return a.M.wb(function(d){a.Ab(b,c,h,d,"replaceNode")})};a.kd=function(b,d,g,k,q){function p(a,b){c(b,s);g.afterRender&&g.afterRender(b,a);s=null}function u(a,c){s=q.createChildContext(a,g.as,function(a){a.$index=c});var d=f(b,a,s);return e(null,"ignoreTargetNode",d,s,g)}var s;return a.B(function(){var b=a.a.c(d)||[];"undefined"==typeof b.length&&(b=[b]);b=a.a.Ka(b,function(b){return g.includeDestroyed||b===n||null===b||!a.a.c(b._destroy)});
|
||||
a.l.w(a.a.Bb,null,[k,b,u,g,p])},null,{i:k})};var k=a.a.e.I();a.d.template={init:function(b,c){var d=a.a.c(c());if("string"==typeof d||d.name)a.f.xa(b);else{if("nodes"in d){if(d=d.nodes||[],a.H(d))throw Error('The "nodes" option must be a plain, non-observable array.');}else d=a.f.childNodes(b);d=a.a.jc(d);(new a.v.qa(b)).nodes(d)}return{controlsDescendantBindings:!0}},update:function(b,c,d,e,f){var g=c(),s;c=a.a.c(g);d=!0;e=null;"string"==typeof c?c={}:(g=c.name,"if"in c&&(d=a.a.c(c["if"])),d&&"ifnot"in
|
||||
c&&(d=!a.a.c(c.ifnot)),s=a.a.c(c.data));"foreach"in c?e=a.kd(g||b,d&&c.foreach||[],c,b,f):d?(f="data"in c?f.createChildContext(s,c.as):f,e=a.Ab(g||b,f,c,b)):a.f.xa(b);f=e;(s=a.a.e.get(b,k))&&"function"==typeof s.k&&s.k();a.a.e.set(b,k,f&&f.ba()?f:n)}};a.h.ta.template=function(b){b=a.h.yb(b);return 1==b.length&&b[0].unknown||a.h.ad(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"};a.f.Z.template=!0})();a.b("setTemplateEngine",a.Db);a.b("renderTemplate",
|
||||
a.Ab);a.a.dc=function(a,c,d){if(a.length&&c.length){var e,f,g,k,l;for(e=f=0;(!d||e<d)&&(k=a[f]);++f){for(g=0;l=c[g];++g)if(k.value===l.value){k.moved=l.index;l.moved=k.index;c.splice(g,1);e=g=0;break}e+=g}}};a.a.ib=function(){function b(b,d,e,f,g){var k=Math.min,l=Math.max,m=[],h,n=b.length,q,p=d.length,s=p-n||1,u=n+p+1,t,v,x;for(h=0;h<=n;h++)for(v=t,m.push(t=[]),x=k(p,h+s),q=l(0,h-1);q<=x;q++)t[q]=q?h?b[h-1]===d[q-1]?v[q-1]:k(v[q]||u,t[q-1]||u)+1:q+1:h+1;k=[];l=[];s=[];h=n;for(q=p;h||q;)p=m[h][q]-
|
||||
1,q&&p===m[h][q-1]?l.push(k[k.length]={status:e,value:d[--q],index:q}):h&&p===m[h-1][q]?s.push(k[k.length]={status:f,value:b[--h],index:h}):(--q,--h,g.sparse||k.push({status:"retained",value:d[q]}));a.a.dc(s,l,!g.dontLimitMoves&&10*n);return k.reverse()}return function(a,d,e){e="boolean"===typeof e?{dontLimitMoves:e}:e||{};a=a||[];d=d||[];return a.length<d.length?b(a,d,"added","deleted",e):b(d,a,"deleted","added",e)}}();a.b("utils.compareArrays",a.a.ib);(function(){function b(b,c,d,k,l){var m=[],
|
||||
h=a.B(function(){var h=c(d,l,a.a.za(m,b))||[];0<m.length&&(a.a.qc(m,h),k&&a.l.w(k,null,[d,h,l]));m.length=0;a.a.ra(m,h)},null,{i:b,wa:function(){return!a.a.Qb(m)}});return{ca:m,B:h.ba()?h:n}}var c=a.a.e.I(),d=a.a.e.I();a.a.Bb=function(e,f,g,k,l){function m(b,c){w=q[c];v!==c&&(D[b]=w);w.qb(v++);a.a.za(w.ca,e);u.push(w);z.push(w)}function h(b,c){if(b)for(var d=0,e=c.length;d<e;d++)c[d]&&a.a.q(c[d].ca,function(a){b(a,d,c[d].ja)})}f=f||[];k=k||{};var r=a.a.e.get(e,c)===n,q=a.a.e.get(e,c)||[],p=a.a.fb(q,
|
||||
function(a){return a.ja}),s=a.a.ib(p,f,k.dontLimitMoves),u=[],t=0,v=0,x=[],z=[];f=[];for(var D=[],p=[],w,C=0,B,E;B=s[C];C++)switch(E=B.moved,B.status){case "deleted":E===n&&(w=q[t],w.B&&(w.B.k(),w.B=n),a.a.za(w.ca,e).length&&(k.beforeRemove&&(u.push(w),z.push(w),w.ja===d?w=null:f[C]=w),w&&x.push.apply(x,w.ca)));t++;break;case "retained":m(C,t++);break;case "added":E!==n?m(C,E):(w={ja:B.value,qb:a.N(v++)},u.push(w),z.push(w),r||(p[C]=w))}a.a.e.set(e,c,u);h(k.beforeMove,D);a.a.q(x,k.beforeRemove?a.$:
|
||||
a.removeNode);for(var C=0,r=a.f.firstChild(e),F;w=z[C];C++){w.ca||a.a.extend(w,b(e,g,w.ja,l,w.qb));for(t=0;s=w.ca[t];r=s.nextSibling,F=s,t++)s!==r&&a.f.gc(e,s,F);!w.Wc&&l&&(l(w.ja,w.ca,w.qb),w.Wc=!0)}h(k.beforeRemove,f);for(C=0;C<f.length;++C)f[C]&&(f[C].ja=d);h(k.afterMove,D);h(k.afterAdd,p)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Bb);a.W=function(){this.allowTemplateRewriting=!1};a.W.prototype=new a.O;a.W.prototype.renderTemplateSource=function(b,c,d,e){if(c=(9>a.a.C?0:b.nodes)?
|
||||
b.nodes():null)return a.a.V(c.cloneNode(!0).childNodes);b=b.text();return a.a.ma(b,e)};a.W.sb=new a.W;a.Db(a.W.sb);a.b("nativeTemplateEngine",a.W);(function(){a.vb=function(){var a=this.$c=function(){if(!v||!v.tmpl)return 0;try{if(0<=v.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f,g){g=g||u;f=f||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var k=b.data("precompiled");
|
||||
k||(k=b.text()||"",k=v.template(null,"{{ko_with $item.koBindingContext}}"+k+"{{/ko_with}}"),b.data("precompiled",k));b=[e.$data];e=v.extend({koBindingContext:e},f.templateOptions);e=v.tmpl(k,b,e);e.appendTo(g.createElement("div"));v.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){u.write("<script type='text/html' id='"+a+"'>"+b+"\x3c/script>")};0<a&&(v.tmpl.tag.ko_code={open:"__.push($1 || '');"},
|
||||
v.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};a.vb.prototype=new a.O;var b=new a.vb;0<b.$c&&a.Db(b);a.b("jqueryTmplTemplateEngine",a.vb)})()})})();})();
|
224
web/Scripts/respond.js
Normal file
224
web/Scripts/respond.js
Normal file
@ -0,0 +1,224 @@
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
(function(w) {
|
||||
"use strict";
|
||||
w.matchMedia = w.matchMedia || function(doc, undefined) {
|
||||
var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div");
|
||||
div.id = "mq-test-1";
|
||||
div.style.cssText = "position:absolute;top:-100em";
|
||||
fakeBody.style.background = "none";
|
||||
fakeBody.appendChild(div);
|
||||
return function(q) {
|
||||
div.innerHTML = '­<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>';
|
||||
docElem.insertBefore(fakeBody, refNode);
|
||||
bool = div.offsetWidth === 42;
|
||||
docElem.removeChild(fakeBody);
|
||||
return {
|
||||
matches: bool,
|
||||
media: q
|
||||
};
|
||||
};
|
||||
}(w.document);
|
||||
})(this);
|
||||
|
||||
/*! Respond.js v1.4.0: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */
|
||||
(function(w) {
|
||||
"use strict";
|
||||
var respond = {};
|
||||
w.respond = respond;
|
||||
respond.update = function() {};
|
||||
var requestQueue = [], xmlHttp = function() {
|
||||
var xmlhttpmethod = false;
|
||||
try {
|
||||
xmlhttpmethod = new w.XMLHttpRequest();
|
||||
} catch (e) {
|
||||
xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
return function() {
|
||||
return xmlhttpmethod;
|
||||
};
|
||||
}(), ajax = function(url, callback) {
|
||||
var req = xmlHttp();
|
||||
if (!req) {
|
||||
return;
|
||||
}
|
||||
req.open("GET", url, true);
|
||||
req.onreadystatechange = function() {
|
||||
if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
|
||||
return;
|
||||
}
|
||||
callback(req.responseText);
|
||||
};
|
||||
if (req.readyState === 4) {
|
||||
return;
|
||||
}
|
||||
req.send(null);
|
||||
};
|
||||
respond.ajax = ajax;
|
||||
respond.queue = requestQueue;
|
||||
respond.regex = {
|
||||
media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
|
||||
keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
|
||||
urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
|
||||
findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
|
||||
only: /(only\s+)?([a-zA-Z]+)\s?/,
|
||||
minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,
|
||||
maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/
|
||||
};
|
||||
respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
|
||||
if (respond.mediaQueriesSupported) {
|
||||
return;
|
||||
}
|
||||
var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() {
|
||||
var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;
|
||||
div.style.cssText = "position:absolute;font-size:1em;width:1em";
|
||||
if (!body) {
|
||||
body = fakeUsed = doc.createElement("body");
|
||||
body.style.background = "none";
|
||||
}
|
||||
docElem.style.fontSize = "100%";
|
||||
body.style.fontSize = "100%";
|
||||
body.appendChild(div);
|
||||
if (fakeUsed) {
|
||||
docElem.insertBefore(body, docElem.firstChild);
|
||||
}
|
||||
ret = div.offsetWidth;
|
||||
if (fakeUsed) {
|
||||
docElem.removeChild(body);
|
||||
} else {
|
||||
body.removeChild(div);
|
||||
}
|
||||
docElem.style.fontSize = originalHTMLFontSize;
|
||||
if (originalBodyFontSize) {
|
||||
body.style.fontSize = originalBodyFontSize;
|
||||
}
|
||||
ret = eminpx = parseFloat(ret);
|
||||
return ret;
|
||||
}, applyMedia = function(fromResize) {
|
||||
var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();
|
||||
if (fromResize && lastCall && now - lastCall < resizeThrottle) {
|
||||
w.clearTimeout(resizeDefer);
|
||||
resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
|
||||
return;
|
||||
} else {
|
||||
lastCall = now;
|
||||
}
|
||||
for (var i in mediastyles) {
|
||||
if (mediastyles.hasOwnProperty(i)) {
|
||||
var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em";
|
||||
if (!!min) {
|
||||
min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
|
||||
}
|
||||
if (!!max) {
|
||||
max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
|
||||
}
|
||||
if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
|
||||
if (!styleBlocks[thisstyle.media]) {
|
||||
styleBlocks[thisstyle.media] = [];
|
||||
}
|
||||
styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var j in appendedEls) {
|
||||
if (appendedEls.hasOwnProperty(j)) {
|
||||
if (appendedEls[j] && appendedEls[j].parentNode === head) {
|
||||
head.removeChild(appendedEls[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
appendedEls.length = 0;
|
||||
for (var k in styleBlocks) {
|
||||
if (styleBlocks.hasOwnProperty(k)) {
|
||||
var ss = doc.createElement("style"), css = styleBlocks[k].join("\n");
|
||||
ss.type = "text/css";
|
||||
ss.media = k;
|
||||
head.insertBefore(ss, lastLink.nextSibling);
|
||||
if (ss.styleSheet) {
|
||||
ss.styleSheet.cssText = css;
|
||||
} else {
|
||||
ss.appendChild(doc.createTextNode(css));
|
||||
}
|
||||
appendedEls.push(ss);
|
||||
}
|
||||
}
|
||||
}, translate = function(styles, href, media) {
|
||||
var qs = styles.replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0;
|
||||
href = href.substring(0, href.lastIndexOf("/"));
|
||||
var repUrls = function(css) {
|
||||
return css.replace(respond.regex.urls, "$1" + href + "$2$3");
|
||||
}, useMedia = !ql && media;
|
||||
if (href.length) {
|
||||
href += "/";
|
||||
}
|
||||
if (useMedia) {
|
||||
ql = 1;
|
||||
}
|
||||
for (var i = 0; i < ql; i++) {
|
||||
var fullq, thisq, eachq, eql;
|
||||
if (useMedia) {
|
||||
fullq = media;
|
||||
rules.push(repUrls(styles));
|
||||
} else {
|
||||
fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
|
||||
rules.push(RegExp.$2 && repUrls(RegExp.$2));
|
||||
}
|
||||
eachq = fullq.split(",");
|
||||
eql = eachq.length;
|
||||
for (var j = 0; j < eql; j++) {
|
||||
thisq = eachq[j];
|
||||
mediastyles.push({
|
||||
media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
|
||||
rules: rules.length - 1,
|
||||
hasquery: thisq.indexOf("(") > -1,
|
||||
minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
|
||||
maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
|
||||
});
|
||||
}
|
||||
}
|
||||
applyMedia();
|
||||
}, makeRequests = function() {
|
||||
if (requestQueue.length) {
|
||||
var thisRequest = requestQueue.shift();
|
||||
ajax(thisRequest.href, function(styles) {
|
||||
translate(styles, thisRequest.href, thisRequest.media);
|
||||
parsedSheets[thisRequest.href] = true;
|
||||
w.setTimeout(function() {
|
||||
makeRequests();
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
}, ripCSS = function() {
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
|
||||
if (!!href && isCSS && !parsedSheets[href]) {
|
||||
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
|
||||
translate(sheet.styleSheet.rawCssText, href, media);
|
||||
parsedSheets[href] = true;
|
||||
} else {
|
||||
if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
|
||||
if (href.substring(0, 2) === "//") {
|
||||
href = w.location.protocol + href;
|
||||
}
|
||||
requestQueue.push({
|
||||
href: href,
|
||||
media: media
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
makeRequests();
|
||||
};
|
||||
ripCSS();
|
||||
respond.update = ripCSS;
|
||||
respond.getEmValue = getEmValue;
|
||||
function callMedia() {
|
||||
applyMedia(true);
|
||||
}
|
||||
if (w.addEventListener) {
|
||||
w.addEventListener("resize", callMedia, false);
|
||||
} else if (w.attachEvent) {
|
||||
w.attachEvent("onresize", callMedia);
|
||||
}
|
||||
})(this);
|
273
web/Scripts/respond.matchmedia.addListener.js
Normal file
273
web/Scripts/respond.matchmedia.addListener.js
Normal file
@ -0,0 +1,273 @@
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
(function(w) {
|
||||
"use strict";
|
||||
w.matchMedia = w.matchMedia || function(doc, undefined) {
|
||||
var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div");
|
||||
div.id = "mq-test-1";
|
||||
div.style.cssText = "position:absolute;top:-100em";
|
||||
fakeBody.style.background = "none";
|
||||
fakeBody.appendChild(div);
|
||||
return function(q) {
|
||||
div.innerHTML = '­<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>';
|
||||
docElem.insertBefore(fakeBody, refNode);
|
||||
bool = div.offsetWidth === 42;
|
||||
docElem.removeChild(fakeBody);
|
||||
return {
|
||||
matches: bool,
|
||||
media: q
|
||||
};
|
||||
};
|
||||
}(w.document);
|
||||
})(this);
|
||||
|
||||
/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */
|
||||
(function(w) {
|
||||
"use strict";
|
||||
if (w.matchMedia && w.matchMedia("all").addListener) {
|
||||
return false;
|
||||
}
|
||||
var localMatchMedia = w.matchMedia, hasMediaQueries = localMatchMedia("only all").matches, isListening = false, timeoutID = 0, queries = [], handleChange = function(evt) {
|
||||
w.clearTimeout(timeoutID);
|
||||
timeoutID = w.setTimeout(function() {
|
||||
for (var i = 0, il = queries.length; i < il; i++) {
|
||||
var mql = queries[i].mql, listeners = queries[i].listeners || [], matches = localMatchMedia(mql.media).matches;
|
||||
if (matches !== mql.matches) {
|
||||
mql.matches = matches;
|
||||
for (var j = 0, jl = listeners.length; j < jl; j++) {
|
||||
listeners[j].call(w, mql);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 30);
|
||||
};
|
||||
w.matchMedia = function(media) {
|
||||
var mql = localMatchMedia(media), listeners = [], index = 0;
|
||||
mql.addListener = function(listener) {
|
||||
if (!hasMediaQueries) {
|
||||
return;
|
||||
}
|
||||
if (!isListening) {
|
||||
isListening = true;
|
||||
w.addEventListener("resize", handleChange, true);
|
||||
}
|
||||
if (index === 0) {
|
||||
index = queries.push({
|
||||
mql: mql,
|
||||
listeners: listeners
|
||||
});
|
||||
}
|
||||
listeners.push(listener);
|
||||
};
|
||||
mql.removeListener = function(listener) {
|
||||
for (var i = 0, il = listeners.length; i < il; i++) {
|
||||
if (listeners[i] === listener) {
|
||||
listeners.splice(i, 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
return mql;
|
||||
};
|
||||
})(this);
|
||||
|
||||
/*! Respond.js v1.4.0: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */
|
||||
(function(w) {
|
||||
"use strict";
|
||||
var respond = {};
|
||||
w.respond = respond;
|
||||
respond.update = function() {};
|
||||
var requestQueue = [], xmlHttp = function() {
|
||||
var xmlhttpmethod = false;
|
||||
try {
|
||||
xmlhttpmethod = new w.XMLHttpRequest();
|
||||
} catch (e) {
|
||||
xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
return function() {
|
||||
return xmlhttpmethod;
|
||||
};
|
||||
}(), ajax = function(url, callback) {
|
||||
var req = xmlHttp();
|
||||
if (!req) {
|
||||
return;
|
||||
}
|
||||
req.open("GET", url, true);
|
||||
req.onreadystatechange = function() {
|
||||
if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
|
||||
return;
|
||||
}
|
||||
callback(req.responseText);
|
||||
};
|
||||
if (req.readyState === 4) {
|
||||
return;
|
||||
}
|
||||
req.send(null);
|
||||
};
|
||||
respond.ajax = ajax;
|
||||
respond.queue = requestQueue;
|
||||
respond.regex = {
|
||||
media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
|
||||
keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
|
||||
urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
|
||||
findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
|
||||
only: /(only\s+)?([a-zA-Z]+)\s?/,
|
||||
minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,
|
||||
maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/
|
||||
};
|
||||
respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
|
||||
if (respond.mediaQueriesSupported) {
|
||||
return;
|
||||
}
|
||||
var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() {
|
||||
var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;
|
||||
div.style.cssText = "position:absolute;font-size:1em;width:1em";
|
||||
if (!body) {
|
||||
body = fakeUsed = doc.createElement("body");
|
||||
body.style.background = "none";
|
||||
}
|
||||
docElem.style.fontSize = "100%";
|
||||
body.style.fontSize = "100%";
|
||||
body.appendChild(div);
|
||||
if (fakeUsed) {
|
||||
docElem.insertBefore(body, docElem.firstChild);
|
||||
}
|
||||
ret = div.offsetWidth;
|
||||
if (fakeUsed) {
|
||||
docElem.removeChild(body);
|
||||
} else {
|
||||
body.removeChild(div);
|
||||
}
|
||||
docElem.style.fontSize = originalHTMLFontSize;
|
||||
if (originalBodyFontSize) {
|
||||
body.style.fontSize = originalBodyFontSize;
|
||||
}
|
||||
ret = eminpx = parseFloat(ret);
|
||||
return ret;
|
||||
}, applyMedia = function(fromResize) {
|
||||
var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();
|
||||
if (fromResize && lastCall && now - lastCall < resizeThrottle) {
|
||||
w.clearTimeout(resizeDefer);
|
||||
resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
|
||||
return;
|
||||
} else {
|
||||
lastCall = now;
|
||||
}
|
||||
for (var i in mediastyles) {
|
||||
if (mediastyles.hasOwnProperty(i)) {
|
||||
var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em";
|
||||
if (!!min) {
|
||||
min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
|
||||
}
|
||||
if (!!max) {
|
||||
max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
|
||||
}
|
||||
if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
|
||||
if (!styleBlocks[thisstyle.media]) {
|
||||
styleBlocks[thisstyle.media] = [];
|
||||
}
|
||||
styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var j in appendedEls) {
|
||||
if (appendedEls.hasOwnProperty(j)) {
|
||||
if (appendedEls[j] && appendedEls[j].parentNode === head) {
|
||||
head.removeChild(appendedEls[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
appendedEls.length = 0;
|
||||
for (var k in styleBlocks) {
|
||||
if (styleBlocks.hasOwnProperty(k)) {
|
||||
var ss = doc.createElement("style"), css = styleBlocks[k].join("\n");
|
||||
ss.type = "text/css";
|
||||
ss.media = k;
|
||||
head.insertBefore(ss, lastLink.nextSibling);
|
||||
if (ss.styleSheet) {
|
||||
ss.styleSheet.cssText = css;
|
||||
} else {
|
||||
ss.appendChild(doc.createTextNode(css));
|
||||
}
|
||||
appendedEls.push(ss);
|
||||
}
|
||||
}
|
||||
}, translate = function(styles, href, media) {
|
||||
var qs = styles.replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0;
|
||||
href = href.substring(0, href.lastIndexOf("/"));
|
||||
var repUrls = function(css) {
|
||||
return css.replace(respond.regex.urls, "$1" + href + "$2$3");
|
||||
}, useMedia = !ql && media;
|
||||
if (href.length) {
|
||||
href += "/";
|
||||
}
|
||||
if (useMedia) {
|
||||
ql = 1;
|
||||
}
|
||||
for (var i = 0; i < ql; i++) {
|
||||
var fullq, thisq, eachq, eql;
|
||||
if (useMedia) {
|
||||
fullq = media;
|
||||
rules.push(repUrls(styles));
|
||||
} else {
|
||||
fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
|
||||
rules.push(RegExp.$2 && repUrls(RegExp.$2));
|
||||
}
|
||||
eachq = fullq.split(",");
|
||||
eql = eachq.length;
|
||||
for (var j = 0; j < eql; j++) {
|
||||
thisq = eachq[j];
|
||||
mediastyles.push({
|
||||
media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
|
||||
rules: rules.length - 1,
|
||||
hasquery: thisq.indexOf("(") > -1,
|
||||
minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
|
||||
maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
|
||||
});
|
||||
}
|
||||
}
|
||||
applyMedia();
|
||||
}, makeRequests = function() {
|
||||
if (requestQueue.length) {
|
||||
var thisRequest = requestQueue.shift();
|
||||
ajax(thisRequest.href, function(styles) {
|
||||
translate(styles, thisRequest.href, thisRequest.media);
|
||||
parsedSheets[thisRequest.href] = true;
|
||||
w.setTimeout(function() {
|
||||
makeRequests();
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
}, ripCSS = function() {
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
|
||||
if (!!href && isCSS && !parsedSheets[href]) {
|
||||
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
|
||||
translate(sheet.styleSheet.rawCssText, href, media);
|
||||
parsedSheets[href] = true;
|
||||
} else {
|
||||
if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
|
||||
if (href.substring(0, 2) === "//") {
|
||||
href = w.location.protocol + href;
|
||||
}
|
||||
requestQueue.push({
|
||||
href: href,
|
||||
media: media
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
makeRequests();
|
||||
};
|
||||
ripCSS();
|
||||
respond.update = ripCSS;
|
||||
respond.getEmValue = getEmValue;
|
||||
function callMedia() {
|
||||
applyMedia(true);
|
||||
}
|
||||
if (w.addEventListener) {
|
||||
w.addEventListener("resize", callMedia, false);
|
||||
} else if (w.attachEvent) {
|
||||
w.attachEvent("onresize", callMedia);
|
||||
}
|
||||
})(this);
|
5
web/Scripts/respond.matchmedia.addListener.min.js
vendored
Normal file
5
web/Scripts/respond.matchmedia.addListener.min.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
|
||||
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
|
||||
* */
|
||||
|
||||
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";if(a.matchMedia&&a.matchMedia("all").addListener)return!1;var b=a.matchMedia,c=b("only all").matches,d=!1,e=0,f=[],g=function(){a.clearTimeout(e),e=a.setTimeout(function(){for(var c=0,d=f.length;d>c;c++){var e=f[c].mql,g=f[c].listeners||[],h=b(e.media).matches;if(h!==e.matches){e.matches=h;for(var i=0,j=g.length;j>i;i++)g[i].call(a,e)}}},30)};a.matchMedia=function(e){var h=b(e),i=[],j=0;return h.addListener=function(b){c&&(d||(d=!0,a.addEventListener("resize",g,!0)),0===j&&(j=f.push({mql:h,listeners:i})),i.push(b))},h.removeListener=function(a){for(var b=0,c=i.length;c>b;b++)i[b]===a&&i.splice(b,1)},h}}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
|
5
web/Scripts/respond.min.js
vendored
Normal file
5
web/Scripts/respond.min.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
|
||||
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
|
||||
* */
|
||||
|
||||
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
|
15
web/Views/Account/Test.aspx
Normal file
15
web/Views/Account/Test.aspx
Normal file
@ -0,0 +1,15 @@
|
||||
<%@ Page Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
|
||||
<asp:Content ID="initContent" ContentPlaceHolderID="init" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="overHeaderOneContent" ContentPlaceHolderID="overHeaderOne" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="headerContent" ContentPlaceHolderID="header" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
@ -211,7 +211,7 @@ function addRow(){
|
||||
$.ajax({
|
||||
url: "<%=Url.Content("~/api/WorkFlow/Write?estid=")%>"+estid,
|
||||
type: "POST",
|
||||
data: wrt,
|
||||
data: JSON.stringify(wrt),
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
wrt.Id = Number(data);
|
||||
|
@ -31,6 +31,24 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
</sectionGroup>
|
||||
<section name="paypal" type="PayPal.SDKConfigHandler, PayPal" />
|
||||
</configSections>
|
||||
<!-- <system.runtime.serialization>
|
||||
<dataContractSerializer>
|
||||
<declaredTypes>
|
||||
<add>
|
||||
<knownType type="Yavsc.Model.Calendar.NominativeEventPub">
|
||||
</knownType>
|
||||
</add>
|
||||
</declaredTypes>
|
||||
</dataContractSerializer>
|
||||
</system.runtime.serialization> -->
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
<system.web>
|
||||
<!--
|
||||
Set compilation debug="true" to insert debugging
|
||||
@ -41,19 +59,10 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
<compilation defaultLanguage="C#" debug="true">
|
||||
<assemblies>
|
||||
<add assembly="System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="nunit.framework, Version=2.6.3.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
|
||||
<add assembly="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.IdentityModel.Selectors, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="nunit.framework, Version=2.6.4.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<customErrors mode="Off">
|
||||
@ -182,7 +191,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
</add>
|
||||
</providers>
|
||||
</skillProviders>
|
||||
<!-- <machineKey validationKey="" decryptionKey="" validation="SHA1" decryption="AES" /> -->
|
||||
<!-- <machineKey validationKey="" decryptionKey="" validation="SHA1" decryption="AES"/> -->
|
||||
<!--- <sessionState cookieless="true" regenerateExpiredSessionId="true" timeout="120"/> -->
|
||||
<trust level="High" />
|
||||
<catalog defaultProvider="XmlCatalogProvider">
|
||||
@ -202,7 +211,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
<!-- <system.web.extensions>
|
||||
<scripting>
|
||||
<webServices>
|
||||
<jsonSerialization maxJsonLength="20000" />
|
||||
<jsonSerialization maxJsonLength="20000"/>
|
||||
</webServices>
|
||||
</scripting>
|
||||
</system.web.extensions> -->
|
||||
@ -212,7 +221,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
</DbProviderFactories>
|
||||
</system.data>
|
||||
<system.net>
|
||||
<!-- not supported: <defaultProxy enabled="true" /> -->
|
||||
<!-- not supported: <defaultProxy enabled="true"/> -->
|
||||
<settings>
|
||||
<!-- This setting causes .NET to check certificate revocation lists (CRL)
|
||||
before trusting HTTPS certificates. But this setting tends to not
|
||||
@ -283,4 +292,4 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
<add key="GOOGLE_CLIENT_ID" value="[YOUR_GOOGLE_CLIENT_ID.apps.googleusercontent.com]" />
|
||||
<add key="GOOGLE_CLIENT_SECRET" value="[YOUR_GOOGLE_CLIENT_SECRET]" />
|
||||
</appSettings>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
128
web/Yavsc.csproj
128
web/Yavsc.csproj
@ -78,22 +78,13 @@
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Web.Http.WebHost" />
|
||||
<Reference Include="System.Web.Http" />
|
||||
<Reference Include="System.Web.Mvc" />
|
||||
<Reference Include="System.Web.WebPages" />
|
||||
<Reference Include="System.Net.Http.Formatting" />
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="System.Web.WebPages.Razor" />
|
||||
<Reference Include="nunit.framework">
|
||||
<Package>nunit</Package>
|
||||
</Reference>
|
||||
@ -115,22 +106,16 @@
|
||||
<Reference Include="Microsoft.Web.XmlTransform">
|
||||
<HintPath>..\packages\Mono.Web.Xdt.1.0.0\lib\Net40\Microsoft.Web.XmlTransform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework" />
|
||||
<Reference Include="System.Data.Entity" />
|
||||
<Reference Include="System.IdentityModel.Selectors" />
|
||||
<Reference Include="System.IdentityModel" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.WebPages.Deployment" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Data.Linq" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceModel.Web" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Npgsql">
|
||||
<HintPath>..\packages\Npgsql.3.0.4\lib\net45\Npgsql.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PayPalCoreSDK">
|
||||
<HintPath>..\packages\PayPalCoreSDK.1.7.0\lib\net451\PayPalCoreSDK.dll</HintPath>
|
||||
</Reference>
|
||||
@ -140,9 +125,102 @@
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin">
|
||||
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework">
|
||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer">
|
||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.Identity.Core">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Owin">
|
||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.Identity.Owin">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure">
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Optimization">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.SystemWeb">
|
||||
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.OAuth">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.Cookies">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.Google">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.Google.3.0.1\lib\net45\Microsoft.Owin.Security.Google.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.Facebook">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.Facebook.3.0.1\lib\net45\Microsoft.Owin.Security.Facebook.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.MicrosoftAccount">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.MicrosoftAccount.3.0.1\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebGrease">
|
||||
<HintPath>..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Net.Http.Primitives">
|
||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Extensions">
|
||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="Npgsql">
|
||||
<HintPath>..\packages\Npgsql.3.0.5\lib\net45\Npgsql.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.Identity.EntityFramework">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.Owin">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Admin\" />
|
||||
@ -183,6 +261,9 @@
|
||||
<Folder Include="App_Themes\base\" />
|
||||
<Folder Include="App_Themes\itclear\" />
|
||||
<Folder Include="App_Themes\itdark\" />
|
||||
<Folder Include="App_Start\" />
|
||||
<Folder Include="Models\Identity\" />
|
||||
<Folder Include="Providers\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
@ -239,6 +320,14 @@
|
||||
<Compile Include="Controllers\PayPalController.cs" />
|
||||
<Compile Include="ApiControllers\BackOfficeController.cs" />
|
||||
<Compile Include="WebApiConfig.cs" />
|
||||
<Compile Include="App_Start\Startup.Auth.cs" />
|
||||
<Compile Include="App_Start\Startup.cs" />
|
||||
<Compile Include="Models\Identity\AccountBindingModels.cs" />
|
||||
<Compile Include="Models\Identity\AccountViewModels.cs" />
|
||||
<Compile Include="Models\Identity\IdentityModels.cs" />
|
||||
<Compile Include="App_Start\IdentityConfig.cs" />
|
||||
<Compile Include="Providers\ApplicationOAuthProvider.cs" />
|
||||
<Compile Include="ApiControllers\ChallengeResult.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Web.config" />
|
||||
@ -785,11 +874,20 @@
|
||||
<Content Include="App_Themes\base\style.css" />
|
||||
<Content Include="Views\FrontOffice\Contact.aspx" />
|
||||
<Content Include="Views\FrontOffice\Sent.aspx" />
|
||||
<Content Include="Scripts\knockout-3.4.0.debug.js" />
|
||||
<Content Include="Scripts\knockout-3.4.0.js" />
|
||||
<Content Include="Scripts\respond.js" />
|
||||
<Content Include="Scripts\respond.matchmedia.addListener.js" />
|
||||
<Content Include="Scripts\respond.matchmedia.addListener.min.js" />
|
||||
<Content Include="Scripts\respond.min.js" />
|
||||
<Content Include="Views\Account\Test.aspx" />
|
||||
<Content Include="web.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<Import Project="WebDeploy.targets" />
|
||||
<Import Project="..\packages\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.1.0\build\portable-net45+win8+wp8+wpa81\xunit.core.props')" />
|
||||
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
|
||||
<ProjectExtensions>
|
||||
<MonoDevelop>
|
||||
<Properties>
|
||||
|
@ -1,22 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="cldrjs" version="0.4.1" targetFramework="net45" />
|
||||
<package id="Antlr" version="3.5.0.2" targetFramework="net451" />
|
||||
<package id="EntityFramework" version="6.1.3" targetFramework="net451" />
|
||||
<package id="jQuery" version="2.1.4" targetFramework="net45" />
|
||||
<package id="JQuery.GoogleMaps" version="2.2.4" targetFramework="net45" />
|
||||
<package id="jquery.mobile" version="1.4.5" targetFramework="net451" />
|
||||
<package id="jQuery.UI.Combined" version="1.11.4" targetFramework="net451" />
|
||||
<package id="jQuery.Validation" version="1.14.0" targetFramework="net451" />
|
||||
<package id="jquery-globalize" version="1.0.0" targetFramework="net45" />
|
||||
<package id="knockoutjs" version="3.4.0" targetFramework="net451" />
|
||||
<package id="log4net" version="2.0.5" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net451" />
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net451" />
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Ajax" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net451" />
|
||||
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net451" />
|
||||
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net451" />
|
||||
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net451" />
|
||||
<package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net451" />
|
||||
<package id="Microsoft.Owin.Security.Facebook" version="3.0.1" targetFramework="net451" />
|
||||
<package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net451" />
|
||||
<package id="Microsoft.Owin.Security.MicrosoftAccount" version="3.0.1" targetFramework="net451" />
|
||||
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net451" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net451" />
|
||||
<package id="Mono.Web.Xdt" version="1.0.0" targetFramework="net451" />
|
||||
<package id="Newtonsoft.Json" version="8.0.1" targetFramework="net451" />
|
||||
<package id="Npgsql" version="3.0.4" targetFramework="net451" />
|
||||
<package id="Npgsql" version="3.0.5" targetFramework="net451" />
|
||||
<package id="Owin" version="1.0" targetFramework="net451" />
|
||||
<package id="PayPalButtonManagerSDK" version="2.10.109" targetFramework="net451" />
|
||||
<package id="PayPalCoreSDK" version="1.7.0" targetFramework="net451" />
|
||||
<package id="Prettify" version="3.3.04.2013" targetFramework="net451" />
|
||||
<package id="Respond" version="1.4.2" targetFramework="net451" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net451" />
|
||||
<package id="xunit" version="2.1.0" targetFramework="net451" />
|
||||
<package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
|
||||
<package id="xunit.assert" version="2.1.0" targetFramework="net451" />
|
||||
|
10
web/web.config
Normal file
10
web/web.config
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
</system.webServer></configuration>
|
@ -3,7 +3,6 @@ using System.Configuration;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model.Circles;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Yavsc.Model.Blogs
|
||||
{
|
||||
|
@ -4,7 +4,6 @@ using Yavsc.Model.RolesAndMembers;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using Yavsc.Model.Circles;
|
||||
using System.Web.Mvc;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
@ -3,7 +3,6 @@ using System.Configuration;
|
||||
using System.Configuration.Provider;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Model.Circles;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Yavsc.Model.Blogs
|
||||
{
|
||||
|
@ -19,7 +19,6 @@
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
|
@ -20,7 +20,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
|
@ -20,7 +20,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
|
@ -20,7 +20,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
|
@ -20,7 +20,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
|
@ -20,8 +20,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model.Maps;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
{
|
||||
|
@ -20,7 +20,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
|
@ -20,7 +20,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
|
@ -20,9 +20,9 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Messaging;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
{
|
||||
|
@ -1,653 +0,0 @@
|
||||
2015-12-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* GoogleHelpers.cs: ça marchait avant, mais c'etait mal écrit
|
||||
et a cassé à la mise à niveau de la plateforme.
|
||||
|
||||
* SimpleJsonPostMethod.cs: using Newtonsoft.Json
|
||||
|
||||
2015-12-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* PerformerContact.cs: modèle de donnnée d'un message
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: traductions
|
||||
|
||||
* YavscModel.csproj: ajout du modèle de données d'un message
|
||||
|
||||
2015-12-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* UpdatePassword.cs: modèle de la modification de mot de passe
|
||||
au
|
||||
jeton de securité (qui est encore un fake en l'état)
|
||||
|
||||
* CommandRegistration.cs: un enregistrement de commande
|
||||
|
||||
* NominativeCommandRegistration.cs: un enregistrement de
|
||||
commande nominative
|
||||
|
||||
* Product.cs: utilise la période du calendrier
|
||||
|
||||
* Commande.cs: renvoie un objet à la prise de commande,
|
||||
indiquant l'identifiant de commande, et les messages envoyés
|
||||
en cas de commande nominative.
|
||||
|
||||
* GoogleHelpers.cs: icone à la notification mobile
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: traductions
|
||||
|
||||
* UserNameBase.cs: fixe la dé-sérialisation
|
||||
|
||||
* WorkFlowManager.cs: refabrication de la prise de commande
|
||||
|
||||
* YavscModel.csproj: nouveaux objets du modèle
|
||||
|
||||
* Period.cs: fondre la période: celle du catalogue disparait,
|
||||
au profit de celle du calendrier.
|
||||
|
||||
2015-12-24 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NominativeEventPub.cs: implémentation du nom de préstataire
|
||||
dans la notification nominative
|
||||
|
||||
* Commande.cs: code plus simple
|
||||
|
||||
* GoogleHelpers.cs:
|
||||
* MessageWithPayLoad.cs: fixe l'envoi de la notification GCM
|
||||
|
||||
* MessageWithPayloadResponse.cs: fixe la réception de la
|
||||
notification GCM
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: traductions
|
||||
|
||||
* WorkFlowManager.cs: envoyer un notification GCM + email à la
|
||||
demande de devis
|
||||
|
||||
* YavscModel.csproj: ajout d'une configuration de debuggage
|
||||
pour Lua
|
||||
|
||||
2015-12-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* WorkFlowManager.cs: une note à faire : envoyer le lieu de la
|
||||
prestation à la demande de devis
|
||||
|
||||
2015-12-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* EventCirclesPub.cs:
|
||||
* NominativeEventPub.cs: refabrication
|
||||
|
||||
* Commande.cs: implémente une description pour toute commande,
|
||||
dans la classe concrete
|
||||
|
||||
* SimpleBookingQuery.cs: la description d'une commande simple
|
||||
de rdv
|
||||
|
||||
* GoogleHelpers.cs: implemente l'envoi d'une notification
|
||||
nominative (à un prestataire en particulier)
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: traductions
|
||||
|
||||
* WorkFlowManager.cs: envoie une notification à la demande de
|
||||
devis d'un client
|
||||
|
||||
* YavscModel.csproj: notifications privée.
|
||||
|
||||
2015-12-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* INominative.cs: Interface d'un objet destiné à un
|
||||
préstataire spécifié,
|
||||
par une propriété `PerformerName`
|
||||
|
||||
|
||||
* NominativeSimpleBookingQuery.cs: implémente l'interface
|
||||
INominative
|
||||
|
||||
* UserFileSystemManager.cs: Fixe: Ne pas créer un dossier de
|
||||
destination si on a aucun fichier à recevoir.
|
||||
|
||||
* Commande.cs: * Ajoute le nom du client dans l'objet commande
|
||||
* Factorise le positionnement des paramêtres
|
||||
* La commande est une instance du type spécifié à la commande,
|
||||
dans son paramêtre `type`
|
||||
|
||||
* SimpleBookingQuery.cs: refabrication
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx: traducations
|
||||
|
||||
* UserNameBase.cs: implemente l'interface `IUserName`
|
||||
|
||||
|
||||
* IContentProvider.cs: doc xml
|
||||
|
||||
* YavscModel.csproj: reference le nouveau code source
|
||||
|
||||
* IUserName.cs: Définit l'interface d'un objet associé à un
|
||||
utilisateur.
|
||||
|
||||
2015-12-15 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* CircleMember.cs: un membre de cercle est un nom
|
||||
d'utilisateur associé au cercle d'un autre utilisateur.
|
||||
|
||||
* ICircle.cs: Définit l'interface d'un cercle:
|
||||
un cercle est identifié par un entier long,
|
||||
il a un possesseur.
|
||||
|
||||
* CircleBase.cs: un objet cercle basique implémente
|
||||
l'interface d'un cercle.
|
||||
|
||||
* PerformerProfile.cs: s'assure que le nom d'utilisateur
|
||||
utilisé n'est pas vide.
|
||||
|
||||
* IIdentified.cs: doc xml
|
||||
|
||||
* UserNameBase.cs: l'objet base de type "nom d'utilisateur"
|
||||
implémente l'interface générique
|
||||
d'un identifié, par une chaine de caractère.
|
||||
|
||||
* YavscModel.csproj: reference les nouvelles definitions :
|
||||
* un membre de cercle
|
||||
* l'interface d'un cercle
|
||||
|
||||
2015-12-09 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* CircleManager.cs: implémente les methodes utilisées à la
|
||||
construction du contrôle utilisateur.
|
||||
|
||||
* CircleProvider.cs: * doc xml
|
||||
* extension de interface
|
||||
|
||||
* Commande.cs: l'objet `Command` devient abstrait, pour
|
||||
exister (être instanciée), une commande doit maintenant
|
||||
hériter de cet objet abstrait.
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: traductions
|
||||
|
||||
* IContentProvider.cs: doc xml
|
||||
|
||||
2015-12-03 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: traductions
|
||||
|
||||
2015-12-02 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: traductions
|
||||
|
||||
2015-12-02 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* PerformerProfile.cs: Ajoute la propriété "titre du blog"
|
||||
`BlogTitle` du profile préstataire
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: internationalisation
|
||||
|
||||
2015-12-01 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: traductions
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* BlogProvider.cs: doc xml
|
||||
|
||||
* BlogManager.cs: implémente un accès au compteur de billet
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* PerformerProfile.cs: doc xml
|
||||
|
||||
* SimpleBookingQuery.cs:
|
||||
* AuthentificatedSkillRating.cs: refabrication
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: internationalisation
|
||||
|
||||
* Profile.cs: Décore la valeur de profile "GoogleRegId"
|
||||
|
||||
* SkillEntity.cs: refabrication pour l'instant inutile ...
|
||||
|
||||
* SkillManager.cs: présente à l'espace de travail la nouvelle
|
||||
methode de recherche d'un préstataire
|
||||
|
||||
* SkillProvider.cs: définit la nouvelle methode de recherche
|
||||
d'un préstataire
|
||||
|
||||
* WorkFlowManager.cs: présente à l'espace de travail une
|
||||
nouvelle methode de recherche d'un préstataire,
|
||||
renvoyant toute l'information relative à chaque prestataire
|
||||
listé.
|
||||
|
||||
* YavscModel.csproj: refabrication des cotes de compétences
|
||||
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* SkillManager.cs:
|
||||
* Notification.cs:
|
||||
* Notification.cs:
|
||||
* MessageWithPayLoad.cs:
|
||||
* MessageWithPayloadResponse.cs: refabrication
|
||||
|
||||
* BookingQuery.cs: Le booking lourd devient une commande basée
|
||||
sur des activités concernée par l'intervention
|
||||
|
||||
* ChangeLog: nettoyage
|
||||
|
||||
* CatalogProvider.cs: implemente l'interface d'un fournissseur
|
||||
de contenu
|
||||
|
||||
* PerformerProfile.cs: implemente le profile prestataire
|
||||
|
||||
* SimpleBookingQuery.cs: Les besoin sont exprimé sous forme
|
||||
d'un tableau de valeur du parametrage de la commande
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: internationalisation
|
||||
|
||||
* Profile.cs: implemente un accès à l'id d'enregistrement
|
||||
Google GCM
|
||||
|
||||
* SkillEntity.cs: La compétence appartient à un domaine
|
||||
d'activité, on lui associe un et un seul code APE
|
||||
|
||||
* SkillProvider.cs: Fait chercher les compétences à partir
|
||||
d'un code activité
|
||||
|
||||
* IContentProvider.cs: xml doc
|
||||
|
||||
* WorkFlowManager.cs: implemente l'accès à la liste des
|
||||
préstataires
|
||||
de telle activité
|
||||
|
||||
* YavscModel.csproj: refabrications
|
||||
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* YavscModel.csproj:
|
||||
* LocalizedText.resx:
|
||||
* Entity.cs:
|
||||
* OAuth2.cs:
|
||||
* SkillEntity.cs:
|
||||
* SkillManager.cs:
|
||||
* LocalizedText.fr.resx:
|
||||
* SkillProvider.cs:
|
||||
* PeopleApi.cs:
|
||||
* MapTracks.cs:
|
||||
* ApiClient.cs:
|
||||
* Entity.cs:
|
||||
* OAuth2.cs:
|
||||
* SimpleJsonPostMethod.cs:
|
||||
* BookingQuery.cs:
|
||||
* CalendarApi.cs:
|
||||
* LocalizedText.Designer.cs:
|
||||
* Notification.cs:
|
||||
* EntityQuery.cs:
|
||||
* ApiClient.cs:
|
||||
* MapTracks.cs:
|
||||
* PeopleApi.cs:
|
||||
* WorkFlowManager.cs:
|
||||
* GoogleHelpers.cs:
|
||||
* EntityQuery.cs:
|
||||
* LocalizedText.fr.Designer.cs:
|
||||
* IContentProvider.cs:
|
||||
* CalendarApi.cs:
|
||||
* GoogleHelpers.cs:
|
||||
* PerformerProfile.cs:
|
||||
* SimpleBookingQuery.cs:
|
||||
* Notification.cs:
|
||||
* PerformerAvailability.cs:
|
||||
* CatalogProvider.cs:
|
||||
* MessageWithPayLoad.cs:
|
||||
* MessageWithPayloadResponse.cs:
|
||||
|
||||
* Profile.cs: internationalisation
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: internationalisation
|
||||
|
||||
* YavscModel.csproj: nouvelles configurations de déploiement
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* EventPub.cs:
|
||||
* BaseEvent.cs: internationalise l'évennement (la base d'une
|
||||
notification)
|
||||
|
||||
* YaEvent.cs: les champs fournisseur d'une notification ne
|
||||
sont pas requis. On peut en avoir de la part du site lui même,
|
||||
qui ne soient pas à l'origine d'un evennement tiers du
|
||||
workflow. Dans tous les autres cas, ils devraient être
|
||||
renseignés ... à suivre.
|
||||
|
||||
* Circle.cs:
|
||||
* CircleBase.cs: ajoute une methode de construition des
|
||||
destinataires à partir d'un tableau d'identifiants de cercles.
|
||||
|
||||
* Activity.cs: implémente la photo activité dans le modèle
|
||||
|
||||
* SimpleBookingQuery.cs: refabriqué
|
||||
|
||||
* MessageWithPayLoad.cs: accuse aussi le champ `to` en cas
|
||||
d'absence de destinataire.
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: internationalisation
|
||||
|
||||
2015-11-25 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* BlogManager.cs: refactorisation
|
||||
|
||||
* Activity.cs: implémente un type de commande à associer à une
|
||||
activité.
|
||||
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: La traduction de "ne pas
|
||||
publier mon activité"
|
||||
|
||||
* LocalizedText.resx: La traduction de "ne pas publier mon
|
||||
activité", et de "Votre activité"
|
||||
|
||||
|
||||
* ManagerHelper.cs: refabrique l'instanciation des
|
||||
fournisseurs du workflow,
|
||||
pour avoir une liste de toutes les activité prises en charges
|
||||
par tous les fournisseurs de contenu.
|
||||
|
||||
|
||||
* Profile.cs: Implement le code activité de l'objet `Profile`
|
||||
|
||||
* ProfileEdition.cs: xmldoc
|
||||
|
||||
* SkillManager.cs: Formattage du code source
|
||||
|
||||
* IContentProvider.cs: reformattage du code+
|
||||
propriété "Name" du fournisseur +
|
||||
definition des methodes relatives à la gestion des activités
|
||||
|
||||
* WorkFlowManager.cs: Methodes de recupperation des activités
|
||||
fournies auprés des fournisseurs de contenu
|
||||
|
||||
* YavscModel.csproj: renommage
|
||||
|
||||
2015-11-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Estimate.cs:
|
||||
* IContentProvider.cs: refactorisation fournisseurs
|
||||
|
||||
* IDataProvider.cs: Permet aux fournisseurs d'identifier les
|
||||
contenus avec un type de donnée arbitraire,
|
||||
du moment que ce type identifie les contenus.
|
||||
|
||||
2015-11-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Manager.cs: implémente la fonction de construction des
|
||||
fournisseurs définis par une interface (sans type, ni concret,
|
||||
ni abstrait, comme ceux du workflow).
|
||||
|
||||
* WorkFlowManager.cs: refactorisation: utiliser le code commun
|
||||
pour instancier le fournisseur de données.
|
||||
|
||||
2015-11-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ITitle.cs:
|
||||
* RssFeeds.cs:
|
||||
* Blog.cs:
|
||||
* BasePost.cs:
|
||||
* YaEvent.cs:
|
||||
* Estimate.cs:
|
||||
* BaseEvent.cs:
|
||||
* Activity.cs:
|
||||
* UTBlogEntryCollection.cs:
|
||||
* UUTBlogEntryCollection.cs: refactorisation: Les titres
|
||||
obtiennent une interface logicielle dédiée.
|
||||
|
||||
* PerformerProfile.cs: refactorisation: Les identifiant
|
||||
deviennent génériques
|
||||
|
||||
* IRating.cs:
|
||||
* IComment.cs:
|
||||
* IIdentified.cs: refactorisation: Les identifiant et
|
||||
commentaires deviennent génériques
|
||||
|
||||
* ITagBackup.cs: refactorisation: un meilleur nom pour cette
|
||||
interface qui n'a pas encore d'implementeur.
|
||||
|
||||
* UserNameBase.cs: xml doc
|
||||
|
||||
* UserSkill.cs:
|
||||
* UserSkillComment.cs: Les commentaire deviennent génériques
|
||||
|
||||
* OtherWebException.cs: classe obsolete
|
||||
|
||||
* ViewRenderer.cs: classe obsolète
|
||||
|
||||
* YavscModel.csproj: nettoyages de classes obsoletes, ajout
|
||||
des nouvelles interfaces et de la classe de base implementant
|
||||
l' "activité".
|
||||
|
||||
2015-11-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* SimpleBookingQuery.cs: Implémente une simple commande de
|
||||
rendez-vous,
|
||||
en tant que commande du workflow.
|
||||
|
||||
* PerformerProfile.cs: S'assure d'avoir une valeur pour le nom
|
||||
d'utilisateur à la création.
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.Designer.cs: "date préférée" en anglais
|
||||
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.fr.Designer.cs: "date préférée" en français
|
||||
|
||||
* Profile.cs: à la creation d'un profile, on doit avoir un nom
|
||||
d'utilisateur,
|
||||
même dans le cas où le profile est anonyme (dans ce cas,
|
||||
on l'appelle identifiant anonyme).
|
||||
Sinon, on lève une exception.
|
||||
|
||||
* SkillEntity.cs:
|
||||
* SkillManager.cs:
|
||||
* SkillProvider.cs: refactorisation (-Skill+SkillEntity)
|
||||
|
||||
* YavscModel.csproj: * refactorisation: le nom `Skill` est
|
||||
celui de l'espace,
|
||||
celui de la classe devient `SkillEntity`.
|
||||
* Creation de la requête dite simple d'un rendez-vous (pour
|
||||
prestation)
|
||||
à une date donnée (sans heure), concernant simplement une
|
||||
activité.
|
||||
|
||||
2015-11-22 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* YavscModel.csproj:
|
||||
* Commande.cs:
|
||||
* WorkFlowManager.cs:
|
||||
* WebFileSystemManager.cs:
|
||||
* UserFileSystemManager.cs: refactorisation du code, en vue de
|
||||
la mise en place
|
||||
de la commande sans enregistrement du client sur le site.
|
||||
|
||||
2015-11-21 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* UserNameBase.cs: Permet l'usage des espaces dans les noms
|
||||
d'utilisateurs,
|
||||
à la création legacy, ou autres usage du nom d'utilisateur.
|
||||
|
||||
2015-11-19 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* YavscModel.csproj: Lua config
|
||||
|
||||
2015-11-17 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* PerformerProfile.cs: implements a performer profile
|
||||
|
||||
* SkillManager.cs:
|
||||
* SkillProvider.cs: Makes the method rendering skills return a
|
||||
PerformerProfile object
|
||||
|
||||
* YavscModel.csproj: replaces the UserSkillProfile with the
|
||||
PerformerProfile class
|
||||
|
||||
* UserSkillProfile.cs: obsolete
|
||||
|
||||
2015-11-17 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* IRating.cs:
|
||||
* IComment.cs:
|
||||
* IIdentified.cs:
|
||||
* IAuthorized.cs:
|
||||
* BasePost.cs:
|
||||
* SkillProvider.cs: refactorization
|
||||
|
||||
* Skill.cs:
|
||||
* YavscModel.csproj:
|
||||
* UserSkill.cs:
|
||||
* SkillManager.cs:
|
||||
* UserSkillRating.cs:
|
||||
* UserSkillProfile.cs:
|
||||
* UserSkillReference.cs:
|
||||
* UserSkillDeclaration.cs: implements the skill data model
|
||||
|
||||
* UserSkillComment.cs: defines an user's skill comment
|
||||
|
||||
* GDate.cs:
|
||||
* YaEvent.cs:
|
||||
* BlogProvider.cs:
|
||||
* CircleBase.cs:
|
||||
* Profile.cs:
|
||||
* CalendarListEntry.cs:
|
||||
* CalendarEventList.cs:
|
||||
* UserRole.cs:
|
||||
* ICalendarManager.cs:
|
||||
* ProfileEdition.cs:
|
||||
* LostPasswordModel.cs:
|
||||
* RegisterClientModel.cs: xmldoc
|
||||
|
||||
* LocalizedText.fr.resx: skills
|
||||
|
||||
* Manager.cs: throws an exception when implementation for the
|
||||
provider was not found
|
||||
|
||||
* IDataProvider.cs: xml doc
|
||||
|
||||
2015-11-14 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* IRated.cs:
|
||||
* BlogHelper.cs:
|
||||
* ICalendarManager.cs:
|
||||
|
||||
* Manager.cs:
|
||||
* BookingQuery.cs: refactoring
|
||||
|
||||
* Manager.cs:
|
||||
* YavscModel.csproj:
|
||||
* SkillRating.cs:
|
||||
* SkillManager.cs:
|
||||
* SkillRating.cs:
|
||||
* SkillProvider.cs:
|
||||
* SkillManager.cs:
|
||||
* SkillProvider.cs:
|
||||
* SkillDeclaration.cs:
|
||||
* SkillDeclaration.cs: VIP skills
|
||||
|
||||
* BasePost.cs: One may rate a bill
|
||||
|
||||
* BlogProvider.cs: The blogs provider takes BlogEntry objects
|
||||
at Update time
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: WIP skills
|
||||
|
||||
* Profile.cs: prettifies the code, as long as the profile
|
||||
providers does'nt return any more DBNull values
|
||||
|
||||
* BlogManager.cs: Uses the static ManagerHelper class to get
|
||||
the configuration
|
||||
|
||||
2015-11-11 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* BasePost.cs: all BasePost contains a rate
|
||||
|
||||
* BasePostInfo.cs: due to base implementation
|
||||
|
||||
* BlogEntry.cs: code formatting
|
||||
|
||||
* BlogManager.cs: Fixes the taginfo object delivering
|
||||
|
||||
* BlogProvider.cs: refactoring
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: localizes UserInRole
|
||||
|
||||
* LoginModel.cs: enables spaces in the legacy login names
|
||||
|
||||
* Profile.cs: gives users the theme choice
|
||||
|
||||
2015-11-08 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* LoginModel.cs:
|
||||
* UserNameBase.cs: enables legacy login with spaces in the
|
||||
user name
|
||||
|
||||
* ProfileEdition.cs: xml doc
|
||||
|
||||
2015-11-06 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* ChangeLog:
|
||||
* TagInfo.cs:
|
||||
* BasePost.cs:
|
||||
* LocalizedText.resx:
|
||||
* BlogEntry.cs:
|
||||
* BlogManager.cs:
|
||||
* BlogProvider.cs:
|
||||
* BookQuery.cs:
|
||||
* BasePostInfo.cs:
|
||||
* LocalizedText.fr.resx:
|
||||
* IFreeDateSet.cs:
|
||||
* LocalizedText.Designer.cs:
|
||||
* Notification.cs:
|
||||
* LocalizedText.fr.Designer.cs:
|
||||
* ICalendarManager.cs:
|
||||
* BlogEntryCollection.cs:
|
||||
* ProfileEdition.cs:
|
||||
* WebFileSystemManager.cs:
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Yavsc.Model.FrontOffice.Catalog
|
||||
{
|
||||
|
@ -24,7 +24,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Threading;
|
||||
using System.Web.Mvc;
|
||||
using System.Configuration;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
|
@ -24,7 +24,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Threading;
|
||||
using System.Web.Mvc;
|
||||
using System.Configuration;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
|
@ -24,7 +24,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Threading;
|
||||
using System.Web.Mvc;
|
||||
using System.Configuration;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
|
@ -24,7 +24,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Threading;
|
||||
using System.Web.Mvc;
|
||||
using System.Configuration;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
|
@ -23,7 +23,6 @@ using System;
|
||||
using System.Configuration;
|
||||
using System.Collections.Specialized;
|
||||
using System.Data;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Yavsc.Model
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
//
|
||||
// Startup.Auth.cs
|
||||
//
|
||||
// Location.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015 GNU GPL
|
||||
// Copyright (c) 2016 GNU GPL
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
@ -18,15 +18,14 @@
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc
|
||||
namespace Yavsc.Model.Maps
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup ()
|
||||
{
|
||||
}
|
||||
public class Location : Position {
|
||||
public string Address { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,11 +20,11 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
namespace Yavsc.Model.Maps
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Position.
|
||||
/// </summary>
|
||||
@ -34,7 +34,9 @@ namespace Yavsc.Model.Calendar
|
||||
/// The longitude.
|
||||
/// </summary>
|
||||
public double Longitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// The latitude.
|
||||
/// </summary>
|
||||
public double Latitude { get; set; }
|
@ -20,11 +20,11 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.Maps;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
namespace Yavsc.Messaging
|
||||
{
|
||||
/// <summary>
|
||||
/// Base event.
|
||||
@ -48,7 +48,7 @@ namespace Yavsc.Model.Calendar
|
||||
/// The location.
|
||||
/// </summary>
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="Location")]
|
||||
public Position Location { get; set; }
|
||||
public Location Location { get; set; }
|
||||
/// <summary>
|
||||
/// The start date.
|
||||
/// </summary>
|
@ -20,9 +20,9 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model.Calendar;
|
||||
using Yavsc.Model.Maps;
|
||||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
|
@ -20,7 +20,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Yavsc.Model.WorkFlow
|
||||
{
|
||||
|
@ -74,16 +74,39 @@
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Web.Mvc" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="MarkdownDeep">
|
||||
<HintPath>..\web\lib\MarkdownDeep.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure">
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\packages\Newtonsoft.Json.8.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@ -114,7 +137,6 @@
|
||||
<Compile Include="Google\SignIn.cs" />
|
||||
<Compile Include="Google\CalendarList.cs" />
|
||||
<Compile Include="Google\CalendarListEntry.cs" />
|
||||
<Compile Include="IRenderer.cs" />
|
||||
<Compile Include="RssFeeds.cs" />
|
||||
<Compile Include="FrontOffice\Commande.cs" />
|
||||
<Compile Include="FrontOffice\Catalog\Brand.cs" />
|
||||
@ -161,7 +183,6 @@
|
||||
<Compile Include="Calendar\OpenDay.cs" />
|
||||
<Compile Include="Calendar\Period.cs" />
|
||||
<Compile Include="Calendar\Periodicity.cs" />
|
||||
<Compile Include="Calendar\Position.cs" />
|
||||
<Compile Include="Calendar\PositionAndKeyphrase.cs" />
|
||||
<Compile Include="Calendar\ProvidedEvent.cs" />
|
||||
<Compile Include="Calendar\Schedule.cs" />
|
||||
@ -228,7 +249,6 @@
|
||||
<Compile Include="FrontOffice\Activity.cs" />
|
||||
<Compile Include="ITagBackup.cs" />
|
||||
<Compile Include="ITitle.cs" />
|
||||
<Compile Include="Calendar\BaseEvent.cs" />
|
||||
<Compile Include="ManagerHelper.cs" />
|
||||
<Compile Include="Google\Api\ApiClient.cs" />
|
||||
<Compile Include="Google\Api\CalendarApi.cs" />
|
||||
@ -256,6 +276,9 @@
|
||||
<Compile Include="WorkFlow\NominativeCommandRegistration.cs" />
|
||||
<Compile Include="RolesAndMembers\UpdatePassword.cs" />
|
||||
<Compile Include="FrontOffice\PerformerContact.cs" />
|
||||
<Compile Include="Maps\Position.cs" />
|
||||
<Compile Include="Maps\Location.cs" />
|
||||
<Compile Include="Messaging\BaseEvent.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
@ -271,6 +294,7 @@
|
||||
<Folder Include="RolesAndMembers\" />
|
||||
<Folder Include="Messaging\" />
|
||||
<Folder Include="Skill\" />
|
||||
<Folder Include="Maps\" />
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<MonoDevelop>
|
||||
@ -291,4 +315,7 @@
|
||||
<LastGenOutput>LocalizedText.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
</Project>
|
8
yavscModel/packages.config
Normal file
8
yavscModel/packages.config
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net451" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net451" />
|
||||
<package id="Newtonsoft.Json" version="8.0.1" targetFramework="net451" />
|
||||
</packages>
|
Reference in New Issue
Block a user