Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make embed grid editor editable again #8576

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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