More changes to rte embed stuff related to Shannons comments

This commit is contained in:
Tim Geyssens
2013-09-16 12:31:07 +02:00
parent 940f7f4534
commit f38fc69ec7
4 changed files with 6 additions and 11 deletions

View File

@@ -385,7 +385,7 @@ angular.module('umbraco.services')
* Opens a dialog to an embed dialog
*/
embedDialog: function (options) {
options.template = 'views/common/dialogs/embed.html';
options.template = 'views/common/dialogs/rteembed.html';
options.show = true;
return openDialog(options);
},

View File

@@ -6,7 +6,7 @@
$scope.preview = "";
$scope.success = false;
$scope.preview = function () {
$scope.preview = function(){
if ($scope.url != "") {
@@ -14,7 +14,7 @@
$scope.success = false;
$http({ method: 'GET', url: '/umbraco/UmbracoApi/RteEmbed/Embed', params: { url: $scope.url, width: $scope.width, height: $scope.height } })
$http({ method: 'GET', url: '/umbraco/UmbracoApi/RteEmbed/GetEmbed', params: { url: $scope.url, width: $scope.width, height: $scope.height } })
.success(function(data) {
$scope.preview = data.Markup;
$scope.success = true;
@@ -27,7 +27,7 @@
};
$scope.insert = function () {
$scope.insert = function(){
$scope.submit($scope.preview);
};
});

View File

@@ -1,6 +1,5 @@
<div class="umb-panel" ng-controller="Umbraco.Dialogs.RteEmbedController">
<div class="umb-panel-header">
<div class="umb-el-wrap umb-panel-buttons">
<div class="btn-toolbar umb-btn-toolbar">
@@ -9,7 +8,6 @@
</div>
</div>
<div class="umb-panel-body umb-scrollable" auto-scale="1">
<div class="umb-panel">
<div class="umb-control-group">
@@ -17,14 +15,11 @@
<label for="url">Url</label>
<input id="url" type="text" ng-model="url" ng-change="preview()"/>
<label>Size:</label>
<input type="text" ng-model="width"/> x <input type="text" ng-model="height" />
<label for="constrain">Constrain:</label>
<input id="constrain" type="checkbox" ng-model="constrain"/>
<div ng-bind-html-unsafe="preview">
</div>

View File

@@ -22,8 +22,8 @@ namespace Umbraco.Web.PropertyEditors
[PluginController("UmbracoApi")]
public class RteEmbedController : UmbracoAuthorizedJsonController
{
[HttpGet]
public Result Embed(string url, int width, int height)
public Result GetEmbed(string url, int width, int height)
{
var result = new Result();