Adding RTL to Document.cshtml and removing from navigation setup

This commit is contained in:
Nicholas Mayne
2014-08-10 23:06:40 +01:00
parent 8cbc9191d6
commit ed02f8a07f
2 changed files with 4 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
@model NavigationManagementViewModel
@using Orchard.Core.Navigation.ViewModels;
@using Orchard.Localization
@using Orchard.Utility.Extensions;
@{
@@ -11,9 +10,6 @@
Script.Include("jquery.mjs.nestedSortable.js").AtFoot();
Script.Include("navigation-admin.js").AtFoot();
}
<script type="text/javascript">
window.isRTL = @((Html.Directionality() == "rtl").ToString().ToLowerInvariant());
</script>
<div id="save-message" class="message message-Warning">@T("You need to hit \"Save All\" in order to save your changes.")</div>

View File

@@ -1,4 +1,5 @@
@using Orchard.Mvc.Html;
@using System.Globalization
@using Orchard.Mvc.Html;
@using Orchard.UI.Resources;
@{
RegisterLink(new LinkEntry {Type = "image/x-icon", Rel = "shortcut icon", Href = Url.Content("~/modules/orchard.themes/Content/orchard.ico")});
@@ -6,6 +7,7 @@
string title = Convert.ToString(Model.Title);
string siteName = Convert.ToString(WorkContext.CurrentSite.SiteName);
bool isRtl = CultureInfo.GetCultureInfo(WorkContext.CurrentCulture).TextInfo.IsRightToLeft;
}
<!DOCTYPE html>
<html lang="@WorkContext.CurrentCulture" class="static @Html.ClassForPage()">
@@ -14,6 +16,7 @@
<title>@Html.Title(title, siteName)</title>
@Display(Model.Head)
<script>(function(d){d.className="dyn"+d.className.substring(6,d.className.length);})(document.documentElement);</script>
<script>window.isRTL = @(isRtl.ToString().ToLowerInvariant());</script>
</head>
<body>
@* Layout (template) is in the Body zone @ the default position (nothing, zero, zilch) *@