More changes to rte embed stuff related to Shannons comments
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
});
|
||||
@@ -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>
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user