#4011 - Not using a unnecessary function call in views

This commit is contained in:
Bjarke Berg
2019-04-02 09:15:30 +02:00
parent d58106d976
commit 76e2f2f380
2 changed files with 1 additions and 4 deletions

View File

@@ -17,9 +17,6 @@ angular.module("umbraco")
$scope.embedHtml = getEmbed();
}, false);
$scope.hasEmbed = function() {
return $scope.control.value !== null;
}
$scope.setEmbed = function() {
var embed = {
submit: function(model) {

View File

@@ -1,6 +1,6 @@
<div ng-controller="Umbraco.PropertyEditors.Grid.EmbedController">
<div class="umb-editor-placeholder" ng-click="setEmbed()" ng-if="hasEmbed() === false">
<div class="umb-editor-placeholder" ng-click="setEmbed()" ng-if="control.value === null">
<i class="icon icon-movie-alt"></i>
<div class="help-text"><localize key="grid_clickToEmbed">Click to embed</localize></div>
</div>