Missing imageHelper rename

This commit is contained in:
perploug
2013-08-23 15:49:43 +02:00
parent a7754c7e8c
commit bbc04c23b4

View File

@@ -1,7 +1,7 @@
angular.module("umbraco")
.controller("My.MarkdownEditorController",
//inject umbracos assetsServce and dialog service
function ($scope, assetsService, dialogService, $log, umbImageHelper) {
function ($scope, assetsService, dialogService, $log, imageHelper) {
//tell the assets service to load the markdown.editor libs from the markdown editors
//plugin folder
@@ -17,7 +17,7 @@ function ($scope, assetsService, dialogService, $log, umbImageHelper) {
"/app_plugins/markdowneditor/lib/markdown.editor.js"
])
.then(function () {
//this function will execute when all dependencies have loaded
var converter2 = new Markdown.Converter();
var editor2 = new Markdown.Editor(converter2, "-" + $scope.model.alias);
@@ -28,16 +28,18 @@ function ($scope, assetsService, dialogService, $log, umbImageHelper) {
dialogService.mediaPicker({ callback: function (data) {
$(data.selection).each(function (i, item) {
var imagePropVal = umbImageHelper.getImagePropertyVaue({ imageModel: item, scope: $scope });
callback(imagePropVal);
});
}
$(data.selection).each(function (i, item) {
var imagePropVal = imageHelper.getImagePropertyVaue({ imageModel: item, scope: $scope });
callback(imagePropVal);
});
}
});
return true; // tell the editor that we'll take care of getting the image url
});
});
//load the seperat css for the editor to avoid it blocking our js loading TEMP HACK
assetsService.loadCss("/app_plugins/markdowneditor/lib/markdown.css");
});