This commit is contained in:
Rick Falkvinge
2014-11-13 22:58:03 +01:00
38 changed files with 215 additions and 36 deletions
-3
View File
@@ -1,6 +1,3 @@
#!/bin/bash
./repackage-build sprint
cp -R /home/prod/Smallwebs/HostedScripts/staging/* /home/prod/Smallwebs/HostedScripts/.
./repackage-one extscripts sprint
+2 -1
View File
@@ -47,7 +47,8 @@ scripts/repackage-one backend $1
scripts/repackage-one common $1
if [ "$DROPFOLDER" != "internal" ]; then
# packaging extscripts should go here; copy from do-sprint
cp -R /home/prod/Smallwebs/HostedScripts/staging/* /home/prod/Smallwebs/HostedScripts/.
scripts/repackage-one extscripts sprint
fi
echo "Notifying developers that new build has packaged for test/deployment..."
+14 -1
View File
@@ -35,9 +35,22 @@ namespace Swarmops.Logic.Security
public enum AccessAspect
{
Unknown = 0,
/// <summary>
/// Access to underlying ledgers
/// </summary>
Bookkeeping,
/// <summary>
/// Access to regular accounting
/// </summary>
Financials,
PersonData
/// <summary>
/// Access to personal details about people in org
/// </summary>
PersonData,
/// <summary>
/// Access to change organization's fundamental operating parameters
/// </summary>
Administration
}
public enum AccessType
@@ -119,7 +119,7 @@
</resheader>
<data name="EasternEurope" xml:space="preserve">
<value>Eastern Europe</value>
<comment>(East of former Iron Curtain)</comment>
<comment>(East of southern tip of Sweden, roughly)</comment>
</data>
<data name="Europe" xml:space="preserve">
<value>Europe</value>
@@ -134,7 +134,7 @@
</data>
<data name="WesternEurope" xml:space="preserve">
<value>Western Europe</value>
<comment>(West of former Iron Curtain)</comment>
<comment>(West of southern tip of Sweden, roughly)</comment>
</data>
<data name="World" xml:space="preserve">
<value>World</value>
+4 -1
View File
@@ -124,7 +124,10 @@
<value>Access Control Lists</value>
</data>
<data name="Menu5_Administration_CreateOrganization" xml:space="preserve">
<value>Create Organization</value>
<value>Create New Organization</value>
</data>
<data name="Menu5_Administration_EditOrganization" xml:space="preserve">
<value>Edit Organization</value>
</data>
<data name="Menu5_Administration_GeographyTree" xml:space="preserve">
<value>Geography Tree</value>
+7 -1
View File
@@ -147,7 +147,13 @@
<comment>This can be "members", etc.</comment>
</data>
<data name="CreateOrganization_Success" xml:space="preserve">
<value>The new organization has been created. You have been given an initial two-year {0} in the organization, so you can work with it and set it up properly. To switch to working with your new organization, use the control panel top right.</value>
<value>The new organization has been created. You have been given an initial two-year {0} in the organization, so you can work with it and set it up properly. You have also been &lt;strong&gt;logged in&lt;/strong&gt; to your new organization instead of the one you were logged in to before.&lt;br/&gt;&lt;br/&gt;This is the Edit Organization panel, where you can set more parameters for your new organization.</value>
<comment>The {0} is membership, employment, citizenship, residence, etc.</comment>
</data>
<data name="EditOrganization_Info" xml:space="preserve">
<value>Work in progress...</value>
</data>
<data name="EditOrganization_PageTitle" xml:space="preserve">
<value>Edit Organization</value>
</data>
</root>
+3 -3
View File
@@ -17,9 +17,9 @@ namespace Swarmops.Frontend.Controls.v5.UI
{
externalScriptUrl = "/Scripts/ExternalScripts";
}
else if (PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox))
else if (System.Diagnostics.Debugger.IsAttached || PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox))
{
externalScriptUrl += "/staging"; // use staging area for new script versions on Sandbox
externalScriptUrl += "/staging"; // use staging area for new script versions on Sandbox and for all debugging
}
if (Package == "easyui")
@@ -42,6 +42,6 @@ namespace Swarmops.Frontend.Controls.v5.UI
}
public string Package { get; set; }
public string Controls { get; set; }
public new string Controls { get; set; }
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

+10
View File
@@ -371,6 +371,16 @@
<Type>Submenu</Type>
<Children>
<MainMenuItem>
<ResourceKey>Administration_EditOrganization</ResourceKey>
<UserLevel>4</UserLevel>
<Permissions />
<ImageUrl>iconshock-box-cog</ImageUrl>
<NavigateUrl>/Pages/v5/Admin/EditOrganization.aspx</NavigateUrl>
<Type>Link</Type>
<Children />
</MainMenuItem>
<MainMenuItem>
<ResourceKey>Administration_CreateOrganization</ResourceKey>
<UserLevel>4</UserLevel>
+1
View File
@@ -36,6 +36,7 @@
<!-- external packages that are commonly used (on practically all pages) -->
<Swarmops5:ExternalScripts ID="ExternalScriptEasyUI" Package="easyui" runat="server" />
<link href="/Style/v5-easyui-elements.css" rel="stylesheet" type="text/css" />
<!-- additional scripts etc from individual pages -->
<asp:ContentPlaceHolder id="PlaceHolderHead" runat="server" />
@@ -2,8 +2,6 @@
<%@ Register TagPrefix="Swarmops5" TagName="ExternalScripts" Src="~/Controls/v5/UI/ExternalScripts.ascx" %>
<asp:Content ID="Content4" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
<script type="text/javascript">
$(document).ready(function () {
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Web;
using System.Web.UI.WebControls;
using Swarmops.Logic.Financial;
@@ -130,13 +131,11 @@ namespace Swarmops.Frontend.Pages.v5.Admin
string successMessage = String.Format(Resources.Pages_Admin.CreateOrganization_Success, Resources.Global.ResourceManager.GetString("Title_" + peopleLabel + "_Ship"));
// Create org here
Response.AppendCookie(new HttpCookie("DashboardMessage", HttpUtility.UrlEncode(successMessage)));
// Redirect to dashboard
// Log in to new organization, then redirect to Edit
Response.Redirect("/", true);
Response.Redirect("/Pages/v5/Security/SetCurrentOrganization.aspx?OrganizationId=" + newOrganization.Identity.ToString(CultureInfo.InvariantCulture) + "&ReturnUrl=/Pages/v5/Admin/EditOrganization.aspx", true);
}
}
@@ -0,0 +1,82 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" CodeFile="EditOrganization.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Admin.EditOrganization" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<script src="/Scripts/jquery.switchButton.js" language="javascript" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/Style/jquery.switchButton.css" />
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$('#divTabs').tabs();
$('.EditCheck').switchbutton({
checkedLabel: '<%=Resources.Global.Global_On.ToUpperInvariant() %>',
uncheckedLabel: '<%=Resources.Global.Global_Off.ToUpperInvariant() %>',
});
});
</script>
<style>
.IconEdit {
cursor: pointer;
}
#IconCloseEdit {
cursor: pointer;
}
.CheckboxContainer {
float: right; padding-top: 6px;padding-right: 8px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<div id="divTabs" class="easyui-tabs" data-options="tabWidth:70,tabHeight:70">
<div title="<img src='/Images/Icons/iconshock-switch-red-64px.png' />">
<h2>Accounting Features</h2>
<div class="entryFields">
<label for="CheckAccountBitcoinCold"><asp:Literal ID="LiteralLabelBitcoinColdShort" runat="server" Text="Bitcoin Cold"/></label><div class="CheckboxContainer"><input type="checkbox" rel="Active" class="EditCheck" id="CheckEnableBitcoinCold"/></div><br/>
<label for="CheckAccountBitcoinHot"><asp:Literal ID="LiteralLabelBitcoinHotShort" runat="server" Text="Bitcoin Hot"/></label><div class="CheckboxContainer"><input type="checkbox" rel="Active" class="EditCheck" id="CheckboxEnableBitcoinHot"/></div><br/>
<asp:TextBox runat="server" ID="TextDaysCashReserves" />&#8203;<br/>
<label for="CheckAccountPaypal"><asp:Literal ID="Literal1" runat="server" Text="Paypal"/></label><div class="CheckboxContainer"><input type="checkbox" rel="Active" class="EditCheck" id="CheckboxEnablePaypal"/></div><br/>
<label for="CheckAccountForeign"><asp:Literal ID="Literal2" runat="server" Text="Forex Profit/Loss"/></label><div class="CheckboxContainer"><input type="checkbox" rel="Active" class="EditCheck" id="CheckboxEnableForeignProfitLoss"/></div><br/>
</div>
<div class="entryLabels">
Enable bitcoin coldwallet tracking?<br/>
Enable bitcoin hotwallet autopay?<br/>
Days of coin reserves to keep hot<br/>
Enable Paypal tracking and IPN?<br/>
Enable foreign currency accounts?<br/>
</div>
</div>
<div title="<img src='/Images/Icons/iconshock-group-diversified-64px.png' />">
<h2>Members policy</h2>
work in progress
</div>
<div title="<img src='/Images/Icons/iconshock-colorswatch-64px.png' />">
<h2>Communications profile and branding</h2>
work in progress
</div>
<div title="<img src='/Images/Icons/iconshock-mail-open-64px.png' />">
<h2>Mail transmission settings</h2>
<div class="entryFields">
<asp:TextBox runat="server" ID="TextMailDomain" />&#8203;<br/>
<asp:TextBox runat="server" ID="TextMailAccounting" />&#8203;<br/>
<asp:TextBox runat="server" ID="TextMailHR" />&#8203;<br/>
<asp:TextBox runat="server" ID="TextMailOfficers" />&#8203;<br/>
<asp:TextBox runat="server" ID="TextSmtpServer" />&#8203;<br/>
</div>
<div class="entryLabels">
Mail Domain (e.g. swarmops.com)<br/>
Accounting sender<br/>
Human Resources sender<br/>
User Notification sender<br/>
SMTP server (default if blank)
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderSide" Runat="Server">
</asp:Content>
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Swarmops.Logic.Security;
namespace Swarmops.Frontend.Pages.v5.Admin
{
public partial class EditOrganization : PageV5Base
{
protected void Page_Load(object sender, EventArgs e)
{
this.PageIcon = "iconshock-box-cog";
this.PageTitle = Resources.Pages_Admin.EditOrganization_PageTitle;
this.InfoBoxLiteral = Resources.Pages_Admin.EditOrganization_Info;
this.PageAccessRequired = new Access(CurrentOrganization, AccessAspect.Administration, AccessType.Write);
this.EasyUIControlsUsed = EasyUIControl.Tabs;
}
}
}
@@ -8,7 +8,6 @@
<script src="/Scripts/jquery.fileupload/jquery.iframe-transport.js" type="text/javascript" language="javascript"></script>
<!-- The basic File Upload plugin -->
<script src="/Scripts/jquery.fileupload/jquery.fileupload.js" type="text/javascript" language="javascript"></script>
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
<script type="text/javascript">
@@ -3,7 +3,6 @@
<%@ Register src="~/Controls/v5/Base/ComboGeographies.ascx" tagname="ComboGeographies" tagprefix="Swarmops5" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
<script type="text/javascript">
@@ -7,7 +7,6 @@
<script src="/Scripts/jquery.fileupload/jquery.iframe-transport.js" type="text/javascript" language="javascript"></script>
<!-- The basic File Upload plugin -->
<script src="/Scripts/jquery.fileupload/jquery.fileupload.js" type="text/javascript" language="javascript"></script>
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
<script type="text/javascript">
@@ -7,7 +7,6 @@
<script src="/Scripts/jquery.fileupload/jquery.iframe-transport.js" type="text/javascript" language="javascript"></script>
<!-- The basic File Upload plugin -->
<script src="/Scripts/jquery.fileupload/jquery.fileupload.js" type="text/javascript" language="javascript"></script>
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
<script type="text/javascript">
@@ -2,7 +2,6 @@
<%@ Register TagPrefix="Swarmops5" TagName="ComboBudgets" Src="~/Controls/v5/Financial/ComboBudgets.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
<script type="text/javascript">
-1
View File
@@ -4,7 +4,6 @@
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<script src="/Scripts/jquery.switchButton.js" language="javascript" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css" />
<link rel="stylesheet" type="text/css" href="/Style/jquery.switchButton.css" />
<script type="text/javascript">
@@ -2,7 +2,6 @@
<%@ Register TagPrefix="Swarmops5" TagName="ComboBudgets" Src="~/Controls/v5/Financial/ComboBudgets.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css" />
<script type="text/javascript">
$(document).ready(function () {
@@ -7,7 +7,6 @@
<script src="/Scripts/jquery.fileupload/jquery.iframe-transport.js" type="text/javascript" language="javascript"></script>
<!-- The basic File Upload plugin -->
<script src="/Scripts/jquery.fileupload/jquery.fileupload.js" type="text/javascript" language="javascript"></script>
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
<script type="text/javascript">
@@ -6,7 +6,6 @@
<script src="/Scripts/jquery.fileupload/jquery.iframe-transport.js" type="text/javascript" language="javascript"></script>
<!-- The basic File Upload plugin -->
<script src="/Scripts/jquery.fileupload/jquery.fileupload.js" type="text/javascript" language="javascript"></script>
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
<style type="text/css">
@@ -10,8 +10,6 @@
});
});
</script>
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
@@ -19,6 +19,7 @@ namespace Swarmops.Frontend.Pages.v5.Security
throw new UnauthorizedAccessException("No"); // may cause problems on login screen?
}
string returnUrlString = Request.QueryString["ReturnUrl"];
string organizationIdString = Request.QueryString["OrganizationId"];
int organizationId = Int32.Parse(organizationIdString);
Organization suggestedOrganization = null;
@@ -47,10 +48,19 @@ namespace Swarmops.Frontend.Pages.v5.Security
logonFlags = currentIdentityParts[3];
}
FormsAuthentication.RedirectFromLoginPage(
CurrentUser.Identity.ToString(CultureInfo.InvariantCulture) + "," +
suggestedOrganization.Identity.ToString(CultureInfo.InvariantCulture) + ",," +
logonFlags, true);
string userIdentityString = CurrentUser.Identity.ToString(CultureInfo.InvariantCulture) + "," +
suggestedOrganization.Identity.ToString(CultureInfo.InvariantCulture) + ",," +
logonFlags;
if (!string.IsNullOrEmpty(returnUrlString))
{
FormsAuthentication.SetAuthCookie(userIdentityString, true);
Response.Redirect(returnUrlString);
}
else
{
FormsAuthentication.RedirectFromLoginPage(userIdentityString, true);
}
}
}
+1 -2
View File
@@ -2,8 +2,7 @@
<%@ Register src="~/Controls/v5/Base/ComboGeographies.ascx" tagname="ComboGeographies" tagprefix="Swarmops5" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<link rel="stylesheet" type="text/css" href="/Style/v5-easyui-elements.css">
<script type="text/javascript">
function preload(arrayOfImages) {
+1 -1
View File
@@ -19,7 +19,7 @@ namespace Swarmops.Frontend.Pages.Swarm
Localize();
}
this.EasyUIControlsUsed = EasyUIControl.Tree;
this.EasyUIControlsUsed = EasyUIControl.Tree | EasyUIControl.DataGrid;
}
private void Localize()
+8
View File
@@ -1031,6 +1031,14 @@ input.ButtonSwarmopsUpload:active {
}
/* JQUERY PLUGIN OVERRIDES */
nav.alertify-buttons {
margin-top: 20px;
}
/* COLOR SCHEME
#A2BEFF #476EC7 #1C397E #C8D9FF #E4ECFF -- blue (hue 222)
+35
View File
@@ -86,4 +86,39 @@ div.combobox-item {
.tree-node-hover{
background: #E4ECFF;
box-shadow: 0px 0px 4px 1px #C8D9FF inset;
}
/* TABS */
.tabs-header { /* overrides */
background: transparent;
border: none;
padding-top: 0;
}
.tabs {
padding: 0;
padding-top: 2px;
border-color: #CCC;
}
.tabs-panels {
border: none;
padding-top: 5px;
}
.tabs li a.tabs-inner {
width: 64px !important;
padding: 0;
padding-left: 2px;
padding-right: 2px;
border: none;
border-radius: 5px;
background: transparent;
border-right: 1px solid #DDD;
margin-right: 5px;
}