Skip to content

Commit 4366500

Browse files
Merge branch '7.1.2-Usky' of https://github.com/umbraco/UmbracoCms-Internal into 7.2.0
Conflicts: src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js
2 parents ee6e1a9 + 3b95184 commit 4366500

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,11 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, appS
264264
$scope.preview = function (content) {
265265
// Chromes popup blocker will kick in if a window is opened
266266
// outwith the initial scoped request. This trick will fix that.
267-
var previewWindow = $window.open('preview/?id=' + data.id, 'umbpreview');
267+
//
268+
var previewWindow = $window.open('preview/?id=' + content.id, 'umbpreview');
268269
$scope.save().then(function (data) {
269270
// Build the correct path so both /#/ and #/ work.
270-
var redirect = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + 'preview/?id=' + data.id;
271+
var redirect = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + '/preview/?id=' + data.id;
271272
previewWindow.location.href = redirect;
272273
});
273274
};

src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/embed.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div ng-controller="Umbraco.PropertyEditors.Grid.EmbedController">
22

3-
<div class="usky-editor-placeholder" ng-click="setEmbed())" ng-if="control.value === null">
3+
<div class="usky-editor-placeholder" ng-click="setEmbed()" ng-if="control.value === null">
44
<i class="icon icon-movie-alt"></i>
55
<div class="help-text">Click to embed</div>
66
</div>

src/Umbraco.Web.UI/Umbraco/preview/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link href="/Umbraco/lib/jquery/jquery-ui-1.10.4.custom.min.css" type="text/css" rel="stylesheet" />
88
</head>
99

10-
<body id="tuningPanel" ng-controller="Umbraco.tuningController">
10+
<body id="tuningPanel" ng-class="{open:isOpen}" ng-controller="Umbraco.tuningController">
1111

1212
<div class="wait" ng-show="!frameLoaded">Loading ...</div>
1313

src/Umbraco.Web.UI/Views/Partials/Grid/bootstrap3.cshtml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,19 @@
3636
</text>
3737
break;
3838
case "macro":
39+
if (control.value != null)
40+
{
41+
string macroAlias = control.value.macroAlias.ToString();
42+
ViewDataDictionary parameters = new ViewDataDictionary();
43+
foreach (dynamic mpd in control.value.marcoParamsDictionary)
44+
{
45+
parameters.Add(mpd.Name, mpd.Value);
46+
}
3947

40-
string macroAlias = control.value.macroAlias.ToString();
41-
ViewDataDictionary parameters = new ViewDataDictionary();
42-
foreach (dynamic mpd in control.value.marcoParamsDictionary)
43-
{
44-
parameters.Add(mpd.Name, mpd.Value);
48+
<text>
49+
@Umbraco.RenderMacro(macroAlias, parameters)
50+
</text>
4551
}
46-
47-
<text>
48-
@Umbraco.RenderMacro(macroAlias, parameters)
49-
</text>
5052
break;
5153
case "textstring":
5254

@@ -71,12 +73,15 @@
7173
break;
7274
case "media":
7375
<text>
74-
<div class="thumbnail">
75-
<img src="@control.value.image">
76-
</div>
77-
@if (control.value.caption != null)
78-
{
79-
<p class="caption">@control.value.caption</p>
76+
@if (control.value != null)
77+
{
78+
<div class="thumbnail">
79+
<img src="@control.value.image">
80+
</div>
81+
if (control.value.caption != null)
82+
{
83+
<p class="caption">@control.value.caption</p>
84+
}
8085
}
8186
</text>
8287
break;

0 commit comments

Comments
 (0)