Fixes: U4-3295 When adding a new related link by the picker, nothing is saved/displayed

This commit is contained in:
Tim Geyssens
2013-11-04 10:48:43 +01:00
parent 1d72800c80
commit 5bbb54d6d0
2 changed files with 6 additions and 13 deletions

View File

@@ -14,28 +14,17 @@
$scope.addExternal = true;
$scope.currentEditLink = null;
$scope.hasError = false;
//$scope.relatedLinks = [
// { caption: 'Google', link: "http://google.com", newWindow: false, edit:false },
// { caption: 'Umbraco', link: "http://umbraco.com", newWindow: false, edit: false },
// { caption: 'Nibble', link: "http://nibble.be", newWindow: false, edit: false }
//];
$scope.internal = function ($event) {
$scope.currentEditLink = null;
var d = dialogService.contentPicker({ scope: $scope, multipicker: false, callback: select });
$event.preventDefault();
};
$scope.selectInternal = function ($event, link) {
$scope.currentEditLink = link;
var d = dialogService.contentPicker({ scope: $scope, multipicker: false, callback: select });
$event.preventDefault();
};

View File

@@ -16,8 +16,12 @@
<input type="text" ng-model="link.caption" ng-show="link.edit"/>
</td>
<td>
<a href="{{link.link}}" target="_blank" ng-show="!link.edit && !link.isInternal">{{link.link}}</a>
<a href="#/content/content/edit/{{link.internal}}" target="_blank" ng-show="!link.edit && link.isInternal">{{link.internalName}}</a>
<div ng-show="!link.edit">
<a href="{{link.link}}" target="_blank" ng-show="!link.isInternal">{{link.link}}</a>
<a href="#/content/content/edit/{{link.internal}}" target="_blank" ng-show="link.isInternal" ng-bind="link.iternalName">
</a>
</div>
<div ng-show="link.edit">
<div ng-show="!link.isInternal">
<input type="text" ng-model="link.link"/><br />