Lots of work on RTL styles; CSS cleanup

This commit is contained in:
Rick Falkvinge
2015-02-07 14:02:02 +01:00
parent 080bc288e0
commit 5be93e252e
14 changed files with 111 additions and 41 deletions
+1 -1
View File
@@ -64,5 +64,5 @@
</script>
<asp:HiddenField runat="server" ID="HiddenGuid"/>
<div style="height:36px;padding-top:4px;float:left"><input id="<%=this.ClientID %>_ButtonUploadVisible" class="ButtonSwarmopsUpload NoInputFocus" type="button" <%= this.HideTrigger? "style='display:none'" : string.Empty %> /><input id="<%=this.ClientID %>_ButtonUploadHidden" type="file" name="files[]" multiple style="display:none" /></div><div style="height:36px;padding-top:4px;width:270px;margin-right:10px;float:right;border:none"><div id="<%=this.ClientID %>_DivUploadCount" style='display:none;overflow:hidden;height:'<%=this.DisplayCount < 9? 32: 64%>px'></div><div id="<%=this.ClientID %>_DivProgressUpload" style="width:100%;margin-top:8px;display:none"></div></div>&#8203;<br/>
<div class="buttonUploadFile"><input id="<%=this.ClientID %>_ButtonUploadVisible" class="ButtonSwarmopsUpload NoInputFocus" type="button" <%= this.HideTrigger? "style='display:none'" : string.Empty %> /><input id="<%=this.ClientID %>_ButtonUploadHidden" type="file" name="files[]" multiple style="display:none" /></div><div style="height:36px;padding-top:4px;width:270px;margin-right:10px;float:right;border:none"><div id="<%=this.ClientID %>_DivUploadCount" style='display:none;overflow:hidden;height:'<%=this.DisplayCount < 9? 32: 64%>px'></div><div id="<%=this.ClientID %>_DivProgressUpload" style="width:100%;margin-top:8px;display:none"></div></div>&#8203;<br/>
+14 -3
View File
@@ -70,10 +70,12 @@ namespace Swarmops.Controls.Base
localizedText = localizedText.Replace ("[Regular]", _regularLocalized);
// TODO IF APPLICABLE - add other [Regulars] [Regularship] etc.
localizedText = Server.HtmlEncode (localizedText); // muy importante
string cssClass = String.Empty;
if (menuItem.Type == MenuItemType.BuildNumber)
{
localizedText = Swarmops.Logic.Support.Formatting.SwarmopsVersion;
cssClass = " class=\"buildId\"";
}
string iconSize = "40px";
@@ -100,11 +102,20 @@ namespace Swarmops.Controls.Base
imageUrl = "/Images/PageIcons/transparency-16px.png";
// doesn't matter in slightest if browser resizes to 20px
}
output.Write ("<a href='#disabled'><img src=\"{0}\" height=\"20\" width=\"20\" />{1}</a>", imageUrl,
localizedText);
output.Write ("<a href='#disabled'><img src=\"{0}\" height=\"20\" width=\"20\" /><span{2}>{1}</span></a>", imageUrl,
localizedText, cssClass);
break;
case MenuItemType.Submenu:
output.Write ("<a href='#'>" + localizedText + "</a>");
if (string.IsNullOrEmpty (menuItem.ImageUrl))
{
output.Write ("<a href='#'>" + localizedText + "</a>");
}
else
{
output.Write(
"<a href=\"#\"><img src=\"/Images/PageIcons/{0}-{3}.png\" height=\"20\" width=\"20\" />{2}</a>",
menuItem.ImageUrl, prettyNavUrl, localizedText, iconSize);
}
break;
case MenuItemType.Separator:
output.Write ("&nbsp;<hr/>");
Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

