Will now also RUN in vs2015 (plus other small fixes)
This commit is contained in:
@@ -724,4 +724,5 @@
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\AutoMapper.3.3.1\tools\AutoMapper.targets" Condition="Exists('..\packages\AutoMapper.3.3.1\tools\AutoMapper.targets')" />
|
||||
</Project>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AutoMapper" version="5.1.1" targetFramework="net45" />
|
||||
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
||||
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net45" />
|
||||
<package id="HtmlAgilityPack.CssSelectors" version="1.0.2" targetFramework="net45" />
|
||||
<package id="iTextSharp-LGPL" version="4.1.6" targetFramework="net45" />
|
||||
@@ -9,6 +9,6 @@
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||
<package id="NGeoIP" version="1.0.1" targetFramework="net45" />
|
||||
<package id="NUnit" version="3.5.0" targetFramework="net45" />
|
||||
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
|
||||
<package id="RestSharp" version="104.5.0" targetFramework="net45" />
|
||||
<package id="SharpZipLib.Portable" version="0.86.0.0003" targetFramework="net45" />
|
||||
</packages>
|
||||
@@ -99,6 +99,27 @@ namespace Swarmops.Frontend
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Authority InitAuthority()
|
||||
{
|
||||
try
|
||||
{
|
||||
Authority authority = CommonV5.GetAuthenticationDataAndCulture(HttpContext.Current).Authority;
|
||||
return authority;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// if this fails FOR WHATEVER REASON then we're not authenticated
|
||||
System.Web.Security.FormsAuthentication.SignOut();
|
||||
|
||||
if (!HttpContext.Current.Request.Path.ToLowerInvariant().StartsWith("/security/login"))
|
||||
{
|
||||
// If we're not already on the login page, put us on the login page leading to Dashboard
|
||||
HttpContext.Current.Response.Redirect("/");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static string JavascriptEscape (string input)
|
||||
{
|
||||
if (String.IsNullOrEmpty (input))
|
||||
|
||||
@@ -35,18 +35,7 @@ namespace Swarmops.Frontend
|
||||
|
||||
protected override void OnInit (EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this._authority = CommonV5.GetAuthenticationDataAndCulture (HttpContext.Current).Authority;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// if this fails FOR WHATEVER REASON then we're not authenticated
|
||||
this._authority = null;
|
||||
FormsAuthentication.SignOut();
|
||||
Response.Redirect ("/");
|
||||
}
|
||||
|
||||
this._authority = CommonV5.InitAuthority();
|
||||
base.OnInit (e);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AjaxToggleSlider.ascx.cs" Inherits="Swarmops.Frontend.Controls.Base.AjaxToggleSlider" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var _initVal_<%=this.TextInput.ClientID%> = $('#<%=this.TextInput.ClientID%>').val();
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#<%=this.TextInput.ClientID%>').blur(function() {
|
||||
|
||||
var currentValue = $('#<%=this.TextInput.ClientID%>').val();
|
||||
|
||||
if (currentValue != _initVal_<%=this.TextInput.ClientID%>) {
|
||||
var jsonData = {};
|
||||
jsonData.newValue = currentValue;
|
||||
jsonData.cookie = '<%=this.Cookie%>';
|
||||
|
||||
// The AJAX call expects the following function prototype:
|
||||
//
|
||||
// [WebMethod]
|
||||
// public static AjaxInputCallbackResult FunctionName (string newValue, string cookie);
|
||||
//
|
||||
// The page must include IncludedControls.JsonParameters and IncludedControls.ColorAnimation among its script.
|
||||
|
||||
$(this).css('background-color', '#FFFFA0');
|
||||
|
||||
if ("" != "<%=this.AjaxCallbackUrl%>") { // if there's a direct callback AJAX url
|
||||
|
||||
SwarmopsJS.ajaxCall(
|
||||
"<%=this.AjaxCallbackUrl%>",
|
||||
jsonData,
|
||||
$.proxy(function(msg) {
|
||||
if (msg.Success == false) {
|
||||
if (msg.DisplayMessage != null) {
|
||||
alertify.error(msg.DisplayMessage);
|
||||
} else {
|
||||
alertify.error(SwarmopsJS.unescape('<%= this.Localized_AjaxGeneralErrorSettingValue %>'));
|
||||
}
|
||||
$(this).css('background-color', '#FFA0A0');
|
||||
} else {
|
||||
if (msg.DisplayMessage != null) {
|
||||
alertify.log(msg.DisplayMessage);
|
||||
}
|
||||
$(this).css('background-color', '#E0FFE0');
|
||||
_initVal_<%=this.TextInput.ClientID%> = msg.NewValue;
|
||||
}
|
||||
$(this).val(_initVal_<%=this.TextInput.ClientID%>);
|
||||
$(this).animate({ backgroundColor: "#FFFFFF" }, 250);
|
||||
<%
|
||||
|
||||
if (!string.IsNullOrEmpty(this.OnChange))
|
||||
{
|
||||
if (string.IsNullOrEmpty (this.Cookie))
|
||||
{
|
||||
Response.Write (this.OnChange + "(msg.NewValue);"); // JavaScript callback on successful change
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Write (this.OnChange + "(msg.NewValue, '" + this.Cookie + "');"); // JavaScript callback on successful change
|
||||
}
|
||||
}
|
||||
|
||||
%>
|
||||
}, this),
|
||||
$.proxy(function(msg) {
|
||||
alertify.error(SwarmopsJS.unescape('<%= this.Localized_AjaxCallException %>'));
|
||||
$(this).val(_initVal_<%=this.TextInput.ClientID%>);
|
||||
$(this).css('background-color', '#FFA0A0');
|
||||
$(this).animate({ backgroundColor: "#FFFFFF" }, 250);
|
||||
}, this)
|
||||
);
|
||||
} else {
|
||||
// if there's no AJAX callback URL given, the javascript handler must take care of it
|
||||
// Resharper marks this code as unused because it falsely thinks the if condition above is always true
|
||||
|
||||
<%=this.OnChange%> (currentValue, '<%=this.Cookie%>', '<%=this.ClientID%>'); // JavaScript callback on successful change
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
function <%=this.ClientID%>_disable() {
|
||||
$('#<%=this.TextInput.ClientID%>').attr ('disabled', 'disabled');
|
||||
}
|
||||
|
||||
function <%=this.ClientID%>_enable() {
|
||||
$('#<%=this.TextInput.ClientID%>').removeAttr('disabled');
|
||||
}
|
||||
|
||||
function <%=this.ClientID%>_setValue(newValue) {
|
||||
$('#<%=this.TextInput.ClientID%>').val(newValue);
|
||||
}
|
||||
|
||||
function <%=this.ClientID%>_initialize(initValue) {
|
||||
_initVal_<%=this.TextInput.ClientID%> = initValue;
|
||||
<%=this.ClientID%>_setValue(initValue);
|
||||
<%=this.ClientID%>_enable();
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<asp:Label runat="server" ID="ToggleSliderLabel"></asp:Label>
|
||||
<div class="toggle-iphone toggle-padding"><asp:Checkbox ID="SliderCheckbox" runat="server"/></div>
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace Swarmops.Frontend.Controls.Base
|
||||
{
|
||||
public partial class AjaxToggleSlider : ControlV5Base
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Label { get; set; }
|
||||
public string CallbackUrl { get; set; }
|
||||
public string OnClientChange { get; set; }
|
||||
public string Cookie { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Swarmops.Frontend.Controls.Base {
|
||||
|
||||
|
||||
public partial class AjaxToggleSlider {
|
||||
|
||||
/// <summary>
|
||||
/// ToggleSliderLabel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label ToggleSliderLabel;
|
||||
|
||||
/// <summary>
|
||||
/// SliderCheckbox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox SliderCheckbox;
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<!-- style sheet, followed by script style sheets -->
|
||||
<asp:PlaceHolder ID="NeededForCacheMarkToParse1" runat="server">
|
||||
<link href="/Style/style-v5.css?CacheId=<%= _cacheVersionMark %>" rel="stylesheet" type="text/css" />
|
||||
<link href="/Style/style-v5.css?CacheId=<%= this._cacheVersionMark %>" rel="stylesheet" type="text/css" />
|
||||
</asp:PlaceHolder>
|
||||
<link href="/Style/jquery.qtip.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/Style/jquery.toggles.css" rel="stylesheet" type="text/css" />
|
||||
@@ -41,11 +41,11 @@
|
||||
<!-- external packages that are commonly used (on practically all pages) -->
|
||||
<Swarmops5:ExternalScripts ID="ExternalScriptEasyUI" Package="easyui" runat="server" />
|
||||
<asp:PlaceHolder ID="NeededForCacheMarkToParse2" runat="server">
|
||||
<link href="/Style/v5-easyui-overrides.css?CacheId=<%= _cacheVersionMark %>" rel="stylesheet" type="text/css" />
|
||||
<link href="/Style/v5-easyui-overrides.css?CacheId=<%= this._cacheVersionMark %>" rel="stylesheet" type="text/css" />
|
||||
</asp:PlaceHolder>
|
||||
|
||||
<!-- Swarmops common JS functions, incl. EasyUI behavior overrides -->
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/Swarmops-v5.js?CacheId=<%= _cacheVersionMark %>" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/Swarmops-v5.js?CacheId=<%= this._cacheVersionMark %>" ></script>
|
||||
|
||||
<!-- additional scripts etc from individual pages -->
|
||||
<Swarmops5:IncludedScripts ID="IncludedScripts" runat="server" />
|
||||
|
||||
@@ -6,21 +6,46 @@
|
||||
<head id="Head1" runat="server">
|
||||
|
||||
<!-- jQuery and plugins -->
|
||||
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/jquery.json.min.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/jquery.tmpl.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/jquery.toggles.min.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/jquery.leanModal.min.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/jquery.color.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/jquery.animate-shadow.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/jquery.qtip.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/hoverIntent.min.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/superfish.js" ></script>
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/jquery.json.min.js" ></script>
|
||||
|
||||
<!-- fonts -->
|
||||
<link href='https://fonts.googleapis.com/css?family=Permanent+Marker' rel='stylesheet' type='text/css' />
|
||||
<link href='https://fonts.googleapis.com/css?family=Ubuntu:light,regular,500,bold' rel='stylesheet' type='text/css' />
|
||||
<link href='https://fonts.googleapis.com/css?family=Arimo:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css' />
|
||||
|
||||
<!-- page title -->
|
||||
<title>Swarmops Alpha - Login</title>
|
||||
|
||||
<link href="/Style/style-v5.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- style sheet, followed by script style sheets -->
|
||||
<asp:PlaceHolder ID="NeededForCacheMarkToParse1" runat="server">
|
||||
<link href="/Style/style-v5.css?CacheId=<%= _cacheVersionMark %>" rel="stylesheet" type="text/css" />
|
||||
</asp:PlaceHolder>
|
||||
<link href="/Style/jquery.qtip.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/Style/jquery.toggles.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/Style/alertify.core.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/Style/alertify.default.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/Style/superfish.css" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" />
|
||||
|
||||
<!-- external packages that are commonly used (on practically all pages) -->
|
||||
<Swarmops5:ExternalScripts ID="ExternalScriptEasyUI" Package="easyui" runat="server" />
|
||||
<asp:PlaceHolder ID="NeededForCacheMarkToParse2" runat="server">
|
||||
<link href="/Style/v5-easyui-overrides.css?CacheId=<%= _cacheVersionMark %>" rel="stylesheet" type="text/css" />
|
||||
</asp:PlaceHolder>
|
||||
|
||||
<!-- Swarmops common JS functions, incl. EasyUI behavior overrides -->
|
||||
<script language="javascript" type="text/javascript" src="/Scripts/Swarmops-v5.js?CacheId=<%= _cacheVersionMark %>" ></script>
|
||||
|
||||
<!-- page title -->
|
||||
|
||||
<title>Swarmops Alpha - Login</title>
|
||||
|
||||
<!-- custom styles -->
|
||||
|
||||
|
||||
@@ -162,6 +162,13 @@ namespace Swarmops.Pages.Security
|
||||
this.ImageCultureIndicator.Style[HtmlTextWriterStyle.MarginRight] = "3px";
|
||||
this.ImageCultureIndicator.Style[HtmlTextWriterStyle.Cursor] = "pointer";
|
||||
|
||||
_cacheVersionMark = Logic.Support.Formatting.SwarmopsVersion;
|
||||
if (_cacheVersionMark.StartsWith("Debug"))
|
||||
{
|
||||
_cacheVersionMark = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss.ffff");
|
||||
}
|
||||
_cacheVersionMark = SHA1.Hash(_cacheVersionMark).Replace(" ", "").Substring(0, 8);
|
||||
|
||||
Localize();
|
||||
|
||||
// Generate BitID tokens
|
||||
@@ -192,6 +199,8 @@ namespace Swarmops.Pages.Security
|
||||
}
|
||||
|
||||
|
||||
protected string _cacheVersionMark; // CSS cache buster
|
||||
|
||||
protected void ProcessRespondBitId (BitIdCredentials credentials, HttpResponse response)
|
||||
{
|
||||
BitcoinPubKeyAddress testAddress = new BitcoinPubKeyAddress (credentials.address);
|
||||
|
||||
Generated
+27
@@ -21,6 +21,33 @@ namespace Swarmops.Pages.Security {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
|
||||
|
||||
/// <summary>
|
||||
/// NeededForCacheMarkToParse1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.PlaceHolder NeededForCacheMarkToParse1;
|
||||
|
||||
/// <summary>
|
||||
/// ExternalScriptEasyUI control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::Swarmops.Frontend.Controls.UI.ExternalScripts ExternalScriptEasyUI;
|
||||
|
||||
/// <summary>
|
||||
/// NeededForCacheMarkToParse2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.PlaceHolder NeededForCacheMarkToParse2;
|
||||
|
||||
/// <summary>
|
||||
/// form2 control.
|
||||
/// </summary>
|
||||
|
||||
@@ -85,6 +85,13 @@
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controls\v5\Base\AjaxToggleSlider.ascx.cs">
|
||||
<DependentUpon>AjaxToggleSlider.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\v5\Base\AjaxToggleSlider.ascx.designer.cs">
|
||||
<DependentUpon>AjaxToggleSlider.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\v5\Admin\BitcoinEchoTest.aspx.cs">
|
||||
<DependentUpon>BitcoinEchoTest.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -610,6 +617,7 @@
|
||||
<Content Include="Automation\Json-TransactionTagsTree.aspx" />
|
||||
<Content Include="Automation\SwarmFunctions.aspx" />
|
||||
<Content Include="Controls\v5\Base\AjaxTextBox.ascx" />
|
||||
<Content Include="Controls\v5\Base\AjaxToggleSlider.ascx" />
|
||||
<Content Include="Controls\v5\Base\ComboGeographies.ascx" />
|
||||
<Content Include="Controls\v5\Base\DropDown.ascx" />
|
||||
<Content Include="Controls\v5\Base\FileUpload.ascx" />
|
||||
@@ -4155,6 +4163,7 @@
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\AutoMapper.3.3.1\tools\AutoMapper.targets" Condition="Exists('..\packages\AutoMapper.3.3.1\tools\AutoMapper.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.toggle-padding {
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-top: 6px;
|
||||
padding-right: 6px;
|
||||
float: right;
|
||||
height: 25px;
|
||||
width: 80px;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
body.rtl .toggle-padding {
|
||||
padding-right: inherit;
|
||||
padding-left: 8px;
|
||||
padding-left: 6px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AutoMapper" version="3.1.1" targetFramework="net45" />
|
||||
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
||||
<package id="jquery-qrcode" version="1.0" targetFramework="net45" />
|
||||
<package id="NBitcoin" version="3.0.0.72" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||
|
||||
@@ -76,10 +76,6 @@
|
||||
<assemblyIdentity name="System.Threading.Tasks.Dataflow" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.5.9.0" newVersion="4.5.9.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.1.1.0" newVersion="5.1.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<location path="WebResource.axd">
|
||||
|
||||
Reference in New Issue
Block a user