Whoops, broke build, now fixed
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
angular.module("umbraco")
|
||||
.controller("My.MarkdownEditorController",
|
||||
//inject umbracos assetsServce
|
||||
function ($scope,assetsService) {
|
||||
//inject umbracos assetsServce and dialog service
|
||||
function ($scope,assetsService, dialogService) {
|
||||
|
||||
//tell the assets service to load the markdown.editor libs from the markdown editors
|
||||
//plugin folder
|
||||
@@ -21,6 +21,29 @@ function ($scope,assetsService) {
|
||||
var converter2 = new Markdown.Converter();
|
||||
var editor2 = new Markdown.Editor(converter2, "-" + $scope.model.alias);
|
||||
editor2.run();
|
||||
|
||||
//subscribe to the image dialog clicks
|
||||
editor2.hooks.set("insertImageDialog", function (callback) {
|
||||
alert("Please click okay to start scanning your brain...");
|
||||
|
||||
dialogService.mediaPicker({callback: function(data){
|
||||
$(data.selection).each(function(i, item){
|
||||
alert(item);
|
||||
});
|
||||
}});
|
||||
|
||||
/*
|
||||
setTimeout(function () {
|
||||
var prompt = "We have detected that you like cats. Do you want to insert an image of a cat?";
|
||||
if (confirm(prompt))
|
||||
callback("http://icanhascheezburger.files.wordpress.com/2007/06/schrodingers-lolcat1.jpg")
|
||||
else
|
||||
callback(null);
|
||||
}, 2000);
|
||||
*/
|
||||
|
||||
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
|
||||
|
||||
@@ -59,22 +59,6 @@ namespace Umbraco.Web.Editors
|
||||
throw new HttpResponseException(HttpStatusCode.Unauthorized);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all users
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public UserDetail GetCurrentUser()
|
||||
{
|
||||
var attempt = UmbracoContext.Security.AuthorizeRequest();
|
||||
if (attempt == ValidateRequestAttempt.Success)
|
||||
{
|
||||
var user = Services.UserService.GetUserById(UmbracoContext.Security.GetUserId());
|
||||
return _userModelMapper.ToUserDetail(user);
|
||||
}
|
||||
|
||||
//return Unauthorized (401) because the user is not authorized right now
|
||||
throw new HttpResponseException(HttpStatusCode.Unauthorized);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a user in
|
||||
|
||||
Reference in New Issue
Block a user