diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.html
index bf02c48a3d..7db829bb03 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.html
@@ -1,5 +1,22 @@
+
+
+
+
+
+
+
+ on-sort="vm.sort">
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.listviewlayout.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.listviewlayout.controller.js
index b77b7478d0..73718b2530 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.listviewlayout.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/layouts/list/list.listviewlayout.controller.js
@@ -1,16 +1,25 @@
(function() {
"use strict";
- function ListViewListLayoutController($scope, listViewHelper, $location) {
+ function ListViewListLayoutController($scope, listViewHelper, $location, mediaHelper) {
var vm = this;
+
+ vm.nodeId = $scope.contentId;
+ vm.acceptedFileTypes = mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes);
+ vm.activeDrag = false;
+
vm.selectItem = selectItem;
vm.clickItem = clickItem;
vm.selectAll = selectAll;
vm.isSelectedAll = isSelectedAll;
vm.isSortDirection = isSortDirection;
vm.sort = sort;
+ vm.dragEnter = dragEnter;
+ vm.dragLeave = dragLeave;
+ vm.onFilesQueue = onFilesQueue;
+ vm.onUploadComplete = onUploadComplete;
function selectAll($event) {
listViewHelper.selectAllItems($scope.items, $scope.selection, $event);
@@ -39,6 +48,23 @@
}
}
+ // Dropzone upload functions
+ function dragEnter(el, event) {
+ vm.activeDrag = true;
+ }
+
+ function dragLeave(el, event) {
+ vm.activeDrag = false;
+ }
+
+ function onFilesQueue() {
+ vm.activeDrag = false;
+ }
+
+ function onUploadComplete() {
+ $scope.getContent($scope.contentId);
+ }
+
}
angular.module("umbraco").controller("Umbraco.PropertyEditors.ListView.ListLayoutController", ListViewListLayoutController);