Skip to content

Commit

Permalink
Make embed grid editor editable again (#8576)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2f69eac)
  • Loading branch information
bjarnef authored and nul800sebastiaan committed Aug 26, 2020
1 parent b1cb792 commit 7d8a6ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
};

if ($scope.model.modify) {
angular.extend($scope.model.embed, $scope.model.modify);
Utilities.extend($scope.model.embed, $scope.model.modify);

showPreview();
}
Expand All @@ -34,7 +34,7 @@
vm.close = close;

function onInit() {
if(!$scope.model.title) {
if (!$scope.model.title) {
localizationService.localize("general_embed").then(function(value){
$scope.model.title = value;
});
Expand Down Expand Up @@ -122,27 +122,25 @@
if ($scope.model.embed.url !== "") {
showPreview();
}

}

function toggleConstrain() {
$scope.model.embed.constrain = !$scope.model.embed.constrain;
}

function submit() {
if($scope.model && $scope.model.submit) {
if ($scope.model && $scope.model.submit) {
$scope.model.submit($scope.model);
}
}

function close() {
if($scope.model && $scope.model.close) {
if ($scope.model && $scope.model.close) {
$scope.model.close();
}
}

onInit();

}

angular.module("umbraco").controller("Umbraco.Editors.EmbedController", EmbedController);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<umb-box-content>

<umb-control-group label="@general_url">
<input id="url" class="umb-property-editor input-block-level" type="text" style="margin-bottom: 10px;" ng-model="model.embed.url" ng-keyup="$event.keyCode == 13 ? vm.showPreview() : null" focus-when="{{true}}" required />
<input type="text" id="url" class="umb-property-editor input-block-level" ng-model="model.embed.url" ng-keyup="$event.keyCode == 13 ? vm.showPreview() : null" focus-when="{{true}}" required />
<umb-button
type="button"
action="vm.showPreview()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ angular.module("umbraco")

$scope.setEmbed = function () {

var original = Utilities.isObject($scope.control.value) ? $scope.control.value : null;
var modify = Utilities.isObject($scope.control.value) ? $scope.control.value : null;

var embed = {
original: original,
modify: modify,
submit: function (model) {

var embed = {
Expand Down

0 comments on commit 7d8a6ce

Please sign in to comment.