Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save position #119

Open
bokrizan opened this issue Sep 22, 2017 · 2 comments
Open

Save position #119

bokrizan opened this issue Sep 22, 2017 · 2 comments

Comments

@bokrizan
Copy link

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.

@Shakell
Copy link

Shakell commented May 9, 2018

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

@bokrizan
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants