gnowledge/gstudio — pull request #898 by sunnychaudhari (2014-10-31 08:11:15+00:00)
Title: Collection save is made on click of save button

#### Feature Enhancements ####
* Collection save is made on click of save button itself , previously saving of collection elements are made on right shift button in collection drawer, due to which lot of confusion occured.

* Bug resolved in removing of collection elements

* Conditions modified for removal of multiple collection elements

* Previously unnecessarily code was manipulating collections , prior node, teaches , assesses list and metadata on saving of each and every node , now conditions added according to the selection type , it means collections will get manipulated or saved when user clicks on collection tab, teaches list will be manipulated or saved when user clicks on teaches tab ....and so on.

* Also check is made for saving of metadata info.

* Input hidden field is added in drawer_widget.html for identifying the selection type such as collection, requires, teaches, assesses lists.
Also input hidden field is added on click of metadata tab so as to check the saving of metadata info for a node.

* These conditions and checks were added while saving of each node according to the selection tab.
```get_node_common_ field() ``` method is modified in ```methods.py``` with above checks and conditions.

* Code removed on right shift collection save in drawer_widget.html template.

* While making homogeneous collections , previously there was only right shift button visible, now left shift and right shift buttons are visible since user can also remove collection elements from homogeneous collection of node.

* Shift up and shift down button in collection drawers are disabled while in homogeneous collection , since ordering doesnt makes sense in homogeneous.

* For heterogeneous collections all left , right, up, down shift buttons are visible.

* Need to work on search which kept on collection drawers since its not working properly as expected.

* Also while displaying collections in left panel now looping of collection elements are avoided. But i havent modified the code while saving of element as a collection which makes a loop in its parent hierarchy.

* Now we just need to add the checks while saving of such elements as a collection. Currently such elements are added and saved but if looping found in collection hierarchy it will not display the collection hierarchy.
I will be adding those conditions in next commit so that while saving collection itself such elements wil not be able to save which makes loop within its own or its parent hierarchy.

#### What is to test ####
* check whether collection , requires, teaches lists are saving properly on click of save button.

* check whether all right drawer elements can be removed or not.

* Now collection can be saved on click of save button bellow the drawers. Save button is now enabled for all selection types( such as collection, requires, teaches and assesses lists) to save.

* do not try to make any loop within the entire collection hierarchy of a node. Since if you make a loop you will not be able to see collection hierarchy. Currently working on the same.