Fix #5650 - fix images thumbnails and adding in CMS
[Pman.Cms] / Cms.readers.js
1 //<script type="text/javascript">
2
3 Pman.Readers.Category = {
4         root : 'data',
5         totalProperty : 'total',
6         id : 'id',
7         xtype : 'JsonReader',
8         fields : [
9                 {name : 'id',type : 'int'},
10                 {name : 'parent_id',type : 'int'},
11                 'short_name',
12                 'title',
13                 'page_text',
14                 'type',
15                 'search_on',
16                 {name : 'image_menu_id',type : 'int'},
17                 {name : 'image_menuover_id',type : 'int'},
18                 {name : 'image_leftactive_id',type : 'int'},
19                 {name : 'image_page_id',type : 'int'},
20                 {name : 'display_order',type : 'int'},
21                 'more_info_title',
22                 'more_info_text',
23                 {name : 'visible',type : 'boolean'},
24                 {name : 'parent_id_id',type : 'int'},
25                 {name : 'parent_id_parent_id',type : 'int'},
26                 'parent_id_short_name',
27                 'parent_id_title',
28                 'parent_id_page_text',
29                 'parent_id_type',
30                 'parent_id_search_on',
31                 {name : 'parent_id_image_menu_id',type : 'int'},
32                 {name : 'parent_id_image_menuover_id',type : 'int'},
33                 {name : 'parent_id_image_leftactive_id',type : 'int'},
34                 {name : 'parent_id_image_page_id',type : 'int'},
35                 {name : 'parent_id_display_order',type : 'int'},
36                 'parent_id_more_info_title',
37                 'parent_id_more_info_text',
38                 {name : 'parent_id_visible',type : 'boolean'},
39                 {name : 'image_menu_id_id',type : 'int'},
40                 'image_menu_id_filename',
41                 'image_menu_id_ontable',
42                 {name : 'image_menu_id_onid',type : 'int'},
43                 'image_menu_id_mimetype',
44                 {name : 'image_menu_id_width',type : 'int'},
45                 {name : 'image_menu_id_height',type : 'int'},
46                 {name : 'image_menu_id_filesize',type : 'int'},
47                 {name : 'image_menu_id_displayorder',type : 'int'},
48                 'image_menu_id_language',
49                 {name : 'image_menu_id_parent_image_id',type : 'int'},
50                 {name : 'image_menu_id_created',type : 'date',dateFormat : 'Y-m-d H:i:s'},
51                 'image_menu_id_imgtype',
52                 'image_menu_id_linkurl',
53                 'image_menu_id_descript',
54                 'image_menu_id_title',
55                 {name : 'image_menuover_id_id',type : 'int'},
56                 'image_menuover_id_filename',
57                 'image_menuover_id_ontable',
58                 {name : 'image_menuover_id_onid',type : 'int'},
59                 'image_menuover_id_mimetype',
60                 {name : 'image_menuover_id_width',type : 'int'},
61                 {name : 'image_menuover_id_height',type : 'int'},
62                 {name : 'image_menuover_id_filesize',type : 'int'},
63                 {name : 'image_menuover_id_displayorder',type : 'int'},
64                 'image_menuover_id_language',
65                 {name : 'image_menuover_id_parent_image_id',type : 'int'},
66                 {name : 'image_menuover_id_created',type : 'date',dateFormat : 'Y-m-d H:i:s'},
67                 'image_menuover_id_imgtype',
68                 'image_menuover_id_linkurl',
69                 'image_menuover_id_descript',
70                 'image_menuover_id_title',
71                 {name : 'image_leftactive_id_id',type : 'int'},
72                 'image_leftactive_id_filename',
73                 'image_leftactive_id_ontable',
74                 {name : 'image_leftactive_id_onid',type : 'int'},
75                 'image_leftactive_id_mimetype',
76                 {name : 'image_leftactive_id_width',type : 'int'},
77                 {name : 'image_leftactive_id_height',type : 'int'},
78                 {name : 'image_leftactive_id_filesize',type : 'int'},
79                 {name : 'image_leftactive_id_displayorder',type : 'int'},
80                 'image_leftactive_id_language',
81                 {name : 'image_leftactive_id_parent_image_id',type : 'int'},
82                 {name : 'image_leftactive_id_created',type : 'date',dateFormat : 'Y-m-d H:i:s'},
83                 'image_leftactive_id_imgtype',
84                 'image_leftactive_id_linkurl',
85                 'image_leftactive_id_descript',
86                 'image_leftactive_id_title',
87                 {name : 'image_page_id_id',type : 'int'},
88                 'image_page_id_filename',
89                 'image_page_id_ontable',
90                 {name : 'image_page_id_onid',type : 'int'},
91                 'image_page_id_mimetype',
92                 {name : 'image_page_id_width',type : 'int'},
93                 {name : 'image_page_id_height',type : 'int'},
94                 {name : 'image_page_id_filesize',type : 'int'},
95                 {name : 'image_page_id_displayorder',type : 'int'},
96                 'image_page_id_language',
97                 {name : 'image_page_id_parent_image_id',type : 'int'},
98                 {name : 'image_page_id_created',type : 'date',dateFormat : 'Y-m-d H:i:s'},
99                 'image_page_id_imgtype',
100                 'image_page_id_linkurl',
101                 'image_page_id_descript',
102                 'image_page_id_title'
103         ]
104 };
105
106 Pman.Readers.CategoryMember = {
107         root : 'data',
108         totalProperty : 'total',
109         id : 'id',
110         xtype : 'JsonReader',
111         fields : [
112                 {name : 'id',type : 'int'},
113                 {name : 'category_id',type : 'int'},
114                 {name : 'product_id',type : 'int'},
115                 {name : 'category_id_id',type : 'int'},
116                 {name : 'category_id_parent_id',type : 'int'},
117                 'category_id_short_name',
118                 'category_id_title',
119                 'category_id_page_text',
120                 'category_id_type',
121                 'category_id_search_on',
122                 {name : 'category_id_image_menu_id',type : 'int'},
123                 {name : 'category_id_image_menuover_id',type : 'int'},
124                 {name : 'category_id_image_leftactive_id',type : 'int'},
125                 {name : 'category_id_image_page_id',type : 'int'},
126                 {name : 'category_id_display_order',type : 'int'},
127                 'category_id_more_info_title',
128                 'category_id_more_info_text',
129                 {name : 'category_id_visible',type : 'boolean'},
130                 {name : 'product_id_id',type : 'int'},
131                 'product_id_name',
132                 'product_id_sku',
133                 {name : 'product_id_price',type : 'float'},
134                 'product_id_shortdesc',
135                 'product_id_description',
136                 {name : 'product_id_visible',type : 'boolean'},
137                 'product_id_itemtypes',
138                 {name : 'product_id_category_id',type : 'int'},
139                 'product_id_currency',
140                 'product_id_vender_url',
141                 {name : 'product_id_supplier_id',type : 'int'}
142         ]
143 };
144
145 Pman.Readers.CmsBlog = {
146         root : 'data',
147         totalProperty : 'total',
148         id : 'id',
149         xtype : 'JsonReader',
150         fields : [
151                 {name : 'id',type : 'int'},
152                 'title',
153                 {name : 'published',type : 'date',dateFormat : 'Y-m-d H:i:s'},
154                 'body',
155                 {name : 'comments_no',type : 'int'},
156                 {name : 'trackbacks_no',type : 'int'},
157                 'extended',
158                 {name : 'has_extended',type : 'boolean'},
159                 {name : 'author_id',type : 'int'},
160                 {name : 'category_id',type : 'int'},
161                 {name : 'is_draft',type : 'boolean'},
162                 {name : 'updated',type : 'date',dateFormat : 'Y-m-d H:i:s'},
163                 {name : 'created',type : 'date',dateFormat : 'Y-m-d H:i:s'},
164                 {name : 'to_replace_id',type : 'int'},
165                 'page_link',
166                 {name : 'in_rss',type : 'boolean'},
167                 {name : 'parent_id',type : 'int'}
168         ]
169 };
170
171 Pman.Readers.Page = {
172         root : 'data',
173         totalProperty : 'total',
174         id : 'id',
175         xtype : 'JsonReader',
176         fields : [
177                 {name : 'id',type : 'int'},
178                 'shortname',
179                 {name : 'category_id',type : 'int'},
180                 'title',
181                 'contents',
182                 {name : 'visible',type : 'boolean'},
183                 'extended',
184                 {name : 'trackbacks_no',type : 'int'},
185                 {name : 'comments_no',type : 'int'},
186                 {name : 'has_extended',type : 'boolean'},
187                 {name : 'author_id',type : 'int'},
188                 'author_name',
189                 {name : 'updated',type : 'date',dateFormat : 'Y-m-d H:i:s'},
190                 {name : 'created',type : 'date',dateFormat : 'Y-m-d H:i:s'},
191                 {name : 'published',type : 'date',dateFormat : 'Y-m-d H:i:s'},
192                 'page_link',
193                 {name : 'parent_id',type : 'int'},
194                 {name : 'in_rss',type : 'boolean'},
195                 {name : 'replaces_id',type : 'int'},
196                 {name : 'category_id_id',type : 'int'},
197                 {name : 'category_id_parent_id',type : 'int'},
198                 'category_id_short_name',
199                 'category_id_title',
200                 'category_id_page_text',
201                 'category_id_type',
202                 'category_id_search_on',
203                 {name : 'category_id_image_menu_id',type : 'int'},
204                 {name : 'category_id_image_menuover_id',type : 'int'},
205                 {name : 'category_id_image_leftactive_id',type : 'int'},
206                 {name : 'category_id_image_page_id',type : 'int'},
207                 {name : 'category_id_display_order',type : 'int'},
208                 'category_id_more_info_title',
209                 'category_id_more_info_text',
210                 {name : 'category_id_visible',type : 'boolean'},
211                 {name : 'author_id_id',type : 'int'},
212                 {name : 'author_id_office_id',type : 'int'},
213                 'author_id_name',
214                 'author_id_phone',
215                 'author_id_fax',
216                 'author_id_email',
217                 {name : 'author_id_company_id',type : 'int'},
218                 'author_id_role',
219                 {name : 'author_id_active',type : 'int'},
220                 'author_id_remarks',
221                 'author_id_passwd',
222                 {name : 'author_id_owner_id',type : 'int'},
223                 'author_id_lang',
224                 {name : 'author_id_no_reset_sent',type : 'int'},
225                 'author_id_action_type',
226                 {name : 'author_id_project_id',type : 'int'}
227         ]
228 };
229
230 Pman.Readers.Product = {
231         root : 'data',
232         totalProperty : 'total',
233         id : 'id',
234         xtype : 'JsonReader',
235         fields : [
236                 {name : 'id',type : 'int'},
237                 'name',
238                 'sku',
239                 {name : 'price',type : 'float'},
240                 'shortdesc',
241                 'description',
242                 {name : 'visible',type : 'boolean'},
243                 'itemtypes',
244                 {name : 'category_id',type : 'int'},
245                 'currency',
246                 'vender_url',
247                 {name : 'supplier_id',type : 'int'},
248                 {name : 'category_id_id',type : 'int'},
249                 {name : 'category_id_parent_id',type : 'int'},
250                 'category_id_short_name',
251                 'category_id_title',
252                 'category_id_page_text',
253                 'category_id_type',
254                 'category_id_search_on',
255                 {name : 'category_id_image_menu_id',type : 'int'},
256                 {name : 'category_id_image_menuover_id',type : 'int'},
257                 {name : 'category_id_image_leftactive_id',type : 'int'},
258                 {name : 'category_id_image_page_id',type : 'int'},
259                 {name : 'category_id_display_order',type : 'int'},
260                 'category_id_more_info_title',
261                 'category_id_more_info_text',
262                 {name : 'category_id_visible',type : 'boolean'},
263                 'supplier_id_code',
264                 'supplier_id_name',
265                 'supplier_id_remarks',
266                 {name : 'supplier_id_owner_id',type : 'int'},
267                 'supplier_id_address',
268                 'supplier_id_tel',
269                 'supplier_id_fax',
270                 'supplier_id_email',
271                 {name : 'supplier_id_id',type : 'int'},
272                 {name : 'supplier_id_isOwner',type : 'int'},
273                 {name : 'supplier_id_logo_id',type : 'int'},
274                 'supplier_id_background_color',
275                 'supplier_id_comptype',
276                 'supplier_id_url',
277                 {name : 'supplier_id_main_office_id',type : 'int'},
278                 {name : 'supplier_id_created_by',type : 'int'},
279                 {name : 'supplier_id_created_dt',type : 'date',dateFormat : 'Y-m-d H:i:s'},
280                 {name : 'supplier_id_updated_by',type : 'int'},
281                 {name : 'supplier_id_updated_dt',type : 'date',dateFormat : 'Y-m-d H:i:s'},
282                 'supplier_id_passwd'
283         ]
284 };
285
286 Pman.Readers.ProductItems = {
287         root : 'data',
288         totalProperty : 'total',
289         id : 'id',
290         xtype : 'JsonReader',
291         fields : [
292                 {name : 'id',type : 'int'},
293                 {name : 'product_id',type : 'int'},
294                 'sku',
295                 'colour',
296                 {name : 'price',type : 'float'},
297                 'age_range',
298                 'tog',
299                 'size',
300                 {name : 'visible',type : 'boolean'},
301                 {name : 'image_id',type : 'int'},
302                 {name : 'product_id_id',type : 'int'},
303                 'product_id_name',
304                 'product_id_sku',
305                 {name : 'product_id_price',type : 'float'},
306                 'product_id_shortdesc',
307                 'product_id_description',
308                 {name : 'product_id_visible',type : 'boolean'},
309                 'product_id_itemtypes',
310                 {name : 'product_id_category_id',type : 'int'},
311                 'product_id_currency',
312                 'product_id_vender_url',
313                 {name : 'product_id_supplier_id',type : 'int'},
314                 {name : 'image_id_id',type : 'int'},
315                 'image_id_filename',
316                 'image_id_ontable',
317                 {name : 'image_id_onid',type : 'int'},
318                 'image_id_mimetype',
319                 {name : 'image_id_width',type : 'int'},
320                 {name : 'image_id_height',type : 'int'},
321                 {name : 'image_id_filesize',type : 'int'},
322                 {name : 'image_id_displayorder',type : 'int'},
323                 'image_id_language',
324                 {name : 'image_id_parent_image_id',type : 'int'},
325                 {name : 'image_id_created',type : 'date',dateFormat : 'Y-m-d H:i:s'},
326                 'image_id_imgtype',
327                 'image_id_linkurl',
328                 'image_id_descript',
329                 'image_id_title'
330         ]
331 };
332
333 Pman.Readers.VarValues = {
334         root : 'data',
335         totalProperty : 'total',
336         id : 'id',
337         xtype : 'JsonReader',
338         fields : [
339                 {name : 'id',type : 'int'},
340                 'vartype',
341                 'value',
342                 'rgb'
343         ]
344 };