-
Notifications
You must be signed in to change notification settings - Fork 197
Changes in common jqGrid dialogs
jqGrid uses by default jqModal.js
and jqDnR.js
plugins to create modal dialogs used in different parts of the code, mostly for form editing, in navigator bar and in searching dialog. jqGrid has the methods $.jgrid.createModal
, $.jgrid.viewModal
, $.jgrid.hideModal
, $.jgrid.closeModal
, $.jgrid.showModal
and $.jgrid.info_dialog
which are based on the methods from jqModal.js
and jqDnR.js
. The methods used in other parts of jqGrid to display modal dialogs.
One more common problem of the dialog methods was the behavior on closing. By default jqGrid hid all dialogs instead of destroying them. As the result the Add/Edit dialog stayed in memory, all event handlers (for onClick events) remain bound, the DOM element of the grid remains in use by the event handlers, the ids with the name of the columns will be used as ids of the Add/Edit form and stay in use (they exist) on closing of the form. All the above behavior can make small and, occasionally, large problems.
The code of jqModal.js
and jqDnR.js
plugins included in jqGrid 4.7 and earlier is difficult to read and understand. The code looks more like minimized code than the original JavaScript code.
Free jqGrid 4.8 contains a lot of renaming and reformatting of the code of jqModal.js
and jqDnR.js
to make it more readable. Additionally, the code of jqDnR.js
wasa changed to support drag and drop and resizing of dialogs on touch devices like iPad and the touch events of Windows 8.
Free jqGrid changed the behavior on closing of Add/Edit/Search/Delete form so that the form is destroyed by default on closing. Only the width, height and the position of the corresponding Dialog are saved by default. The next time the dialog is opened, the previous width, height and the position are used. If the recreateForm: true
option or recreateFilter: true
option is used then the saved width, height and the position are ignored.