Kawai Wiki

Rev

Rev 76 | Rev 80 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 76 Rev 79
Line 213... Line 213...
213
                    }
213
                    }
214
                    
214
                    
215
                    radioCell = ' ';
215
                    radioCell = ' ';
216
                    viewCell = ' ';
216
                    viewCell = ' ';
217
                    if (page.CSS == false && page.systemPage == false) {
217
                    if (page.CSS == false && page.systemPage == false) {
218
                    	viewCell = '<a tabindex="-1" href="<mtw:contextPath/>/Page.mtw?name=' + page.name + '&lang=' + page.lang + '"><img src="<mtw:contextPath/>/images/view.png" /></a>';
-
 
-
 
218
                    	viewCell = '<a tabindex="-1" href="<mtw:contextPath/>/Page.mtw?name=' + page.name + '&lang=' + page.lang + '"><img src="<mtw:contextPath/>/images/view.png" /></a> ';
219
                    	if (page.frontPage == false) {
219
                    	if (page.frontPage == false) {
220
                    		radioCell = '<input tabindex="-1" type="radio" name="pageId" id="pageId" value="' + page.id + '" />';
220
                    		radioCell = '<input tabindex="-1" type="radio" name="pageId" id="pageId" value="' + page.id + '" />';
221
                    	}
221
                    	}
222
                    }
222
                    }
-
 
223
-
 
224
                    viewCell += '<a tabindex="-1" href="#" onclick="return showListRevisionsDialog(\'' + page.name + '\',\'' + page.lang + '\');">History</a>';
223
                    
225
                    
224
                    nameTitle = '';
226
                    nameTitle = '';
225
                    if (page.title != null && page.title != '') {
227
                    if (page.title != null && page.title != '') {
226
                    	nameTitle = ' title="' + page.title + '"';
228
                    	nameTitle = ' title="' + page.title + '"';
227
                    }
229
                    }
Line 231... Line 233...
231
                    tableData += '<td' + nameTitle + '>' + pageName + '</td>';
233
                    tableData += '<td' + nameTitle + '>' + pageName + '</td>';
232
                    tableData += '<td align="center">' + page.language + '</td>';
234
                    tableData += '<td align="center">' + page.language + '</td>';
233
                    tableData += '<td align="center"' + createdOnTitle + '>' + page.createdBy.username + '</td>';
235
                    tableData += '<td align="center"' + createdOnTitle + '>' + page.createdBy.username + '</td>';
234
                    tableData += '<td align="center"' + modifiedOnTitle + '>' + modifiedBy + '</td>';
236
                    tableData += '<td align="center"' + modifiedOnTitle + '>' + modifiedBy + '</td>';
235
                    tableData += '<td align="center">' + viewCell + '</td>';
237
                    tableData += '<td align="center">' + viewCell + '</td>';
-
 
238
                    tableData += '</tr>';
-
 
239
                });
-
 
240
-
 
241
                $('#listAllPagesTable').html(tableData);
-
 
242
-
 
243
                myDialog = $('#listAllPagesDialog');
-
 
244
                myDialog = prepareListAllPagesDialog(myDialog);
-
 
245
                myDialog.dialog('open');
-
 
246
                $('.ui-dialog :button').blur();
-
 
247
             });
-
 
248
            
-
 
249
            return false;
-
 
250
        }
-
 
251
-
 
252
        function showListRevisionsDialog(name, lang) {
-
 
253
-
 
254
            $.getJSON('<mtw:contextPath />/Page.getRevisions.mtw?name=' + name + '&lang=' + lang, function(data) {
-
 
255
-
 
256
                tableData = '';
-
 
257
                tableData += '<tr>';
-
 
258
                tableData += '<th>Revision</th>';
-
 
259
                tableData += '<th>Author</th>';
-
 
260
                tableData += '<th>&nbsp;</th>';
-
 
261
                tableData += '</tr>';
-
 
262
-
 
263
                $.each(data.revisions, function(i,revision) {
-
 
264
-
 
265
                    tableData += '<tr>';
-
 
266
                    tableData += '<td>' + revision.revision + '</td>';
-
 
267
                    tableData += '<td align="center">' + revision.userId + '</td>';
-
 
268
                    tableData += '<td align="center">&nbsp;</td>';
236
                    tableData += '</tr>';
269
                    tableData += '</tr>';
237
                });
270
                });
238
271
239
                $('#listAllPagesTable').html(tableData);
272
                $('#listAllPagesTable').html(tableData);
240
273