Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to create a custom contentpicker to use in grid, where it would be nice to make it possible to pick multiple items.
So far i've been able to add and store one item at a time to the contentpicker and my code is like this.
controllers.js
angular.module("umbraco") .controller("Umbraco.SNCPPropertyEditors.Grid.ContentController", function ($scope, $timeout, dialogService, contentResource) { $scope.setContentId = function () { dialogService.contentPicker({ multiPicker: false, callback: function (data) { $scope.control.value = { id: data.id, name: data.name, }; $scope.setPreview(); } }); }; $scope.setPreview = function () { if ($scope.control.value.id) { $scope.id = $scope.control.value.id; $scope.name = $scope.control.value.name; } }; $timeout(function () { if ($scope.control.$initializing) { $scope.setContentId(); } else { $scope.setPreview(); } }, 200); });
I've tried to set multipicker to true and add a foreach to store data for each item, but then the dialogservice don't show the "select".
An other question i have is this: How can i store other data than id/name from my picked content - eg. image url to use in the grid preview?
Any hints/tips are welcome :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Custom contentpicker - multipicker not allowing picking multiple items
I'm trying to create a custom contentpicker to use in grid, where it would be nice to make it possible to pick multiple items.
So far i've been able to add and store one item at a time to the contentpicker and my code is like this.
controllers.js
I've tried to set multipicker to true and add a foreach to store data for each item, but then the dialogservice don't show the "select".
An other question i have is this: How can i store other data than id/name from my picked content - eg. image url to use in the grid preview?
Any hints/tips are welcome :)
is working on a reply...