Kawai Wiki

Rev

Rev 207 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 207 Rev 209
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<%@page pageEncoding="UTF-8" %>
2
<%@page pageEncoding="UTF-8" %>
-
 
3
<%@ page contentType="text/html; charset=UTF-8"%> 
3
<%@taglib prefix="mtw" uri="http://www.mentaframework.org/tags-mtw/"%>
4
<%@taglib prefix="mtw" uri="http://www.mentaframework.org/tags-mtw/"%>
4
<%@ taglib uri="/WEB-INF/tld/taglib.tld" prefix="k" %>
5
<%@ taglib uri="/WEB-INF/tld/taglib.tld" prefix="k" %>
5
6
6
<html>
7
<html>
7
<head>
8
<head>
8
9
9
<title><mtw:out  value="bodyColumn.title" /></title>
10
<title><mtw:out  value="bodyColumn.title" /></title>
10
11
11
<style type="text/css" media="all">
12
<style type="text/css" media="all">
12
@import url("<mtw:contextPath/>/Page.getCSS.mtw?file=main.css");
13
@import url("<mtw:contextPath/>/Page.getCSS.mtw?file=main.css");
13
</style>
14
</style>
14
15
15
<meta http-equiv="imagetoolbar" content="no" />
16
<meta http-equiv="imagetoolbar" content="no" />
16
<meta http-equiv="imagetoolbar" content="false" />
17
<meta http-equiv="imagetoolbar" content="false" />
17
18
18
<link rel="shortcut icon" type="image/x-icon" href="<mtw:contextPath />/images/kawai.ico" />
19
<link rel="shortcut icon" type="image/x-icon" href="<mtw:contextPath />/images/kawai.ico" />
19
<link rel="icon" type="image/gif" href="<mtw:contextPath />/images/kawai.gif" />
20
<link rel="icon" type="image/gif" href="<mtw:contextPath />/images/kawai.gif" />
20
<link rel="stylesheet" href="<mtw:contextPath/>/Page.getPrintCSS.mtw?file=print.css" type="text/css" media="print" />
21
<link rel="stylesheet" href="<mtw:contextPath/>/Page.getPrintCSS.mtw?file=print.css" type="text/css" media="print" />
21
22
22
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-
 
-
 
23
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
23
<meta name="author" content="Sergio Oliveira Junior" />
24
<meta name="author" content="Sergio Oliveira Junior" />
24
<meta name="email" content="sergio.oliveira.jr@gmail.com" />
25
<meta name="email" content="sergio.oliveira.jr@gmail.com" />
25
26
26
<link href="<mtw:contextPath/>/css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
27
<link href="<mtw:contextPath/>/css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
27
<script type="text/javascript" src="<mtw:contextPath/>/jquery/jquery-1.6.4.min.js"></script>
28
<script type="text/javascript" src="<mtw:contextPath/>/jquery/jquery-1.6.4.min.js"></script>
28
<script src="<mtw:contextPath/>/js/jquery-ui-1.8.16.custom.min.js"></script>
29
<script src="<mtw:contextPath/>/js/jquery-ui-1.8.16.custom.min.js"></script>
29
30
30
<link href="<mtw:contextPath />/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
31
<link href="<mtw:contextPath />/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
31
<script type="text/javascript" src="<mtw:contextPath />/uploadify/swfobject.js"></script>
32
<script type="text/javascript" src="<mtw:contextPath />/uploadify/swfobject.js"></script>
32
<script type="text/javascript" src="<mtw:contextPath />/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
33
<script type="text/javascript" src="<mtw:contextPath />/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
33
34
34
<!-- Include required JS files -->
35
<!-- Include required JS files -->
35
<script type="text/javascript" src="<mtw:contextPath/>/sh/js/shCore.js"></script>
36
<script type="text/javascript" src="<mtw:contextPath/>/sh/js/shCore.js"></script>
36
 
37
 
37
<!--
38
<!--
38
    At least one brush, here we choose JS. You need to include a brush for every 
39
    At least one brush, here we choose JS. You need to include a brush for every 
39
    language you want to highlight
40
    language you want to highlight
40
-->
41
-->
41
<script type="text/javascript" src="<mtw:contextPath/>/sh/js/shBrushJava.js"></script>
42
<script type="text/javascript" src="<mtw:contextPath/>/sh/js/shBrushJava.js"></script>
42
 
43
 
43
<!-- Include *at least* the core style and default theme -->
44
<!-- Include *at least* the core style and default theme -->
44
<link href="<mtw:contextPath/>/sh/css/shCore.css" rel="stylesheet" type="text/css" />
45
<link href="<mtw:contextPath/>/sh/css/shCore.css" rel="stylesheet" type="text/css" />
45
<link href="<mtw:contextPath/>/sh/css/shThemeDefault.css" rel="stylesheet" type="text/css" />
46
<link href="<mtw:contextPath/>/sh/css/shThemeDefault.css" rel="stylesheet" type="text/css" />
46
 
47
 
47
<!-- Finally, to actually run the highlighter, you need to include this JS on your page -->
48
<!-- Finally, to actually run the highlighter, you need to include this JS on your page -->
48
<script type="text/javascript">
49
<script type="text/javascript">
49
     SyntaxHighlighter.all();
50
     SyntaxHighlighter.all();
50
</script>
51
</script>
51
52
52
<!--  User JavaScript -->
53
<!--  User JavaScript -->
53
<script type="text/javascript">
54
<script type="text/javascript">
54
55
55
<mtw:out value="js.body" />
56
<mtw:out value="js.body" />
56
57
57
</script>
58
</script>
58
59
59
60
60
<script language="JavaScript">
61
<script language="JavaScript">
61
    
62
    
62
        $(document).ready(function() {
63
        $(document).ready(function() {
63
        
64
        
64
        	<mtw:if test="showForm" value="login">
65
        	<mtw:if test="showForm" value="login">
65
				showLoginDialog();
66
				showLoginDialog();
66
			</mtw:if>
67
			</mtw:if>
67
68
68
            <mtw:if test="showForm" value="addNewUser">
69
            <mtw:if test="showForm" value="addNewUser">
69
                showAddNewUserDialog(false);
70
                showAddNewUserDialog(false);
70
            </mtw:if>
71
            </mtw:if>
71
			
72
			
72
			<mtw:if test="showForm" value="add">
73
			<mtw:if test="showForm" value="add">
73
				showCreateNewPageDialog();
74
				showCreateNewPageDialog();
74
			</mtw:if>
75
			</mtw:if>
75
76
76
            <mtw:outMessage>
77
            <mtw:outMessage>
77
                alert('<mtw:out />');
78
                alert('<mtw:out />');
78
            </mtw:outMessage>
79
            </mtw:outMessage>
79
80
80
			$('#loginDialog').keyup(function(e) {
81
			$('#loginDialog').keyup(function(e) {
81
    			if (e.keyCode == 13) {
82
    			if (e.keyCode == 13) {
82
        			$('#loginForm').submit();
83
        			$('#loginForm').submit();
83
    			}
84
    			}
84
			});
85
			});
85
			
86
			
86
			$('#file_upload').uploadify({
87
			$('#file_upload').uploadify({
87
				'uploader'  : '<mtw:contextPath />/uploadify/uploadify.swf',
88
				'uploader'  : '<mtw:contextPath />/uploadify/uploadify.swf',
88
				'script'    : '<mtw:contextPath />/File.upload.mtw;jsessionid=<%= session.getId() %>',
89
				'script'    : '<mtw:contextPath />/File.upload.mtw;jsessionid=<%= session.getId() %>',
89
				'cancelImg' : '<mtw:contextPath />/uploadify/cancel.png',
90
				'cancelImg' : '<mtw:contextPath />/uploadify/cancel.png',
90
				'folder'    : '<mtw:contextPath />/uploads',
91
				'folder'    : '<mtw:contextPath />/uploads',
91
				'scriptData': { 'JSESSIONID': '<%= session.getId() %>'},
92
				'scriptData': { 'JSESSIONID': '<%= session.getId() %>'},
92
				'auto'      : true,
93
				'auto'      : true,
93
				'multi'     : true,
94
				'multi'     : true,
94
				'onComplete'  : function(event, ID, fileObj, response, data) {
95
				'onComplete'  : function(event, ID, fileObj, response, data) {
95
96
96
					var resp = eval('(' + response + ')');
97
					var resp = eval('(' + response + ')');
97
		
98
		
98
					if (resp.status == 'success') {
99
					if (resp.status == 'success') {
99
						$('#uploadResults').append('<tr><td style="color: blue;">' + resp.msg + '</td></tr>');
100
						$('#uploadResults').append('<tr><td style="color: blue;">' + resp.msg + '</td></tr>');
100
					} else if (resp.status == 'error') {
101
					} else if (resp.status == 'error') {
101
						$('#uploadResults').append('<tr><td style="color: red;">' + resp.msg + '</td></tr>');    				
102
						$('#uploadResults').append('<tr><td style="color: red;">' + resp.msg + '</td></tr>');    				
102
					}
103
					}
103
				}
104
				}
104
			});
105
			});
105
106
106
            // ajax add new user:
107
            // ajax add new user:
107
108
108
	        
109
	        
109
            $('#usernameLoading').hide();
110
            $('#usernameLoading').hide();
110
    
111
    
111
            $('#addNewUserUsername').blur( function() {
112
            $('#addNewUserUsername').blur( function() {
112
    
113
    
113
                $('#usernameMessage').hide();
114
                $('#usernameMessage').hide();
114
    
115
    
115
                if ($('#addNewUserUsername').val().trim() != '') {
116
                if ($('#addNewUserUsername').val().trim() != '') {
116
117
117
                    $('#usernameLoading').show();
118
                    $('#usernameLoading').show();
118
    
119
    
119
                    $.post("<mtw:contextPath />/User.check.mtw", {
120
                    $.post("<mtw:contextPath />/User.check.mtw", {
120
                        username : $('#addNewUserUsername').val()
121
                        username : $('#addNewUserUsername').val()
121
                    }, function(response) {
122
                    }, function(response) {
122
                        $('#usernameMessage').fadeOut();
123
                        $('#usernameMessage').fadeOut();
123
                        setTimeout("usernameResult('"
124
                        setTimeout("usernameResult('"
124
                                + escape(response) + "')", 400);
125
                                + escape(response) + "')", 400);
125
                    });
126
                    });
126
                }
127
                }
127
    
128
    
128
                return false;
129
                return false;
129
            });
130
            });
130
131
131
        });
132
        });
132
        
133
        
133
        function prepareEditPageDialog(myDialog, theTitle) {
134
        function prepareEditPageDialog(myDialog, theTitle) {
134
135
135
            options = {
136
            options = {
136
                autoOpen: false,
137
                autoOpen: false,
137
                width: 1000,
138
                width: 1000,
138
                modal: true,
139
                modal: true,
139
                title: theTitle,
140
                title: theTitle,
140
                buttons: [
141
                buttons: [
141
                          {
142
                          {
142
                                text: "Save",
143
                                text: "Save",
143
                                click: function() { $('#editPageForm').submit(); }
144
                                click: function() { $('#editPageForm').submit(); }
144
                          },
145
                          },
145
                          {
146
                          {
146
                                text: "Preview",
147
                                text: "Preview",
147
                                click: function() { $('#editPagePreview').val('true'); $('#editPageForm').submit(); }
148
                                click: function() { $('#editPagePreview').val('true'); $('#editPageForm').submit(); }
148
                          },                          
149
                          },                          
149
                          {
150
                          {
150
                                text: "Cancel",
151
                                text: "Cancel",
151
                                click: function() { $(this).dialog("close"); }
152
                                click: function() { $(this).dialog("close"); }
152
                          }
153
                          }
153
                      ]
154
                      ]
154
           };
155
           };
155
156
156
          myDialog.dialog(options);
157
          myDialog.dialog(options);
157
158
158
          return myDialog;
159
          return myDialog;
159
        }
160
        }
160
161
161
        function prepareShowPageDialog(myDialog, theTitle) {
162
        function prepareShowPageDialog(myDialog, theTitle) {
162
163
163
            options = {
164
            options = {
164
                autoOpen: false,
165
                autoOpen: false,
165
                width: 800,
166
                width: 800,
166
                modal: true,
167
                modal: true,
167
                title: theTitle,
168
                title: theTitle,
168
                buttons: [
169
                buttons: [
169
                          {
170
                          {
170
                                text: "Back",
171
                                text: "Back",
171
                                click: function() { $(this).dialog("close"); }
172
                                click: function() { $(this).dialog("close"); }
172
                          },
173
                          },
173
                          {
174
                          {
174
                                text: "Close",
175
                                text: "Close",
175
                                click: function() { $(this).dialog("close"); $('#listLastRevisionsDialog').dialog('close'); $('#listRevisionsDialog').dialog('close'); $('#listAllPagesDialog').dialog('close'); }
176
                                click: function() { $(this).dialog("close"); $('#listLastRevisionsDialog').dialog('close'); $('#listRevisionsDialog').dialog('close'); $('#listAllPagesDialog').dialog('close'); }
176
                          }
177
                          }
177
                      ]
178
                      ]
178
           };
179
           };
179
180
180
          myDialog.dialog(options);
181
          myDialog.dialog(options);
181
182
182
          return myDialog;
183
          return myDialog;
183
        }
184
        }
