rails_jq_grid 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. data/COPYRIGHT.txt +17 -0
  2. data/GPL-LICENSE +675 -0
  3. data/README.rdoc +176 -0
  4. data/Rakefile +47 -0
  5. data/VERSION +1 -0
  6. data/app/helpers/rails_jq_grid/jq_grid_css_helper.rb +29 -0
  7. data/app/helpers/rails_jq_grid/jq_grid_helper.rb +21 -0
  8. data/app/helpers/rails_jq_grid/jq_grid_js_helper.rb +30 -0
  9. data/app/models/rails_jq_grid/jq_grid.rb +315 -0
  10. data/app/models/rails_jq_grid/jq_grid_column.rb +33 -0
  11. data/app/models/rails_jq_grid/jq_grid_method_missing.rb +50 -0
  12. data/app/models/rails_jq_grid/jq_grid_option_or_method.rb +46 -0
  13. data/lib/rails_jq_grid/acts_as_jq_grid_able.rb +76 -0
  14. data/lib/rails_jq_grid/acts_as_jq_grid_data_source.rb +34 -0
  15. data/lib/rails_jq_grid/engine.rb +23 -0
  16. data/lib/rails_jq_grid.rb +7 -0
  17. data/lib/tasks/rails_jq_grid.rake +1 -0
  18. data/public/javascripts/rails-jqgrid/Changes.txt +1160 -0
  19. data/public/javascripts/rails-jqgrid/i18n/grid.locale-bg.js +1 -0
  20. data/public/javascripts/rails-jqgrid/i18n/grid.locale-bg1251.js +1 -0
  21. data/public/javascripts/rails-jqgrid/i18n/grid.locale-cat.js +1 -0
  22. data/public/javascripts/rails-jqgrid/i18n/grid.locale-cn.js +1 -0
  23. data/public/javascripts/rails-jqgrid/i18n/grid.locale-cs.js +1 -0
  24. data/public/javascripts/rails-jqgrid/i18n/grid.locale-de.js +1 -0
  25. data/public/javascripts/rails-jqgrid/i18n/grid.locale-dk.js +1 -0
  26. data/public/javascripts/rails-jqgrid/i18n/grid.locale-el.js +1 -0
  27. data/public/javascripts/rails-jqgrid/i18n/grid.locale-en.js +1 -0
  28. data/public/javascripts/rails-jqgrid/i18n/grid.locale-es.js +1 -0
  29. data/public/javascripts/rails-jqgrid/i18n/grid.locale-fa.js +1 -0
  30. data/public/javascripts/rails-jqgrid/i18n/grid.locale-fi.js +1 -0
  31. data/public/javascripts/rails-jqgrid/i18n/grid.locale-fr.js +1 -0
  32. data/public/javascripts/rails-jqgrid/i18n/grid.locale-he.js +1 -0
  33. data/public/javascripts/rails-jqgrid/i18n/grid.locale-hu.js +1 -0
  34. data/public/javascripts/rails-jqgrid/i18n/grid.locale-is.js +1 -0
  35. data/public/javascripts/rails-jqgrid/i18n/grid.locale-it.js +1 -0
  36. data/public/javascripts/rails-jqgrid/i18n/grid.locale-ja.js +1 -0
  37. data/public/javascripts/rails-jqgrid/i18n/grid.locale-nl.js +1 -0
  38. data/public/javascripts/rails-jqgrid/i18n/grid.locale-no.js +1 -0
  39. data/public/javascripts/rails-jqgrid/i18n/grid.locale-pl.js +1 -0
  40. data/public/javascripts/rails-jqgrid/i18n/grid.locale-pt-br.js +1 -0
  41. data/public/javascripts/rails-jqgrid/i18n/grid.locale-pt.js +1 -0
  42. data/public/javascripts/rails-jqgrid/i18n/grid.locale-ro.js +1 -0
  43. data/public/javascripts/rails-jqgrid/i18n/grid.locale-ru.js +1 -0
  44. data/public/javascripts/rails-jqgrid/i18n/grid.locale-sk.js +1 -0
  45. data/public/javascripts/rails-jqgrid/i18n/grid.locale-sv.js +1 -0
  46. data/public/javascripts/rails-jqgrid/i18n/grid.locale-tr.js +1 -0
  47. data/public/javascripts/rails-jqgrid/i18n/grid.locale-ua.js +1 -0
  48. data/public/javascripts/rails-jqgrid/install.txt +43 -0
  49. data/public/javascripts/rails-jqgrid/jquery-1.4.2.min.js +154 -0
  50. data/public/javascripts/rails-jqgrid/jquery-ui-1.8.4.custom.min.js +763 -0
  51. data/public/javascripts/rails-jqgrid/jquery.jqGrid.min.js +445 -0
  52. data/public/javascripts/rails-jqgrid/src/JsonXml.js +330 -0
  53. data/public/javascripts/rails-jqgrid/src/css/ellipsis-xbl.xml +13 -0
  54. data/public/javascripts/rails-jqgrid/src/css/jquery.searchFilter.css +7 -0
  55. data/public/javascripts/rails-jqgrid/src/css/ui.jqgrid.css +129 -0
  56. data/public/javascripts/rails-jqgrid/src/css/ui.multiselect.css +30 -0
  57. data/public/javascripts/rails-jqgrid/src/grid.base.js +3003 -0
  58. data/public/javascripts/rails-jqgrid/src/grid.celledit.js +486 -0
  59. data/public/javascripts/rails-jqgrid/src/grid.common.js +636 -0
  60. data/public/javascripts/rails-jqgrid/src/grid.custom.js +818 -0
  61. data/public/javascripts/rails-jqgrid/src/grid.formedit.js +1872 -0
  62. data/public/javascripts/rails-jqgrid/src/grid.import.js +201 -0
  63. data/public/javascripts/rails-jqgrid/src/grid.inlinedit.js +250 -0
  64. data/public/javascripts/rails-jqgrid/src/grid.jqueryui.js +503 -0
  65. data/public/javascripts/rails-jqgrid/src/grid.loader.js +47 -0
  66. data/public/javascripts/rails-jqgrid/src/grid.postext.js +64 -0
  67. data/public/javascripts/rails-jqgrid/src/grid.setcolumns.js +126 -0
  68. data/public/javascripts/rails-jqgrid/src/grid.subgrid.js +260 -0
  69. data/public/javascripts/rails-jqgrid/src/grid.tbltogrid.js +106 -0
  70. data/public/javascripts/rails-jqgrid/src/grid.treegrid.js +483 -0
  71. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-bg.js +132 -0
  72. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-bg1251.js +132 -0
  73. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-cat.js +128 -0
  74. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-cn.js +132 -0
  75. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-cs.js +128 -0
  76. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-de.js +128 -0
  77. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-dk.js +128 -0
  78. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-el.js +126 -0
  79. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-en.js +128 -0
  80. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-es.js +128 -0
  81. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-fa.js +125 -0
  82. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-fi.js +130 -0
  83. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-fr.js +126 -0
  84. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-he.js +127 -0
  85. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-hu.js +129 -0
  86. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-is.js +126 -0
  87. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-it.js +1 -0
  88. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-ja.js +155 -0
  89. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-nl.js +149 -0
  90. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-no.js +1 -0
  91. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-pl.js +127 -0
  92. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-pt-br.js +127 -0
  93. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-pt.js +125 -0
  94. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-ro.js +139 -0
  95. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-ru.js +127 -0
  96. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-sk.js +127 -0
  97. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-sv.js +127 -0
  98. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-tr.js +126 -0
  99. data/public/javascripts/rails-jqgrid/src/i18n/grid.locale-ua.js +127 -0
  100. data/public/javascripts/rails-jqgrid/src/jqDnR.js +68 -0
  101. data/public/javascripts/rails-jqgrid/src/jqModal.js +69 -0
  102. data/public/javascripts/rails-jqgrid/src/jquery.fmatter.js +542 -0
  103. data/public/javascripts/rails-jqgrid/src/jquery.searchFilter.js +716 -0
  104. data/public/javascripts/rails-jqgrid/src/ui.multiselect.js +314 -0
  105. data/public/stylesheets/rails-jqgrid/ellipsis-xbl.xml +13 -0
  106. data/public/stylesheets/rails-jqgrid/themes/AUTHORS.txt +30 -0
  107. data/public/stylesheets/rails-jqgrid/themes/GPL-LICENSE.txt +278 -0
  108. data/public/stylesheets/rails-jqgrid/themes/MIT-LICENSE.txt +25 -0
  109. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  110. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  111. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  112. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  113. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  114. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  115. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  116. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  117. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-icons_222222_256x240.png +0 -0
  118. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  119. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-icons_454545_256x240.png +0 -0
  120. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-icons_888888_256x240.png +0 -0
  121. data/public/stylesheets/rails-jqgrid/themes/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  122. data/public/stylesheets/rails-jqgrid/themes/smoothness/jquery-ui-1.8.4.custom.css +572 -0
  123. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-bg_flat_55_999999_40x100.png +0 -0
  124. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-bg_flat_75_aaaaaa_40x100.png +0 -0
  125. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-bg_glass_45_0078ae_1x400.png +0 -0
  126. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-bg_glass_55_f8da4e_1x400.png +0 -0
  127. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-bg_glass_75_79c9ec_1x400.png +0 -0
  128. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png +0 -0
  129. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png +0 -0
  130. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png +0 -0
  131. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  132. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-icons_0078ae_256x240.png +0 -0
  133. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-icons_056b93_256x240.png +0 -0
  134. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-icons_d8e7f3_256x240.png +0 -0
  135. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-icons_e0fdff_256x240.png +0 -0
  136. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-icons_f5e175_256x240.png +0 -0
  137. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-icons_f7a50d_256x240.png +0 -0
  138. data/public/stylesheets/rails-jqgrid/themes/start/images/ui-icons_fcd113_256x240.png +0 -0
  139. data/public/stylesheets/rails-jqgrid/themes/start/jquery-ui-1.8.4.custom.css +573 -0
  140. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png +0 -0
  141. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
  142. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-bg_glass_20_555555_1x400.png +0 -0
  143. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png +0 -0
  144. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png +0 -0
  145. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
  146. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
  147. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png +0 -0
  148. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png +0 -0
  149. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-icons_222222_256x240.png +0 -0
  150. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-icons_4b8e0b_256x240.png +0 -0
  151. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-icons_a83300_256x240.png +0 -0
  152. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-icons_cccccc_256x240.png +0 -0
  153. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/images/ui-icons_ffffff_256x240.png +0 -0
  154. data/public/stylesheets/rails-jqgrid/themes/ui-darkness/jquery-ui-1.8.4.custom.css +572 -0
  155. data/public/stylesheets/rails-jqgrid/themes/version.txt +1 -0
  156. data/public/stylesheets/rails-jqgrid/ui.jqgrid.css +2 -0
  157. data/rails_jq_grid.gemspec +200 -0
  158. data/spec/spec.opts +1 -0
  159. data/spec/spec_helper.rb +8 -0
  160. metadata +240 -0
