diff --git a/Site5/App_GlobalResources/Global.resx b/Site5/App_GlobalResources/Global.resx index 159585d2..1e37841a 100644 --- a/Site5/App_GlobalResources/Global.resx +++ b/Site5/App_GlobalResources/Global.resx @@ -179,7 +179,11 @@ Displayed as confirmation link on changing something - -- Select bookkeeping account -- + -- Select Budget/Account -- + Initializer in dropdown box. + + + -- Select Organization -- Initializer in dropdown box. diff --git a/Site5/Master-v5.master b/Site5/Master-v5.master index c7bd9128..8e572c1c 100644 --- a/Site5/Master-v5.master +++ b/Site5/Master-v5.master @@ -7,7 +7,7 @@ - + @@ -37,7 +37,7 @@ content: { text: $('#DivModalOrganizationChanger'), title: { - text: 'craigsworks :: Login', + text: 'Switch Organizations', button: true } }, @@ -62,19 +62,6 @@ tip: false } }); - $('#LinkChangeOrganizations').removeData('qtip'); // This last part makes it possible to have a modal on-click box AND a tooltip. - $('#LinkChangeOrganizations').qtip({ - content: { - attr: 'title', - title: function (api) { - // Retrieve content from custom attribute of the elements. - return $(this).attr('rel'); - }, - style: { - classes: 'ui-tooltip-blue ui-tooltip-shadow' - } - } - }); $("a[rel*=leanModal]").leanModal(); @@ -117,7 +104,13 @@
-
|
| 
|
| 
+
+
|
+
| 
+
|
+
| 
+ +
Activizr Logo
@@ -267,11 +260,11 @@ diff --git a/Site5/Master-v5.master.cs b/Site5/Master-v5.master.cs index 3135b38d..c12abe9a 100644 --- a/Site5/Master-v5.master.cs +++ b/Site5/Master-v5.master.cs @@ -85,6 +85,21 @@ namespace Activizr this.ImageCultureIndicator.Style[HtmlTextWriterStyle.MarginRight] = "3px"; this.ImageCultureIndicator.Style[HtmlTextWriterStyle.Cursor] = "pointer"; + SetupDropboxes(); + } + + private void SetupDropboxes() + { + this.DropSwitchOrganizations.Items.Clear(); + + this.DropSwitchOrganizations.Items.Add(new ListItem(Resources.Global.Global_DropInits_SelectOrganization, "0")); + + Organizations organizations = Organizations.GetAll(); + + foreach (Organization organization in organizations) + { + this.DropSwitchOrganizations.Items.Add(new ListItem(organization.Name, organization.Identity.ToString(CultureInfo.InvariantCulture))); + } } private Person _viewingPerson; @@ -354,5 +369,17 @@ namespace Activizr this.LiteralCrowdinScript.Text = crowdinCode; // Page.ClientScript.RegisterStartupScript(this.GetType(), "crowdin", crowdinCode, false); } + + protected void ButtonSwitchOrganizations_Click(object sender, EventArgs e) + { + int currentUserId = _viewingPerson.Identity; + int desiredOrganizationId = Int32.Parse(this.DropSwitchOrganizations.SelectedValue); + + if (desiredOrganizationId != 0) + { + FormsAuthentication.RedirectFromLoginPage(string.Format(CultureInfo.InvariantCulture, "{0},{1}", currentUserId, desiredOrganizationId), true); + Response.Redirect("/"); + } + } } } \ No newline at end of file diff --git a/Site5/Style/style-v5.css b/Site5/Style/style-v5.css index 75a0de05..ac012a5f 100644 --- a/Site5/Style/style-v5.css +++ b/Site5/Style/style-v5.css @@ -394,6 +394,52 @@ span.loginalphabetasign background-image: url('/Security/Images/iconshock-foreign-key-16px-hot-offset.png'); } +.buttonAccentColor { + display:block; + float:right; + margin:5px 3px 8px 3px; + padding:5px; + text-decoration: none; + text-align: center; + font: bold 13px Ubuntu, sans-serif; + width:100px; + outline-style:none; + border-radius: 5px; + color: #7F5500; + background: #EA8511; + border: 1px solid #EA8511; + box-shadow: 1px 1px 4px #7F5500; + background: -moz-linear-gradient(top, #FFC145, #F0AB22); + background: -webkit-linear-gradient(top, #FFC145, #F0AB22); + background: linear-gradient(top, #FFC145, #F0AB22); + text-shadow: #FFEDC8 0px 0px 3px, #FFEDC8 0px 0px 3px; + border-color: #C78B15; + position: relative; + top: -1px; + left: -1px; + cursor: pointer; +} + +.buttonAccentColor:hover, .buttonAccentColor:active { + text-shadow: #FFF4E4 0px 0px 5px, #FFF4E4 0px 0px 5px, #FFF4E4 0px 0px 5px; + +} + + +.buttonAccentColor:hover { + top: -2px; + left: -2px; + box-shadow: 2px 2px 4px #7F5500; +} + + +.buttonAccentColor:active { + top: 0px; + left: 0px; + box-shadow: 0px 0px 4px #7F5500; +} + + .button-orange { -webkit-box-shadow: 0 1px 3px #C78B15;