184
        
185
        
185
		function prepareFileListDialog(myDialog) {
186
		function prepareFileListDialog(myDialog) {
186
187
187
            options = {
188
            options = {
188
                autoOpen: false,
189
                autoOpen: false,
189
                width: 400,
190
                width: 400,
190
                height: 300,
191
                height: 300,
191
                modal: true,
192
                modal: true,
192
                title: "Files uploaded:",
193
                title: "Files uploaded:",
193
                buttons: [
194
                buttons: [
194
                          {
195
                          {
195
                                text: "Close",
196
                                text: "Close",
196
                                click: function() { $(this).dialog("close"); }
197
                                click: function() { $(this).dialog("close"); }
197
                          }
198
                          }
198
                      ]
199
                      ]
199
           };
200
           };
200
201
201
          myDialog.dialog(options);
202
          myDialog.dialog(options);
202
203
203
          return myDialog;
204
          return myDialog;
204
        }        
205
        }        
205
                
206
                
206
207
207
        function prepareListAllPagesDialog(myDialog, showEdit) {
208
        function prepareListAllPagesDialog(myDialog, showEdit) {
208
209
209
            listAllPagesButtons = [
210
            listAllPagesButtons = [
210
                      {
211
                      {
211
                            text: "Close",
212
                            text: "Close",
212
                            click: function() { $(this).dialog("close"); }
213
                            click: function() { $(this).dialog("close"); }
213
                      }];
214
                      }];
214
215
215
            if (showEdit) {
216
            if (showEdit) {
216
                listAllPagesButtons = [
217
                listAllPagesButtons = [
217
                          {
218
                          {
218
                                text: "FrontPage",
219
                                text: "FrontPage",
219
                                click: function() { $('#listAllPagesForm').attr('action', '<mtw:contextPath/>/Page.setFrontPage.mtw'); $('#listAllPagesForm').submit(); }
220
                                click: function() { $('#listAllPagesForm').attr('action', '<mtw:contextPath/>/Page.setFrontPage.mtw'); $('#listAllPagesForm').submit(); }
220
                          },
221
                          },
221
                          {
222
                          {
222
                                text: "Delete",
223
                                text: "Delete",
223
                                click: function() { $('#listAllPagesForm').attr('action', '<mtw:contextPath/>/Page.delete.mtw'); $('#listAllPagesForm').submit(); }
224
                                click: function() { $('#listAllPagesForm').attr('action', '<mtw:contextPath/>/Page.delete.mtw'); $('#listAllPagesForm').submit(); }
224
                          },
225
                          },
225
                          {
226
                          {
226
                                text: "Close",
227
                                text: "Close",
227
                                click: function() { $(this).dialog("close"); }
228
                                click: function() { $(this).dialog("close"); }
228
                          }];
229
                          }];
229
            }
230
            }
230
231
231
            options = {
232
            options = {
232
                autoOpen: false,
233
                autoOpen: false,
233
                width: 800,
234
                width: 800,
234
                height: 450,
235
                height: 450,
235
                modal: true,
236
                modal: true,
236
                title: 'Pages:',
237
                title: 'Pages:',
237
                buttons: listAllPagesButtons
238
                buttons: listAllPagesButtons
238
           };
239
           };
239
240
240
          myDialog.dialog(options);
241
          myDialog.dialog(options);
241
242
242
          return myDialog;
243
          return myDialog;
243
        }
244
        }
244
245
245
        function prepareListRevisionsDialog(myDialog, name, lang, showBackButton) {
246
        function prepareListRevisionsDialog(myDialog, name, lang, showBackButton) {
246
        
247
        
247
        	theButtons = [
248
        	theButtons = [
248
                          {
249
                          {
249
                                text: "Back",
250
                                text: "Back",
250
                                click: function() { $(this).dialog("close"); }
251
                                click: function() { $(this).dialog("close"); }
251
                          },
252
                          },
252
                          {
253
                          {
253
                                text: "Close",
254
                                text: "Close",
254
                                click: function() { $(this).dialog("close"); $('#listAllPagesDialog').dialog('close'); }
255
                                click: function() { $(this).dialog("close"); $('#listAllPagesDialog').dialog('close'); }
255
                          }
256
                          }
256
                      ];
257
                      ];
257
                      
258
                      
258
			if (!showBackButton) {
259
			if (!showBackButton) {
259
			
260
			
260
        	theButtons = [
261
        	theButtons = [
261
                          {
262
                          {
262
                                text: "Close",
263
                                text: "Close",
263
                                click: function() { $(this).dialog("close"); $('#listAllPagesDialog').dialog('close'); }
264
                                click: function() { $(this).dialog("close"); $('#listAllPagesDialog').dialog('close'); }
264
                          }
265
                          }
265
                      ];
266
                      ];
266
			}                      
267
			}                      
267
            
268
            
268
269
269
            options = {
270
            options = {
270
                autoOpen: false,
271
                autoOpen: false,
271
                width: 800,
272
                width: 800,
272
                height: 450,
273
                height: 450,
273
                modal: true,
274
                modal: true,
274
                title: 'Revisions for ' + name + ' in ' + lang,
275
                title: 'Revisions for ' + name + ' in ' + lang,
275
                buttons: theButtons
276
                buttons: theButtons
276
           };
277
           };
277
278
278
          myDialog.dialog(options);
279
          myDialog.dialog(options);
279
280
280
          return myDialog;
281
          return myDialog;
281
        }
282
        }
282
        
283
        
283
        function prepareListLastRevisionsDialog(myDialog, language) {
284
        function prepareListLastRevisionsDialog(myDialog, language) {
284
        
285
        
285
        	theButtons = [
286
        	theButtons = [
286
                          {
287
                          {
287
                                text: "Close",
288
                                text: "Close",
288
                                click: function() { $(this).dialog("close"); }
289
                                click: function() { $(this).dialog("close"); }
289
                          }
290
                          }
290
                      ];
291
                      ];
291
292
292
            options = {
293
            options = {
293
                autoOpen: false,
294
                autoOpen: false,
294
                width: 800,
295
                width: 800,
295
                height: 450,
296
                height: 450,
296
                modal: true,
297
                modal: true,
297
                title: 'Latest revisions in ' + language,
298
                title: 'Latest revisions in ' + language,
298
                buttons: theButtons
299
                buttons: theButtons
299
           };
300
           };
300
301
301
          myDialog.dialog(options);
302
          myDialog.dialog(options);
302
303
303
          return myDialog;
304
          return myDialog;
304
        }
305
        }
305
        
306
        
306
        
307
        
307
        function prepareFileUploadDialog(myDialog) {
308
        function prepareFileUploadDialog(myDialog) {
308
        
309
        
309
            options = {
310
            options = {
310
                autoOpen: false,
311
                autoOpen: false,
311
                width: 400,
312
                width: 400,
312
                height: 300,
313
                height: 300,
313
                modal: true,
314
                modal: true,
314
                title: 'Uploading files...',
315
                title: 'Uploading files...',
315
                buttons: [
316
                buttons: [
316
                          {
317
                          {
317
                                text: "Close",
318
                                text: "Close",
318
                                click: function() { $(this).dialog("close"); }
319
                                click: function() { $(this).dialog("close"); }
319
                          }
320
                          }
320
                      ]
321
                      ]
321
           };
322
           };
322
323
323
          myDialog.dialog(options);
324
          myDialog.dialog(options);
324
325
325
          return myDialog;
326
          return myDialog;
326
        }        
327
        }        
327
        
328
        
