-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathThemes.aspx
155 lines (154 loc) · 8.58 KB
/
Themes.aspx
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<%@ Page Title="Oasis Admin Tools --- Theme" Language="VB" MasterPageFile="~/site.master"
AutoEventWireup="false" CodeFile="Themes.aspx.vb" Inherits="Themes" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" />
<ext:FormPanel ID="frmUserGroup" runat="server" Split="true" Margins="0 5 5 5" Frame="true"
Title="User Groups" Icon="Group" DefaultAnchor="100%">
<Items>
<ext:ComboBox ID="cboUserGroups" runat="server" EmptyText="Select a user group..."
Editable="false" FieldLabel="User groups" Width="300" DisplayField="Name" ValueField="Id"
ForceSelection="true" DataIndex="GroupID" AllowBlank="false" MsgTarget="Under">
<Store>
<ext:Store runat="server" ID="UserGroupStore" OnRefreshData="UserGroupStore_Refresh">
<Reader>
<ext:JsonReader IDProperty="Id">
<Fields>
<ext:RecordField Name="Id" Type="String" Mapping="Id" />
<ext:RecordField Name="Name" Type="String" Mapping="Name" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<DirectEvents>
<Select OnEvent="cboUserGroups_Select" Before="return #{frmUserGroup}.isValid();">
<EventMask ShowMask="true" />
</Select>
</DirectEvents>
</ext:ComboBox>
</Items>
</ext:FormPanel>
<ext:GridPanel ID="gpThemes" runat="server" Title="Themes" Margins="0 0 5 5"
Frame="true" Height="300">
<Store>
<ext:Store ID="ThemesStore" runat="server" OnRefreshData="ThemesStore_Refresh">
<Reader>
<ext:JsonReader IDProperty="ID">
<Fields>
<ext:RecordField Name="ID" />
<ext:RecordField Name="ThemeGroupName" />
<ext:RecordField Name="ThemeGroupID" />
<ext:RecordField Name="Name" />
<ext:RecordField Name="Description" />
<ext:RecordField Name="AnalysisField" />
<ext:RecordField Name="AnalysisLayer" />
<ext:RecordField Name="Map" />
<ext:RecordField Name="ThemeConfigName" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:CommandColumn Width="50" Header="Actions">
<Commands>
<ext:GridCommand Icon="Delete" CommandName="Delete">
<ToolTip Text="Delete" />
</ext:GridCommand>
</Commands>
</ext:CommandColumn>
<ext:Column ColumnID="ID" Header="ID" Width="100" DataIndex="ID" Hidden="false" />
<ext:Column DataIndex="ThemeGroupName" Header="Groups" Width="100" />
<ext:Column DataIndex="ThemeGroupID" Header="ThemeGroupID" Width="100" Hidden="true" />
<ext:Column DataIndex="Name" Header="Name" Width="100" />
<ext:Column DataIndex="Description" Header="Description" Width="100" />
<ext:Column DataIndex="AnalysisField" Header="Analysis Field" Width="100" />
<ext:Column DataIndex="AnalysisLayer" Header="Analysis Layer" Width="100" />
<ext:Column DataIndex="Map" Header="Map" Width="100" />
<ext:Column DataIndex="ThemeConfigName" Header="Theme Config Name" Width="100" />
</Columns>
</ColumnModel>
<DirectEvents>
<Command OnEvent="RowDelete">
<EventMask ShowMask="true" />
<ExtraParams>
<ext:Parameter Name="ID" Value="record.data.ID" Mode="Raw" />
</ExtraParams>
<Confirmation BeforeConfirm="if (command!='Delete') return false;" ConfirmRequest="true"
Message="Are you sure to delete this record" Title="Attention" />
</Command>
</DirectEvents>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
<Listeners>
<RowSelect Handler="#{frmThemes}.getForm().loadRecord(record); #{cboThemeGroups}.setValue(record.data.ThemeGroupID);" />
</Listeners>
</ext:RowSelectionModel>
</SelectionModel>
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="10" />
</BottomBar>
<LoadMask ShowMask="true" />
</ext:GridPanel>
<ext:FormPanel ID="frmThemes" runat="server" Split="true" Margins="0 5 5 5" Frame="true"
Title="Themes Detail" DefaultAnchor="100%">
<Items>
<ext:TextField ID="txtID" runat="server" FieldLabel="ID" DataIndex="ID" AllowBlank="true"
MsgTarget="Under" Hidden="false" Disabled="true" />
<ext:ComboBox ID="cboThemeGroups" runat="server" EmptyText="Select a theme group..."
Editable="false" FieldLabel="Theme groups" Width="320" DisplayField="ThemeGroupName"
ValueField="ThemeGroupId" ForceSelection="true" AllowBlank="false" MsgTarget="Under">
<Store>
<ext:Store runat="server" ID="ThemeGroupStore" AutoLoad="false" OnRefreshData="ThemeGroupStore_Refresh">
<Reader>
<ext:JsonReader IDProperty="ThemeGroupId">
<Fields>
<ext:RecordField Name="ThemeGroupId" Type="String" Mapping="ThemeGroupId" />
<ext:RecordField Name="ThemeGroupName" Type="String" Mapping="ThemeGroupName" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
</ext:ComboBox>
<ext:TextField ID="txtName" runat="server" FieldLabel="Name" DataIndex="Name" AllowBlank="true"
MaxLengthText="255" MsgTarget="Under" />
<ext:TextArea ID="txtDescription" runat="server" FieldLabel="Description" DataIndex="Description"
AllowBlank="true" MsgTarget="Under" />
<ext:TextField ID="txtAnalysisField" runat="server" FieldLabel="Analysis Field" DataIndex="AnalysisField"
AllowBlank="true" MsgTarget="Under" MaxLengthText="50" />
<ext:TextField ID="txtAnalysisLayer" runat="server" FieldLabel="Analysis Layer" DataIndex="AnalysisLayer"
AllowBlank="true" MsgTarget="Under" MaxLengthText="250" />
<ext:TextArea ID="txtMap" runat="server" FieldLabel="Map" DataIndex="Map" AllowBlank="true"
MsgTarget="Under" />
<ext:TextField ID="txtThemeConfigName" runat="server" FieldLabel="Theme Config Name"
DataIndex="ThemeConfigName" AllowBlank="true" MaxLengthText="250" MsgTarget="Under"
LabelWidth="120" />
</Items>
<Buttons>
<ext:Button ID="btnInsert" runat="server" Text="Insert">
<DirectEvents>
<Click OnEvent="btnInsert_Click" Before="return #{frmThemes}.isValid();">
<EventMask ShowMask="true" Msg="Inserting..." />
</Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="btnUpdate" runat="server" Text="Update">
<DirectEvents>
<Click OnEvent="btnUpdate_Click" Before="return #{frmThemes}.isValid();">
<EventMask ShowMask="true" Msg="Updating..." />
</Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="btnResetFields" runat="server" Text="Reset Fields">
<Listeners>
<Click Handler="#{frmThemes}.getForm().reset();" />
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</asp:Content>