diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index f599c1f051..f865dc322b 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -327,9 +327,13 @@ + + + + diff --git a/src/Umbraco.Web.UI/umbraco/images/download.png b/src/Umbraco.Web.UI/umbraco/images/download.png new file mode 100644 index 0000000000..0885c935e4 Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco/images/download.png differ diff --git a/src/Umbraco.Web.UI/umbraco/images/pencil.png b/src/Umbraco.Web.UI/umbraco/images/pencil.png new file mode 100644 index 0000000000..0bfecd50ee Binary files /dev/null and b/src/Umbraco.Web.UI/umbraco/images/pencil.png differ diff --git a/src/Umbraco.Web.UI/umbraco_client/ContextMenu/Css/jquery.contextMenu.css b/src/Umbraco.Web.UI/umbraco_client/ContextMenu/Css/jquery.contextMenu.css index 1a57a33180..6c1bd904b8 100644 --- a/src/Umbraco.Web.UI/umbraco_client/ContextMenu/Css/jquery.contextMenu.css +++ b/src/Umbraco.Web.UI/umbraco_client/ContextMenu/Css/jquery.contextMenu.css @@ -61,6 +61,8 @@ .context-menu-separator { padding-bottom:0; + height: 1px; + margin: 3px 0 3px 30px; border-bottom: 1px solid #DDD; } @@ -104,13 +106,9 @@ .context-menu-item.icon:before {} */ .context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 4px; } -.context-menu-item.icon-edit { background-image: url(../../../umbraco/images/copy.small.png); } -.context-menu-item.icon-cut { background-image: url(images/cut.png); } -.context-menu-item.icon-copy { background-image: url(images/page_white_copy.png); } -.context-menu-item.icon-paste { background-image: url(images/page_white_paste.png); } +.context-menu-item.icon-edit { background-image: url(../../../umbraco/images/pencil.png); } .context-menu-item.icon-delete { background-image: url(../../../umbraco/images/delete.small.png); } -.context-menu-item.icon-add { background-image: url(images/page_white_add.png); } -.context-menu-item.icon-quit { background-image: url(images/door.png); } +.context-menu-item.icon-download { background-image: url(../../../umbraco/images/download.png); } /* vertically align inside labels */ .context-menu-input > label > * { vertical-align: top; } diff --git a/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js b/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js index b0ce3788b2..29df398007 100644 --- a/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js +++ b/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js @@ -36,6 +36,26 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); return results.length == 1 ? results[0] : null; }, + _editItem: function (id) { + var self = this; + + var item = self._getItemById(id); + if (item === null) + throw Error("No item found with the id: " + id); + + window.location.href = "editMedia.aspx?id="+ item.Id(); + }, + + _downloadItem: function (id) { + var self = this; + + var item = self._getItemById(id); + if (item === null) + throw Error("No item found with the id: " + id); + + window.open(item.FileUrl(), "Download"); + }, + _deleteItem: function (id) { var self = this; @@ -232,6 +252,12 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); callback: function (key, options) { var id = options.$trigger.data("id"); switch (key) { + case "edit": + self._editItem(id); + break; + case "download": + self._downloadItem(id); + break; case "delete": self._deleteItem(id); break; @@ -239,6 +265,8 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); }, items: { "edit": { name: "Edit", icon: "edit" }, + "download": { name: "Download", icon: "download" }, + "separator1": "-----", "delete": { name: "Delete", icon: "delete" } }, animation: { show: "fadeIn", hide: "fadeOut" }