jquery start
This commit is contained in:
parent
0d58b58523
commit
7f73a1f87e
10 changed files with 93 additions and 11 deletions
|
@ -39,7 +39,12 @@ class ImageBanTheme extends Themelet {
|
|||
";
|
||||
}
|
||||
$html = "
|
||||
<table class='zebra'>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(\"#image_bans\").tablesorter();
|
||||
});
|
||||
</script>
|
||||
<table id='image_bans' class='zebra'>
|
||||
<thead><th>Hash</th><th>Reason</th><th>Action</th></thead>
|
||||
$h_bans
|
||||
<tfoot><tr>
|
||||
|
|
|
@ -34,9 +34,14 @@ class IPBanTheme extends Themelet {
|
|||
";
|
||||
}
|
||||
$html = "
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(\"#bans\").tablesorter();
|
||||
});
|
||||
</script>
|
||||
<a href='".make_link("ip_ban/list", "all=on")."'>Show All</a>
|
||||
<p><table class='zebra'>
|
||||
<thead><th>IP</th><th>Reason</th><th>By</th><th>Until</th><th>Action</th></thead>
|
||||
<p><table id='bans' class='zebra'>
|
||||
<thead><tr><th>IP</th><th>Reason</th><th>By</th><th>Until</th><th>Action</th></tr></thead>
|
||||
$h_bans
|
||||
<tfoot><tr>
|
||||
<form action='".make_link("ip_ban/add")."' method='POST'>
|
||||
|
|
|
@ -2,9 +2,18 @@
|
|||
|
||||
class PMTheme extends Themelet {
|
||||
public function display_pms(Page $page, $pms) {
|
||||
$html = "<table>";
|
||||
$html .= "<tr><th>Subject</th><th>From</th><th>Date</th><th>Action</th></tr>";
|
||||
$html = "
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(\"#pms\").tablesorter();
|
||||
});
|
||||
</script>
|
||||
<table id='pms' class='zebra'>
|
||||
<thead><tr><th>Subject</th><th>From</th><th>Date</th><th>Action</th></tr></thead>
|
||||
<tbody>";
|
||||
$n = 0;
|
||||
foreach($pms as $pm) {
|
||||
$oe = ($n++ % 2 == 0) ? "even" : "odd";
|
||||
$h_subject = html_escape($pm["subject"]);
|
||||
if(strlen(trim($h_subject)) == 0) $h_subject = "(No subject)";
|
||||
$h_from = html_escape($pm["from_name"]);
|
||||
|
@ -13,11 +22,14 @@ class PMTheme extends Themelet {
|
|||
$del_url = make_link("pm/delete/".$pm["id"]);
|
||||
$h_date = html_escape($pm["sent_date"]);
|
||||
if($pm["is_read"] == "N") $h_subject = "<b>$h_subject</b>";
|
||||
$html .= "<tr><td><a href='$pm_url'>$h_subject</a></td>
|
||||
$html .= "<tr class='$oe'><td><a href='$pm_url'>$h_subject</a></td>
|
||||
<td><a href='$from_url'>$h_from</a></td><td>$h_date</td>
|
||||
<td><form action='$del_url'><input type='submit' value='Delete'></form></td></tr>";
|
||||
}
|
||||
$html .= "</table>";
|
||||
$html .= "
|
||||
</tbody>
|
||||
</table>
|
||||
";
|
||||
$page->add_block(new Block("Private Messages", $html, "main", 10));
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,12 @@ class AliasEditorTheme extends Themelet {
|
|||
$h_aliases .= "</tr>";
|
||||
}
|
||||
$html = "
|
||||
<table class='zebra'>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(\"#aliases\").tablesorter();
|
||||
});
|
||||
</script>
|
||||
<table id='aliases' class='zebra'>
|
||||
<thead><tr><th>From</th><th>To</th>$action</tr>$add</thead>
|
||||
<tbody>$h_aliases</tbody>
|
||||
<tfoot>$add</tfoot>
|
||||
|
|
|
@ -4,7 +4,12 @@ class ExtManagerTheme extends Themelet {
|
|||
public function display_table(Page $page, $extensions) {
|
||||
$html = "
|
||||
<form action='".make_link("ext_manager/set")."' method='POST'>
|
||||
<table class='zebra'>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(\"#extensions\").tablesorter();
|
||||
});
|
||||
</script>
|
||||
<table id='extensions' class='zebra'>
|
||||
<thead>
|
||||
<tr><th>Enabled</td><th>Name</th><th>Description</th></tr>
|
||||
</thead>
|
||||
|
|
|
@ -72,7 +72,12 @@ class SetupTheme extends Themelet {
|
|||
}
|
||||
|
||||
$table = "
|
||||
<form action='".make_link("setup/save")."' method='POST'><table class='zebra'>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(\"#settings\").tablesorter();
|
||||
});
|
||||
</script>
|
||||
<form action='".make_link("setup/save")."' method='POST'><table id='settings' class='zebra'>
|
||||
<thead><tr><th width='25%'>Name</th><th>Value</th></tr></thead>
|
||||
<tbody>$rows</tbody>
|
||||
<tfoot><tr><td colspan='2'><input type='submit' value='Save Settings'></td></tr></tfoot>
|
||||
|
|
19
lib/jquery-1.3.2.min.js
vendored
Normal file
19
lib/jquery-1.3.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
lib/jquery.tablesorter.min.js
vendored
Normal file
2
lib/jquery.tablesorter.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -51,6 +51,8 @@ class Layout {
|
|||
$header_html
|
||||
<script src='$data_href/themes/$theme_name/sidebar.js' type='text/javascript'></script>
|
||||
<script src='$data_href/themes/$theme_name/script.js' type='text/javascript'></script>
|
||||
<script src='$data_href/lib/jquery-1.3.2.min.js' type='text/javascript'></script>
|
||||
<script src='$data_href/lib/jquery.tablesorter.min.js' type='text/javascript'></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -79,12 +81,20 @@ EOD;
|
|||
$html = "";
|
||||
$i = str_replace(' ', '_', $h) . $salt;
|
||||
if($hidable) {
|
||||
$toggle = " onclick=\"toggle('$i')\"";
|
||||
#$toggle = " onclick=\"toggle('$i')\"";
|
||||
$toggle = "";
|
||||
}
|
||||
else {
|
||||
$toggle = "";
|
||||
}
|
||||
if(!is_null($h)) $html .= "
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(\"#$i-toggle\").click(function() {
|
||||
$(\"#$i\").slideToggle(\"slow\");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class='hrr'>
|
||||
<div class='hrrtop'><div></div></div>
|
||||
<div class='hrrcontent'><h3 id='$i-toggle'$toggle>$h</h3></div>
|
||||
|
|
14
themes/default/setup.theme.php
Normal file
14
themes/default/setup.theme.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
class CustomSetupTheme extends SetupTheme {
|
||||
protected function sb_to_html(SetupBlock $block) {
|
||||
return "
|
||||
<div class='rr setupblock'>
|
||||
<div class='rrtop'><div></div></div>
|
||||
<div class='rrcontent'><b>{$block->header}</b><br>{$block->body}</div>
|
||||
<div class='rrbot'><div></div></div>
|
||||
</div>
|
||||
";
|
||||
}
|
||||
}
|
||||
?>
|
Reference in a new issue