]>
jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blob - channels/index.php
2 require_once "../inc/common.php";
3 require_once "../inc/header.php";
9 /* Nothing being posted yet */
14 <h4
>Channels Overview
</h4
><br
>
16 <!-- The channel
list -->
17 <table id
="data_list" class="table-striped display responsive nowrap" style
="width:100%">
18 <thead
class="table-primary">
19 <th scope
="col">Name
</th
>
20 <th scope
="col">Users
</th
>
21 <th scope
="col">Modes
</th
>
22 <th scope
="col">Topic
</th
>
23 <th scope
="col">Created
</th
>
28 let data_list_table
= null;
30 $
(document
).ready( function () {
38 'url': '<?php echo get_config("base_url"); ?>api/channels.php',
44 {
'data': 'Name', 'responsivePriority': 1, 'className':'virtuallink' },
45 {
'data': 'Users', 'responsivePriority': 2 },
46 {
'data': 'Modes', 'responsivePriority': 3 },
47 {
'data': 'Topic', 'responsivePriority': 5, 'className':'tdwrap' },
48 {
'data': 'Created', 'responsivePriority': 4 },
52 if (window
.innerWidth
> 8000)
54 args
['dom'] = 'Pfrtip';
55 args
['searchPanes'] = {
56 'initCollapsed': 'true',
59 select
: { style
: 'multi'},
60 order
: [[ 1, "desc" ]]
65 data_list_table
= $
('#data_list').DataTable(args
);
67 $
('#data_list').on( 'click', 'td', function () {
72 function show_channel(e
)
74 /* The first column is the 'Select' column */
75 // not on this page, or not yet ;)
76 //if (data_list_table.cell(e).index().column == 0)
79 /* For all the other columns we show the view screen */
80 var data
= data_list_table
.row(e
).data();
81 channel
= data
['Name'];
82 window
.location
= '<?php echo get_config('base_url
'); ?>channels/details.php?chan=' +
83 encodeURIComponent(channel
);
84 // not working: still expands on mobile: e.stopImmediatePropagation();
90 <?php
require_once UPATH
.'/inc/footer.php'; ?>