1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# coding: utf-8
def datapanel(context, main=None, session=None):
u'''Продедура возвращает информационную панель для справочников'''
xml = u'''<?xml version="1.0" encoding="UTF-8"?>
<datapanel>
<tab id="1" name="Редактирование данных">
<!--
<element id="12" type="webtext" proc="dirusing.webtext.dircontentbuttons.buttons.celesta">
<related id="13"/>
</element> -->
<element id="11" type="xforms" template="dirusing/dirusing_filter.xml" proc="dirusing.xforms.dirfilter.cardData.celesta">
</element>
<element id="13" type="grid" subtype="JS_PAGE_GRID" plugin="pageDGrid" proc="dirusing.grids.dircontentgrid.getData.celesta">
<proc id="proc13" name="dirusing.grids.dircontentgrid.getSettings.celesta" type="METADATA"/>
<proc id="toolbar1" name="dirusing.grids.dircontentgrid.gridToolBar.celesta" type="TOOLBAR"/>
<proc id="download1" name="dirusing.commonfunctions.downloadFileFromGrid.celesta" type="DOWNLOAD"/>
<related id="11"/>
</element>
<element id="14" type="xforms" template="dirusing/directory_export_card.xml" proc="dirusing.xforms.direxportcard.cardData.celesta" neverShowInPanel="true">
<proc id="proc14" name="dirusing.xforms.direxportcard.cardDataSave.celesta" type="SAVE"/>
<proc id="download14" name="dirusing.xforms.direxportcard.exportDownload.celesta" type="DOWNLOAD"/>
<related id="13"/>
</element>
<element id="15" type="xforms" template="dirusing/directory_data_card.xml" proc="dirusing.xforms.dircontentcard.cardData.celesta" neverShowInPanel="true">
<proc id="proc1" name="dirusing.xforms.dircontentcard.cardDataSave.celesta" type="SAVE"/>
<proc id="download2" name="dirusing.commonfunctions.downloadFileFromXform.celesta" type="DOWNLOAD"/>
<proc id="upload2" name="dirusing.commonfunctions.uploadFileToXform.celesta" type="UPLOAD"/>
<related id="13"/>
</element>
<element id="16" type="xforms" template="dirusing/directory_data_del_card.xml" proc="dirusing.xforms.dircontentdelcard.cardDelData.celesta" neverShowInPanel="true">
<proc id="proc16" name="dirusing.xforms.dircontentdelcard.cardDelDataSave.celesta" type="SAVE"/>
<related id="13"/>
</element>
<element id="17" type="xforms" template="dirusing/directory_data_del_all_card.xml" proc="dirusing.xforms.dircontentdelcard.cardDelData.celesta" neverShowInPanel="true">
<proc id="proc17" name="dirusing.xforms.dircontentdelcard.cardDelAllDataSave.celesta" type="SAVE"/>
<related id="13"/>
</element>
<element id="18" type="xforms" template="dirusing/directory_import_card.xml" proc="dirusing.xforms.dirimportcard.cardData.celesta" neverShowInPanel="true">
<proc id="proc18" name="dirusing.xforms.dirimportcard.cardDataSave.celesta" type="SAVE"/>
<proc id="upload3" name="dirusing.exportfunctions.importXlsData.celesta" type="UPLOAD"/>
<related id="13"/>
</element>
<!--<element id="19" type="xforms" template="dirusing/directory_import_card.xml" proc="dirusing.xforms.dirimportcard.cardData.celesta" neverShowInPanel="true">
<proc id="proc18" name="dirusing.xforms.dirimportcard.cardDataSave.celesta" type="SAVE"/>
<proc id="upload3" name="dirusing.exportfunctions.importXlsDataOld.celesta" type="UPLOAD"/>
<related id="13"/>
</element>-->
</tab>
<!--<tab id="2" name="Редактирование структуры">
<element id="2_11" type="xforms" proc="ssp.struct_import_filter" template="ssp_import_struct_filter.xml">
<proc id="1" name="ssp.struct_data_upload_file" type="UPLOAD"/>
<proc id="2" name="ssp.struct_data_save_file" type="SAVE"/>
<proc id="3" name="ssp.struct_data_download_file" type="DOWNLOAD"/>
</element>
<element id="2_12" type="grid" subtype="EXT_PAGE_GRID" proc="ssp.struct_import_grid"/>
<element id="2_13" type="webtext" proc="ssp.struct_import_webtext_row" hideOnLoad="true">
<related id="2_12"/>
</element>
</tab>-->
</datapanel>'''
#raise Exception(XMLJSONConverter(input=data).parse())
return xml
def datapanelHierarchical(context, main=None, session=None):
u'''Продедура возвращает информационную панель для справочников'''
xml = u'''<?xml version="1.0" encoding="UTF-8"?>
<datapanel>
<tab id="1" name="Редактирование данных">
<!--
<element id="12" type="webtext" proc="dirusing.webtext.dircontentbuttons.buttons.celesta">
<related id="13"/>
</element> -->
<element id="11" type="xforms" template="dirusing/dirusing_filter.xml" proc="dirusing.xforms.dirfilter.cardData.celesta">
</element>
<element id="13" type="grid" subtype="JS_TREE_GRID" plugin="treeDGrid" proc="dirusing.grids.dircontentgrid.getTreeData.celesta">
<proc id="proc13" name="dirusing.grids.dircontentgrid.getTreeSettings.celesta" type="METADATA"/>
<proc id="toolbar1" name="dirusing.grids.dircontentgrid.gridToolBar.celesta" type="TOOLBAR"/>
<proc id="download1" name="dirusing.commonfunctions.downloadFileFromGrid.celesta" type="DOWNLOAD"/>
<related id="11"/>
</element>
<element id="14" type="xforms" template="dirusing/directory_export_card.xml" proc="dirusing.xforms.direxportcard.cardData.celesta" neverShowInPanel="true">
<proc id="proc14" name="dirusing.xforms.direxportcard.cardDataSave.celesta" type="SAVE"/>
<proc id="download14" name="dirusing.exportfunctions.exportToExcel.celesta" type="DOWNLOAD"/>
<related id="13"/>
</element>
<element id="15" type="xforms" template="dirusing/directory_data_card.xml" proc="dirusing.xforms.dircontentcard.cardData.celesta" neverShowInPanel="true">
<proc id="proc1" name="dirusing.xforms.dircontentcard.cardDataSave.celesta" type="SAVE"/>
<proc id="download2" name="dirusing.commonfunctions.downloadFileFromXform.celesta" type="DOWNLOAD"/>
<proc id="upload2" name="dirusing.commonfunctions.uploadFileToXform.celesta" type="UPLOAD"/>
<related id="13"/>
</element>
<element id="16" type="xforms" template="dirusing/directory_data_del_card.xml" proc="dirusing.xforms.dircontentdelcard.cardDelData.celesta" neverShowInPanel="true">
<proc id="proc16" name="dirusing.xforms.dircontentdelcard.cardDelDataSave.celesta" type="SAVE"/>
<related id="13"/>
</element>
<element id="17" type="xforms" template="dirusing/directory_data_del_all_card.xml" proc="dirusing.xforms.dircontentdelcard.cardDelData.celesta" neverShowInPanel="true">
<proc id="proc17" name="dirusing.xforms.dircontentdelcard.cardDelAllDataSave.celesta" type="SAVE"/>
<related id="13"/>
</element>
<element id="18" type="xforms" template="dirusing/directory_import_card.xml" proc="dirusing.xforms.dirimportcard.cardData.celesta" neverShowInPanel="true">
<proc id="proc18" name="dirusing.xforms.dirimportcard.cardDataSave.celesta" type="SAVE"/>
<proc id="upload3" name="dirusing.exportfunctions.importXlsData.celesta" type="UPLOAD"/>
<related id="13"/>
</element>
<!--<element id="19" type="xforms" template="dirusing/directory_import_card.xml" proc="dirusing.xforms.dirimportcard.cardData.celesta" neverShowInPanel="true">
<proc id="proc18" name="dirusing.xforms.dirimportcard.cardDataSave.celesta" type="SAVE"/>
<proc id="upload3" name="dirusing.exportfunctions.importXlsDataOld.celesta" type="UPLOAD"/>
<related id="13"/>
</element>-->
</tab>
<!--<tab id="2" name="Редактирование структуры">
<element id="2_11" type="xforms" proc="ssp.struct_import_filter" template="ssp_import_struct_filter.xml">
<proc id="1" name="ssp.struct_data_upload_file" type="UPLOAD"/>
<proc id="2" name="ssp.struct_data_save_file" type="SAVE"/>
<proc id="3" name="ssp.struct_data_download_file" type="DOWNLOAD"/>
</element>
<element id="2_12" type="grid" subtype="EXT_PAGE_GRID" proc="ssp.struct_import_grid"/>
<element id="2_13" type="webtext" proc="ssp.struct_import_webtext_row" hideOnLoad="true">
<related id="2_12"/>
</element>
</tab>-->
</datapanel>'''
#raise Exception(XMLJSONConverter(input=data).parse())
return xml