Exit PreviewMode when all Preview Session are closed + translation
This commit is contained in:
@@ -4,12 +4,25 @@
|
||||
@using Umbraco.Core.IO
|
||||
@using Umbraco.Web
|
||||
@using Umbraco.Core.Configuration
|
||||
@using Umbraco.Core.Composing
|
||||
@using Umbraco.Core.Services
|
||||
|
||||
@inherits System.Web.Mvc.WebViewPage<Umbraco.Web.Editors.BackOfficePreviewModel>
|
||||
@{
|
||||
var disableDevicePreview = Model.DisableDevicePreview.ToString().ToLowerInvariant();
|
||||
|
||||
Html.RequiresCss("assets/css/canvasdesigner.css", "Umbraco");
|
||||
|
||||
// See if we can get without using Current
|
||||
var textService = Current.Services.TextService;
|
||||
|
||||
var EndLabel = textService.Localize("preview", "endLabel");
|
||||
var EndTitle = textService.Localize("preview", "endTitle");
|
||||
var OpenWebsiteLabel = textService.Localize("preview", "openWebsiteLabel");
|
||||
var OpenWebsiteTitle = textService.Localize("preview", "openWebsiteTitle");
|
||||
var returnToPreviewHeadline = textService.Localize("preview", "returnToPreviewHeadline");
|
||||
var returnToPreviewDescription = textService.Localize("preview", "returnToPreviewDescription");
|
||||
var returnToPreviewButton = textService.Localize("preview", "returnToPreviewButton");
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -22,6 +35,13 @@
|
||||
@Html.RenderCssHere(
|
||||
new BasicPath("Umbraco", IOHelper.ResolveUrl(SystemDirectories.Umbraco)))
|
||||
|
||||
<script type="text/javascript">
|
||||
window.umbLocalizedVars = {
|
||||
'returnToPreviewHeadline': '@returnToPreviewHeadline',
|
||||
'returnToPreviewDescription':'@returnToPreviewDescription',
|
||||
'returnToPreviewButton':'@returnToPreviewButton'
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body id="canvasdesignerPanel" ng-mouseover="outlinePositionHide()" ng-controller="previewController" ng-class="{'tabbing-active': tabbingActive === true}" ng-click="windowClickHandler($event)">
|
||||
<div class="wait" ng-show="!frameLoaded"></div>
|
||||
@@ -68,7 +88,7 @@
|
||||
<button ng-click="openInBrowser()" title="Open preview in the browser" class="menu-bar__button umb-outline"><i class="icon icon-out"></i><span>Open in browser</span>
|
||||
</button>
|
||||
|
||||
<button ng-click="exitPreview()" title="End Preview" class="menu-bar__button umb-outline"><i class="icon icon-power"></i><span>End</span>
|
||||
<button ng-click="exitPreview()" title="@EndTitle" class="menu-bar__button umb-outline"><i class="icon icon-power"></i><span>@EndLabel</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1864,5 +1864,17 @@ Mange hilsner fra Umbraco robotten
|
||||
<key alias="elementTypeDoesNotExistHeadline">Error!</key>
|
||||
<key alias="elementTypeDoesNotExistDescription">The ElementType of this block does not exist anymore</key>
|
||||
</area>
|
||||
|
||||
<area alias="preview">
|
||||
<key alias="endLabel">Afslut</key>
|
||||
<key alias="endTitle">Afslut forhåndsvisning</key>
|
||||
<key alias="openWebsiteLabel">Vis i nyt vindue</key>
|
||||
<key alias="openWebsiteTitle">Åben forhåndsvisning i nyt vindue</key>
|
||||
<key alias="returnToPreviewHeadline">Forhåndsvisning af indholdet?</key>
|
||||
<key alias="returnToPreviewDescription">Du har afslutet forhåndsvisning, vil du se dette indhold i forhåndsvisning?</key>
|
||||
<key alias="returnToPreviewButton">Fortsæt</key>
|
||||
<key alias="viewPublishedContentHeadline">Se udgivet indhold?</key>
|
||||
<key alias="viewPublishedContentDescription">Du er i forhåndsvisning, vil du afslutte for at se den udgivet version?</key>
|
||||
<key alias="viewPublishedContentAcceptButton">Se udgivet version</key>
|
||||
<key alias="viewPublishedContentDeclineButton">Forbliv i forhåndsvisning</key>
|
||||
</area>
|
||||
</language>
|
||||
|
||||
@@ -515,7 +515,7 @@
|
||||
<key alias="selectSnippet">Select snippet</key>
|
||||
<key alias="variantdeletewarning">This will delete the node and all its languages. If you only want to delete one language, you should unpublish the node in that language instead.</key>
|
||||
<key alias="propertyuserpickerremovewarning"><![CDATA[This will remove the user <b>%0%</b>.]]></key>
|
||||
<key alias="userremovewarning"><![CDATA[This will remove the user <b>%0%</b> from the <b>%1%</b> group]]></key>
|
||||
<key alias="userremovewarning"><![CDATA[This will remove the user <b>%0%</b> from the <b>%1%</b> group]]></key>
|
||||
<key alias="yesRemove">Yes, remove</key>
|
||||
</area>
|
||||
<area alias="dictionary">
|
||||
@@ -2511,4 +2511,17 @@ To manage your website, simply open the Umbraco back office and start adding con
|
||||
<key alias="manageHeadline">How do I manage Content Templates?</key>
|
||||
<key alias="manageDescription">You can edit and delete Content Templates from the "Content Templates" tree in the Settings section. Expand the Document Type which the Content Template is based on and click it to edit or delete it.</key>
|
||||
</area>
|
||||
<area alias="preview">
|
||||
<key alias="endLabel">End</key>
|
||||
<key alias="endTitle">End preview mode</key>
|
||||
<key alias="openWebsiteLabel">Preview website</key>
|
||||
<key alias="openWebsiteTitle">Open website in preview mode</key>
|
||||
<key alias="returnToPreviewHeadline">Preview content?</key>
|
||||
<key alias="returnToPreviewDescription">You have ended preview mode, do you want to continue previewing this content?</key>
|
||||
<key alias="returnToPreviewButton">Preview</key>
|
||||
<key alias="viewPublishedContentHeadline">View published version?</key>
|
||||
<key alias="viewPublishedContentDescription">You are in Preview Mode, do you want exit in order to view the published version of your website?</key>
|
||||
<key alias="viewPublishedContentAcceptButton">View published version</key>
|
||||
<key alias="viewPublishedContentDeclineButton">Stay in preview mode</key>
|
||||
</area>
|
||||
</language>
|
||||
|
||||
@@ -2533,4 +2533,17 @@ To manage your website, simply open the Umbraco back office and start adding con
|
||||
<key alias="manageHeadline">How do I manage Content Templates?</key>
|
||||
<key alias="manageDescription">You can edit and delete Content Templates from the "Content Templates" tree in the Settings section. Expand the Document Type which the Content Template is based on and click it to edit or delete it.</key>
|
||||
</area>
|
||||
<area alias="preview">
|
||||
<key alias="endLabel">End</key>
|
||||
<key alias="endTitle">End preview mode</key>
|
||||
<key alias="openWebsiteLabel">Preview website</key>
|
||||
<key alias="openWebsiteTitle">Open website in preview mode</key>
|
||||
<key alias="returnToPreviewHeadline">Preview content?</key>
|
||||
<key alias="returnToPreviewDescription">You have ended preview mode, do you want to continue previewing this content?</key>
|
||||
<key alias="returnToPreviewButton">Preview</key>
|
||||
<key alias="viewPublishedContentHeadline">View published version?</key>
|
||||
<key alias="viewPublishedContentDescription">You are in Preview Mode, do you want exit in order to view the published version of your website?</key>
|
||||
<key alias="viewPublishedContentAcceptButton">View published version</key>
|
||||
<key alias="viewPublishedContentDeclineButton">Stay in preview mode</key>
|
||||
</area>
|
||||
</language>
|
||||
|
||||
Reference in New Issue
Block a user