angularjs-dragula icon indicating copy to clipboard operation
angularjs-dragula copied to clipboard

Save position

Open bokrizan opened this issue 7 years ago • 2 comments

Is there any way to store custom position to the base, so when the user next time login, the position of the box are not changed. I don't want to store position to local storage or cookie, I want to store position to API.

bokrizan avatar Sep 22 '17 10:09 bokrizan

@bokrizan Have some ideas now? I want make the same thing work.

Shakell avatar May 09 '18 08:05 Shakell

first, you need to get all div id in order like on your web page (when you with dragula change position), and after, I push this ID in the array and send to the server var orderById = []; var orderDiv = $("#dragulaBox").children("div"); angular.forEach (orderDiv, function(key, value){ orderById.push(key.id); }) var data = {graphsConfig: orderById}; $http.post(someURL, data, config)

And, when you again come back to site, you get from your API array with order.

bokrizan avatar May 10 '18 11:05 bokrizan