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,330 @@
1
+ /*
2
+ The below work is licensed under Creative Commons GNU LGPL License.
3
+
4
+ Original work:
5
+
6
+ License: http://creativecommons.org/licenses/LGPL/2.1/
7
+ Author: Stefan Goessner/2006
8
+ Web: http://goessner.net/
9
+
10
+ Modifications made:
11
+
12
+ Version: 0.9-p5
13
+ Description: Restructured code, JSLint validated (no strict whitespaces),
14
+ added handling of empty arrays, empty strings, and int/floats values.
15
+ Author: Michael Schøler/2008-01-29
16
+ Web: http://michael.hinnerup.net/blog/2008/01/26/converting-json-to-xml-and-xml-to-json/
17
+
18
+ Description: json2xml added support to convert functions as CDATA
19
+ so it will be easy to write characters that cause some problems when convert
20
+ Author: Tony Tomov
21
+ */
22
+
23
+ /*global alert */
24
+ var xmlJsonClass = {
25
+ // Param "xml": Element or document DOM node.
26
+ // Param "tab": Tab or indent string for pretty output formatting omit or use empty string "" to supress.
27
+ // Returns: JSON string
28
+ xml2json: function(xml, tab) {
29
+ if (xml.nodeType === 9) {
30
+ // document node
31
+ xml = xml.documentElement;
32
+ }
33
+ var nws = this.removeWhite(xml);
34
+ var obj = this.toObj(nws);
35
+ var json = this.toJson(obj, xml.nodeName, "\t");
36
+ return "{\n" + tab + (tab ? json.replace(/\t/g, tab) : json.replace(/\t|\n/g, "")) + "\n}";
37
+ },
38
+
39
+ // Param "o": JavaScript object
40
+ // Param "tab": tab or indent string for pretty output formatting omit or use empty string "" to supress.
41
+ // Returns: XML string
42
+ json2xml: function(o, tab) {
43
+ var toXml = function(v, name, ind) {
44
+ var xml = "";
45
+ var i, n;
46
+ if (v instanceof Array) {
47
+ if (v.length === 0) {
48
+ xml += ind + "<"+name+">__EMPTY_ARRAY_</"+name+">\n";
49
+ }
50
+ else {
51
+ for (i = 0, n = v.length; i < n; i += 1) {
52
+ var sXml = ind + toXml(v[i], name, ind+"\t") + "\n";
53
+ xml += sXml;
54
+ }
55
+ }
56
+ }
57
+ else if (typeof(v) === "object") {
58
+ var hasChild = false;
59
+ xml += ind + "<" + name;
60
+ var m;
61
+ for (m in v) if (v.hasOwnProperty(m)) {
62
+ if (m.charAt(0) === "@") {
63
+ xml += " " + m.substr(1) + "=\"" + v[m].toString() + "\"";
64
+ }
65
+ else {
66
+ hasChild = true;
67
+ }
68
+ }
69
+ xml += hasChild ? ">" : "/>";
70
+ if (hasChild) {
71
+ for (m in v) if (v.hasOwnProperty(m)) {
72
+ if (m === "#text") {
73
+ xml += v[m];
74
+ }
75
+ else if (m === "#cdata") {
76
+ xml += "<![CDATA[" + v[m] + "]]>";
77
+ }
78
+ else if (m.charAt(0) !== "@") {
79
+ xml += toXml(v[m], m, ind+"\t");
80
+ }
81
+ }
82
+ xml += (xml.charAt(xml.length - 1) === "\n" ? ind : "") + "</" + name + ">";
83
+ }
84
+ }
85
+ else if (typeof(v) === "function") {
86
+ xml += ind + "<" + name + ">" + "<![CDATA[" + v + "]]>" + "</" + name + ">";
87
+ }
88
+ else {
89
+ if (v.toString() === "\"\"" || v.toString().length === 0) {
90
+ xml += ind + "<" + name + ">__EMPTY_STRING_</" + name + ">";
91
+ }
92
+ else {
93
+ xml += ind + "<" + name + ">" + v.toString() + "</" + name + ">";
94
+ }
95
+ }
96
+ return xml;
97
+ };
98
+ var xml = "";
99
+ var m;
100
+ for (m in o) if (o.hasOwnProperty(m)) {
101
+ xml += toXml(o[m], m, "");
102
+ }
103
+ return tab ? xml.replace(/\t/g, tab) : xml.replace(/\t|\n/g, "");
104
+ },
105
+ // Internal methods
106
+ toObj: function(xml) {
107
+ var o = {};
108
+ var FuncTest = /function/i;
109
+ if (xml.nodeType === 1) {
110
+ // element node ..
111
+ if (xml.attributes.length) {
112
+ // element with attributes ..
113
+ var i;
114
+ for (i = 0; i < xml.attributes.length; i += 1) {
115
+ o["@" + xml.attributes[i].nodeName] = (xml.attributes[i].nodeValue || "").toString();
116
+ }
117
+ }
118
+ if (xml.firstChild) {
119
+ // element has child nodes ..
120
+ var textChild = 0, cdataChild = 0, hasElementChild = false;
121
+ var n;
122
+ for (n = xml.firstChild; n; n = n.nextSibling) {
123
+ if (n.nodeType === 1) {
124
+ hasElementChild = true;
125
+ }
126
+ else if (n.nodeType === 3 && n.nodeValue.match(/[^ \f\n\r\t\v]/)) {
127
+ // non-whitespace text
128
+ textChild += 1;
129
+ }
130
+ else if (n.nodeType === 4) {
131
+ // cdata section node
132
+ cdataChild += 1;
133
+ }
134
+ }
135
+ if (hasElementChild) {
136
+ if (textChild < 2 && cdataChild < 2) {
137
+ // structured element with evtl. a single text or/and cdata node ..
138
+ this.removeWhite(xml);
139
+ for (n = xml.firstChild; n; n = n.nextSibling) {
140
+ if (n.nodeType === 3) {
141
+ // text node
142
+ o["#text"] = this.escape(n.nodeValue);
143
+ }
144
+ else if (n.nodeType === 4) {
145
+ // cdata node
146
+ if (FuncTest.test(n.nodeValue)) {
147
+ o[n.nodeName] = [o[n.nodeName], n.nodeValue];
148
+ } else {
149
+ o["#cdata"] = this.escape(n.nodeValue);
150
+ }
151
+ }
152
+ else if (o[n.nodeName]) {
153
+ // multiple occurence of element ..
154
+ if (o[n.nodeName] instanceof Array) {
155
+ o[n.nodeName][o[n.nodeName].length] = this.toObj(n);
156
+ }
157
+ else {
158
+ o[n.nodeName] = [o[n.nodeName], this.toObj(n)];
159
+ }
160
+ }
161
+ else {
162
+ // first occurence of element ..
163
+ o[n.nodeName] = this.toObj(n);
164
+ }
165
+ }
166
+ }
167
+ else {
168
+ // mixed content
169
+ if (!xml.attributes.length) {
170
+ o = this.escape(this.innerXml(xml));
171
+ }
172
+ else {
173
+ o["#text"] = this.escape(this.innerXml(xml));
174
+ }
175
+ }
176
+ }
177
+ else if (textChild) {
178
+ // pure text
179
+ if (!xml.attributes.length) {
180
+ o = this.escape(this.innerXml(xml));
181
+ if (o === "__EMPTY_ARRAY_") {
182
+ o = "[]";
183
+ } else if (o === "__EMPTY_STRING_") {
184
+ o = "";
185
+ }
186
+ }
187
+ else {
188
+ o["#text"] = this.escape(this.innerXml(xml));
189
+ }
190
+ }
191
+ else if (cdataChild) {
192
+ // cdata
193
+ if (cdataChild > 1) {
194
+ o = this.escape(this.innerXml(xml));
195
+ }
196
+ else {
197
+ for (n = xml.firstChild; n; n = n.nextSibling) {
198
+ if(FuncTest.test(xml.firstChild.nodeValue)) {
199
+ o = xml.firstChild.nodeValue;
200
+ break;
201
+ } else {
202
+ o["#cdata"] = this.escape(n.nodeValue);
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ if (!xml.attributes.length && !xml.firstChild) {
209
+ o = null;
210
+ }
211
+ }
212
+ else if (xml.nodeType === 9) {
213
+ // document.node
214
+ o = this.toObj(xml.documentElement);
215
+ }
216
+ else {
217
+ alert("unhandled node type: " + xml.nodeType);
218
+ }
219
+ return o;
220
+ },
221
+ toJson: function(o, name, ind) {
222
+ var json = name ? ("\"" + name + "\"") : "";
223
+ if (o === "[]") {
224
+ json += (name ? ":[]" : "[]");
225
+ }
226
+ else if (o instanceof Array) {
227
+ var n, i, ar=[];
228
+ for (i = 0, n = o.length; i < n; i += 1) {
229
+ ar[i] = this.toJson(o[i], "", ind + "\t");
230
+ }
231
+ json += (name ? ":[" : "[") + (ar.length > 1 ? ("\n" + ind + "\t" + ar.join(",\n" + ind + "\t") + "\n" + ind) : ar.join("")) + "]";
232
+ }
233
+ else if (o === null) {
234
+ json += (name && ":") + "null";
235
+ }
236
+ else if (typeof(o) === "object") {
237
+ var arr = [];
238
+ var m;
239
+ for (m in o) if (o.hasOwnProperty(m)) {
240
+ arr[arr.length] = this.toJson(o[m], m, ind + "\t");
241
+ }
242
+ json += (name ? ":{" : "{") + (arr.length > 1 ? ("\n" + ind + "\t" + arr.join(",\n" + ind + "\t") + "\n" + ind) : arr.join("")) + "}";
243
+ }
244
+ else if (typeof(o) === "string") {
245
+ var objRegExp = /(^-?\d+\.?\d*$)/;
246
+ var FuncTest = /function/i;
247
+ var os = o.toString();
248
+ if (objRegExp.test(os) || FuncTest.test(os) || os==="false" || os==="true") {
249
+ // int or float
250
+ json += (name && ":") + os;
251
+ }
252
+ else {
253
+ json += (name && ":") + "\"" + o + "\"";
254
+ }
255
+ }
256
+ else {
257
+ json += (name && ":") + o.toString();
258
+ }
259
+ return json;
260
+ },
261
+ innerXml: function(node) {
262
+ var s = "";
263
+ if ("innerHTML" in node) {
264
+ s = node.innerHTML;
265
+ }
266
+ else {
267
+ var asXml = function(n) {
268
+ var s = "", i;
269
+ if (n.nodeType === 1) {
270
+ s += "<" + n.nodeName;
271
+ for (i = 0; i < n.attributes.length; i += 1) {
272
+ s += " " + n.attributes[i].nodeName + "=\"" + (n.attributes[i].nodeValue || "").toString() + "\"";
273
+ }
274
+ if (n.firstChild) {
275
+ s += ">";
276
+ for (var c = n.firstChild; c; c = c.nextSibling) {
277
+ s += asXml(c);
278
+ }
279
+ s += "</" + n.nodeName + ">";
280
+ }
281
+ else {
282
+ s += "/>";
283
+ }
284
+ }
285
+ else if (n.nodeType === 3) {
286
+ s += n.nodeValue;
287
+ }
288
+ else if (n.nodeType === 4) {
289
+ s += "<![CDATA[" + n.nodeValue + "]]>";
290
+ }
291
+ return s;
292
+ };
293
+ for (var c = node.firstChild; c; c = c.nextSibling) {
294
+ s += asXml(c);
295
+ }
296
+ }
297
+ return s;
298
+ },
299
+ escape: function(txt) {
300
+ return txt.replace(/[\\]/g, "\\\\").replace(/[\"]/g, '\\"').replace(/[\n]/g, '\\n').replace(/[\r]/g, '\\r');
301
+ },
302
+ removeWhite: function(e) {
303
+ e.normalize();
304
+ var n;
305
+ for (n = e.firstChild; n; ) {
306
+ if (n.nodeType === 3) {
307
+ // text node
308
+ if (!n.nodeValue.match(/[^ \f\n\r\t\v]/)) {
309
+ // pure whitespace text node
310
+ var nxt = n.nextSibling;
311
+ e.removeChild(n);
312
+ n = nxt;
313
+ }
314
+ else {
315
+ n = n.nextSibling;
316
+ }
317
+ }
318
+ else if (n.nodeType === 1) {
319
+ // element node
320
+ this.removeWhite(n);
321
+ n = n.nextSibling;
322
+ }
323
+ else {
324
+ // any other node
325
+ n = n.nextSibling;
326
+ }
327
+ }
328
+ return e;
329
+ }
330
+ };
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0"?>
2
+ <bindings
3
+ xmlns="http://www.mozilla.org/xbl"
4
+ xmlns:xbl="http://www.mozilla.org/xbl"
5
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
6
+ <binding id="ellipsis">
7
+ <content>
8
+ <xul:window><!-- xul:window tag required for FF2 -->
9
+ <xul:description crop="end" xbl:inherits="value=xbl:text"><children/></xul:description>
10
+ </xul:window>
11
+ </content>
12
+ </binding>
13
+ </bindings>
@@ -0,0 +1,7 @@
1
+ .ui-searchFilter { display: none; position: absolute; z-index: 770; overflow: visible;}
2
+ .ui-searchFilter table {position:relative; margin:0em; width:auto}
3
+ .ui-searchFilter table td {margin: 0em; padding: 1px;}
4
+ .ui-searchFilter table td input, .ui-searchFilter table td select {margin: 0.1em;}
5
+ .ui-searchFilter .ui-state-default { cursor: pointer; }
6
+ .ui-searchFilter .divider { height: 1px; }
7
+ .ui-searchFilter .divider div { background-color: black; height: 1px; }
@@ -0,0 +1,129 @@
1
+ /*Grid*/
2
+ .ui-jqgrid {position: relative; font-size:11px;}
3
+ .ui-jqgrid .ui-jqgrid-view {position: relative;left:0px; top: 0px; padding: .0em;}
4
+ /* caption*/
5
+ .ui-jqgrid .ui-jqgrid-titlebar {padding: .3em .2em .2em .3em; position: relative; border-left: 0px none;border-right: 0px none; border-top: 0px none;}
6
+ .ui-jqgrid .ui-jqgrid-title { float: left; margin: .1em 0 .2em; }
7
+ .ui-jqgrid .ui-jqgrid-titlebar-close { position: absolute;top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height:18px;}.ui-jqgrid .ui-jqgrid-titlebar-close span { display: block; margin: 1px; }
8
+ .ui-jqgrid .ui-jqgrid-titlebar-close:hover { padding: 0; }
9
+ /* header*/
10
+ .ui-jqgrid .ui-jqgrid-hdiv {position: relative; margin: 0em;padding: 0em; overflow-x: hidden; overflow-y: auto; border-left: 0px none !important; border-top : 0px none !important; border-right : 0px none !important;}
11
+ .ui-jqgrid .ui-jqgrid-hbox {float: left; padding-right: 20px;}
12
+ .ui-jqgrid .ui-jqgrid-htable {table-layout:fixed;margin:0em;}
13
+ .ui-jqgrid .ui-jqgrid-htable th {height:22px;padding: 0 2px 0 2px;}
14
+ .ui-jqgrid .ui-jqgrid-htable th div {overflow: hidden; position:relative; height:17px;}
15
+ .ui-th-column, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column {overflow: hidden;white-space: nowrap;text-align:center;border-top : 0px none;border-bottom : 0px none;}
16
+ .ui-th-ltr, .ui-jqgrid .ui-jqgrid-htable th.ui-th-ltr {border-left : 0px none;}
17
+ .ui-th-rtl, .ui-jqgrid .ui-jqgrid-htable th.ui-th-rtl {border-right : 0px none;}
18
+ .ui-jqgrid .ui-th-div-ie {white-space: nowrap; zoom :1; height:17px;}
19
+ .ui-jqgrid .ui-jqgrid-resize {height:20px !important;position: relative; cursor :e-resize;display: inline;overflow: hidden;}
20
+ .ui-jqgrid .ui-grid-ico-sort {overflow:hidden;position:absolute;display:inline; cursor: pointer !important;}
21
+ .ui-jqgrid .ui-icon-asc {margin-top:-3px; height:12px;}
22
+ .ui-jqgrid .ui-icon-desc {margin-top:3px;height:12px;}
23
+ .ui-jqgrid .ui-i-asc {margin-top:0px;height:16px;}
24
+ .ui-jqgrid .ui-i-desc {margin-top:0px;margin-left:13px;height:16px;}
25
+ .ui-jqgrid .ui-jqgrid-sortable {cursor:pointer;}
26
+ .ui-jqgrid tr.ui-search-toolbar th { border-top-width: 1px !important; border-top-color: inherit !important; border-top-style: ridge !important }
27
+ tr.ui-search-toolbar input {margin: 1px 0px 0px 0px}
28
+ tr.ui-search-toolbar select {margin: 1px 0px 0px 0px}
29
+ /* body */
30
+ .ui-jqgrid .ui-jqgrid-bdiv {position: relative; margin: 0em; padding:0; overflow: auto; text-align:left;}
31
+ .ui-jqgrid .ui-jqgrid-btable {table-layout:fixed; margin:0em;}
32
+ .ui-jqgrid tr.jqgrow td {font-weight: normal; overflow: hidden; white-space: pre; height: 22px;padding: 0 2px 0 2px;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
33
+ .ui-jqgrid tr.ui-row-ltr td {text-align:left;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;}
34
+ .ui-jqgrid tr.ui-row-rtl td {text-align:right;border-left-width: 1px; border-left-color: inherit; border-left-style: solid;}
35
+ .ui-jqgrid td.jqgrid-rownum { padding: 0 2px 0 2px; margin: 0px; border: 0px none;}
36
+ .ui-jqgrid .ui-jqgrid-resize-mark { width:2px; left:0; background-color:#777; cursor: e-resize; cursor: col-resize; position:absolute; top:0; height:100px; overflow:hidden; display:none; border:0 none;}
37
+ /* footer */
38
+ .ui-jqgrid .ui-jqgrid-sdiv {position: relative; margin: 0em;padding: 0em; overflow: hidden; border-left: 0px none !important; border-top : 0px none !important; border-right : 0px none !important;}
39
+ .ui-jqgrid .ui-jqgrid-ftable {table-layout:fixed; margin-bottom:0em;}
40
+ .ui-jqgrid tr.footrow td {font-weight: bold; overflow: hidden; white-space:nowrap; height: 21px;padding: 0 2px 0 2px;border-top-width: 1px; border-top-color: inherit; border-top-style: solid;}
41
+ .ui-jqgrid tr.footrow-ltr td {text-align:left;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;}
42
+ .ui-jqgrid tr.footrow-rtl td {text-align:right;border-left-width: 1px; border-left-color: inherit; border-left-style: solid;}
43
+ /* Pager*/
44
+ .ui-jqgrid .ui-jqgrid-pager { border-left: 0px none !important;border-right: 0px none !important; border-bottom: 0px none !important; margin: 0px !important; padding: 0px !important; position: relative; height: 25px;white-space: nowrap;overflow: hidden;}
45
+ .ui-jqgrid .ui-pager-control {position: relative;}
46
+ .ui-jqgrid .ui-pg-table {position: relative; padding-bottom:2px; width:auto; margin: 0em;}
47
+ .ui-jqgrid .ui-pg-table td {font-weight:normal; vertical-align:middle; padding:1px;}
48
+ .ui-jqgrid .ui-pg-button { height:19px !important;}
49
+ .ui-jqgrid .ui-pg-button span { display: block; margin: 1px; float:left;}
50
+ .ui-jqgrid .ui-pg-button:hover { padding: 0px; }
51
+ .ui-jqgrid .ui-state-disabled:hover {padding:1px;}
52
+ .ui-jqgrid .ui-pg-input { height:13px;font-size:.8em; margin: 0em;}
53
+ .ui-jqgrid .ui-pg-selbox {font-size:.8em; line-height:18px; display:block; height:18px; margin: 0em;}
54
+ .ui-jqgrid .ui-separator {height: 18px; border-left: 1px solid #ccc ; border-right: 1px solid #ccc ; margin: 1px; float: right;}
55
+ .ui-jqgrid .ui-paging-info {font-weight: normal;height:19px; margin-top:3px;margin-right:4px;}
56
+ .ui-jqgrid .ui-jqgrid-pager .ui-pg-div {padding:1px 0;float:left;list-style-image:none;list-style-position:outside;list-style-type:none;position:relative;}
57
+ .ui-jqgrid .ui-jqgrid-pager .ui-pg-button { cursor:pointer; }
58
+ .ui-jqgrid .ui-jqgrid-pager .ui-pg-div span.ui-icon {float:left;margin:0 2px;}
59
+ .ui-jqgrid td input, .ui-jqgrid td select .ui-jqgrid td textarea { margin: 0em;}
60
+ .ui-jqgrid td textarea {width:auto;height:auto;}
61
+ .ui-jqgrid .ui-jqgrid-toppager {border-left: 0px none !important;border-right: 0px none !important; border-top: 0px none !important; margin: 0px !important; padding: 0px !important; position: relative; height: 25px !important;white-space: nowrap;overflow: hidden;}
62
+ /*subgrid*/
63
+ .ui-jqgrid .ui-jqgrid-btable .ui-sgcollapsed span {display: block;}
64
+ .ui-jqgrid .ui-subgrid {margin:0em;padding:0em; width:100%;}
65
+ .ui-jqgrid .ui-subgrid table {table-layout: fixed;}
66
+ .ui-jqgrid .ui-subgrid tr.ui-subtblcell td {height:18px;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
67
+ .ui-jqgrid .ui-subgrid td.subgrid-data {border-top: 0px none !important;}
68
+ .ui-jqgrid .ui-subgrid td.subgrid-cell {border-width: 0px 0px 1px 0px;}
69
+ .ui-jqgrid .ui-th-subgrid {height:20px;}
70
+ /* loading */
71
+ .ui-jqgrid .loading {position: absolute; top: 45%;left: 45%;width: auto;z-index:101;padding: 6px; margin: 5px;text-align: center;font-weight: bold;display: none;border-width: 2px !important;}
72
+ .ui-jqgrid .jqgrid-overlay {display:none;z-index:100;}
73
+ * html .jqgrid-overlay {width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}
74
+ * .jqgrid-overlay iframe {position:absolute;top:0;left:0;z-index:-1;width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}
75
+ /* end loading div */
76
+ /* toolbar */
77
+ .ui-jqgrid .ui-userdata {border-left: 0px none; border-right: 0px none; height : 21px;overflow: hidden; }
78
+ /*Modal Window */
79
+ .ui-jqdialog { display: none; width: 300px; position: absolute; padding: .2em; font-size:11px; overflow:visible;}
80
+ .ui-jqdialog .ui-jqdialog-titlebar { padding: .3em .2em; position: relative; }
81
+ .ui-jqdialog .ui-jqdialog-title { margin: .1em 0 .2em; }
82
+ .ui-jqdialog .ui-jqdialog-titlebar-close { position: absolute; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
83
+
84
+ .ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: 1px; }
85
+ .ui-jqdialog .ui-jqdialog-titlebar-close:hover, .ui-jqdialog .ui-jqdialog-titlebar-close:focus { padding: 0; }
86
+ .ui-jqdialog-content, .ui-jqdialog .ui-jqdialog-content { border: 0; padding: .3em .2em; background: none; height:auto;}
87
+ .ui-jqdialog .ui-jqconfirm {padding: .4em 1em; border-width:3px;position:absolute;bottom:10px;right:10px;overflow:visible;display:none;height:80px;width:220px;text-align:center;}
88
+ /* end Modal window*/
89
+ /* Form edit */
90
+ .ui-jqdialog-content .FormGrid {margin: 0px;}
91
+ .ui-jqdialog-content .EditTable { width: 100%; margin-bottom:0em;}
92
+ .ui-jqdialog-content .DelTable { width: 100%; margin-bottom:0em;}
93
+ .EditTable td input, .EditTable td select, .EditTable td textarea {margin: 0em;}
94
+ .EditTable td textarea { width:auto; height:auto;}
95
+ .ui-jqdialog-content td.EditButton {text-align: right;border-top: 0px none;border-left: 0px none;border-right: 0px none; padding-bottom:5px; padding-top:5px;}
96
+ .ui-jqdialog-content td.navButton {text-align: center; border-left: 0px none;border-top: 0px none;border-right: 0px none; padding-bottom:5px; padding-top:5px;}
97
+
98
+ .ui-jqdialog-content .CaptionTD {text-align: left; vertical-align: top;border-left: 0px none;border-right: 0px none; border-bottom: 0px none; padding: 1px;white-space: nowrap;}
99
+ .ui-jqdialog-content .DataTD {padding: 1px;border-left: 0px none;border-right: 0px none; border-bottom: 0px none; vertical-align: top;}
100
+ .ui-jqdialog-content .form-view-data {white-space:pre}
101
+ .fm-button { display: inline-block; margin:0 4px 0 0; padding: .4em .5em; text-decoration:none !important; cursor:pointer; position: relative; text-align: center; zoom: 1; }
102
+ .fm-button-icon-left { padding-left: 1.9em; }
103
+ .fm-button-icon-right { padding-right: 1.9em; }
104
+ .fm-button-icon-left .ui-icon { right: auto; left: .2em; margin-left: 0; position: absolute; top: 50%; margin-top: -8px; }
105
+ .fm-button-icon-right .ui-icon { left: auto; right: .2em; margin-left: 0; position: absolute; top: 50%; margin-top: -8px;}
106
+ #nData, #pData { float: left; margin:3px;padding: 0; width: 15px; }
107
+ /* End Eorm edit */
108
+ /*.ui-jqgrid .edit-cell {}*/
109
+ .ui-jqgrid .selected-row, div.ui-jqgrid .selected-row td {font-style : normal;border-left: 0px none;}
110
+ /* Tree Grid */
111
+ .ui-jqgrid .tree-wrap {float: left; position: relative;height: 18px;white-space: nowrap;overflow: hidden;}
112
+ .ui-jqgrid .tree-minus {position: absolute; height: 18px; width: 18px; overflow: hidden;}
113
+ .ui-jqgrid .tree-plus {position: absolute; height: 18px; width: 18px; overflow: hidden;}
114
+ .ui-jqgrid .tree-leaf {position: absolute; height: 18px; width: 18px;overflow: hidden;}
115
+ .ui-jqgrid .treeclick {cursor: pointer;}
116
+ /* moda dialog */
117
+ .jqmOverlay { background-color: #000; }
118
+ * iframe.jqm {position:absolute;top:0;left:0;z-index:-1;width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}
119
+ .ui-jqgrid-dnd tr td {border-right-width: 1px; border-right-color: inherit; border-right-style: solid; height:20px}
120
+ /* RTL Support */
121
+ .ui-jqgrid .ui-jqgrid-title-rtl {float:right;margin: .1em 0 .2em; }
122
+ .ui-jqgrid .ui-jqgrid-hbox-rtl {float: right; padding-left: 20px;}
123
+ .ui-jqgrid .ui-jqgrid-resize-ltr {float: right;margin: -2px -2px -2px 0px;}
124
+ .ui-jqgrid .ui-jqgrid-resize-rtl {float: left;margin: -2px 0px -1px -3px;}
125
+ .ui-jqgrid .ui-sort-rtl {left:0px;}
126
+ .ui-jqgrid .tree-wrap-ltr {float: left;}
127
+ .ui-jqgrid .tree-wrap-rtl {float: right;}
128
+ .ui-jqgrid .ui-ellipsis {text-overflow:ellipsis; -moz-binding:url('ellipsis-xbl.xml#ellipsis');}
129
+
@@ -0,0 +1,30 @@
1
+ /* Multiselect
2
+ ----------------------------------*/
3
+
4
+ .ui-multiselect { border: solid 1px; font-size: 0.8em; }
5
+ .ui-multiselect ul { -moz-user-select: none; }
6
+ .ui-multiselect li { margin: 0; padding: 0; cursor: default; line-height: 20px; height: 20px; font-size: 11px; list-style: none; }
7
+ .ui-multiselect li a { color: #999; text-decoration: none; padding: 0; display: block; float: left; cursor: pointer;}
8
+ .ui-multiselect li.ui-draggable-dragging { padding-left: 10px; }
9
+
10
+ .ui-multiselect div.selected { position: relative; padding: 0; margin: 0; border: 0; float:left; }
11
+ .ui-multiselect ul.selected { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; position: relative; width: 100%; }
12
+ .ui-multiselect ul.selected li { }
13
+
14
+ .ui-multiselect div.available { position: relative; padding: 0; margin: 0; border: 0; float:left; border-left: 1px solid; }
15
+ .ui-multiselect ul.available { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; width: 100%; }
16
+ .ui-multiselect ul.available li { padding-left: 10px; }
17
+
18
+ .ui-multiselect .ui-state-default { border: none; margin-bottom: 1px; position: relative; padding-left: 20px;}
19
+ .ui-multiselect .ui-state-hover { border: none; }
20
+ .ui-multiselect .ui-widget-header {border: none; font-size: 11px; margin-bottom: 1px;}
21
+
22
+ .ui-multiselect .add-all { float: right; padding: 7px;}
23
+ .ui-multiselect .remove-all { float: right; padding: 7px;}
24
+ .ui-multiselect .search { float: left; padding: 4px;}
25
+ .ui-multiselect .count { float: left; padding: 7px;}
26
+
27
+ .ui-multiselect li span.ui-icon-arrowthick-2-n-s { position: absolute; left: 2px; }
28
+ .ui-multiselect li a.action { position: absolute; right: 2px; top: 2px; }
29
+
30
+ .ui-multiselect input.search { height: 14px; padding: 1px; opacity: 0.5; margin: 4px; width: 100px; }