+2 -1
View File
@@ -355,6 +355,7 @@
<MainMenuItem>
<ResourceKey>Ledgers_TaxForms</ResourceKey>
<UserLevel>3</UserLevel>
<ImageUrl>iconshock-invoice</ImageUrl>
<Permissions />
<Type>Submenu</Type>
<Children>
@@ -362,7 +363,7 @@
<ResourceKey>Ledgers_TaxForms_Payroll</ResourceKey>
<UserLevel>3</UserLevel>
<Permissions />
<ImageUrl />
<ImageUrl>iconshock-invoice</ImageUrl>
<NavigateUrl>/Pages/v5/Ledgers/TaxForms/PayrollForms.aspx</NavigateUrl>
<Type>Link</Type>
<Children />
+5 -4
View File
@@ -54,12 +54,8 @@ namespace Swarmops
{
// Event subscriptions
// this.LanguageSelector.LanguageChanged += new EventHandler(LanguageSelector_LanguageChanged);
// Titles and other page elements
this.IconPage.ImageUrl = "/Images/PageIcons/" + CurrentPageIcon + "-40px.png";
this.LabelPageTitle.Text = CurrentPageTitle;
Page.Title = "Swarmops - " + CurrentPageTitle;
this.ExternalScriptEasyUI.Controls = EasyUIControlsUsed.ToString();
@@ -212,6 +208,11 @@ namespace Swarmops
flagName = cultureStringLower.Substring (3);
}
if (cultureStringLower.StartsWith ("ar"))
{
flagName = "Arabic";
}
if (cultureStringLower == "af-za") // "South African Afrikaans", a special placeholder for localization code
{
flagName = "txl";
+7 -4
View File
@@ -37,7 +37,6 @@ namespace Swarmops.Frontend.Pages.v5.User
foreach (string cultureId in availableCultures)
{
LanguageParameters newLanguage = new LanguageParameters();
newLanguage.IconUrl = "/Images/Flags/" + cultureId.Substring (3, 2).ToLowerInvariant() + "-64px.png";
newLanguage.CultureId = cultureId;
CultureInfo culture = CultureInfo.CreateSpecificCulture (cultureId);
newLanguage.DisplayName = culture.NativeName;
@@ -49,10 +48,14 @@ namespace Swarmops.Frontend.Pages.v5.User
newLanguage.IconUrl = "/Images/Flags/uk-64px.png";
// use "uk" for en-GB and en-US rather than "gb" or "us"
}
if (cultureId.StartsWith("ar"))
else if (cultureId.StartsWith ("ar"))
{
newLanguage.IconUrl = "/Images/Flags/ae-64px.png";
// crowdin's generic culture is ar-SA but we're not showing the SA flag
newLanguage.IconUrl = "/Images/Flags/Arabic-64px.png";
// crowdin's generic culture is ar-SA but Arabic is not country specific
}
else
{
newLanguage.IconUrl = "/Images/Flags/" + cultureId.Substring(3, 2).ToLowerInvariant() + "-64px.png";
}
if (culture.TextInfo.IsRightToLeft)
{
Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 402 B

+60 -10
View File
@@ -206,6 +206,16 @@ body.rtl .searchbox input {
font-weight: normal;
}
body.rtl #ctl00_MainMenu {
left: inherit;
right: 20px;
}
body.rtl span.buildId {
direction: ltr; /* parentheses freak out unless specified LTR */
}
/* BARS AND BOXEN */
@@ -228,6 +238,8 @@ body.rtl .mainbar {
body.rtl .sidebar {
float: left;
margin-left: inherit;
margin-right: 20px;
}
.box
@@ -450,9 +462,7 @@ span.loginalphabetasign
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);
background: linear-gradient(#FFC145, #F0AB22);
text-shadow: #FFEDC8 0px 0px 3px, #FFEDC8 0px 0px 3px;
border-color: #C78B15;
position: relative;
@@ -461,6 +471,12 @@ span.loginalphabetasign
cursor: pointer;
}
body.rtl .buttonAccentColor {
float:left;
left: inherit;
right: -1px;
}
.buttonAccentColor:hover, .buttonAccentColor:active {
text-shadow: #FFF4E4 0px 0px 5px, #FFF4E4 0px 0px 5px, #FFF4E4 0px 0px 5px;
@@ -472,10 +488,13 @@ span.loginalphabetasign
left: -2px;
box-shadow: 2px 2px 4px #7F5500;
background: #FFC34D;
background: -moz-linear-gradient(top, #FFD580, #FFC34D);
background: -webkit-linear-gradient(top, #FFD580, #FFC34D);
background: linear-gradient(top, #FFD580, #FFC34D);
background: linear-gradient(#FFD580, #FFC34D);
}
body.rtl .buttonAccentColor:hover,
body.rtl .buttonAccentColor:focus {
left: inherit;
right: -2px;
}
@@ -505,6 +524,11 @@ span.loginalphabetasign
-moz-border-radius: 4px;
}
body.rtl .button-orange {
padding: 2px 20px 2px 4px;
background-position: right;
}
.button-orange:hover
{
text-shadow: #FFEDC8 0px 1px 3px, #FFBC37 0px 1px 3px;
@@ -539,8 +563,7 @@ span.loginalphabetasign
.entryFields
{
background: #A2BEFF;
background: -webkit-gradient(linear, left top, left bottom, from(#B0C8FF), to(#86A6F0));
background: -moz-gradient(linear, left top, left bottom, from(#B0C8FF), to(#86A6F0));
background: linear-gradient(#B0C8FF, #86A6F0);
border-radius: 6px;
line-height: 40px;
float:right;
@@ -553,11 +576,15 @@ span.loginalphabetasign
font-size: 24px;
width: 330px;
-webkit-box-shadow: 0 1px 3px 1px #1C397E;
-moz-box-shadow: 0 1px 3px 1px #1C397E;
box-shadow: 0 1px 3px 1px #1C397E;
}
body.rtl .entryFields {
float: left;
padding-left: 8px;
padding-right: 10px;
}
.entryFields input, .entryFields textarea, .entryFields select
{
@@ -595,6 +622,11 @@ span.loginalphabetasign
overflow-x: hidden;
}
body.rtl .entryLabels {
padding-left: inherit;
padding-right: 15px;
}
.content .entryLabels h2
{
font-size: 130%;
@@ -790,6 +822,10 @@ div#page-icon-encaps
box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
body.rtl .sidebar h2 {
float: right;
}
.sidebar h2.blue
{
background-color: #A2BEFF;
@@ -821,6 +857,11 @@ div#page-icon-encaps
position: absolute;
}
body.rtl .sidebar h2 span.arrow {
left: inherit;
right: 10px;
}
.sidebar h2.blue span.arrow
{
border-color: #86A6F0 transparent transparent transparent;
@@ -1001,6 +1042,15 @@ input.ButtonSwarmopsUpload:active {
}
.buttonUploadFile {
height:36px;
padding-top:4px;
float: left;
}
body.rtl .buttonUploadFile {
float: right;
}
.ImageFlag
+16 -18
View File
@@ -143,14 +143,11 @@ body.rtl .sf-menu ul li img
}
.sf-menu li.Submenu li.Submenu { /* default: LTR website */
background: #FF00FF url('/Style/submenu-rightarrow.png') no-repeat right top; /* testing selector */
padding-left: 20px; /* no icon */
background: #E4ECFF url('/Style/Images/menu-arrow-right.png') no-repeat right top;
}
body.rtl .sf-menu li.Submenu li.Submenu { /* Right-to-left override */
background: #FF0044 url('/Style/submenu-leftarrow.png') no-repeat right top; /* testing selector */
padding-left: inherit;
padding-right: 20px; /* no icon */
background: #E4ECFF url('/Style/Images/menu-arrow-left.png') no-repeat left top;
}
/* -- commented out
@@ -158,34 +155,35 @@ body.rtl .sf-menu li.Submenu li.Submenu { /* Right-to-left override */
background: #FF00FF;
}*/
.sf-menu li:not(.Separator):hover, .sf-menu li.sfHover
.sf-menu li:not(.Separator):hover,
.sf-menu li.sfHover
{
/* Same as Sidebar.Orange */
background-color: #FFBC37;
background: -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFC145', endColorstr='#F0AB22'); /* MSIE */
background: -moz-linear-gradient(top, #FFC145, #F0AB22); /* Mozilla */
background: -webkit-gradient(linear, left top, left bottom, from(#FFC145), to(#F0AB22)); /* Chrome, Safari */
-webkit-transition: none;
-webkit-transition: none;
transition: none;
background: linear-gradient(#FFC145, #F0AB22);
transition: none;
box-shadow: #C78B15 0 0px 2px 0px inset;
/* text-shadow: #C78B15 0px 0px 3px, #C78B15 0px 0px 3px; */
}
.sf-menu ul li:not(.Separator):hover,
.sf-menu ul li.sfHover {
background-color: #FFBC37;
background: -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFC145', endColorstr='#F0AB22'); /* MSIE */
background: -moz-linear-gradient(top, #FFC145, #F0AB22); /* Mozilla */
background: -webkit-gradient(linear, left top, left bottom, from(#FFC145), to(#F0AB22)); /* Chrome, Safari */
background: linear-gradient(#FFC145, #F0AB22);
/* only transition out, not in */
-webkit-transition: none;
-webkit-transition: none;
transition: none;
transition: none;
}
.sf-menu li.Submenu li.Submenu:hover {
background: #FFBC37 url('/Style/Images/menu-arrow-right-white.png') no-repeat right top; /* how combine gradient with image? */
}
body.rtl .sf-menu li.Submenu li.Submenu:hover {
background: #FFBC37 url('/Style/Images/menu-arrow-left-white.png') no-repeat left top; /* how combine gradient with image? */
}
/*** arrows (for all except IE7) **/
.sf-menu ul ul.sf-arrows .sf-with-ul {
padding-right: 2.5em;
+6
View File
@@ -34,6 +34,12 @@
filter:alpha(opacity=40);
}
body.rtl .combo-arrow {
left: inherit;
right: 3px;
}
/* overrides when controls are used in page headers as part of a H2 */
.content h2 span span.combo {