moved some JS to an external lib file for ease of sharing
[Evergreen.git] / Open-ILS / xul / staff_client / server / admin / stat_cat_editor.xml
1 <?xml version='1.0'?>
2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
3
4         <head>
5                 <title>Evergreen: Statistical Category Editor</title>
6                 <script language='javascript' src='/opac/common/js/utils.js'> </script>
7                 <script language='javascript' src='/opac/common/js//config.js'> </script> <script language='javascript' src='/opac/common/js/CGI.js'> </script>
8                 <script language='javascript' src='/opac/common/js/Cookie.js'> </script>
9         
10                 <script language='javascript' src='/opac/common/js/slimtree.js'> </script>
11                 <script language='javascript' src='/opac/common/js/JSON.js'> </script>
12                 <script language='javascript' src='/opac/common/js/fmall.js'> </script>
13                 <script language='javascript' src='/opac/common/js/fmgen.js'> </script>
14                 <script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
15                 <script language='javascript' src='/opac/common/js/OrgTree.js'> </script>
16                 <script language='javascript' src='/opac/common/js/org_utils.js'> </script>
17                 <script language='javascript' src='/opac/common/js/init.js'> </script>
18                 <script language='javascript' src='/opac/common/js/RemoteRequest.js'> </script>
19                 <script language='javascript' src='adminlib.js'> </script>
20                 <script language='javascript' src='stat_cat_editor.js'> </script>
21
22                 <style type='text/css'>
23                         .hide_me { visibility: hidden; display: none }
24                         .has_color { background: #E0F0E0; color: #000000; }
25                         .data_grid { font-weight: 500; border-collapse: collapse;}
26                         .data_grid thead tr { background: #E0F0E0; color: #000000; }
27                         .data_grid thead td { border: 1px solid #808080; padding-right: 5px; padding-left: 5px;}
28                         .data_grid tbody td { border: 1px solid #E0E0E0; padding: 5px; }
29                         .data_grid_center { text-align: center; }
30                         .data_grid_padded tbody td { padding: 10px; }
31                         /*.selector option { width: 10em; }*/
32                         .insert_row { border: 2px solid #A0B0A0; padding: 50px;}
33                         .padded { padding-left: 7px; padding-right: 7px; }
34                         select { width: 12em; }
35                 </style>
36
37         </head>
38
39         <body onload='try{scEditorInit();}catch(e){alert(js2JSON(e));}'>
40
41
42                 <div style='position:absolute; top: 5px; right: 5px;'>
43                         <span>Welcome </span><b><span id='sc_user'/></b>
44                 </div>
45
46                 <center>
47                         <div style='font-weight: bold; font-size: 12pt;'> Statistical Category Editor</div>
48                 </center>
49
50                 <hr/> 
51
52                 <center>
53                         <br/>
54
55                         <table class='data_grid data_grid_center' width='80%'>
56                                 <thead>
57                                         <tr>
58                                                 <td colspan='4'>Create a new statistical category</td>
59                                         </tr>
60                                 </thead>
61                                 <tbody>
62                                         <tr>
63                                                 <td>Enter the name: </td>
64                                                 <td>
65                                                         <input type='text' id='sc_new_name'> </input>
66                                                         <script>$('sc_new_name').focus();</script>
67                                                 </td>
68                                                 <td>Owning Library: </td>
69                                                 <td>
70                                                         <select id='sc_owning_lib_selector'>
71                                                         </select>
72                                                 </td>
73                                         </tr>
74                                         <tr>
75                                                 <td>Opac Visibility: </td>
76                                                 <td>    
77                                                         <span>On</span>
78                                                         <input type='radio' name='opac_visibility' id='sc_make_opac_visible'> </input>
79                                                         <span>Off</span>
80                                                         <input type='radio' name='opac_visibility' checked='checked'> </input>
81                                                 </td>
82                                                 <td>Type: </td>
83                                                 <td>
84                                                         <select id='sc_type_selector'>
85                                                                 <option value='actor'>Patron</option>
86                                                                 <option value='asset'>Copy</option>
87                                                         </select>
88                                                 </td>
89                                         </tr>
90                                         <tr>
91                                                 <td colspan='4'>
92                                                         <input type='submit' value='Create new stat cat' onclick='scNew();' id='sc_new'/>
93                                                 </td>
94                                         </tr>
95                                 </tbody>
96                         </table>
97
98                         <br/>
99                         <hr/>
100                         <br/>
101
102                         <div id='loading' class='has_color'><h2>Loading permissions and stat cats...</h2></div>
103
104                         <table width='98%'>
105                                 <tbody>
106                                         <tr>
107                                                 <td width='20%'> </td>
108                                                 <td id='sc_show_copy' width='30%' class='has_color'
109                                                         align='center'><a href='javascript:scShow("asset");'>Copy Stat Cats</a></td>
110                                                 <td id='sc_show_actor' width='30%' 
111                                                         align='center'><a href='javascript:scShow("actor");'>Patron Stat Cats</a></td>
112                                                 <td width='20%'> </td>
113                                         </tr>
114                                 </tbody>
115                         </table>
116
117
118
119                         <br/>
120                         <div>* To edit or view information about an entry, click on the entry in the drop-down menu</div>
121                         <br/>
122
123                         <!--
124                         <div style='overflow: auto; max-height: 200px;'>
125                         -->
126                                 <table width='95%' class='hide_me data_grid data_grid_center' id='sc_table'>
127                                         <thead>
128                                                 <tr>
129                                                         <td>Stat Cat Name</td>
130                                                         <td>Owning Library</td>
131                                                         <td>OPAC Visiblity</td>
132                                                         <td>Entries</td>
133                                                         <td>Add Entry</td>
134                                                         <td>Edit</td>
135                                                 </tr>
136                                         </thead>
137         
138                                         <tbody id='sc_tbody'>
139                                                 <tr id='sc_tr'>
140                                                         <td><b name='sc_name'> </b></td>
141                                                         <td name='sc_owning_lib'> </td>
142         
143                                                         <td>
144                                                                 <span class='hide_me' name='sc_opac_visible'>On</span> 
145                                                                 <span class='hide_me' name='sc_opac_invisible'>Off</span> 
146                                                         </td>
147         
148                                                         <td><select class='selector' name='sc_entries_selector'><option>(none)</option></select></td>
149                                                         <td><a href='javascript:void(0);' name='sc_new_entry'>Add</a></td>
150                                                         <td><a href='javascript:void(0);' name='sc_edit'>Edit</a></td>
151                                                 </tr>
152                                         </tbody>
153                                 </table>
154                         <!--
155                         </div>
156                         -->
157         
158                 
159
160                         
161                 </center>
162
163
164                 <!-- Text spans  / template +++++++++++++++++++++++++++++++++++++  -->
165                 <span class='hide_me' id='sc_new_entry_text'>Enter the value for the new stat cat entry</span>
166
167                 <span class='hide_me' id='sc_delete_confirm'>
168                         This will delete the selected stat cat and all attached entries
169                         Are you sure you wish to continue?
170                 </span>
171
172                 <span class='hide_me' id='sc_entry_delete_confirm'>
173                         Are you sure you wish to remove this stat cat entry?
174                 </span>
175
176                 <table class='hide_me'>
177                         <tr class='insert_row' id='sc_edit_row'>
178                                 <td><input name='sc_edit_name'> </input></td>
179                                 <td>
180                                         <span class='hide_me' name='sc_edit_show_owning_lib'> </span>
181                                         <select class='hide_me' name='sc_edit_owning_lib'> </select>
182                                 </td>
183
184                                 <td>
185                                         <span>On</span>
186                                         <span name='sc_edit_opac_vis'>
187                                                 <input type='radio' name='sc_edit_opac_visibility'> </input>
188                                         </span>
189                                         <span>Off</span>
190                                         <span name='sc_edit_opac_invis'>
191                                                 <input type='radio' name='sc_edit_opac_visibility'> </input>
192                                         </span>
193                                 </td>
194                                 <td colspan='4'>
195                                         <span class='padded'>
196                                                 <input  type='submit' value='Update Stat Cat' name='sc_edit_submit'/>
197                                         </span>
198                                         <span class='padded'>
199                                                 <input  type='submit' value='Delete Stat Cat' name='sc_edit_delete'/>
200                                         </span>
201                                         <input type='submit' name='sc_edit_cancel' value='Cancel'/>
202                                 </td>
203                         </tr>
204
205                         <tr class='insert_row' id='sc_edit_entry_row'>
206                                 <td colspan='7'>
207                                         <span class='padded'>
208                                                 <span>Owned By </span><b name='sc_edit_entry_owner'/>
209                                         </span>
210                                         <span class='padded'>
211                                                 <input type='text' name='sc_edit_entry_name' class='padded'/>
212                                         </span>
213                                         <span class='padded'>
214                                                 <input type='submit' name='sc_edit_entry_name_submit' value='Update Entry Value' class='padded'/>
215                                         </span>
216                                         <span class='padded'>
217                                                 <input type='submit' name='sc_edit_entry_delete' value='Delete Entry' class='padded'/>
218                                         </span>
219                                         <span class='padded'>
220                                                 <input type='submit' name='sc_edit_entry_cancel' value='Cancel'/>
221                                         </span>
222                                 </td>
223                         </tr>
224
225                         <tr class='insert_row' id='sc_new_entry_row'>
226                                 <td colspan='7'> 
227                                         <span>Enter the value of the new entry: </span>
228                                         <span class='padded'>
229                                                 <input type='text' name='sc_new_entry_name'/>
230                                         </span>
231                                         <span class='padded'>
232                                                 <select name='sc_new_entry_lib'> </select>
233                                         </span>
234                                         <span class='padded'>
235                                                 <input type='submit' name='sc_new_entry_create' value='Create new entry'/>
236                                         </span>
237                                         <span class='padded'>
238                                                 <input type='submit' name='sc_new_entry_cancel' value='Cancel'/>
239                                         </span>
240                                 </td>
241                         </tr>
242                 </table>
243
244         </body>
245 </html>
246