Make embed grid editor editable again (#8576)
This commit is contained in:
committed by
GitHub
parent
74bce68c61
commit
2f69eac833
@@ -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();
|
||||
}
|
||||
@@ -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;
|
||||
});
|
||||
@@ -122,7 +122,6 @@
|
||||
if ($scope.model.embed.url !== "") {
|
||||
showPreview();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function toggleConstrain() {
|
||||
@@ -130,19 +129,18 @@
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -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()"
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user