Update to rte embed stuff following Shannons comments
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
angular.module("umbraco").controller("Umbraco.Dialogs.EmbedController", function ($scope, $http) {
|
||||
angular.module("umbraco").controller("Umbraco.Dialogs.RteEmbedController", function ($scope, $http) {
|
||||
$scope.url = "";
|
||||
$scope.width = 500;
|
||||
$scope.height = 300;
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
$scope.success = false;
|
||||
|
||||
$http({ method: 'POST', url: '/umbraco/UmbracoApi/Embed/Embed', params: { url: $scope.url, width: $scope.width, height: $scope.height } })
|
||||
$http({ method: 'POST', url: '/umbraco/UmbracoApi/RteEmbed/Embed', params: { url: $scope.url, width: $scope.width, height: $scope.height } })
|
||||
.success(function(data) {
|
||||
$scope.preview = data.Markup;
|
||||
$scope.success = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="umb-panel" ng-controller="Umbraco.Dialogs.EmbedController">
|
||||
<div class="umb-panel" ng-controller="Umbraco.Dialogs.RteEmbedController">
|
||||
|
||||
|
||||
<div class="umb-panel-header">
|
||||
|
||||
@@ -6,19 +6,20 @@ using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Web.Editors;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
using Umbraco.Core.Media;
|
||||
using System.IO;
|
||||
|
||||
namespace Umbraco.Web.Editors
|
||||
namespace Umbraco.Web.PropertyEditors
|
||||
{
|
||||
/// <summary>
|
||||
/// A controller used for the embed dialog
|
||||
/// </summary>
|
||||
[PluginController("UmbracoApi")]
|
||||
public class EmbedController : UmbracoAuthorizedJsonController
|
||||
public class RteEmbedController : UmbracoAuthorizedJsonController
|
||||
{
|
||||
public Result Embed(string url, int width, int height)
|
||||
{
|
||||
@@ -304,7 +304,7 @@
|
||||
<Compile Include="Editors\DashboardController.cs" />
|
||||
<Compile Include="Editors\DataTypeController.cs" />
|
||||
<Compile Include="Editors\DataTypeValidateAttribute.cs" />
|
||||
<Compile Include="Editors\EmbedController.cs" />
|
||||
<Compile Include="PropertyEditors\RteEmbedController.cs" />
|
||||
<Compile Include="Editors\EntityController.cs" />
|
||||
<Compile Include="Editors\MediaPostValidateAttribute.cs" />
|
||||
<Compile Include="Editors\MemberController.cs" />
|
||||
|
||||
Reference in New Issue
Block a user