Closed NejcZupec closed 12 years ago
Please update with latest from main repository.
Ping.
Tried it out. It is getting better. :-)
I don't like the loading sign when you are resizing the window. This is just ugly. Why would that be useful? I know that I am resizing the window. :-) Just leave it displayed and rewrap the windows as you can, you can do also a very quick animation to move them around, if you want.
Don't tell me that you are doing GET Ajax requests to store state on the server?
Drag and dropping does not always work. Sometimes it simply does not allow dropping on columns.
For collapsing, add some icon on the edge of the title space, not just collapse on every click. Change mouse into dragging when you are over title space.
I'll fix other comments in next days... ;)
Will wait for that. :-)
I've fixed almost everything, except:
1) Hard-coded URLs What is the best way to remove hard-coded URL? Constants defined in settings.py? And how can I get them in JS script?
2) Hiding div panels, while AJAX is moving panels around I'd like to hide div panels, but I don't know how. I've already tried to hide div and then show it back with CSS visibility value. But this is not working, because JavaScript is asynchronous. I've also tried callback functions. How can I fix that?
What is the best way to remove hard-coded URL? Constants defined in settings.py? And how can I get them in JS script?
No, you don't need constants. Django can resolve them for you. You just name them in urls.py
and then Django knows how to give you the URL. You then a global JavaScript variable in the template where you store that URL into a variable. The best is to define a dict:
/* <![CDATA[ */
var piplMeshAPI = {
'panels': '{% filter escapejs %}{% url "panels" %}{% endfilter %}'
};
/* ]]> */
Hiding div panels, while AJAX is moving panels around
I don't understand this question.
It looks nice. But still I cannot always drag and drop to some columns. If I move away, it sometimes does not allow to move to another column.
More work is needed.
Please tell me when you will fix everything. :-)
Ok. I need a few hours ;) I'll notify you.
Ok, I think, I've fixed almost everything... actually, I hope so :)
Fixed. Why is GET better than POST in this example?
Because it allows you to have the same view both for reading and updating the state. GET for reading, POST for updating.
I will not read and comment until you fix everything what I have already commented. Things are still not good. So, JavaScript style, too much for loops, spaces, how you do HTTP requests, database schema. All needs polishing. Please make a comment when you fix all of those.
Please update from main repository.
Now you will have to update from main repository, because the file is already there. :-)
Please update from main repository.
Please update from main repository.
So, do you want me to pull this in or will you try to remove JSON and change the model? How much in a hurry are you?
So, add TODOs and open tickets for things you will not do and link them here.
You can check 9a689d6e1143a8061a79e305d0fa926caf55eb97 to see how some things could be cleaned.
This is a new pull request for main page panels. Panels are now draggable and droppable. Their position and collapsed status is saved in database. Everything is made with ajax. When window size is changed, all panels are reallocated.