328
        function showEditPageDialog(pageName, lang) {
329
        function showEditPageDialog(pageName, lang) {
329
330
330
            $.getJSON('<mtw:contextPath />/Page.get.mtw?name=' + pageName + '&lang=' + lang, function(data) {
331
            $.getJSON('<mtw:contextPath />/Page.get.mtw?name=' + pageName + '&lang=' + lang, function(data) {
331
332
332
                if (data.page.systemPage) {
333
                if (data.page.systemPage) {
333
                	$('.editPageTitleCell').hide();
334
                	$('.editPageTitleCell').hide();
334
                } else {
335
                } else {
335
                	$('.editPageTitleCell').show();
336
                	$('.editPageTitleCell').show();
336
                	$('#editPageTitle').val(data.page.title);
337
                	$('#editPageTitle').val(data.page.title);
337
                }
338
                }
338
                
339
                
339
                if (data.page.new) {
340
                if (data.page.new) {
340
                	$('#editPageCommentCell').hide();
341
                	$('#editPageCommentCell').hide();
341
                } else {
342
                } else {
342
                	$('#editPageCommentCell').show();
343
                	$('#editPageCommentCell').show();
343
                	if (data.page.preview) {
344
                	if (data.page.preview) {
344
                		$('#editPageComment').val(data.page.comment);
345
                		$('#editPageComment').val(data.page.comment);
345
                	}
346
                	}
346
                }
347
                }
347
                
348
                
348
                $('#editPageTextArea').val(data.page.body);
349
                $('#editPageTextArea').val(data.page.body);
349
                $('#editPageName').val(data.page.name);
350
                $('#editPageName').val(data.page.name);
350
                $('#editPageLang').val(data.page.lang);
351
                $('#editPageLang').val(data.page.lang);
351
352
352
                myDialog = $('#editPageDialog');
353
                myDialog = $('#editPageDialog');
353
                myDialog = prepareEditPageDialog(myDialog, 'Editing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language.name + "<i>...");
354
                myDialog = prepareEditPageDialog(myDialog, 'Editing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language.name + "<i>...");
354
                myDialog.dialog('open');
355
                myDialog.dialog('open');
355
            });
356
            });
356
            
357
            
357
            return false;
358
            return false;
358
        }
359
        }
359
        
360
        
360
        function showFileListDialog() {
361
        function showFileListDialog() {
361
362
362
            $.getJSON('<mtw:contextPath />/File.listFiles.mtw', function(data) {
363
            $.getJSON('<mtw:contextPath />/File.listFiles.mtw', function(data) {
363
364
364
				$('#fileListTable').html('');
365
				$('#fileListTable').html('');
365
            
366
            
366
            	if (data.files.length == 0) {
367
            	if (data.files.length == 0) {
367
            		$('#fileListTable').html('<tr><td align="center">No files uploaded yet!</td></tr>');
368
            		$('#fileListTable').html('<tr><td align="center">No files uploaded yet!</td></tr>');
368
            	} else {
369
            	} else {
369
            		$.each(data.files, function(i,file) {
370
            		$.each(data.files, function(i,file) {
370
						$('#fileListTable').append('<tr><td>' + file + '</td></tr>');						            			
371
						$('#fileListTable').append('<tr><td>' + file + '</td></tr>');						            			
371
            		});
372
            		});
372
            	}
373
            	}
373
374
374
                myDialog = $('#fileListDialog');
375
                myDialog = $('#fileListDialog');
375
                myDialog = prepareFileListDialog(myDialog);
376
                myDialog = prepareFileListDialog(myDialog);
376
                myDialog.dialog('open');
377
                myDialog.dialog('open');
377
            });
378
            });
378
            
379
            
379
            return false;
380
            return false;
380
        }        
381
        }        
381
382
382
        function showShowPageDialog(pageName, lang, revision) {
383
        function showShowPageDialog(pageName, lang, revision) {
383
384
384
            $.getJSON('<mtw:contextPath />/Page.get.mtw?name=' + pageName + '&lang=' + lang + '&revision=' + revision, function(data) {
385
            $.getJSON('<mtw:contextPath />/Page.get.mtw?name=' + pageName + '&lang=' + lang + '&revision=' + revision, function(data) {
385
            
386
            
386
                if (data.page.systemPage) {
387
                if (data.page.systemPage) {
387
                    $('.showPageTitleCell').hide();
388
                    $('.showPageTitleCell').hide();
388
                } else {
389
                } else {
389
                    $('.showPageTitleCell').show();
390
                    $('.showPageTitleCell').show();
390
                    $('#showPageTitle').val(data.page.title);
391
                    $('#showPageTitle').val(data.page.title);
391
                }
392
                }
392
                $('#showPageTextArea').val(data.page.body);
393
                $('#showPageTextArea').val(data.page.body);
393
394
394
                theTitle = 'Showing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language.name + "<i>...";
395
                theTitle = 'Showing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language.name + "<i>...";
395
                if (revision > 0) {
396
                if (revision > 0) {
396
                    theTitle += ' (Revision #' + revision + ')';
397
                    theTitle += ' (Revision #' + revision + ')';
397
                }
398
                }
398
399
399
                myDialog = $('#showPageDialog');
400
                myDialog = $('#showPageDialog');
400
                myDialog = prepareShowPageDialog(myDialog, theTitle);
401
                myDialog = prepareShowPageDialog(myDialog, theTitle);
401
                myDialog.dialog('open');
402
                myDialog.dialog('open');
402
            });
403
            });
403
            
404
            
404
            return false;
405
            return false;
405
        }
406
        }
406
407
407
        
408
        
408
        function showEditPreviewDialog(pageName, lang) {
409
        function showEditPreviewDialog(pageName, lang) {
409
410
410
            $.getJSON('<mtw:contextPath />/Page.getPreview.mtw?name=' + pageName + '&lang=' + lang, function(data) {
411
            $.getJSON('<mtw:contextPath />/Page.getPreview.mtw?name=' + pageName + '&lang=' + lang, function(data) {
411
412
412
            	if (data.page.systemPage) {
413
            	if (data.page.systemPage) {
413
                	$('.editPageTitleCell').hide();
414
                	$('.editPageTitleCell').hide();
414
                } else {
415
                } else {
415
                	$('.editPageTitleCell').show();
416
                	$('.editPageTitleCell').show();
416
                	$('#editPageTitle').val(data.page.title);
417
                	$('#editPageTitle').val(data.page.title);
417
                }
418
                }
418
                
419
                
419
                if (data.page.new) {
420
                if (data.page.new) {
420
                	$('#editPageCommentCell').hide();
421
                	$('#editPageCommentCell').hide();
421
                } else {
422
                } else {
422
                	$('#editPageCommentCell').show();
423
                	$('#editPageCommentCell').show();
423
                	if (data.page.preview) {
424
                	if (data.page.preview) {
424
                		$('#editPageComment').val(data.page.comment);
425
                		$('#editPageComment').val(data.page.comment);
425
                	}
426
                	}
426
                }
427
                }
427
                
428
                
428
                
429
                
429
                $('#editPageTextArea').val(data.page.body);
430
                $('#editPageTextArea').val(data.page.body);
430
                $('#editPageName').val(data.page.name);
431
                $('#editPageName').val(data.page.name);
431
                $('#editPageLang').val(data.page.lang);
432
                $('#editPageLang').val(data.page.lang);
432
433
433
                myDialog = $('#editPageDialog');
434
                myDialog = $('#editPageDialog');
434
                myDialog = prepareEditPageDialog(myDialog, 'Editing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language.name + "<i>...");
435
                myDialog = prepareEditPageDialog(myDialog, 'Editing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language.name + "<i>...");
435
                myDialog.dialog('open');
436
                myDialog.dialog('open');
436
            });
437
            });
437
            
438
            
438
            return false;
439
            return false;
439
        }
440
        }
440
        
441
        
441
        
442
        
442
       	function showEditPreviewNewPageDialog(pageName, lang) {
443
       	function showEditPreviewNewPageDialog(pageName, lang) {
443
444
444
            $.getJSON('<mtw:contextPath />/Page.getPreview.mtw?name=' + pageName + '&lang=' + lang, function(data) {
445
            $.getJSON('<mtw:contextPath />/Page.getPreview.mtw?name=' + pageName + '&lang=' + lang, function(data) {
445
            
446
            
446
           		$('#createNewPageName').val(data.page.name);
447
           		$('#createNewPageName').val(data.page.name);
447
        		$('#createNewPageTitle').val(data.page.title);
448
        		$('#createNewPageTitle').val(data.page.title);
448
        		$('#createNewPageLanguage').val(data.page.languageId);
449
        		$('#createNewPageLanguage').val(data.page.languageId);
449
        		$('#createNewPageTextArea').val(data.page.body);
450
        		$('#createNewPageTextArea').val(data.page.body);
450
        		$('#createNewPageNameError').text('');
451
        		$('#createNewPageNameError').text('');
451
        		$('#createNewPageTitleError').text('');
452
        		$('#createNewPageTitleError').text('');
452
        		$('#createNewPageLanguageError').text('');
453
        		$('#createNewPageLanguageError').text('');
453
        		$('#createNewPageBodyError').text('');
454
        		$('#createNewPageBodyError').text('');
454
            
455
            
455
				showCreateNewPageDialog();
456
				showCreateNewPageDialog();
456
457
457
				$('#createPageLanguageCell').hide();
458
				$('#createPageLanguageCell').hide();
458
            });
459
            });
459
            
460
            
460
            return false;
461
            return false;
461
        }
462
        }
462
        
463
        
463
        function showListAllPagesDialog(isAdmin) {
464
        function showListAllPagesDialog(isAdmin) {
464
465
465
            $.getJSON('<mtw:contextPath />/Page.list.mtw', function(data) {
466
            $.getJSON('<mtw:contextPath />/Page.list.mtw', function(data) {
466
467
467
                tableData = '';
468
                tableData = '';
468
                tableData += '<tr>';
469
                tableData += '<tr>';
469
                if (isAdmin) tableData += '<th>&nbsp;</th>';
470
                if (isAdmin) tableData += '<th>&nbsp;</th>';
470
                tableData += '<th>Name</th>';
471
                tableData += '<th>Name</th>';
471
                tableData += '<th>Language</th>';
472
                tableData += '<th>Language</th>';
472
                tableData += '<th>Created By</th>';
473
                tableData += '<th>Created By</th>';
473
                tableData += '<th>Modified By</th>';
474
                tableData += '<th>Modified By</th>';
474
                tableData += '<th>&nbsp;</th>';
475
                tableData += '<th>&nbsp;</th>';
475
                tableData += '<th>&nbsp;</th>';
476
                tableData += '<th>&nbsp;</th>';
476
                tableData += '<th>&nbsp;</th>';
477
                tableData += '<th>&nbsp;</th>';
477
                tableData += '</tr>';
478
                tableData += '</tr>';
478
479
479
                $.each(data.pages, function(i,page) {
480
                $.each(data.pages, function(i,page) {
480
                
481
                
481
                	pageName = page.name;
482
                	pageName = page.name;
482
483
483
                    modifiedBy = '';
484
                    modifiedBy = '';
484
                    if (page.modifiedById > 0) {
485
                    if (page.modifiedById > 0) {
485
                        modifiedBy = page.modifiedBy.username;
486
                        modifiedBy = page.modifiedBy.username;
486
                    }
487
                    }
487
488
488
                    if (page.systemPage == true) {
489
                    if (page.systemPage == true) {
489
                        pageName = '*' + pageName;
490
                        pageName = '*' + pageName;
490
                    }
491
                    }
491
492
492
                    if (page.frontPage == true) {
493
                    if (page.frontPage == true) {
493
                        pageName = '[' + pageName + ']';
494
                        pageName = '[' + pageName + ']';
494
                    }
495
                    }
495
                    
496
                    
496
                    modifiedOnTitle = '';
497
                    modifiedOnTitle = '';
497
                    if (page.formattedModifiedOn != null) {
498
                    if (page.formattedModifiedOn != null) {
498
                    	modifiedOnTitle = ' title="' + page.formattedModifiedOn + '"';
499
                    	modifiedOnTitle = ' title="' + page.formattedModifiedOn + '"';
499
                    }
500
                    }
500
                    
501
                    
501
                    createdOnTitle = '';
502
                    createdOnTitle = '';
502
                    if (page.formattedCreatedOn != null) {
503
                    if (page.formattedCreatedOn != null) {
503
                    	createdOnTitle = ' title="' + page.formattedCreatedOn + '"';
504
                    	createdOnTitle = ' title="' + page.formattedCreatedOn + '"';
504
                    }
505
                    }
505
                    
506
                    
506
                    radioCell = '&nbsp;';
507
                    radioCell = '&nbsp;';
507
                    viewCell = '&nbsp;';
508
                    viewCell = '&nbsp;';
508
                    if (page.CSS == false && page.systemPage == false) {
509
                    if (page.CSS == false && page.systemPage == false) {
509
                    	viewCell = '<a title="View Page" tabindex="-1" href="<mtw:contextPath/>/Page.mtw?name=' + page.name + '&lang=' + page.lang + '"><img src="<mtw:contextPath/>/images/preview.png" border="0" /></a> ';
510
                    	viewCell = '<a title="View Page" tabindex="-1" href="<mtw:contextPath/>/Page.mtw?name=' + page.name + '&lang=' + page.lang + '"><img src="<mtw:contextPath/>/images/preview.png" border="0" /></a> ';
510
                    	if (page.frontPage == false) {
511
                    	if (page.frontPage == false) {
511
                    		radioCell = '<input tabindex="-1" type="radio" name="pageId" id="pageId" value="' + page.id + '" />';
512
                    		radioCell = '<input tabindex="-1" type="radio" name="pageId" id="pageId" value="' + page.id + '" />';
512
                    	}
513
                    	}
513
                    }
514
                    }
514
515
515
                    viewRevisionsCell = '<a title="View Revisions" class="revisionLink" tabindex="-1" href="#" onclick="return showListRevisionsDialog(\'' + page.name + '\',\'' + page.lang + '\',\'' + page.language.name + '\', true);"><img src="<mtw:contextPath/>/images/folder.png" height="24" height="20" border="0" /></a>';
516
                    viewRevisionsCell = '<a title="View Revisions" class="revisionLink" tabindex="-1" href="#" onclick="return showListRevisionsDialog(\'' + page.name + '\',\'' + page.lang + '\',\'' + page.language.name + '\', true);"><img src="<mtw:contextPath/>/images/folder.png" height="24" height="20" border="0" /></a>';
516
                    
517
                    
517
                    nameTitle = '';
518
                    nameTitle = '';
518
                    if (page.title != null && page.title != '') {
519
                    if (page.title != null && page.title != '') {
519
                    	nameTitle = ' title="' + page.title + '"';
520
                    	nameTitle = ' title="' + page.title + '"';
520
                    }
521
                    }
521
522
522
                    tableData += '<tr>';
523
                    tableData += '<tr>';
523
                    if (isAdmin) tableData += '<td>' + radioCell + '</td>';
524
                    if (isAdmin) tableData += '<td>' + radioCell + '</td>';
524
                    tableData += '<td' + nameTitle + '>' + pageName + '</td>';
525
                    tableData += '<td' + nameTitle + '>' + pageName + '</td>';
525
                    tableData += '<td align="center">' + page.language.name + '</td>';
526
                    tableData += '<td align="center">' + page.language.name + '</td>';
526
                    tableData += '<td align="center"' + createdOnTitle + '>' + page.createdBy.username + '</td>';
527
                    tableData += '<td align="center"' + createdOnTitle + '>' + page.createdBy.username + '</td>';
527
                    tableData += '<td align="center"' + modifiedOnTitle + '>' + modifiedBy + '</td>';
528
                    tableData += '<td align="center"' + modifiedOnTitle + '>' + modifiedBy + '</td>';
528
                    tableData += '<td align="center">' + viewCell + '</td>';
529
                    tableData += '<td align="center">' + viewCell + '</td>';
529
                    tableData += '<td align="center"><a tabindex="-1" title="View Html" href="#" onclick="return showShowPageDialog(\'' + page.name + '\',\'' + page.lang + '\', -1);"><img src="<mtw:contextPath/>/images/view.png" border="0" /></a></td>';
530
                    tableData += '<td align="center"><a tabindex="-1" title="View Html" href="#" onclick="return showShowPageDialog(\'' + page.name + '\',\'' + page.lang + '\', -1);"><img src="<mtw:contextPath/>/images/view.png" border="0" /></a></td>';
530
                    tableData += '<td align="center">' + viewRevisionsCell + '</td>';
531
                    tableData += '<td align="center">' + viewRevisionsCell + '</td>';
531
                    tableData += '</tr>';
532
                    tableData += '</tr>';
532
                });
533
                });
533
534
534
                $('#listAllPagesTable').html(tableData);
535
                $('#listAllPagesTable').html(tableData);
535
536
536
                myDialogDiv = $('#listAllPagesDialog');
537
                myDialogDiv = $('#listAllPagesDialog');
537
                myDialog = prepareListAllPagesDialog(myDialogDiv, isAdmin);
538
                myDialog = prepareListAllPagesDialog(myDialogDiv, isAdmin);
538
                myDialog.dialog('open');
539
                myDialog.dialog('open');
539
                $('.ui-dialog :button').blur();
540
                $('.ui-dialog :button').blur();
540
             });
541
             });
541
            
542
            
542
            return false;
543
            return false;
543
        }
544
        }
544
545
545
        function showListRevisionsDialog(name, lang, language, showBackButton) {
546
        function showListRevisionsDialog(name, lang, language, showBackButton) {
546
547
547
            $.getJSON('<mtw:contextPath />/Page.getRevisions.mtw?name=' + name + '&lang=' + lang, function(data) {
548
            $.getJSON('<mtw:contextPath />/Page.getRevisions.mtw?name=' + name + '&lang=' + lang, function(data) {
548
549
549
                tableData = '';
550
                tableData = '';
550
                tableData += '<tr>';
551
                tableData += '<tr>';
551
                tableData += '<th>Revision</th>';
552
                tableData += '<th>Revision</th>';
552
                tableData += '<th>Author</th>';
553
                tableData += '<th>Author</th>';
553
                tableData += '<th>Date</th>';
554
                tableData += '<th>Date</th>';
554
                
555
                
555
                if (data.isSystemPage == false) {
556
                if (data.isSystemPage == false) {
556
                    tableData += '<th>&nbsp;</th>';
557
                    tableData += '<th>&nbsp;</th>';
557
                }
558
                }
558
                tableData += '<th>&nbsp;</th>';
559
                tableData += '<th>&nbsp;</th>';
559
                tableData += '</tr>';
560
                tableData += '</tr>';
560
561
561
                $.each(data.revisions, function(i,revision) {
562
                $.each(data.revisions, function(i,revision) {
562
                
563
                
563
                	titleForComment = '';
564
                	titleForComment = '';
564
                	if (revision.comment != null && revision.comment != '') {
565
                	if (revision.comment != null && revision.comment != '') {
565
                		titleForComment = ' title="' + revision.comment + '"';
566
                		titleForComment = ' title="' + revision.comment + '"';
566
                	}
567
                	}
567
568
568
                    tableData += '<tr>';
569
                    tableData += '<tr>';
569
                    tableData += '<td' + titleForComment + '>' + revision.revision + '</td>';
570
                    tableData += '<td' + titleForComment + '>' + revision.revision + '</td>';
570
                    tableData += '<td align="center">' + revision.user.username + '</td>';
571
                    tableData += '<td align="center">' + revision.user.username + '</td>';
571
                    tableData += '<td align="center">' + revision.formattedCreatedOn + '</td>';
572
                    tableData += '<td align="center">' + revision.formattedCreatedOn + '</td>';
572
573
573
                    if (data.isSystemPage == false) {
574
                    if (data.isSystemPage == false) {
574
                        tableData += '<td align="center"><a title="View Page" tabindex="-1" href="<mtw:contextPath/>/Page.mtw?name=' + revision.name + '&lang=' + revision.lang + '&revision=' + revision.revision +'"><img src="<mtw:contextPath/>/images/preview.png" border="0" /></a></td>';
575
                        tableData += '<td align="center"><a title="View Page" tabindex="-1" href="<mtw:contextPath/>/Page.mtw?name=' + revision.name + '&lang=' + revision.lang + '&revision=' + revision.revision +'"><img src="<mtw:contextPath/>/images/preview.png" border="0" /></a></td>';
575
                    }
576
                    }
576
                    
577
                    
577
                    tableData += '<td align="center"><a tabindex="-1" title="View Html" href="#" onclick="return showShowPageDialog(\'' + revision.name + '\',\'' + revision.lang + '\',' + revision.revision + ');"><img src="<mtw:contextPath/>/images/view.png" border="0" /></a></td>';
578
                    tableData += '<td align="center"><a tabindex="-1" title="View Html" href="#" onclick="return showShowPageDialog(\'' + revision.name + '\',\'' + revision.lang + '\',' + revision.revision + ');"><img src="<mtw:contextPath/>/images/view.png" border="0" /></a></td>';
578
579
579
                    tableData += '</tr>';
580
                    tableData += '</tr>';
580
                });
581
                });
581
582
582
                $('#listRevisionsTable').html(tableData);
583
                $('#listRevisionsTable').html(tableData);
583
                myDialog = $('#listRevisionsDialog');
584
                myDialog = $('#listRevisionsDialog');
584
                myDialog = prepareListRevisionsDialog(myDialog, name, language, showBackButton);
585
                myDialog = prepareListRevisionsDialog(myDialog, name, language, showBackButton);
585
                myDialog.dialog('open');
586
                myDialog.dialog('open');
586
                $('.ui-dialog :button').blur();
587
                $('.ui-dialog :button').blur();
587
             });
588
             });
588
            
589
            
589
            return false;
590
            return false;
590
        }
591
        }
591
        
592
        
592
        function showListLastRevisionsDialog(lang, language, isLogged) {
593
        function showListLastRevisionsDialog(lang, language, isLogged) {
593
594
594
            $.getJSON('<mtw:contextPath />/Page.getLastRevisions.mtw?lang=' + lang, function(data) {
595
            $.getJSON('<mtw:contextPath />/Page.getLastRevisions.mtw?lang=' + lang, function(data) {
595
596
596
                tableData = '';
597
                tableData = '';
597
                tableData += '<tr>';
598
                tableData += '<tr>';
598
                tableData += '<th>Page</th>';
599
                tableData += '<th>Page</th>';
599
                tableData += '<th>Revision</th>';
600
                tableData += '<th>Revision</th>';
600
                tableData += '<th>Author</th>';
601
                tableData += '<th>Author</th>';
601
                tableData += '<th>Date</th>';
602
                tableData += '<th>Date</th>';
602
                tableData += '<th>Comment</th>';
603
                tableData += '<th>Comment</th>';
603
                tableData += '<th>&nbsp;</th>';
604
                tableData += '<th>&nbsp;</th>';
604
605
605
                if (isLogged) {
606
                if (isLogged) {
606
                    tableData += '<th>&nbsp;</th>';
607
                    tableData += '<th>&nbsp;</th>';
607
                }
608
                }
608
                
609
                
609
                tableData += '</tr>';
610
                tableData += '</tr>';
610
611
611
                $.each(data.revisions, function(i,revision) {
612
                $.each(data.revisions, function(i,revision) {
612
                
613
                
613
                    tableData += '<tr>';
614
                    tableData += '<tr>';
614
                    
615
                    
615
                    pageName = revision.name;
616
                    pageName = revision.name;
616
                    
617
                    
617
                    if (revision.frontPage) {
618
                    if (revision.frontPage) {
618
                    	pageName = '[' + pageName + ']';
619
                    	pageName = '[' + pageName + ']';
619
                    } else if (revision.systemPage) {
620
                    } else if (revision.systemPage) {
620
                    	pageName = '*' + pageName;
621
                    	pageName = '*' + pageName;
621
                    }
622
                    }
622
623
623
                    nameTitle = '';
624
                    nameTitle = '';
624
                    if (revision.title != null && revision.title != '') {
625
                    if (revision.title != null && revision.title != '') {
625
                    	nameTitle = ' title="' + revision.title + '"';
626
                    	nameTitle = ' title="' + revision.title + '"';
626
                    }
627
                    }
627
                    
628
                    
628
                    tableData += '<td' + nameTitle + ' align="center">' + pageName + '</td>';
629
                    tableData += '<td' + nameTitle + ' align="center">' + pageName + '</td>';
629
                    tableData += '<td align="center">' + revision.revision + '</td>';
630
                    tableData += '<td align="center">' + revision.revision + '</td>';
630
                    tableData += '<td align="center">' + revision.user.username + '</td>';
631
                    tableData += '<td align="center">' + revision.user.username + '</td>';
631
                    tableData += '<td align="center">' + revision.formattedCreatedOn + '</td>';
632
                    tableData += '<td align="center">' + revision.formattedCreatedOn + '</td>';
632
                    tableData += '<td align="left">' + revision.comment + '</td>';
633
                    tableData += '<td align="left">' + revision.comment + '</td>';
633
634
634
					if (!revision.systemPage) {
635
					if (!revision.systemPage) {
635
                    	tableData += '<td align="center"><a title="View Page" tabindex="-1" href="<mtw:contextPath/>/Page.mtw?name=' + revision.name + '&lang=' + revision.lang + '&revision=' + revision.revision +'"><img src="<mtw:contextPath/>/images/preview.png" border="0" /></a></td>';
636
                    	tableData += '<td align="center"><a title="View Page" tabindex="-1" href="<mtw:contextPath/>/Page.mtw?name=' + revision.name + '&lang=' + revision.lang + '&revision=' + revision.revision +'"><img src="<mtw:contextPath/>/images/preview.png" border="0" /></a></td>';
636
                    } else {
637
                    } else {
637
                    	tableData += '<td>&nbsp;</td>';
638
                    	tableData += '<td>&nbsp;</td>';
638
                    }
639
                    }
639
640
640
                    if (isLogged) {
641
                    if (isLogged) {
641
                        tableData += '<td align="center"><a tabindex="-1" title="View Html" href="#" onclick="return showShowPageDialog(\'' + revision.name + '\',\'' + revision.lang + '\',' + revision.revision + ');"><img src="<mtw:contextPath/>/images/view.png" border="0" /></a></td>';
642
                        tableData += '<td align="center"><a tabindex="-1" title="View Html" href="#" onclick="return showShowPageDialog(\'' + revision.name + '\',\'' + revision.lang + '\',' + revision.revision + ');"><img src="<mtw:contextPath/>/images/view.png" border="0" /></a></td>';
642
                    }
643
                    }
643
                    
644
                    
644
                    tableData += '</tr>';
645
                    tableData += '</tr>';
645
                });
646
                });
646
647
647
                $('#listLastRevisionsTable').html(tableData);
648
                $('#listLastRevisionsTable').html(tableData);
648
                myDialog = $('#listLastRevisionsDialog');
649
                myDialog = $('#listLastRevisionsDialog');
649
                myDialog = prepareListLastRevisionsDialog(myDialog, language);
650
                myDialog = prepareListLastRevisionsDialog(myDialog, language);
650
                myDialog.dialog('open');
651
                myDialog.dialog('open');
651
                $('.ui-dialog :button').blur();
652
                $('.ui-dialog :button').blur();
652
             });
653
             });
653
            
654
            
654
            return false;
655
            return false;
655
        }
656
        }
656
657
657
658
658
       	function showCreateNewPageDialog() {
659
       	function showCreateNewPageDialog() {
659
660
660
            $('#createNewPageFormName').val('<mtw:out value="bodyColumn.name" />');
661
            $('#createNewPageFormName').val('<mtw:out value="bodyColumn.name" />');
661
            $('#createNewPageFormLang').val('<mtw:out value="bodyColumn.lang" />');
662
            $('#createNewPageFormLang').val('<mtw:out value="bodyColumn.lang" />');
662
            $('#createPageLanguageCell').show();
663
            $('#createPageLanguageCell').show();
663
664
664
            myDialog = $('#createNewPageDialog');
665
            myDialog = $('#createNewPageDialog');
665
            myDialog = prepareCreateNewPageDialog(myDialog);
666
            myDialog = prepareCreateNewPageDialog(myDialog);
666
            myDialog.dialog('open');
667
            myDialog.dialog('open');
667
            
668
            
668
            return false;
669
            return false;
669
        }
670
        }
670
        
671
        
671
        function prepareCreateNewPageDialog(myDialog) {
672
        function prepareCreateNewPageDialog(myDialog) {
672
673
673
            options = {
674
            options = {
674
            	close: function() { clearCreateNewPageForm(); },
675
            	close: function() { clearCreateNewPageForm(); },
675
                autoOpen: false,
676
                autoOpen: false,
676
                width: 800,
677
                width: 800,
677
                modal: true,
678
                modal: true,
678
                title: "Create New Page:",
679
                title: "Create New Page:",
679
                buttons: [
680
                buttons: [
680
                          {
681
                          {
681
                                text: "Create",
682
                                text: "Create",
682
                                click: function() { $('#createNewPageForm').submit(); }
683
                                click: function() { $('#createNewPageForm').submit(); }
683
                          },
684
                          },
684
                          {
685
                          {
685
                              text: "Preview",
686
                              text: "Preview",
686
                              click: function() { $('#createNewPageFormPreview').val('true'); $('#createNewPageForm').submit(); }
687
                              click: function() { $('#createNewPageFormPreview').val('true'); $('#createNewPageForm').submit(); }
687
                          },
688
                          },
688
                          {
689
                          {
689
                                text: "Cancel",
690
                                text: "Cancel",
690
                                click: function() {  $(this).dialog("close"); }
691
                                click: function() {  $(this).dialog("close"); }
691
                          }
692
                          }
692
                      ]
693
                      ]
693
           };
694
           };
694
695
695
          myDialog.dialog(options);
696
          myDialog.dialog(options);
696
697
697
          return myDialog;
698
          return myDialog;
698
        }
699
        }
699
        
700
        
700
        function showFileUploadDialog() {
701
        function showFileUploadDialog() {
701
  			
702
  			
702
  			$('#uploadResults').html('');
703
  			$('#uploadResults').html('');
703
        
704
        
704
        	myDialog = $('#fileUploadDialog');
705
        	myDialog = $('#fileUploadDialog');
705
        	myDialog = prepareFileUploadDialog(myDialog);
706
        	myDialog = prepareFileUploadDialog(myDialog);
706
        	myDialog.dialog('open');
707
        	myDialog.dialog('open');
707
        }
708
        }
708
        
709
        
709
    
710
    
710
        function showLoginDialog() {
711
        function showLoginDialog() {
711
712
712
            $('#loginFormName').val('<mtw:out value="bodyColumn.name" />');
713
            $('#loginFormName').val('<mtw:out value="bodyColumn.name" />');
713
            $('#loginFormLang').val('<mtw:out value="bodyColumn.lang" />');
714
            $('#loginFormLang').val('<mtw:out value="bodyColumn.lang" />');
714
715
715
            myDialog = $('#loginDialog');
716
            myDialog = $('#loginDialog');
716
            myDialog = prepareLoginDialog(myDialog);
717
            myDialog = prepareLoginDialog(myDialog);
717
            myDialog.dialog('open');
718
            myDialog.dialog('open');
718
719
719
            return false;
720
            return false;
720
        }
721
        }
721
722
722
        function showAddNewUserDialog(hideUsernameMessage) {
723
        function showAddNewUserDialog(hideUsernameMessage) {
723
724
724
            myDialog = $('#addNewUserDialog');
725
            myDialog = $('#addNewUserDialog');
725
            myDialog = prepareAddNewUserDialog(myDialog, hideUsernameMessage);
726
            myDialog = prepareAddNewUserDialog(myDialog, hideUsernameMessage);
726
            myDialog.dialog('open');
727
            myDialog.dialog('open');
727
728
728
            return false;
729
            return false;
729
        }
730
        }
730
        
731
        
731
        function clearLoginForm() {
732
        function clearLoginForm() {
732
        	$('#loginUsername').val('');
733
        	$('#loginUsername').val('');
733
        	$('#loginPassword').val('');
734
        	$('#loginPassword').val('');
734
        	$('#loginUsernameError').text('');
735
        	$('#loginUsernameError').text('');
735
        	$('#loginPasswordError').text('');
736
        	$('#loginPasswordError').text('');
736
        }
737
        }
737
738
738
        function clearAddNewUserForm() {
739
        function clearAddNewUserForm() {
739
        	$('#addNewUserUsername').val('');
740
        	$('#addNewUserUsername').val('');
740
        	$('#addNewUserPassword').val('');
741
        	$('#addNewUserPassword').val('');
741
        	$('#addNewUserPassconf').val('');
742
        	$('#addNewUserPassconf').val('');
742
        	$('#addNewUserGroup').val('');
743
        	$('#addNewUserGroup').val('');
743
        	$('#usernameMessage').text('');
744
        	$('#usernameMessage').text('');
744
        	$('#addNewUserPasswordError').text('');
745
        	$('#addNewUserPasswordError').text('');
745
        	$('#addNewUserPassconfError').text('');
746
        	$('#addNewUserPassconfError').text('');
746
        	$('#addNewUserGroupError').text('');
747
        	$('#addNewUserGroupError').text('');
747
        }
748
        }
748
        
749
        
749
        function clearCreateNewPageForm() {
750
        function clearCreateNewPageForm() {
750
        	$('#createNewPageName').val('');
751
        	$('#createNewPageName').val('');
751
        	$('#createNewPageTitle').val('');
752
        	$('#createNewPageTitle').val('');
752
        	$('#createNewPageLanguage').val('');
753
        	$('#createNewPageLanguage').val('');
753
        	$('#createNewPageTextArea').val('');
754
        	$('#createNewPageTextArea').val('');
754
        	$('#createNewPageNameError').text('');
755
        	$('#createNewPageNameError').text('');
755
        	$('#createNewPageTitleError').text('');
756
        	$('#createNewPageTitleError').text('');
756
        	$('#createNewPageLanguageError').text('');
757
        	$('#createNewPageLanguageError').text('');
757
        	$('#createNewPageBodyError').text('');
758
        	$('#createNewPageBodyError').text('');
758
        }
759
        }
759
        
760
        
760
      	function prepareLoginDialog(myDialog) {
761
      	function prepareLoginDialog(myDialog) {
761
762
762
            options = {
763
            options = {
763
            	close: function() { clearLoginForm(); },
764
            	close: function() { clearLoginForm(); },
764
                autoOpen: false,
765
                autoOpen: false,
765
                width: 290,
766
                width: 290,
766
                modal: true,
767
                modal: true,
767
                title: "Login:",
768
                title: "Login:",
768
                buttons: [
769
                buttons: [
769
                          {
770
                          {
770
                                text: "Login",
771
                                text: "Login",
771
                                click: function() { $('#loginForm').submit(); }
772
                                click: function() { $('#loginForm').submit(); }
772
                          },
773
                          },
773
                          {
774
                          {
774
                                text: "Cancel",
775
                                text: "Cancel",
775
                                click: function() {  $(this).dialog("close"); }
776
                                click: function() {  $(this).dialog("close"); }
776
                          }
777
                          }
777
                      ]
778
                      ]
778
           };
779
           };
779
780
780
          myDialog.dialog(options);
781
          myDialog.dialog(options);
781
782
782
          return myDialog;
783
          return myDialog;
783
        }
784
        }
784
785
785
        function prepareAddNewUserDialog(myDialog, hideUsernameMessage) {
786
        function prepareAddNewUserDialog(myDialog, hideUsernameMessage) {
786
787
787
        	$('#usernameLoading').hide();
788
        	$('#usernameLoading').hide();
788
            if (hideUsernameMessage) $('#usernameMessage').text('');
789
            if (hideUsernameMessage) $('#usernameMessage').text('');
789
790
790
            options = {
791
            options = {
791
                close: function() { clearAddNewUserForm(); },
792
                close: function() { clearAddNewUserForm(); },
792
                autoOpen: false,
793
                autoOpen: false,
793
                width: 550,
794
                width: 550,
794
                modal: true,
795
                modal: true,
795
                title: "Add New User:",
796
                title: "Add New User:",
796
                buttons: [
797
                buttons: [
797
                          {
798
                          {
798
                                text: "Add",
799
                                text: "Add",
799
                                click: function() { $('#addNewUserForm').submit(); }
800
                                click: function() { $('#addNewUserForm').submit(); }
800
                          },
801
                          },
801
                          {
802
                          {
802
                                text: "Cancel",
803
                                text: "Cancel",
803
                                click: function() {  $(this).dialog("close"); }
804
                                click: function() {  $(this).dialog("close"); }
804
                          }
805
                          }
805
                      ]
806
                      ]
806
           };
807
           };
807
808
808
          myDialog.dialog(options);
809
          myDialog.dialog(options);
809
810
810
          return myDialog;
811
          return myDialog;
811
        }
812
        }
812
        
813
        
813
      	function prepareConfirmDialog(myDialog) {
814
      	function prepareConfirmDialog(myDialog) {
814
815
815
            options = {
816
            options = {
816
                autoOpen: false,
817
                autoOpen: false,
817
                width: 300,
818
                width: 300,
818
                modal: true,
819
                modal: true,
819
                title: "Confirmation:",
820
                title: "Confirmation:",
820
                buttons: [
821
                buttons: [
821
                          {
822
                          {
822
                                text: "Yes",
823
                                text: "Yes",
823
                                click: function() { $(this).dialog("close"); }
824
                                click: function() { $(this).dialog("close"); }
824
                          },
825
                          },
825
                          {
826
                          {
826
                                text: "No",
827
                                text: "No",
827
                                click: function() {  $(this).dialog("close"); }
828
                                click: function() {  $(this).dialog("close"); }
828
                          }
829
                          }
829
                      ]
830
                      ]
830
           };
831
           };
831
832
832
          myDialog.dialog(options);
833
          myDialog.dialog(options);
833
834
834
          return myDialog;
835
          return myDialog;
835
        }
836
        }
836
        
837
        
837
         function showConfirmDialog() {
838
         function showConfirmDialog() {
838
839
839
            myDialog = $('#confirmDialog');
840
            myDialog = $('#confirmDialog');
840
            myDialog = prepareConfirmDialog(myDialog);
841
            myDialog = prepareConfirmDialog(myDialog);
841
            myDialog.dialog('open');
842
            myDialog.dialog('open');
842
843
843
            return false;
844
            return false;
844
        }
845
        }
845
        
846
        
846
        function usernameResult(response) {
847
        function usernameResult(response) {
847
        
848
        
848
                $('#usernameLoading').hide();
849
                $('#usernameLoading').hide();
849
        
850
        
850
                var res = unescape(response);
851
                var res = unescape(response);
851
        
852
        
852
                if (res == "error") {
853
                if (res == "error") {
853
        
854
        
854
                    $('#usernameMessage')
855
                    $('#usernameMessage')
855
                            .html(
856
                            .html(
856
                                    '<font color="red"><b>Error!</b></font>');
857
                                    '<font color="red"><b>Error!</b></font>');
857
                    $('#usernameMessage').fadeIn();
858
                    $('#usernameMessage').fadeIn();
858
        
859
        
859
                } else if (res == "success") {
860
                } else if (res == "success") {
860
        
861
        
861
                    $('#usernameMessage').html(
862
                    $('#usernameMessage').html(
862
                            '<img src="<mtw:contextPath />/images/chk.gif" />');
863
                            '<img src="<mtw:contextPath />/images/chk.gif" />');
863
                    $('#usernameMessage').fadeIn();
864
                    $('#usernameMessage').fadeIn();
864
        
865
        
865
                } else if (res == "already") {
866
                } else if (res == "already") {
866
        
867
        
867
                    $('#usernameMessage')
868
                    $('#usernameMessage')
868
                            .html(
869
                            .html(
869
                                    '<font color="red"><b>Username already exists!</b></font>');
870
                                    '<font color="red"><b>Username already exists!</b></font>');
870
                    $('#usernameMessage').fadeIn();
871
                    $('#usernameMessage').fadeIn();
871
                }
872
                }
872
            }
873
            }
873
        </script>
874
        </script>
874
        
875
        
875
		<%@ include file="google_analytics.jsp" %>       
876
		<%@ include file="google_analytics.jsp" %>       
876
877
877
</head>
878
</head>
878
879
879
<body class="composite">
880
<body class="composite">
880
881
881
<!--  For adding username -->
882
<!--  For adding username -->
882
<div id="addNewUserDialog" style="display: none;">
883
<div id="addNewUserDialog" style="display: none;">
883
        <form action="<mtw:contextPath />/User.add.mtw" method="post" id="addNewUserForm">
884
        <form action="<mtw:contextPath />/User.add.mtw" method="post" id="addNewUserForm">
884
            <table>
885
            <table>
885
                <tr>
886
                <tr>
886
                    <td width="10%">
887
                    <td width="10%">
887
                        Username:
888
                        Username:
888
                    </td>
889
                    </td>
889
                    <td>
890
                    <td>
890
                        <mtw:input name="username" id="addNewUserUsername" size="20" maxlength="30" />
891
                        <mtw:input name="username" id="addNewUserUsername" size="20" maxlength="30" />
891
                        <span id="usernameLoading">
892
                        <span id="usernameLoading">
892
                            <img src="<mtw:contextPath />/images/loading.gif" />
893
                            <img src="<mtw:contextPath />/images/loading.gif" />
893
                        </span>
894
                        </span>
894
                        <span id="usernameMessage">
895
                        <span id="usernameMessage">
895
                            <mtw:outError field="username">
896
                            <mtw:outError field="username">
896
                                <font color="red">
897
                                <font color="red">
897
                                    <b><mtw:out /></b>
898
                                    <b><mtw:out /></b>
898
                                </font>
899
                                </font>
899
                            </mtw:outError>
900
                            </mtw:outError>
900
                        </span>
901
                        </span>
901
                    </td>
902
                    </td>
902
                </tr>
903
                </tr>
903
                <tr>
904
                <tr>
904
                    <td>
905
                    <td>
905
                        Password:
906
                        Password:
906
                    </td>
907
                    </td>
907
                    <td>
908
                    <td>
908
                        <mtw:input name="password" type="password" size="20" maxlength="20" id="addNewUserPassword" /> 
909
                        <mtw:input name="password" type="password" size="20" maxlength="20" id="addNewUserPassword" /> 
909
                        <span id="addNewUserPasswordError">
910
                        <span id="addNewUserPasswordError">
910
                            <mtw:outError field="password">
911
                            <mtw:outError field="password">
911
                                <font color="red">
912
                                <font color="red">
912
                                    <b><mtw:out /></b>
913
                                    <b><mtw:out /></b>
913
                                </font>
914
                                </font>
914
                        </mtw:outError>
915
                        </mtw:outError>
915
                        </span>
916
                        </span>
916
                    </td>
917
                    </td>
917
                </tr>
918
                </tr>
918
                <tr>
919
                <tr>
919
                    <td>
920
                    <td>
920
                        Confirm:
921
                        Confirm:
921
                    </td>
922
                    </td>
922
                    <td>
923
                    <td>
923
                        <mtw:input name="passconf" type="password" size="20" maxlength="20" id="addNewUserPassconf" /> 
924
                        <mtw:input name="passconf" type="password" size="20" maxlength="20" id="addNewUserPassconf" /> 
924
                        <span id="addNewUserPassconfError">
925
                        <span id="addNewUserPassconfError">
925
                            <mtw:outError field="passconf">
926
                            <mtw:outError field="passconf">
926
                                <font color="red">
927
                                <font color="red">
927
                                <b><mtw:out /></b>
928
                                <b><mtw:out /></b>
928
                            </font>
929
                            </font>
929
                        </mtw:outError>
930
                        </mtw:outError>
930
                        </span>
931
                        </span>
931
                    </td>
932
                    </td>
932
                </tr>
933
                </tr>
933
                <tr>
934
                <tr>
934
                    <td>
935
                    <td>
935
                        Group:
936
                        Group:
936
                    </td>
937
                    </td>
937
                    <td>
938
                    <td>
938
                        <mtw:select name="groupId" list="groups" emptyField="true" id="addNewUserGroup" />
939
                        <mtw:select name="groupId" list="groups" emptyField="true" id="addNewUserGroup" />
939
                        <span id="addNewUserGroupError">
940
                        <span id="addNewUserGroupError">
940
                        <mtw:outError field="groupId">
941
                        <mtw:outError field="groupId">
941
                            <font color="red">
942
                            <font color="red">
942
                                <b><mtw:out /></b>
943
                                <b><mtw:out /></b>
943
                            </font>
944
                            </font>
944
                        </mtw:outError>
945
                        </mtw:outError>
945
                        </span>
946
                        </span>
946
                    </td>
947
                    </td>
947
                </tr>
948
                </tr>
948
            </table>
949
            </table>
949
        </form>
950
        </form>
950
</div>
951
</div>
951
952
952
<!-- For Testing -->
953
<!-- For Testing -->
953
<div id="dialog" title="Dialog Title" style="display: none;">I'm in a dialog</div>
954
<div id="dialog" title="Dialog Title" style="display: none;">I'm in a dialog</div>
954
955
955
<!-- Close Confirm -->
956
<!-- Close Confirm -->
956
<div id="confirmDialog" style="display: none;">
957
<div id="confirmDialog" style="display: none;">
957
	<span id="confirmMessage">The confirmation message goes here.</span>
958
	<span id="confirmMessage">The confirmation message goes here.</span>
958
</div>
959
</div>
959
960
960
<!-- For file upload -->
961
<!-- For file upload -->
961
<div id="fileUploadDialog" style="display: none;">
962
<div id="fileUploadDialog" style="display: none;">
962
<br/>
963
<br/>
963
<input id="file_upload" name="file_upload" type="file" />
964
<input id="file_upload" name="file_upload" type="file" />
964
<table cellspacing="2" cellpadding="5" id="uploadResults" style="margin-top: 10px;">
965
<table cellspacing="2" cellpadding="5" id="uploadResults" style="margin-top: 10px;">
965
</table>
966
</table>
966
</div>
967
</div>
967
968
968
<!-- For files listing -->
969
<!-- For files listing -->
969
<div id="fileListDialog" style="display: none;">
970
<div id="fileListDialog" style="display: none;">
970
<table cellspacing="2" cellpadding="5" id="fileListTable" style="margin-top: 10px;">
971
<table cellspacing="2" cellpadding="5" id="fileListTable" style="margin-top: 10px;">
971
</table>
972
</table>
972
</div>
973
</div>
973
974
974
<!-- For Editing Pages -->
975
<!-- For Editing Pages -->
975
<div id="editPageDialog" style="display: none;">
976
<div id="editPageDialog" style="display: none;">
976
<form id="editPageForm" action="<mtw:contextPath />/Page.edit.mtw" method="post">
977
<form id="editPageForm" action="<mtw:contextPath />/Page.edit.mtw" method="post">
977
<input type="hidden" name="name" id ="editPageName" value="" />
978
<input type="hidden" name="name" id ="editPageName" value="" />
978
<input type="hidden" name="lang" id="editPageLang" value="" />
979
<input type="hidden" name="lang" id="editPageLang" value="" />
979
<input type="hidden" name="isPreview" id="editPagePreview" value="false" />
980
<input type="hidden" name="isPreview" id="editPagePreview" value="false" />
980
<table border="0">
981
<table border="0">
981
    <tr>
982
    <tr>
982
        <td>&nbsp;</td>
983
        <td>&nbsp;</td>
983
    </tr>
984
    </tr>
984
                <tr class="editPageTitleCell">
985
                <tr class="editPageTitleCell">
985
                    <td>
986
                    <td>
986
                        Title:&nbsp;&nbsp;&nbsp;&nbsp;
987
                        Title:&nbsp;&nbsp;&nbsp;&nbsp;
987
                        <mtw:input id="editPageTitle" name="title" size="40" maxlength="100" />
988
                        <mtw:input id="editPageTitle" name="title" size="40" maxlength="100" />
988
                        <span id="editPageTitleError">
989
                        <span id="editPageTitleError">
989
                        <mtw:outError field="title">
990
                        <mtw:outError field="title">
990
                            <font color="red">
991
                            <font color="red">
991
                                <b><mtw:out /></b>
992
                                <b><mtw:out /></b>
992
                            </font>
993
                            </font>
993
                        </mtw:outError>
994
                        </mtw:outError>
994
                        </span>
995
                        </span>
995
                    </td>
996
                    </td>
996
                </tr>
997
                </tr>
997
                <tr class="editPageTitleCell"><td colspan="2">&nbsp;</td></tr>
998
                <tr class="editPageTitleCell"><td colspan="2">&nbsp;</td></tr>
998
    <tr>
999
    <tr>
999
        <td><mtw:textarea id="editPageTextArea" name="body" style="width: 100%; height: 465px;" />
1000
        <td><mtw:textarea id="editPageTextArea" name="body" style="width: 100%; height: 465px;" />
1000
        <span id="editPageTextAreaError">
1001
        <span id="editPageTextAreaError">
1001
                        <mtw:outError field="body">
1002
                        <mtw:outError field="body">
1002
                            <font color="red">
1003
                            <font color="red">
1003
                                <b><mtw:out /></b>
1004
                                <b><mtw:out /></b>
1004
                            </font>
1005
                            </font>
1005
                        </mtw:outError>
1006
                        </mtw:outError>
1006
                        </span>
1007
                        </span>
1007
        
1008
        
1008
        </td>
1009
        </td>
1009
    </tr>
1010
    </tr>
1010
    
1011
    
1011
    <tr id="editPageCommentCell">
1012
    <tr id="editPageCommentCell">
1012
                    <td width="20%">
1013
                    <td width="20%">
1013
                        Edit comment: (<i>optional</i>) &nbsp;&nbsp;&nbsp;&nbsp;
1014
                        Edit comment: (<i>optional</i>) &nbsp;&nbsp;&nbsp;&nbsp;
1014
                        <mtw:input id="editPageComment" name="comment" size="40" maxlength="60" />
1015
                        <mtw:input id="editPageComment" name="comment" size="40" maxlength="60" />
1015
                        <span id="editPageCommentError">
1016
                        <span id="editPageCommentError">
1016
                        <mtw:outError field="comment">
1017
                        <mtw:outError field="comment">
1017
                            <font color="red">
1018
                            <font color="red">
1018
                                <b><mtw:out /></b>
1019
                                <b><mtw:out /></b>
1019
                            </font>
1020
                            </font>
1020
                        </mtw:outError>
1021
                        </mtw:outError>
1021
                        </span>
1022
                        </span>
1022
                    </td>
1023
                    </td>
1023
                </tr>
1024
                </tr>
1024
    
1025
    
1025
</table>
1026
</table>
1026
</form>
1027
</form>
1027
</div>
1028
</div>
1028
1029
1029
<!-- For Showing Page Html -->
1030
<!-- For Showing Page Html -->
1030
<div id="showPageDialog" style="display: none;">
1031
<div id="showPageDialog" style="display: none;">
1031
<form id="showPageForm">
1032
<form id="showPageForm">
1032
<table>
1033
<table>
1033
    <tr>
1034
    <tr>
1034
        <td>&nbsp;</td>
1035
        <td>&nbsp;</td>
1035
    </tr>
1036
    </tr>
1036
                <tr class="showPageTitleCell">
1037
                <tr class="showPageTitleCell">
1037
                    <td>
1038
                    <td>
1038
                        Title:
1039
                        Title:
1039
                    </td>
1040
                    </td>
1040
                    <td>
1041
                    <td>
1041
                        <mtw:input id="showPageTitle" name="title" size="40" maxlength="100" extra="readonly=readonly" />
1042
                        <mtw:input id="showPageTitle" name="title" size="40" maxlength="100" extra="readonly=readonly" />
1042
                    </td>
1043
                    </td>
1043
                </tr>
1044
                </tr>
1044
                <tr class="showPageTitleCell"><td>&nbsp;</td></tr>
1045
                <tr class="showPageTitleCell"><td>&nbsp;</td></tr>
1045
    <tr>
1046
    <tr>
1046
        <td colspan="2">
1047
        <td colspan="2">
1047
        <mtw:textarea id="showPageTextArea" name="body" style="width: 100%; height: 465px;" extra="readonly=readonly" />
1048
        <mtw:textarea id="showPageTextArea" name="body" style="width: 100%; height: 465px;" extra="readonly=readonly" />
1048
        </td>
1049
        </td>
1049
    </tr>
1050
    </tr>
1050
</table>
1051
</table>
1051
</form>
1052
</form>
1052
</div>
1053
</div>
1053
1054
1054
1055
1055
<!-- For Login -->
1056
<!-- For Login -->
1056
<div id="loginDialog" style="display: none;">
1057
<div id="loginDialog" style="display: none;">
1057
		<form action="<mtw:contextPath />/Login.mtw" method="post" id="loginForm">
1058
		<form action="<mtw:contextPath />/Login.mtw" method="post" id="loginForm">
1058
            <input type="hidden" name="name" value="" id="loginFormName" />
1059
            <input type="hidden" name="name" value="" id="loginFormName" />
1059
            <input type="hidden" name="lang" value="" id="loginFormLang" />
1060
            <input type="hidden" name="lang" value="" id="loginFormLang" />
1060
			<table>
1061
			<table>
1061
				<tr>
1062
				<tr>
1062
					<td>
1063
					<td>
1063
						Username:
1064
						Username:
1064
					</td>
1065
					</td>
1065
					<td>
1066
					<td>
1066
						<mtw:input id="loginUsername" name="username" size="20" maxlength="20" />
1067
						<mtw:input id="loginUsername" name="username" size="20" maxlength="20" />
1067
						<span id="loginUsernameError">
1068
						<span id="loginUsernameError">
1068
						<mtw:outError field="username">
1069
						<mtw:outError field="username">
1069
							<font color="red">
1070
							<font color="red">
1070
								<b><mtw:out /></b>
1071
								<b><mtw:out /></b>
1071
							</font>
1072
							</font>
1072
						</mtw:outError>
1073
						</mtw:outError>
1073
						</span>
1074
						</span>
1074
					</td>
1075
					</td>
1075
				</tr>
1076
				</tr>
1076
				<tr>
1077
				<tr>
1077
					<td>
1078
					<td>
1078
						Password:
1079
						Password:
1079
					</td>
1080
					</td>
1080
					<td>
1081
					<td>
1081
						<mtw:input id="loginPassword" name="password" type="password" size="20" maxlength="20" />
1082
						<mtw:input id="loginPassword" name="password" type="password" size="20" maxlength="20" />
1082
						<span id="loginPasswordError"> 
1083
						<span id="loginPasswordError"> 
1083
						<mtw:outError field="password">
1084
						<mtw:outError field="password">
1084
							<font color="red">
1085
							<font color="red">
1085
								<b><mtw:out /></b>
1086
								<b><mtw:out /></b>
1086
							</font>
1087
							</font>
1087
						</mtw:outError>
1088
						</mtw:outError>
1088
						</span>
1089
						</span>
1089
					</td>
1090
					</td>
1090
				</tr>
1091
				</tr>
1091
			</table>
1092
			</table>
1092
		</form>
1093
		</form>
1093
</div>
1094
</div>
1094
1095
1095
<!-- For displaying all pages -->
1096
<!-- For displaying all pages -->
1096
<div id="listAllPagesDialog" style="display: none;">
1097
<div id="listAllPagesDialog" style="display: none;">
1097
    <form action="#" method="post" id="listAllPagesForm">
1098
    <form action="#" method="post" id="listAllPagesForm">
1098
    <table id="listAllPagesTable">
1099
    <table id="listAllPagesTable">
1099
    </table>
1100
    </table>
1100
    </form>
1101
    </form>
1101
</div>
1102
</div>
1102
1103
1103
1104
1104
<!-- For displaying revisions -->
1105
<!-- For displaying revisions -->
1105
<div id="listRevisionsDialog" style="display: none;">
1106
<div id="listRevisionsDialog" style="display: none;">
1106
    <table class="revisionsTable" id="listRevisionsTable">
1107
    <table class="revisionsTable" id="listRevisionsTable">
1107
    </table>
1108
    </table>
1108
</div>
1109
</div>
1109
1110
1110
<!-- For displaying last revisions -->
1111
<!-- For displaying last revisions -->
1111
<div id="listLastRevisionsDialog" style="display: none;">
1112
<div id="listLastRevisionsDialog" style="display: none;">
1112
    <table class="revisionsTable" id="listLastRevisionsTable">
1113
    <table class="revisionsTable" id="listLastRevisionsTable">
1113
    </table>
1114
    </table>
1114
</div>
1115
</div>
1115
1116
1116
1117
1117
<!-- Create New Page -->
1118
<!-- Create New Page -->
1118
<div id="createNewPageDialog" style="display: none;">
1119
<div id="createNewPageDialog" style="display: none;">
1119
		<form action="<mtw:contextPath />/Page.add.mtw" method="post" id="createNewPageForm">
1120
		<form action="<mtw:contextPath />/Page.add.mtw" method="post" id="createNewPageForm">
1120
            <input type="hidden" name="name" value="" id="createNewPageFormName" />
1121
            <input type="hidden" name="name" value="" id="createNewPageFormName" />
1121
            <input type="hidden" name="lang" value="" id="createNewPageFormLang" />
1122
            <input type="hidden" name="lang" value="" id="createNewPageFormLang" />
1122
            <input type="hidden" name="isPreview" value="false" id="createNewPageFormPreview" />
1123
            <input type="hidden" name="isPreview" value="false" id="createNewPageFormPreview" />
1123
			<table>
1124
			<table>
1124
				<tr>
1125
				<tr>
1125
					<td>
1126
					<td>
1126
						Name:
1127
						Name:
1127
					</td>
1128
					</td>
1128
					<td>
1129
					<td>
1129
						<mtw:input id="createNewPageName" name="newPage.name" size="40" maxlength="30" />
1130
						<mtw:input id="createNewPageName" name="newPage.name" size="40" maxlength="30" />
1130
						<span id="createNewPageNameError">
1131
						<span id="createNewPageNameError">
1131
						<mtw:outError field="newPage.name">
1132
						<mtw:outError field="newPage.name">
1132
							<font color="red">
1133
							<font color="red">
1133
								<b><mtw:out /></b>
1134
								<b><mtw:out /></b>
1134
							</font>
1135
							</font>
1135
						</mtw:outError>
1136
						</mtw:outError>
1136
						</span>
1137
						</span>
1137
					</td>
1138
					</td>
1138
				</tr>
1139
				</tr>
1139
				<tr>
1140
				<tr>
1140
					<td>
1141
					<td>
1141
						Title:
1142
						Title:
1142
					</td>
1143
					</td>
1143
					<td>
1144
					<td>
1144
						<mtw:input id="createNewPageTitle" name="newPage.title" size="40" maxlength="100" />
1145
						<mtw:input id="createNewPageTitle" name="newPage.title" size="40" maxlength="100" />
1145
						<span id="createNewPageTitleError">
1146
						<span id="createNewPageTitleError">
1146
						<mtw:outError field="newPage.title">
1147
						<mtw:outError field="newPage.title">
1147
							<font color="red">
1148
							<font color="red">
1148
								<b><mtw:out /></b>
1149
								<b><mtw:out /></b>
1149
							</font>
1150
							</font>
1150
						</mtw:outError>
1151
						</mtw:outError>
1151
						</span>
1152
						</span>
1152
					</td>
1153
					</td>
1153
				</tr>
1154
				</tr>
1154
				<tr id="createPageLanguageCell">
1155
				<tr id="createPageLanguageCell">
1155
					<td>
1156
					<td>
1156
						Language:
1157
						Language:
1157
					</td>
1158
					</td>
1158
					<td>
1159
					<td>
1159
						<mtw:select name="newPage.languageId" list="languages" id="createNewPageLanguage" emptyField="true" />
1160
						<mtw:select name="newPage.languageId" list="languages" id="createNewPageLanguage" emptyField="true" />
1160
						<span id="createNewPageLanguageError">
1161
						<span id="createNewPageLanguageError">
1161
						<mtw:outError field="newPage.languageId">
1162
						<mtw:outError field="newPage.languageId">
1162
							<font color="red">
1163
							<font color="red">
1163
								<b><mtw:out /></b>
1164
								<b><mtw:out /></b>
1164
							</font>
1165
							</font>
1165
						</mtw:outError>
1166
						</mtw:outError>
1166
						</span>
1167
						</span>
1167
					</td>
1168
					</td>
1168
				</tr>
1169
				</tr>
1169
				<tr>
1170
				<tr>
1170
        			<td colspan="2">
1171
        			<td colspan="2">
1171
        				<mtw:textarea id="createNewPageTextArea" name="newPage.body" style="width: 100%; height: 465px;" />
1172
        				<mtw:textarea id="createNewPageTextArea" name="newPage.body" style="width: 100%; height: 465px;" />
1172
        				<span id="createNewPageBodyError">
1173
        				<span id="createNewPageBodyError">
1173
						<mtw:outError field="newPage.body">
1174
						<mtw:outError field="newPage.body">
1174
							<font color="red">
1175
							<font color="red">
1175
								<b><mtw:out /></b>
1176
								<b><mtw:out /></b>
1176
							</font>
1177
							</font>
1177
						</mtw:outError>
1178
						</mtw:outError>
1178
						</span>
1179
						</span>
1179
        			</td>
1180
        			</td>
1180
    			</tr>
1181
    			</tr>
1181
			</table>
1182
			</table>
1182
		</form>
1183
		</form>
1183
</div>
1184
</div>
1184
1185
1185
1186
1186
<div>
1187
<div>
1187
<table border="0">
1188
<table border="0">
1188
    <tr>
1189
    <tr>
1189
        <td>
1190
        <td>
1190
1191
1191
        <k:kcode name="logo" />        
1192
        <k:kcode name="logo" />        
1192
        <mtw:hasAuthorization groups="admin">
1193
        <mtw:hasAuthorization groups="admin">
1193
        
1194
        
1194
        <mtw:if test="logo.preview" value="false">
1195
        <mtw:if test="logo.preview" value="false">
1195
        <br/>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" style="font-size: 8px;" onclick="return showEditPageDialog('logo', '<mtw:out value="logo.lang" />');" title="<k:editTooltip name="logo" />">Edit Logo</a>
1196
        <br/>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" style="font-size: 8px;" onclick="return showEditPageDialog('logo', '<mtw:out value="logo.lang" />');" title="<k:editTooltip name="logo" />">Edit Logo</a>
1196
        </mtw:if>
1197
        </mtw:if>
1197
        
1198
        
1198
        <mtw:if test="logo.preview" value="true">
1199
        <mtw:if test="logo.preview" value="true">
1199
        <br/>&nbsp;&nbsp;&nbsp;&nbsp;
1200
        <br/>&nbsp;&nbsp;&nbsp;&nbsp;
1200
        <span style="font-size: 10px; font-weight: bold;">Preview</span><span style="font-size: 8px;">&nbsp;&nbsp;-&nbsp;</span>
1201
        <span style="font-size: 10px; font-weight: bold;">Preview</span><span style="font-size: 8px;">&nbsp;&nbsp;-&nbsp;</span>
1201
        <a style="font-size: 8px;" href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="logo.name" />&lang=<mtw:out value="logo.language.locale" />">Save</a>&nbsp;
1202
        <a style="font-size: 8px;" href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="logo.name" />&lang=<mtw:out value="logo.language.locale" />">Save</a>&nbsp;
1202
        <a style="font-size: 8px;" href="#" onclick="return showEditPreviewDialog('<mtw:out value="logo.name" />', '<mtw:out value="logo.language.locale" />');" title="<k:editTooltip name="logo" />">Edit</a>&nbsp;
1203
        <a style="font-size: 8px;" href="#" onclick="return showEditPreviewDialog('<mtw:out value="logo.name" />', '<mtw:out value="logo.language.locale" />');" title="<k:editTooltip name="logo" />">Edit</a>&nbsp;
1203
        <a style="font-size: 8px;" href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="logo.name" />&lang=<mtw:out value="logo.language.locale" />">Discard</a>
1204
        <a style="font-size: 8px;" href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="logo.name" />&lang=<mtw:out value="logo.language.locale" />">Discard</a>
1204
        </mtw:if>
1205
        </mtw:if>
1205
        
1206
        
1206
        </mtw:hasAuthorization>
1207
        </mtw:hasAuthorization>
1207
        
1208
        
1208
        </td>
1209
        </td>
1209
        <td align="right" valign="bottom">
1210
        <td align="right" valign="bottom">
1210
            <mtw:isLogged negate="true">
1211
            <mtw:isLogged negate="true">
1211
                <a href="#" onclick="return showListLastRevisionsDialog('<mtw:out value="bodyColumn.language.locale" />', '<mtw:out value="bodyColumn.language" />', false);">Last Updates</a> |
1212
                <a href="#" onclick="return showListLastRevisionsDialog('<mtw:out value="bodyColumn.language.locale" />', '<mtw:out value="bodyColumn.language" />', false);">Last Updates</a> |
1212
                <a href="#" onclick="return showLoginDialog();">Login</a>
1213
                <a href="#" onclick="return showLoginDialog();">Login</a>
1213
            </mtw:isLogged>
1214
            </mtw:isLogged>
1214
            <mtw:isLogged>
1215
            <mtw:isLogged>
1215
                <a href="#" onclick="return showCreateNewPageDialog();">Create New Page</a> |
1216
                <a href="#" onclick="return showCreateNewPageDialog();">Create New Page</a> |
1216
                <a href="#" onclick="return showAddNewUserDialog(true);">Add New User</a> |
1217
                <a href="#" onclick="return showAddNewUserDialog(true);">Add New User</a> |
1217
                <a href="#" onclick="return showListAllPagesDialog(<mtw:out value="sessionUser.admin" />);">List Pages</a> |
1218
                <a href="#" onclick="return showListAllPagesDialog(<mtw:out value="sessionUser.admin" />);">List Pages</a> |
1218
                
1219
                
1219
                <mtw:hasAuthorization groups="admin, editor">
1220
                <mtw:hasAuthorization groups="admin, editor">
1220
                
1221
                
1221
                <mtw:if test="css.preview" value="true">
1222
                <mtw:if test="css.preview" value="true">
1222
                <b>CSS</b> - 
1223
                <b>CSS</b> - 
1223
                <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="css.name" />&lang=<mtw:out value="css.language.locale" />">Save</a>&nbsp;
1224
                <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="css.name" />&lang=<mtw:out value="css.language.locale" />">Save</a>&nbsp;
1224
                <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="css.name" />', '<mtw:out value="css.language.locale" />');" title="<k:editTooltip name="css" />">Edit</a>&nbsp;
1225
                <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="css.name" />', '<mtw:out value="css.language.locale" />');" title="<k:editTooltip name="css" />">Edit</a>&nbsp;
1225
                <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="css.name" />&lang=<mtw:out value="css.language.locale" />">Discard</a> |
1226
                <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="css.name" />&lang=<mtw:out value="css.language.locale" />">Discard</a> |
1226
                </mtw:if>
1227
                </mtw:if>
1227
                
1228
                
1228
                <mtw:if test="css.preview" value="false">
1229
                <mtw:if test="css.preview" value="false">
1229
                <a href="#" onclick="return showEditPageDialog('CSS', 'en');" title="<k:editTooltip name="css" />">Edit CSS</a> |
1230
                <a href="#" onclick="return showEditPageDialog('CSS', 'en');" title="<k:editTooltip name="css" />">Edit CSS</a> |
1230
                </mtw:if>
1231
                </mtw:if>
1231
                
1232
                
1232
                </mtw:hasAuthorization>
1233
                </mtw:hasAuthorization>
1233
                
1234
                
1234
                <mtw:hasAuthorization groups="admin, editor">
1235
                <mtw:hasAuthorization groups="admin, editor">
1235
                
1236
                
1236
                <mtw:if test="js.preview" value="true">
1237
                <mtw:if test="js.preview" value="true">
1237
                <b>JavaScript</b> - 
1238
                <b>JavaScript</b> - 
1238
                <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="js.name" />&lang=<mtw:out value="js.language.locale" />">Save</a>&nbsp;
1239
                <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="js.name" />&lang=<mtw:out value="js.language.locale" />">Save</a>&nbsp;
1239
                <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="js.name" />', '<mtw:out value="js.language.locale" />');" title="<k:editTooltip name="js" />">Edit</a>&nbsp;
1240
                <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="js.name" />', '<mtw:out value="js.language.locale" />');" title="<k:editTooltip name="js" />">Edit</a>&nbsp;
1240
                <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="js.name" />&lang=<mtw:out value="js.language.locale" />">Discard</a> |
1241
                <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="js.name" />&lang=<mtw:out value="js.language.locale" />">Discard</a> |
1241
                </mtw:if>
1242
                </mtw:if>
1242
                
1243
                
1243
                <mtw:if test="js.preview" value="false">
1244
                <mtw:if test="js.preview" value="false">
1244
                <a href="#" onclick="return showEditPageDialog('JavaScript', 'en');" title="<k:editTooltip name="js" />">Edit JavaScript</a> |
1245
                <a href="#" onclick="return showEditPageDialog('JavaScript', 'en');" title="<k:editTooltip name="js" />">Edit JavaScript</a> |
1245
                </mtw:if>
1246
                </mtw:if>
1246
                
1247
                
1247
                </mtw:hasAuthorization>
1248
                </mtw:hasAuthorization>
1248
                
1249
                
1249
                <mtw:hasAuthorization groups="admin, editor">
1250
                <mtw:hasAuthorization groups="admin, editor">
1250
                
1251
                
1251
                <a href="#" onclick="return showFileUploadDialog();">Upload Files</a> |
1252
                <a href="#" onclick="return showFileUploadDialog();">Upload Files</a> |
1252
                <a href="#" onclick="return showFileListDialog();">List Files</a> |
1253
                <a href="#" onclick="return showFileListDialog();">List Files</a> |
1253
                <a href="#" onclick="return showListLastRevisionsDialog('<mtw:out value="bodyColumn.language.locale" />', '<mtw:out value="bodyColumn.language" />', true);">Last Updates</a> |
1254
                <a href="#" onclick="return showListLastRevisionsDialog('<mtw:out value="bodyColumn.language.locale" />', '<mtw:out value="bodyColumn.language" />', true);">Last Updates</a> |
1254
                
1255
                
1255
                </mtw:hasAuthorization>
1256
                </mtw:hasAuthorization>
1256
                
1257
                
1257
                
1258
                
1258
                <a href="<mtw:contextPath/>/Logout.mtw">Logout</a> (<mtw:out value="sessionUser.username" />)
1259
                <a href="<mtw:contextPath/>/Logout.mtw">Logout</a> (<mtw:out value="sessionUser.username" />)
1259
            </mtw:isLogged>
1260
            </mtw:isLogged>
1260
            &nbsp;
1261
            &nbsp;
1261
            <%--
1262
            <%--
1262
            <mtw:isLocale value="pt">
1263
            <mtw:isLocale value="pt">
1263
	            <a href="<mtw:urlWithLoc loc="pt" tagsToExclude="revision" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #ccc;" /></a>
1264
	            <a href="<mtw:urlWithLoc loc="pt" tagsToExclude="revision" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #ccc;" /></a>
1264
    	        <a href="<mtw:urlWithLoc loc="en" tagsToExclude="revision" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #fff;" /></a>
1265
    	        <a href="<mtw:urlWithLoc loc="en" tagsToExclude="revision" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #fff;" /></a>
1265
            </mtw:isLocale>
1266
            </mtw:isLocale>
1266
            <mtw:isLocale value="en">
1267
            <mtw:isLocale value="en">
1267
            	<a href="<mtw:urlWithLoc loc="pt" tagsToExclude="revision" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #fff;" /></a>
1268
            	<a href="<mtw:urlWithLoc loc="pt" tagsToExclude="revision" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #fff;" /></a>
1268
            	<a href="<mtw:urlWithLoc loc="en" tagsToExclude="revision" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #ccc;" /></a>
1269
            	<a href="<mtw:urlWithLoc loc="en" tagsToExclude="revision" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #ccc;" /></a>
1269
            </mtw:isLocale>
1270
            </mtw:isLocale>
1270
            --%>
1271
            --%>
1271
            <k:listFlags />
1272
            <k:listFlags />
1272
            &nbsp;&nbsp;&nbsp;
1273
            &nbsp;&nbsp;&nbsp;
1273
        </td>
1274
        </td>
1274
    </tr>
1275
    </tr>
1275
</table>
1276
</table>
1276
</div>
1277
</div>
1277
1278
1278
<hr />
1279
<hr />
1279
1280
1280
<div id="leftColumn"><mtw:isLogged>
1281
<div id="leftColumn"><mtw:isLogged>
1281
    <mtw:hasAuthorization groups="admin, editor">
1282
    <mtw:hasAuthorization groups="admin, editor">
1282
    
1283
    
1283
        <mtw:if test="leftColumn.preview" value="true">
1284
        <mtw:if test="leftColumn.preview" value="true">
1284
        <div style="text-align: left; padding-left: 8px; padding-top: 6px;">
1285
        <div style="text-align: left; padding-left: 8px; padding-top: 6px;">
1285
            <b>Preview</b>
1286
            <b>Preview</b>
1286
            &nbsp;-&nbsp;
1287
            &nbsp;-&nbsp;
1287
            <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="leftColumn.name" />&lang=<mtw:out value="leftColumn.language.locale" />">Save</a>&nbsp;&nbsp;
1288
            <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="leftColumn.name" />&lang=<mtw:out value="leftColumn.language.locale" />">Save</a>&nbsp;&nbsp;
1288
            <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="leftColumn.name" />', '<mtw:out value="leftColumn.language.locale" />');" title="<k:editTooltip name="leftColumn" />">Edit</a>&nbsp;&nbsp;
1289
            <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="leftColumn.name" />', '<mtw:out value="leftColumn.language.locale" />');" title="<k:editTooltip name="leftColumn" />">Edit</a>&nbsp;&nbsp;
1289
            <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="leftColumn.name" />&lang=<mtw:out value="leftColumn.language.locale" />">Discard</a>
1290
            <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="leftColumn.name" />&lang=<mtw:out value="leftColumn.language.locale" />">Discard</a>
1290
        </div>
1291
        </div>
1291
        </mtw:if>
1292
        </mtw:if>
1292
1293
1293
        <mtw:if test="leftColumn.preview" value="false">
1294
        <mtw:if test="leftColumn.preview" value="false">
1294
        <div style="text-align: right; padding-right: 14px; padding-top: 6px;">
1295
        <div style="text-align: right; padding-right: 14px; padding-top: 6px;">
1295
        <a href="#" onclick="return showEditPageDialog('LeftColumn', '<mtw:out value="leftColumn.language.locale" />');" title="<k:editTooltip name="leftColumn" />">Edit</a>
1296
        <a href="#" onclick="return showEditPageDialog('LeftColumn', '<mtw:out value="leftColumn.language.locale" />');" title="<k:editTooltip name="leftColumn" />">Edit</a>
1296
        &nbsp;&nbsp;
1297
        &nbsp;&nbsp;
1297
        <a href="#" onclick="return showListRevisionsDialog('LeftColumn','<mtw:out value="leftColumn.language.locale" />','<mtw:out value="leftColumn.language" />', false);">Revisions</a>
1298
        <a href="#" onclick="return showListRevisionsDialog('LeftColumn','<mtw:out value="leftColumn.language.locale" />','<mtw:out value="leftColumn.language" />', false);">Revisions</a>
1298
        </div>
1299
        </div>
1299
        </mtw:if>
1300
        </mtw:if>
1300
    
1301
    
1301
        
1302
        
1302
    </mtw:hasAuthorization>
1303
    </mtw:hasAuthorization>
1303
</mtw:isLogged>
1304
</mtw:isLogged>
1304
<div id="navcolumn">
1305
<div id="navcolumn">
1305
    <div>
1306
    <div>
1306
    <k:kcode name="leftColumn" />
1307
    <k:kcode name="leftColumn" />
1307
    </div>
1308
    </div>
1308
<br />
1309
<br />
1309
</div>
1310
</div>
1310
1311
1311
</div>
1312
</div>
1312
1313
1313
<div id="bodyColumn">
1314
<div id="bodyColumn">
1314
    <mtw:hasAuthorization groups="admin, editor">
1315
    <mtw:hasAuthorization groups="admin, editor">
1315
1316
1316
    <mtw:if test="bodyColumn.preview" value="true">
1317
    <mtw:if test="bodyColumn.preview" value="true">
1317
1318
1318
    	<mtw:if test="bodyColumn.new" value="true">
1319
    	<mtw:if test="bodyColumn.new" value="true">
1319
			<div style="text-align: left; padding-left: 4px;">
1320
			<div style="text-align: left; padding-left: 4px;">
1320
			<b>This is a Preview</b>
1321
			<b>This is a Preview</b>
1321
			&nbsp;-&nbsp;
1322
			&nbsp;-&nbsp;
1322
            <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Save</a>&nbsp;&nbsp;
1323
            <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Save</a>&nbsp;&nbsp;
1323
            <a href="#" onclick="return showEditPreviewNewPageDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a>&nbsp;&nbsp;
1324
            <a href="#" onclick="return showEditPreviewNewPageDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a>&nbsp;&nbsp;
1324
			<a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Discard</a>
1325
			<a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Discard</a>
1325
			</div>    
1326
			</div>    
1326
    	</mtw:if>
1327
    	</mtw:if>
1327
    	<mtw:if test="bodyColumn.new" value="false">
1328
    	<mtw:if test="bodyColumn.new" value="false">
1328
            <div style="text-align: left; padding-left: 4px;">
1329
            <div style="text-align: left; padding-left: 4px;">
1329
            <b>This is a Preview</b>
1330
            <b>This is a Preview</b>
1330
            &nbsp;-&nbsp;
1331
            &nbsp;-&nbsp;
1331
            <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Save</a>&nbsp;&nbsp;
1332
            <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Save</a>&nbsp;&nbsp;
1332
            <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a>&nbsp;&nbsp;
1333
            <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a>&nbsp;&nbsp;
1333
            <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Discard</a>
1334
            <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Discard</a>
1334
			</div>    	
1335
			</div>    	
1335
    	</mtw:if>
1336
    	</mtw:if>
1336
    
1337
    
1337
    </mtw:if>
1338
    </mtw:if>
1338
1339
1339
    <mtw:if test="bodyColumn.preview" value="false">
1340
    <mtw:if test="bodyColumn.preview" value="false">
1340
        <mtw:if test="bodyColumn.revision" value="true">
1341
        <mtw:if test="bodyColumn.revision" value="true">
1341
            <div style="text-align: left; padding-left: 4px;"><span title="<k:editTooltip name="bodyColumn" />"><b>Revision #<mtw:out value="bodyColumn.revisionNumber" /></b></span></div>
1342
            <div style="text-align: left; padding-left: 4px;"><span title="<k:editTooltip name="bodyColumn" />"><b>Revision #<mtw:out value="bodyColumn.revisionNumber" /></b></span></div>
1342
        </mtw:if>
1343
        </mtw:if>
1343
    
1344
    
1344
        <mtw:if test="bodyColumn.revision" value="false">
1345
        <mtw:if test="bodyColumn.revision" value="false">
1345
            <div style="text-align: right; padding-right: 14px;">
1346
            <div style="text-align: right; padding-right: 14px;">
1346
            <a href="#" onclick="return showEditPageDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a>
1347
            <a href="#" onclick="return showEditPageDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a>
1347
            &nbsp;&nbsp;
1348
            &nbsp;&nbsp;
1348
            <a href="#" onclick="return showListRevisionsDialog('<mtw:out value="bodyColumn.name" />','<mtw:out value="bodyColumn.language.locale" />','<mtw:out value="bodyColumn.language" />', false);">Revisions</a>
1349
            <a href="#" onclick="return showListRevisionsDialog('<mtw:out value="bodyColumn.name" />','<mtw:out value="bodyColumn.language.locale" />','<mtw:out value="bodyColumn.language" />', false);">Revisions</a>
1349
            </div>
1350
            </div>
1350
        </mtw:if>
1351
        </mtw:if>
1351
    </mtw:if>
1352
    </mtw:if>
1352
1353
1353
    </mtw:hasAuthorization>
1354
    </mtw:hasAuthorization>
1354
    <k:kcode name="bodyColumn" />
1355
    <k:kcode name="bodyColumn" />
1355
</div>
1356
</div>
1356
1357
1357
<div class="clear">
1358
<div class="clear">
1358
<hr />
1359
<hr />
1359
</div>
1360
</div>
1360
<br/><br/><br/>
1361
<br/><br/><br/>
1361
<div id="footer">
1362
<div id="footer">
1362
<div><center>Copyright (c) 2011 - Powered by <a href="http://www.kawaiwiki.org" target="_blank"><b>Kawai</b></a></center></div>
1363
<div><center>Copyright (c) 2011 - Powered by <a href="http://www.kawaiwiki.org" target="_blank"><b>Kawai</b></a></center></div>
1363
<div class="clear">
1364
<div class="clear">
1364
<hr />
1365
<hr />
1365
</div>
1366
</div>
1366
</div>
1367
</div>
1367
1368
1368
</body>
1369
</body>
1369
</html>
1370
</html>