gnowledge/gstudio — pull request #888 by AvadootNachankar (2014-10-21 17:46:56+00:00)
Title: Drawer-widget compatibility issue resolved with RelationType widgets used in MIS GApp

**1. views/methods.py**

- ```get_drawers()``` modified
- Special check added for handling "RelationType" widget's data
- Processing required for pagination is handled in this function only
- Work related to pagination is avoided for "RelationType" widget
- Returned parameter's modified:
- If RelationType widget found, then only drawers' data is returned
- Else, pagination data is also returned along with drawers' data

**2. templatetags/ndf_tags.py**

- ```edit_drawer_widget()``` modified
- New functional parameters added: *page_no*, **kwargs
- Special check added for handling "RelationType" widget's data

**3. templates/ndf/drawer_widget.html**

- Don't apply pagination & ajax-based search to RelationType widgets used in MIS Gapp
- Passing a context variable **is_RT** that holds value as **RelationType** if used in MIS GApp. Otherwise, it doesn't holds any value; which helps in distinguishing between the two scenarios.
- Right button's click modified that makes an ajax-call (for saving selected elements from left drawer at the time of passing them to right drawer)
- Now if *is_RT* doesn't holds any value then only such call is made
- Bind event for search input box modified that makes an ajax-call to search given text (when search-text's length is > 2)
- Now if *is_RT* doesn't holds any value then only such call is made

**4. templates/ndf/html_field_widget.html**

- Call to ```edit_drawer_widget``` template tag modified
- Passing parameters using python positional arguments
- Passing very first argument's value as *RelationType*; indicating here we are dealing with RelationType widget
- Passing left drawer's content via *left_drawer_content*

**5. views/ajax_views.py**

- print statements removed
- Call to ```get_drawers()``` function modified accordingly and Pagination processing content commented in following functions:
- ```drawer_widget()```
- ```select_drawer()```
- ```search_drawer()```
- ```get_anncourses_allstudents()``` modified:
- Call to ```edit_drawer_widget``` template tag modified
- Passing parameters using python positional arguments
- Passing very first argument's value as *RelationType*; indicating here we are dealing with RelationType widget
- Passing left drawer's content via *left_drawer_content*

**6. templates/ndf/student_list.html**

- Due to removal of *Action* dropdown, need to find a new position for **Enroll in Courses** option

**7. templates/ndf/student_enroll.html**

- *script* & *document_ready* block tags implemented based on latest changes made in ```base.html```