@@ -0,0 +1,1160 @@
1
+ 3.6 version
2
+ ===========
3
+ Bug Fixes
4
+ ---------
5
+ * Fix problem with getAbsoluteIndex on IE8
6
+ * Fix in triggerReload grid to reset the savedRow array.
7
+ * Fix in setGridWidth method when try to resize a grid a and there is no data.
8
+ * Fix header aligment in ie8
9
+ * Fix in createEl function to check for val and not for html when select
10
+ * making getChangedCells method compatible with unformat function if defined
11
+ * Fixed record count when scroll true
12
+ * Fix in setSelection method to accept numbers
13
+ * Fix IE header checkbox when multiselect is true
14
+ * Fix for searching DOM elements with id containing special characters
15
+ * Fix a checkbox checking in form editing module.
16
+ * Fix getCol to use unformat function
17
+ * Better looking buttons in form editing
18
+ * Fix searchFilter in IE7 and IE6 not to return undefined value when more
19
+ than one field is searched.
20
+ * Some fixes for datepicker UI in inline and cell edit (when present)
21
+ * Fix in setLabel method not to clear the sort icons when we set new label
22
+ * Fix in form edit when a formatter select is used
23
+ * Fix the id pollution when multiselect is enabled. Now the id of every
24
+ common multiselect is combination of cb_ + id of the grid
25
+ * Fixed bug when deselectAfterSort false and we are in multiselect mode
26
+ * Fix in unformat number and currency
27
+ * Fixed bug when creating a select with dataUrl and select is set to multiple.
28
+ * Fix a bug when creating select with multiple option. Also the attribute
29
+ should be set immediatley after the element is created and not after.
30
+ * Fix a bug in form edit. The comapared values should be trimed since of
31
+ split(",") which cause the elements to begin with space.
32
+ * Fix a jqGrid loader (development version) for IE browsers
33
+ * Fix for form icons in Opera
34
+ * Fix getGridParam to return values 0 or false
35
+ * Avoiding the overhead of local functions and maintenance issues when the
36
+ parameters change
37
+ * Opera fix for cursor col-resize
38
+ * Fix in editGridRow when a save key is defined and the key is Eneter we
39
+ should not do save when we are in teaxtarea element
40
+ * Fix in formatter checkbox when the value is undefined. We also add a
41
+ default format for the checkbox too
42
+ * Fix addRowData to use key:true (keyIndex) when rowid is not defined
43
+ * Fix formatter bug for the select to use the defaultFormat
44
+ * Adding a 3 parameter to the unformat function - the cellobject.
45
+ * Fix alternate rows when we sort data locally.
46
+ * Fix in addRowData for alternate rows when we add item as last
47
+ * Fix collapseRow in treegrid preventing infinite recursion
48
+ * Fix in stripHtml function to parse numeric values
49
+ * Fix in delGridRow to get "fresh" Data from delData object
50
+ * Fix problems with width option if set as string.
51
+ * Fixing $jgrid.format function in base module to accept undefined parameter.
52
+ * Fix for saveRow method in aftersave function. Also we pass the request and
53
+ not the responseText. Also both aftersave and success functions have the
54
+ same type parameter - the response
55
+ * Fix for serchhidden in searchGrid method
56
+ * Fix for setGridWidth method
57
+ * Fix setColWidth function
58
+ * Fix for topinfo and bottom info in formedit to appear separatley in edit and add dialogs
59
+ * Fix searchFilter css to work when called from subgrid
60
+ * Fix celledit to work better when datepicker is attached
61
+ * Fix in viewGrid row to vizualize only the columns that only not hidden.
62
+
63
+
64
+ Additions and changes
65
+ ---------------------
66
+ * New API
67
+ * RTL Support
68
+ * Column reordering
69
+ * Added life scrolling of data
70
+ * Added gridResize method which can resize the grid. Also use a jQuery UI
71
+ resizable and can use any options of this widget
72
+ * Added sortableRows method which allow us to sort rows with drag and drop
73
+ * Added gridDnD method. The method connect two or more grids so that drag and drop rows
74
+ between these is possible
75
+ * Add columnChooser method which allows choosing/sorting columns at the same
76
+ time. This method requiere multiselect plugin
77
+ * Now getRowData can return all rows when rowid is not set.
78
+ * getCol now can return summary, average and count of the selected row. The
79
+ 3 parameter determines this (valid are sum, avg, count). If this parameter
80
+ is set and is valid, the returned value is a scalar.If the param is not
81
+ valid the returned value is empty array.
82
+ * To setRowData we add a 3 parameter. If the parameter is string we use
83
+ addClass to add classes. If the parameter is object we use css to add css
84
+ properties. Note that we can set properties and classes without data, in
85
+ this case we should set data to false
86
+ * Adding a event object to ondblClickRow and onRightClickRow events as 4 parameter
87
+ * Add a ant based build system which allow us to minify the JS code
88
+ * Added custom validation property in editing modules
89
+ * Added possibility to create custom element in editing modules
90
+ * Adding support to configure the ajax request in a way that user want. This
91
+ is done in all modules where ajax is used.
92
+ * Added class in cell edit and inline edit so that the cell or row can not
93
+ be edited - the corresponding classes are 'not-editable-cell' and
94
+ 'not-editable-row'.
95
+ * Added Hebrew Translation
96
+ * Added a beforeCheckValues event in editGridRow method. The execution is
97
+ before checking the values. Should return object of the posted data.
98
+ * Added Romanian translation
99
+ * Added a property classes in colModel where we can attach classes to column.
100
+ * info_dialog function can be used as separate modal dialog
101
+ * Added a class ui-ellipsis in grid css file. Also work in FireFox too.
102
+ * Changind the order of calling the events beforeSearch and beforeClear in
103
+ filterToolbar method. Also the events are called immediatley after triggering the grid
104
+ * To onCellSelect we replace the 4 parameter with the more natuaral event instead of e.target -
105
+ sorry if this will bring to some confusions.
106
+ * Added searchoptions value parameter in order to separate the editing module and search module.
107
+ We first look for such option in searchoptions and if not found we use the
108
+ editoptions value
109
+ * Added fixed property in colModel which allow us not to change the
110
+ column width if shrinkToFit is true and we set new width of the grid.
111
+ * Added buildSelect function to deserialize data for the select. This is option
112
+ can be added in editoptions or search options
113
+
114
+
115
+ Please read The Installation instructions first in install.txt
116
+ ================================================
117
+ 3.5 beta (buld6- build11)
118
+
119
+ New Properties and methods
120
+ ==========================
121
+
122
+ - Added new grid parameter hoverrows. When set to false the mouse hovering is
123
+ disabled in the grid data rows.
124
+
125
+ - Added rowid as parameter to error function in saveRow method - inline
126
+ editing module
127
+
128
+ - treeGrid to be initially work with datatype local
129
+
130
+ - Added new method updateGridRows (grid.custom.js)
131
+ This method update the existing data in the grid by given id rowname.
132
+
133
+ Syntax: updateGridRows (data, rowidname, jsonreader)
134
+
135
+ data is a array of data in format
136
+ [{name:value,name1:value1...},{name:value,name2:value2...}]
137
+ where the name is the name from colModel and value is the actuall value.
138
+ It is not neccessary that all columns are present in the data item object
139
+ (the same as setRowData method)
140
+
141
+ rowidname (string) - is the name of the row which should acts as id.
142
+ If not set the name "id" is used.
143
+
144
+ jsonreader (boolean) default false. If set to true a jsonReader definition
145
+ is used to set the data. Note that this work only of the item in jsonReader
146
+ object 'repeatitems' is set to true.
147
+
148
+ - Switch to namedItems JS function. This improve the speed. Previously we
149
+ walk throught the entry rowset to find the rowIndex of the given rowid.
150
+ Now we use the build in javaScript method namedItems which do the same.
151
+
152
+ - multiselect is enabled in inline edit module.
153
+
154
+ - To the importComplete event in jqGridImport method we pass the response.
155
+
156
+ - Added support for alternate rows. Also added new jqGrid option altclass.
157
+ The default value is 'ui-priority-secondary' THis way we can develop our own
158
+ alternate class.
159
+
160
+ - Added ShrinkToFit option in setColumns method which fit columns to the grid
161
+ width. Default value is false.
162
+
163
+ - Extend tableToGrid method to use custom options when building the grid.
164
+ The call to this function is
165
+ tableToGrid(selector, options)
166
+ where options is the object with jqGrid options.
167
+
168
+ - Adding 4px right to the view records text for better view
169
+
170
+ - Add a onClose event to all modals in form editing (except alert dialog)
171
+ The default value is null. This event can be passed in editGridRow, delGridRow,
172
+ viewGridRow, and setColumns methods. The event raised when a close icon is clicked,
173
+ a cancel button is clicked or ESC key is pressed (if this is enabled).
174
+
175
+ - Significant speed improvents in tree Grid when a relative large data is loaded.
176
+
177
+ - Added dataheight parameter to all modal windows, where we can control the
178
+ scrolling content. Intitially this parameter is auto.
179
+ To summarize - we have two parameters for controlling the height of the modal.
180
+ height and dataheight.
181
+ The height parameter control the height of the entry modal, dataheight parameter
182
+ control the height of the scrolling content. The buttons of the modals are
183
+ allways visible at the bottom of the modal.Also some improvments in jqDnR.
184
+
185
+ - In setColumns method we add colnameview and closeAfterSubmit parameters. The
186
+ colnameview (default true). If set to false the names from colModel are not
187
+ visible. closeAfterSubmit if defined cleses the dialog after the submit
188
+ button is clicked.
189
+
190
+ - Added parameter viewsortcols in jqGrid parameters. The purpose of this
191
+ parameter is to define different look and behavior of sorting icons that
192
+ appear near the header. This parameter is array with the following default
193
+ options
194
+ viewsortcols : [false,'vertical',true]
195
+
196
+ The first parameter determines if all icons should be viewed at the same time
197
+ when all columns have sort property set to true.
198
+ The default of false determines that only the icons of the current sorting column
199
+ should be viewed.
200
+ Setting this parameter to true causes all icons in all sortable columns to be viewed.
201
+
202
+ The second parameter determines how icons should be placed - vertical means that
203
+ the sorting icons are one under another. 'horizontal' means that the icons should
204
+ be one near other.
205
+
206
+ The third parameter determines the click functionality. If set to true the columns are
207
+ sorted if the header is clicked. If set to false the columns are sorted only when
208
+ the icons are clicked.
209
+
210
+ Important note: When set a third parameter to false be a sure that the first parameter
211
+ is set to true, otherwise you will lost the sorting.
212
+
213
+
214
+ Fixes
215
+ =====
216
+ - Fixed bug in filterToolbar. We search now by index and when not found by
217
+ name.
218
+
219
+ - Fix in searchGrid method. We search now by index and when not found by
220
+ name.
221
+
222
+ - Fixed bug in IE when resizing columns. The function getOffset is changed
223
+ so that the resizing speed is the same as in Safari and FF.
224
+
225
+ - Fix multiple select bug in createEl function. Now we set the options before
226
+ checking for multiple:true
227
+
228
+ - Fixed bug in treegrid. The strict comparation in getNodeParent method
229
+ causes bad results.
230
+
231
+ - Fix in setGridWidth method. We do not initialize correct the new width which
232
+ causes after the first set of the width to not work in other grid in the same
233
+ page.
234
+
235
+ - Fixed bug in GridExport. We delete the columns that are generated
236
+ dynamically - multiselect, subgrid, treegrid or rownumbers. This way the
237
+ import is without errors
238
+
239
+ - Fixed a bug in addRowData method to add data with id = 0 (number)
240
+
241
+ - Fixed a forever loading bug in IE.
242
+
243
+ - Fixed altRows bug in delRowData method
244
+
245
+ - navGrid method fix for warning modal and IE6
246
+
247
+ - Fix setColumns method to the common apprach of forms and modals
248
+
249
+ - Fix for IE8 in getAbsoluteIndex method. IE8 seems to work as other browsers
250
+
251
+ - Fixed bug in delRowData - the grid does not resize when first row is
252
+ deleted.
253
+
254
+ - Fixed bug when rownumbers and subgrid are used together
255
+
256
+ - Fixed bug in row editing when the column name contain dot.
257
+
258
+ - Fixing bug in viewGridRow - also the id manes of the form are changed in order
259
+ to be not equal of those in editGridRow
260
+
261
+
262
+
263
+ 3.5 beta (buld5)
264
+
265
+ FormEditing
266
+ ===========
267
+ - added options checkOnUpdate (default false) in editGridRow method.
268
+ Also available in add and edit mode.
269
+ When this option is set to true the behaviour as follow:
270
+ When something is changed in the form and the user click on
271
+ Cancel button, navigator buttons, close button (on upper right corner of the
272
+ form), in overlay (if available) or press Esc key (if set) a message box apper
273
+ asking the user to save the changes, not to save the changes and go back in the
274
+ form or cancel all changes (this will close the modal form)
275
+ Note that checkOnSubmit option will work only when a submit button is clicked.
276
+ When nothing is changed we contionue with the action.
277
+
278
+ - added option - rowabove (default false) in colModel formoptions
279
+ When set to true a new empty row is added above this row in form editing.
280
+ - added option - rowcontent (default empty) in colModel formoptions.
281
+ This option have sense only when rowabove option is set to true.
282
+ With this option is possible to set a content to the new added empty row in
283
+ the form. In order to style easy these rows a class 'contentinfo' is set.
284
+
285
+ - added new items in the language files to support the checkOnUpdate option
286
+
287
+ - added class 'delmsg' in the delGridRow method. This allow us to change the
288
+ message dynamically using a beforeShow or afterSow eventrs. The class is added
289
+ to a element td.
290
+
291
+ Fixes
292
+ =====
293
+ - fix in Bulgarian translations files.
294
+ - fix in searchGrid method. Now we search by index (from colModel) and only if
295
+ it is not available we search by name.
296
+ - Fix for date parser in the base module. Now we can sort locally on
297
+ dates that contain month names
298
+ - Fixed bug in searchGrid. The translation messages for the operations does not
299
+ apper when not set in colModel
300
+ - removed some not needed events from base grid. Also return false do these
301
+ by default;
302
+ - Fix bug to check if datepicker is available in searchGrid.
303
+ - Fix a bug in searchGrid in IE6, where the data value is not set for elements
304
+ after the first
305
+ - Fixed bug when calling of jqModal multiple times on the same element. We
306
+ need the initialization only once and not every time. This cause a memory
307
+ leaks
308
+ - Fixed bug in formatter where the data containing ' causes break in IE
309
+ - Fixed bug in base module when adding data where the data contain a ' char.
310
+ This breaks in IE browsers.
311
+ - Fixed bug in checkboxes. We add the value setted in the editoptions. Also
312
+ converting to lower case make the option checkOnUpdate to be true every time.
313
+ - We replace white-space nowrap with pre in td element in the CSS file. This fixes
314
+ the bug in IE where the first row does not wrap when the text is longer than
315
+ the column width. Also this requiere DOCTYPE declaration in the document.
316
+ - Fixed bug in viewGridRow method where when resizing the modal causes the data
317
+ to apper bad.
318
+
319
+
320
+ 3.5 beta (buld4)
321
+ Base
322
+ ====
323
+ - added option footerrow - default false. If set to true this will place a
324
+ footer table with one row below the gird records and above the pager.
325
+ The number of columns equal of these from colModel
326
+
327
+ -added option userDataOnFooter(default false) which directly place the user data
328
+ array at footer. The rules are as follow: If the userData array contain name
329
+ which is equal to those of colModel then the value is placed in that column.
330
+ If there are no such values nothing is palced. Note that if this option
331
+ is used we use the current formatter options (if available) for that column.
332
+
333
+ -Added method getCol(colname). Colname can be either number which represents
334
+ the index of the column or name from colModel. The method return array with
335
+ the values of the coulmn.
336
+
337
+ - Added method footerData ( action, data, format). This method get or set data
338
+ on footer.
339
+
340
+ action - can be 'get' or 'set'. If not set default is get.
341
+ When set to 'get' - the result is object of type name:value, where the name is
342
+ a name from colModel. This will return a data from the footer. The other two
343
+ options does not have effect in this case.
344
+
345
+ When set to 'set' a data array (object) should be set. This will place
346
+ the values in the footer.
347
+
348
+ format - default is true. This instruct the method to use the formmater
349
+ (if set in colModel) when a new values are set.
350
+ Setting to false will disable the using of formatter.
351
+
352
+ Related css items in the ui.jqgrid.css
353
+ .ui-jqgrid-sdiv - is a div container for the footer
354
+ .ui-jqgrid-ftable - is the class for the table
355
+ tr.footrow - is the class for the footer row
356
+ tr.footrow td is the item for the cell formating
357
+
358
+ In order to format every cell in a way that you want
359
+ maybe you can use
360
+
361
+ jQuery("tr.footrow td:eq(2)","#gbox_mygrid").css(...)
362
+ where the td:eq(2) point to the third column
363
+ and mygrid is the id of the grid. The id of the global grid container
364
+ is constructed via "gbox_"+the id of the grid.
365
+
366
+ There are no methods to show and hide the footer row dynamically, but
367
+ following the above example we can do
368
+
369
+ jQuery(".ui-jqgrid-sdiv","#gbox_mygrid").hide() - this will hide the footer row.
370
+
371
+ jQuery(".ui-jqgrid-sdiv","#gbox_mygrid").show() - this will show the footer row.
372
+
373
+
374
+ Form Editing
375
+ ============
376
+ aded option in editGridRow - checkOnSubmit (default false)
377
+ This option only work in editing mode and not in add.
378
+ When set to true - the method looks if any data is changed in the form and
379
+ if this is a case a dilog message appear where the user is asked to confirm the
380
+ changes or cancel it. Pressing cancel will return to the form, but does not
381
+ set the values to its original state.
382
+
383
+ Note that this causes a some changes in the language file.
384
+
385
+ Fixes
386
+ =====
387
+
388
+ - Removed imgpath from cell edit and inline edit modules and common module.
389
+ This parameter is no longer valid in 3.5
390
+ - Replace $ with jQuery in grid.common.js which causes problems when used with
391
+ other librariers like prototype.
392
+ - removed a checking e.srcElement from base module. jQuery allready fix this.
393
+ - fixing the size option in select when using ajax to load selects.
394
+ - Fixed bug in IE browsers, when clicked on href tag with child nodes,
395
+ IE incorrect report in all cases that this is a href element. This couses
396
+ onSelectCell not to behave correct.
397
+ - Fixed bug in searchGrid - group options are not passed to serchFilter in
398
+ order get them from Language file.
399
+ - Fix in bulgarian trnslations.
400
+ - Fix on sorting column. The initial sort check first for index and then for
401
+ column name. Before the checking for the index was missed.
402
+ Sortorder converted to lower case in order to avoid some cofusions.
403
+ - Fix in set columns module. The modal does not appear correctly due to
404
+ missed parameter
405
+
406
+
407
+
408
+ 3.5 beta (buld3)
409
+
410
+ Base
411
+ ====
412
+ - To the loading message is added ui-state-active class from Theme roller.
413
+ This is more natural, indicating that the grid is active when data is loaded.
414
+
415
+ Form Editing
416
+ ============
417
+ - Added keyboard navigation, which allow us to navigate throught the records while
418
+ in form editing pressing certain keys. This option is available in editGridRow
419
+ and viewGridRow methods. The default state is disabled. To enable this you
420
+ should set the options in the edit/add parameters:
421
+
422
+ navkeys: [true,38,40]
423
+ The first item enables the navigation.
424
+ The second item corresponds to reccord up and by default is the the key code
425
+ for Up key
426
+ The third item corresponds to reccord down and by default is the key code for
427
+ Down key
428
+ Example
429
+ $("#mygrid").navGrid("#pager",{options},{id:'myeditid',navkeys: [true,38,40]}..)
430
+ Also this option does not work in add mode.
431
+
432
+ Note: Instead that this does not have sense, if you plan to navigate with keys
433
+ it is recommended to add this option in add mode. This should be done
434
+ because the form for add and edit is the same and it is unknown which action
435
+ will be lunched first.
436
+
437
+ - Added posibility to save the form pressing certain key - add/edit mode only
438
+ By default this option is disabled.
439
+ To enable
440
+ savekey: [true,13]
441
+ The first item enables saving with pressing certain key.
442
+ The second item corresponds to key code for saving. Default Enter (key code 13)
443
+
444
+ Note that this binding should be used for both adding and editing a row.
445
+ Since the binding is for the form, there is no possibility to have one
446
+ key in add and another in edit mode.
447
+
448
+ - Added icons for the buttons in the form. The corresponding class in the css
449
+ is "fm-button"
450
+ By default all icons are enabled.
451
+ For add/edit method editGridRow
452
+ The save button is defined with
453
+ saveicon : [true,"left","ui-icon-disk"]
454
+ The close button is defined with
455
+ closeicon: [true,"left","ui-icon-close"]
456
+
457
+ The first item enables the icon
458
+ The second item tells where to pu icon left or right
459
+ The third item corresponds to valid ui icon from theme roller
460
+
461
+ For viewGrid Row
462
+ closeicon : [true,"left","ui-icon-close"]
463
+
464
+ For Deleting
465
+ delicon: [true,"left","ui-icon-scissors"]
466
+ cancelicon: [true,"left","ui-icon-cancel"]
467
+
468
+ Fixes
469
+ ======
470
+ -Fixed bug when getting the index of the row. Strict compare should be removed.
471
+ -Fixed bug when datatype is function - we need to exit when call it and not to
472
+ continue.
473
+ -Fixed bug in form editing - the buttons do not align properly.
474
+
475
+ 3.5 beta (build2)
476
+
477
+ Navigator
478
+ =========
479
+ This was missed in the first build
480
+ In the navGrid we can pass uniquie id's of the buttons in order to manipulate
481
+ them easy. If no id is set we create one which is combination of:
482
+ for add button "add_"+ the id of the grid
483
+ for edit button "edit_"+ the id of the grid
484
+ for view button "view_" + the id of the grid
485
+ for delete button "del_" + the id of the grid
486
+ for search button "search_" + the id of the grid
487
+ for refresh button "refresh_" + the id of the grid
488
+ Example:
489
+ $("#mygrid").navGrid("#pager",{options}, {id:'myeditid'},{id:'myaddid'}...)
490
+
491
+ Base Grid
492
+ =========
493
+ - Record number information now can format the values according to the
494
+ formatter setting (if available) getting information from language file.
495
+
496
+ Fixes
497
+ =====
498
+
499
+ - Fixed bug when multi select with json. We pass wrong parameter to addMulti
500
+ function
501
+ - Spelling error in all language files, which cause not to set the default
502
+ value correct
503
+ - Fixed bug when creating warning message. Fixed bug when determining the
504
+ number column element in the form
505
+ - Fixed bug - clientSide datatype should be converted to lower case
506
+ according to the new improvements
507
+ - Fixed bug in IE6/7 when try to select a option in the select generated via
508
+ ajax
509
+
510
+ ===============================
511
+ Upgrade from 3.4.x to 3.5 beta.
512
+ ===============================
513
+
514
+
515
+ 1. Installation
516
+ --------------
517
+ See install.txt
518
+
519
+ 2. Code changes
520
+ ---------------
521
+ 2.1 The following grid options are deprecated - i.e. you can remove them from
522
+ the grid options. They are not needed in 3.5 version
523
+
524
+ imgpath
525
+ sortascimg
526
+ sortdescimg
527
+ firstimg
528
+ previmg
529
+ nextimg
530
+ lastimg
531
+ sortclass
532
+ resizeclass
533
+
534
+ 2.2 Second change is related to custom formatters. Starting with version 3.5,
535
+ the custom formatter is passed the following parameters:
536
+
537
+ formatter : function ( cellvalue, options, rowObject )
538
+ {
539
+ // format the cellvalue to new format
540
+ return new_formated_cellvalue;
541
+ }
542
+
543
+ Note the return in the function. This function should always return a value
544
+ in order to work correctly. The parameters are
545
+
546
+ cellvalue - is the value to be formatted
547
+ options - is an object containing the following element
548
+
549
+ options : { rowId: rid, colModel: cm}
550
+ where rid - is the id of the row
551
+ colModel is the object of the properties for this column getted from colModel
552
+ array of jqGrid
553
+
554
+ rowObject - is a row data represented in the format determined from datatype
555
+ option.
556
+ If we have datatype: xml/xmlstring - the rowObject is xml node,provided
557
+ according to the rules from xmlReader
558
+ If we have datatype: json/jsonstring - the rowObject is array, provided
559
+ according to the rules from jsonReader
560
+
561
+ Example:
562
+ Code in 3.4.x variant
563
+
564
+ formatter : function ( elem, cellvalue, options)
565
+ {
566
+ var newval = "<strong>"+cellvalue+"</strong>";
567
+ jQuery(elem).html(newval);
568
+ }
569
+
570
+
571
+ Code in 3.5
572
+
573
+ formatter : function ( cellvalue, options, rowObject )
574
+ {
575
+ return "<strong>"+cellvalue+"</strong>";
576
+ }
577
+
578
+
579
+ Base Module
580
+ ============
581
+ Bug fixes
582
+ ---------
583
+ - fixed bug in onCellSelect event when used in IE browsers - now the rowIndex
584
+ passed to this event is calculated correctly regardless of hidden columns.
585
+
586
+ - fixed width bug when multiselect is used. Previously the width of this column
587
+ is recalculated according to table width and when shrinkToFit is set to true.
588
+ Now the column has fixed width and is no longer recalculated when the grid
589
+ width is changed. See documentation for the new options
590
+
591
+ - fixed width bug when subgrid is used. Previously the width of this column is
592
+ recalculated according to table width and when shrinkToFit is set to true. Now
593
+ the column has fixed width and is no longer recalculated when the grid width
594
+ is changed. See documentation for the new options
595
+
596
+ - fixed bug in addRowData method when the grid is empty and we try to add one
597
+ or more columns. The width of the data was not being recalculated correctly,
598
+ according to the header elements.
599
+
600
+ - fixed bug when we use xmlstring and jsonstring to add data. Previously all
601
+ the data from the string is loaded without reference to the rowNum parameter.
602
+ Also this behaviour is changed for xml and json data. In other words, we now
603
+ load only rowNum number of rows even when the request consists of more rows.
604
+
605
+ - fixed bug when posting values of input of type select set to multiple:true.
606
+ Now in all editing modules the posted values in for multiselect are separated
607
+ with comma
608
+
609
+ - fixed bug in the size option of multi select. If the size option is not set
610
+ for multiselect the default value is 3
611
+
612
+ Deprecated options
613
+ ----------------
614
+ imgpath: "", in all modules
615
+ sortascimg: "sort_asc.gif",
616
+ sortdescimg: "sort_desc.gif",
617
+ firstimg: "first.gif",
618
+ previmg: "prev.gif",
619
+ nextimg: "next.gif",
620
+ lastimg: "last.gif",
621
+ sortclass: "grid_sort",
622
+ resizeclass: "grid_resize",
623
+
624
+ Note that imgpath is not used anymore in all modules.
625
+ The altRows option is still here, but will have no effect until the jQuery
626
+ UI Theme roller supports alternative rows.
627
+
628
+
629
+ Note that the table element where we define the grid can not have a class
630
+ scroll - i.e. class scroll in the table definition can be omitted, but this
631
+ is NOT true for the pager element.
632
+
633
+ New options
634
+ -----------
635
+ datatype can now set as 'script'. In other words, we now support script
636
+ as datatype.
637
+
638
+ reccount: numeric, Default 0. Determines the exact number of available
639
+ grid rows. Can be <= from rowNum parameter
640
+
641
+ autowidth: boolean, Default false. When set to true, the grid width is
642
+ recalculated automatically to the width of the parent element. This is done
643
+ only initially when the grid is created. In order to resize the grid when
644
+ the parent element changes width you should apply custom code and use a
645
+ setGridWidth method for this purpose.
646
+
647
+ scrollOffset: numeric, Default 18. Determines the width of the vertical
648
+ scrollbar. Since different browsers interpret this width differently (and it
649
+ is difficult to calculate it in all browsers) this can be changed.
650
+
651
+ cellLayout: numeric, Default 5. This option determines the padding + border
652
+ width of the cell. Usually this should not be changed, but if custom changes
653
+ to td element are made in the grid css file this will need to be changed.
654
+
655
+ subGridWidth: numeric, Default 20. Determines the width of the subgrid column
656
+ if the subGrid option is set to true.
657
+
658
+ multiselectWidth: numeric, Default 20. Determines the width of the multiselect
659
+ column if multiselect is set to true.
660
+
661
+ rownumbers: boolean, Default false. If this option is set to true, a new column
662
+ at left of the grid is added. The purpose of this column is to count the number
663
+ of available rows, beginning from 1. In this case colModel is extended
664
+ automatically with new element with name - 'rn'. Also, be careful not to use
665
+ the name 'rn' in colModel
666
+
667
+ rownumWidth: numeric, Default 25. Determines the width of the row number column
668
+ if rownumbers option is set to true.
669
+
670
+ pagerpos: string, Default 'center'. Determines the position of the pager in the
671
+ grid. By default the pager element when created is divided in 3 parts (one part
672
+ for pager, one part for navigator buttons and one part for record information)
673
+
674
+ recordpos: string, Default 'right'. Determines the position of the record
675
+ information in the pager.
676
+
677
+ toolbar now accepts another option: "both". When we set toolbar: [true,"both"]
678
+ two toolbars are created -- one on the top of table data and one of the bottom
679
+ of the table data. When we have two toolbars then we create two elements (div).
680
+ The id of the top bar is constructed like "t_"+id of the grid and the bottom
681
+ toolbar the id is "tb_"+id of the grid. In case when only one toolbar is
682
+ created we have the id as "t_" + id of the grid, independent of where this
683
+ toolbar is created (top or bottom)
684
+
685
+ gridview: boolean, Default value false. In the previous versions of jqGrid,
686
+ including 3.5 alfa, reading a relatively big data sets (Rows >=100 ) caused
687
+ speed problems. The reason for this was that as every cell was inserted into
688
+ the grid we applied about 5-6 jQuery calls to it. Now this problem is resolved;
689
+ we now insert the entry row at once with a jQuery append. The result is
690
+ impressive - about 3-5 times faster. What will be the result if we insert all
691
+ the data at once? Yes, this can be done with a help of gridview option when set
692
+ to true. The result is a grid that is 5 to 10 times faster. Of course when this
693
+ option is set to true we have some limitations. If set to true we can not use
694
+ - treeGrid
695
+ - subGrid, or
696
+ - afterInsertRow event.
697
+ If you do not use these three options in the grid you can set this option to
698
+ true and enjoy the speed.
699
+
700
+ addRowData now is 1-2 times faster because we are using the concept to insert
701
+ the row at once
702
+
703
+ Added jQuery function parse (removed from json2.js module):
704
+ jQuery.parse(jsonstring)
705
+ To prevent JavaScript hijacking attacks, web application authors are encouraged
706
+ to use this function. This returns a JSON representation of the variable.
707
+
708
+ Cyclic structures are detected and safely interrupted, but could not be further
709
+ restored.
710
+ 1. The while(1); construct, located at the beginning of JSON text,
711
+ 2. Comments at the beginning and end of the text.
712
+ JSON data providers are encouraged to use one or both of these methods to
713
+ prevent data execution. Such JSON response may then look like this:
714
+ while(1);/*{[
715
+ {"name":"safe value 1"},
716
+ {"name":"safe value 2"},
717
+ ...
718
+ ]}*/
719
+ jqGrid uses this function when obtaining a data with datatype:'json', also used
720
+ in subGrid.
721
+
722
+ Added jQuery function stringToDoc: jQuery.stringToDoc(xmlstring). This returns
723
+ the xml document of xml string
724
+
725
+ Added new method: jQuery("#mygrid").updateColumns(); this synchronizes the
726
+ width of the headers with the data. Useful when used with table drag and drop.
727
+
728
+
729
+ colModel changes and additions
730
+ ------------------------------
731
+ searchhidden is removed from editrules object
732
+
733
+ added searchoptions object to define properties, events and other settings when
734
+ a search is performed
735
+ searchoptions : {
736
+ dataUrl : value,
737
+ dataInit: function,
738
+ dataEvents : array,
739
+ defaultValue: value,
740
+ attr: object,
741
+ searchhidden: boolean,
742
+ sopt: array
743
+ }
744
+ To summarize - when we want to deal with search we should use the following
745
+ options in colModel
746
+
747
+ search : boolean , // true/false
748
+ stype: value, // text/select
749
+ searchoptions : object // see above
750
+
751
+ Note: when the dataUrl is not used for the search type select, the definitions
752
+ for the select are taken from editoptions value property - i.e
753
+ editoptions:{value:"1:one;2:two",...}. See below for how to use these options in
754
+ different search methods.
755
+
756
+
757
+ Added new object formoptions to define various settings in form editing. Also
758
+ valid only in this module.
759
+
760
+ formoptions : {
761
+ elmprefix:value,
762
+ elmsuffix:value,
763
+ rowpos: number,
764
+ colpos:number,
765
+ label: value
766
+ }
767
+ See below for how to use
768
+
769
+ The editoptions are extended with the following properties. Valid in all editing
770
+ modules editoptions : {
771
+ dataUrl : value, dataInit: function, dataEvents : array, defaultValue:
772
+ value/function,
773
+ } See below
774
+
775
+
776
+ Changes in all editing modules
777
+ ==============================
778
+
779
+ edittype property is extended with the support of the following input elements:
780
+ button, image and file
781
+
782
+ As described above in all editing modules we can add additional properties and
783
+ events to the editing element:
784
+
785
+ editoptions : {
786
+ dataUrl : value, dataInit: function, dataEvents : array, defaultValue:
787
+ value/function
788
+ }
789
+ -------------------------------------------------------------------------------
790
+ dataUrl option is valid only for the elements of type select - i.e.,
791
+ edittype:select
792
+
793
+ When this option is set, the element will be filled with values from the ajax
794
+ request. The data should be a valid html select element with the desired
795
+ options. <select>
796
+ <option value="1">One</option> <option value="2">Two</option>
797
+ </select>
798
+
799
+ In form editing for add/edit this is called only once. In order to call it every
800
+ time the form is launched you should set the option recreateForm:true or use
801
+ other events like beforeShowForm (with another custom ajax call) to fill the
802
+ desired element.
803
+
804
+ In inline edit and cell edit this is fired every time you edit the row or cell
805
+ element.
806
+ --------------------------------------------------------------------------------
807
+ dataInit : function (elem) {
808
+ // do something
809
+ }
810
+
811
+ If set, this function is called only once ? when the element is created. The
812
+ function is passed the specified element. This option is ideal for attaching
813
+ date picker, time picker, etc. Example:
814
+
815
+ dataInit : function (elem) {
816
+ $(elem).datepicker();
817
+ }
818
+ --------------------------------------------------------------------------------
819
+ dataEvents: list of events to apply to the data element; uses
820
+ $("#id").bind(type, [data], fn) to bind events to data element
821
+
822
+ Should be described like this dataEvents: [
823
+ { type: 'click', data: { i: 7 }, fn: function(e) { console.log(e.data.i); }
824
+ }, { type: 'keypress', fn: function(e) { console.log('keypress'); } }
825
+ ]
826
+
827
+ The event(s) are called only once when the element is created
828
+ -------------------------------------------------------------------------------
829
+ defaultValue: 'value' or function This option is valid only in Form Editing
830
+ module when used with editGridRow method in add mode.If set this the input
831
+ element is set with this value if only element is empty. If used in selects the
832
+ text should be provided and not the key. Also when a function is used the
833
+ function should return value.
834
+
835
+ Now we can validate a url. The corresponding settings is in colModel
836
+ editrules:{required:true, url:true}
837
+
838
+
839
+ FormEditing
840
+ ===========
841
+ In all methods that deal with the modals are added the following options (thanks
842
+ to Faserline Team: www.faserline.com)
843
+
844
+ jqModal: true. The default value is true. How it works. If set to true, first
845
+ jqGrid checks if the jqModal plugin is available. If this plugin is available we
846
+ create the modal according to the jqModal plugin. If this plugin is not
847
+ available jqGrid create its own modal. The difference between the jqModal window
848
+ and jqGrid modal window is that the overlay covers only the grid, but not the
849
+ entry page as jqModal does. If this option is set to false, jqGrid will create
850
+ its own modal as described above even if jqModal is available.
851
+
852
+ The only exception here is searchGrid method created with the new searchFilter
853
+ plugin, where this option is not available. In this method a jqGrid modal window
854
+ is used.
855
+
856
+ closeOnEscape : false. Default false. When set to true the modal window can be
857
+ closed with ESC key.
858
+
859
+
860
+
861
+ =======searchGrid==================
862
+ From now on jqGrid use a new search engine
863
+ thanks to wonderful plugin provided from Kasey Speakman (kasey@cornerspeed.com).
864
+ This plugin can also be used separately. Detailed documentation is provided in
865
+ the jquery.searchFilter.js which is provided with jqGrid package.
866
+
867
+ These options are not used anymore in the searchGrid method
868
+ ----------------------------------------------------------
869
+ top : 0,
870
+ left: 0,
871
+ width: 360,
872
+ height: 80,
873
+ modal: false,
874
+ closeicon: 'ico-close.gif',
875
+ dirty: false,
876
+ processData: "",
877
+
878
+ Added the following options
879
+ ---------------------------
880
+
881
+ recreateFilter: false, This option construct the filter every time a search
882
+ button is clicked.
883
+
884
+ multipleSearch : false, When set to false the behaviour of the search is the
885
+ same as those in versions before 3.5 When set to true: 1. We have a possibility
886
+ to add/delete as many conditions as we want 2. The posted data to the server is
887
+ string (actually a json array converted to string)
888
+
889
+ sFilter: 'filters', This option has an effect only when the multipleSearch is
890
+ set to true; it describes the name of the posted string. By default this, i.e.
891
+ the posted data, can look like this
892
+
893
+ filters ={
894
+ "groupOp":"AND","rules":[{"field":"id","op":"gt","data":"1"},
895
+ {"field":"name","op":"bw","data":"Client"}]
896
+ }
897
+
898
+ groupOp determines the logical operator that can be used in the where statement
899
+ of the select. The value can be AND or OR. This can be changed used a select box
900
+ which is created at bottom of the search filter.
901
+
902
+ The rules array describes actually which fields and how they are included in the
903
+ where clause The field element describes the name of the field The op element
904
+ describes the operator that should be used in the search The data element is the
905
+ data that we want to search.
906
+
907
+ The above example (if getted and constructed correctly) should generate the
908
+ following where clause
909
+
910
+ SELECT .... FROM table,... WHERE id > 1 AND name LIKE 'Client%'
911
+ -------------------------------------------------------------------------------
912
+ As described above the search is constructed according to the searchoptions in
913
+ colModel
914
+
915
+ search : boolean , // true/false stype: value, // text/select
916
+
917
+ searchoptions : {
918
+ dataUrl : value,
919
+ dataInit: function,
920
+ dataEvents : array,
921
+ attr: object,
922
+ searchhidden: boolean,
923
+ sopt: array
924
+ }
925
+ Note that here is missing the defaultValue. The option is not implemented in
926
+ this method.
927
+
928
+
929
+ stype determines the search type - can be select or text. If not set a text is
930
+ used
931
+
932
+ searchoptions
933
+ -------------------------------------------------------------------------------
934
+ dataUrl option is valid only for the elements of type select, i.e.
935
+ edittype:select
936
+
937
+ When this option is set the element will be filled with values from the ajax
938
+ request. The data should be a valid html select element with the desired
939
+ options. <select>
940
+ <option value="1">One</option> <option value="2">Two</option>
941
+ </select>
942
+
943
+ This is called only once.
944
+
945
+ -------------------------------------------------------------------------------
946
+ dataInit : function (elem) {
947
+ // do something
948
+ }
949
+
950
+ If set this function is called only once when the element is created. To the
951
+ function is passed the element. Also this option is ideal for attaching date
952
+ picker, time picker and etc. Example
953
+
954
+ dataInit : function (elem) {
955
+ $(elem).datepicker();
956
+ }
957
+ --------------------------------------------------------------------------------
958
+ dataEvents: list of events to apply to the data element; uses
959
+ $("#id").bind(type, [data], fn) to bind events to data element
960
+
961
+ Should be described like this
962
+ dataEvents: [
963
+ { type: 'click', data: { i: 7 }, fn: function(e) { console.log(e.data.i); }},
964
+ { type: 'keypress', fn: function(e) { console.log('keypress'); } }
965
+ ]
966
+
967
+ The event(s) are called only once when the element is created
968
+ --------------------------------------------------------------------------------
969
+ attr is object where we can set valid attributes to the created element
970
+
971
+ attr : { title: "Some title" }
972
+ ------------------------------------------------------------------------------
973
+ searchhidden : if set to true, the hidden element will appear in the search.
974
+ -------------------------------------------------------------------------------
975
+ array that correspond to the op element in the posted data and determines the
976
+ operation. If not set all the available options will be used; if set only the
977
+ set values will appear as selectboxes.
978
+
979
+ All available option are sopt:
980
+ ['eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc']
981
+
982
+ The corresponding texts are in language file and mean the following ['equal',
983
+ 'not equal', 'less', 'less or equal','greater','greater or equal', 'begins
984
+ with','does not begin with','is in','is not in','ends with','does not end
985
+ with','contains','does not contain'],
986
+
987
+ Note that the elements in sopt array can be mixed in any order.
988
+
989
+
990
+ =========add/edit form==========
991
+ In the editGridRow method the following options are no longer used
992
+
993
+ closeicon: 'ico-close.gif',
994
+ imgpath: ''
995
+
996
+ Added new property formoptions (in colModel); thanks to Faserline Team
997
+ (www.faserline.com)
998
+
999
+ The purpose of these options is to reorder the elements in the form and to add
1000
+ some information before and after the editing element.
1001
+
1002
+ formoptions : {
1003
+ elmprefix:'',
1004
+ elmsuffix:'',
1005
+ rowpos:number,
1006
+ colpos:number,
1007
+ label: value
1008
+ }
1009
+
1010
+ If you go to use this object in collModel it is recommended that all editing
1011
+ fields use this property and with at least the rowpos and colpos set.
1012
+
1013
+ Elemprefix: if set, a text or html content appears before the input element
1014
+
1015
+ Elemsuffix: if set, a text or html content appears after the input element
1016
+
1017
+ Label: if set, this replace the name from colNames array that appears as label
1018
+ in the form.
1019
+
1020
+ rowpos : number determines the row position of the element (again with the
1021
+ text-label) in the form; the count begins from 1
1022
+
1023
+ colpos : number determines the column position of the element (again with the
1024
+ label) in the form beginning from 1
1025
+
1026
+ Two elements can have equal row position, but different column position. This
1027
+ will place the two elements in one row on the form.
1028
+
1029
+ =========== delete=================================
1030
+ In the delGridRow method the following options are no longer used
1031
+
1032
+ closeicon: 'ico-close.gif',
1033
+ imgpath: '',
1034
+
1035
+
1036
+
1037
+ ============= view =============================
1038
+ Added viewGridRow method; thanks to Faserline Team (www.faserline.com)
1039
+
1040
+ This method is similar to the editGridRow method except that the fields are not
1041
+ editable and we do not have any events attached to the form. Here are the
1042
+ options viewGridRow (options) where
1043
+ options = {
1044
+ top : 0,
1045
+ left: 0,
1046
+ width: 0,
1047
+ height: 0,
1048
+ modal: false,
1049
+ drag: true,
1050
+ closeOnEscape : false,
1051
+ labelswidth: '30%'
1052
+ }
1053
+
1054
+
1055
+ All the options have the same thing as these in editGridRow except the option
1056
+ labelswidth which default value is 30%. Since we construct the view with table
1057
+ element it is difficult to calculate, in this case, how much width is needed for
1058
+ the labels. Depending on the needs this value can be increased or decreased
1059
+
1060
+ Custom method
1061
+ =============
1062
+ In the custom module is added new method filterToolbar.
1063
+
1064
+ This method is the same as filterGrid, except that the search input elements are
1065
+ placed in the grid just below the header elements. When the header elements are
1066
+ resized the input search elements are also resized according to the new width.
1067
+ Another difference to the filterGrid is that the filter toolbar uses definitions
1068
+ from colModel just like the searchGrid
1069
+
1070
+ Should be called like this
1071
+
1072
+ jQuery("#mygrid").filterToolbar(options)
1073
+
1074
+ where options are
1075
+
1076
+ options = {
1077
+ autosearch: true,
1078
+ beforeSearch: null,
1079
+ afterSearch: null,
1080
+ beforeClear: null,
1081
+ afterClear: null,
1082
+ searchurl : ''
1083
+ }
1084
+
1085
+ autosearch: true Search is performed according to the following rules For text
1086
+ element when a Enter key is pressed while inputting values a search is
1087
+ performed. For select element when the value changes.
1088
+
1089
+ beforeSearch - event which fires before a search
1090
+
1091
+ afterSearch - event which fires after a search
1092
+
1093
+ beforeClear - event which fires before clearing entered values (i.e.,
1094
+ clearToolbar is activated)
1095
+
1096
+ afterClear - event which fires after clearing entered values (i.e., clearToolbar
1097
+ is activated)
1098
+
1099
+ The rules of creating toolbar search input elements are the same as searchGrid
1100
+ using the colModel
1101
+ searchoptions : {
1102
+ dataUrl : value,
1103
+ dataInit: function,
1104
+ dataEvents : array,
1105
+ defaultValue: value,
1106
+ attr: object
1107
+ }
1108
+
1109
+ Note the missing sopt element, but addition of defaultValue property
1110
+
1111
+ This method has 3 new additional methods that can be used:
1112
+
1113
+ triggerToolbar - when called perform a search dynamically
1114
+
1115
+ clearToolbar - when called clear the search values and set the default one if
1116
+ available
1117
+
1118
+ toggleToolbar - toggles the searchbar
1119
+
1120
+ A typical call to these methods
1121
+
1122
+ var sgrid = $("#mygrid")[0] sgrid.triggerToolbar();
1123
+
1124
+ will trigger the search of mygrid.
1125
+
1126
+
1127
+ Import module
1128
+ =============
1129
+ added option importComplete event which fires after constructing the grid.
1130
+
1131
+
1132
+ Inline edit
1133
+ ===========
1134
+ added afterrestorefunc as 9th parameter. The event fires after the row is
1135
+ restored
1136
+
1137
+ treeGrid
1138
+ ========
1139
+ the tree icons can be changed using the following grid parameter treeIcons. The
1140
+ default values are.
1141
+ treeIcons ={
1142
+ plus:'ui-icon-triangle-1-e',
1143
+ minus:'ui-icon-triangle-1-s',
1144
+ leaf:'ui-icon-radio-off'
1145
+ };
1146
+ Note that icons from UI Theme should be used.
1147
+
1148
+ formatter
1149
+ =========
1150
+
1151
+ - the source format for date formatter (srcformat) now can accept month names
1152
+ - it is possible to enable checkboxes as editable when created with formatter In
1153
+ the format options we should in this case checkbox : {disabled:false} The
1154
+ default is false. To enable this option globally you can change this value in
1155
+ the language file
1156
+
1157
+ - the showLink now can accept custom name for the id The parameter is idName :
1158
+ 'id' The default is id. Can be changed in formatoptions or in the language
1159
+ file.
1160
+