Permet de trier les tableau dans alternc

Appliquer sur les liste de FTP et les liste sur les sous domaines (là, c'est utile)
This commit is contained in:
Alan Garcia 2014-01-15 17:23:05 +00:00
parent 40cb4b59f1
commit 749996bfbf
8 changed files with 54 additions and 3 deletions

3
.gitattributes vendored
View File

@ -177,6 +177,7 @@ bureau/admin/icon/winresize.gif -text
bureau/admin/icon/xls.png -text bureau/admin/icon/xls.png -text
bureau/admin/icon/zip.png -text bureau/admin/icon/zip.png -text
bureau/admin/images/admin.png -text bureau/admin/images/admin.png -text
bureau/admin/images/asc.gif -text
bureau/admin/images/bgborder.gif -text bureau/admin/images/bgborder.gif -text
bureau/admin/images/blank.gif -text bureau/admin/images/blank.gif -text
bureau/admin/images/check_no.png -text bureau/admin/images/check_no.png -text
@ -186,6 +187,7 @@ bureau/admin/images/config.png -text
bureau/admin/images/copyrights.txt -text bureau/admin/images/copyrights.txt -text
bureau/admin/images/danger.png -text bureau/admin/images/danger.png -text
bureau/admin/images/delete.png -text bureau/admin/images/delete.png -text
bureau/admin/images/desc.gif -text
bureau/admin/images/dom.png -text bureau/admin/images/dom.png -text
bureau/admin/images/edit.png -text bureau/admin/images/edit.png -text
bureau/admin/images/exit.png -text bureau/admin/images/exit.png -text
@ -252,6 +254,7 @@ bureau/admin/index.php -text
bureau/admin/ip_main.php -text bureau/admin/ip_main.php -text
bureau/admin/js/alternc.js -text bureau/admin/js/alternc.js -text
bureau/admin/js/jquery.min_embedded.js -text bureau/admin/js/jquery.min_embedded.js -text
bureau/admin/js/jquery.tablesorter.min.js -text
bureau/admin/js/jquery_ui/css/redmond/images/animated-overlay.gif -text bureau/admin/js/jquery_ui/css/redmond/images/animated-overlay.gif -text
bureau/admin/js/jquery_ui/css/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png -text bureau/admin/js/jquery_ui/css/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png -text
bureau/admin/js/jquery_ui/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png -text bureau/admin/js/jquery_ui/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png -text

View File

@ -126,8 +126,10 @@ if ($r['dns_action']=='UPDATE') {?>
<div id="tabsdom-editsub"> <div id="tabsdom-editsub">
<h3><?php printf(_("Editing subdomains of %s"),$domain); ?></h3> <h3><?php printf(_("Editing subdomains of %s"),$domain); ?></h3>
<table class="tlist"> <table class="tlist" id="dom_edit_table">
<thead>
<tr><th colspan="2"> </th><th><?php __("Subdomain"); ?></th><th><?php __("Type");?></th><th><?php __("Status")?></th><th></th></tr> <tr><th colspan="2"> </th><th><?php __("Subdomain"); ?></th><th><?php __("Type");?></th><th><?php __("Status")?></th><th></th></tr>
</thead>
<?php <?php
$dt=$dom->domains_type_lst(); $dt=$dom->domains_type_lst();
for($i=0;$i<$r["nsub"];$i++) { for($i=0;$i<$r["nsub"];$i++) {
@ -271,6 +273,7 @@ if (!$r['noerase']) {
<a target="_blank" href="dom_dnsdump.php?domain=<?php echo urlencode($domain) ?>"><?php __("Click here to view the dump");?></a> <a target="_blank" href="dom_dnsdump.php?domain=<?php echo urlencode($domain) ?>"><?php __("Click here to view the dump");?></a>
</span> </span>
</pre> </pre>
<a href="javascript:force_update_dns_content();"><?php __("Refresh");?></a>
</div> </div>
<?php } // if dns ?> <?php } // if dns ?>
@ -306,6 +309,17 @@ function update_dns_content(){
} }
} }
function force_update_dns_content(){
get_dns_content = 1;
$("#divdumpdns").html('In progress...');
update_dns_content();
}
$(document).ready(function()
{
$("#dom_edit_table").tablesorter();
}
);
</script> </script>
<?php include_once("foot.php"); ?> <?php include_once("foot.php"); ?>

View File

@ -68,8 +68,10 @@ if (isset($error) && $error && !$noftp) {
?> ?>
<form method="post" action="ftp_del.php"> <form method="post" action="ftp_del.php">
<table class="tlist"> <table class="tlist" id="ftp_list_table">
<thead>
<tr><th colspan="2"> </th><th><?php __("Enabled"); ?></th><th><?php __("Username"); ?></th><th><?php __("Folder"); ?></th></tr> <tr><th colspan="2"> </th><th><?php __("Enabled"); ?></th><th><?php __("Username"); ?></th><th><?php __("Folder"); ?></th></tr>
</thead>
<?php <?php
reset($r); reset($r);
while (list($key,$val)=each($r)) { ?> while (list($key,$val)=each($r)) { ?>
@ -80,11 +82,12 @@ while (list($key,$val)=each($r)) { ?>
<td><a href='ftp_switch_enable.php?id=<?php echo $val['id'].'&amp;status='.( ($val['enabled'])?'0':'1' ) ;?>' onClick='return confirm("<?php __("Are you sure you want to change his status?"); ?>");'><?php <td><a href='ftp_switch_enable.php?id=<?php echo $val['id'].'&amp;status='.( ($val['enabled'])?'0':'1' ) ;?>' onClick='return confirm("<?php __("Are you sure you want to change his status?"); ?>");'><?php
if ( $val['enabled']) { if ( $val['enabled']) {
echo "<img src='images/check_ok.png' alt=\""._("Enabled")."\"/>"; echo "<img src='images/check_ok.png' alt=\""._("Enabled")."\"/>";
echo "<span style='display:none;'>ENABLED</span>"; // for tablesorter
} else { } else {
echo "<img src='images/check_no.png' alt=\""._("Disabled")."\"/>"; echo "<img src='images/check_no.png' alt=\""._("Disabled")."\"/>";
echo "<span style='display:none;'>DISABLED</span>"; // for tablesorter
} }
?></a></td> ?></a></td>
<td><label for="del_<?php echo $val["id"]; ?>"><?php echo $val["login"] ?></label> <td><label for="del_<?php echo $val["id"]; ?>"><?php echo $val["login"] ?></label>
<input type='hidden' name='names[<?php echo $val['id'];?>]' value='<?php echo $val["login"] ?>' /> <input type='hidden' name='names[<?php echo $val['id'];?>]' value='<?php echo $val["login"] ?>' />
@ -117,4 +120,13 @@ if ( $val['enabled']) {
<?php <?php
$mem->show_help("ftp_list"); $mem->show_help("ftp_list");
?> ?>
<script type="text/javascript">
$(document).ready(function()
{
$("#ftp_list_table").tablesorter();
}
);
</script>
<?php include_once("foot.php"); ?> <?php include_once("foot.php"); ?>

View File

@ -50,6 +50,8 @@ if (file_exists("styles/style-custom.css") ) {
<script src="js/jquery.min_embedded.js" type="text/javascript"></script> <script src="js/jquery.min_embedded.js" type="text/javascript"></script>
<script src="js/jquery_ui/js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script> <script src="js/jquery_ui/js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
<script src="js/jquery.tablesorter.min.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<? <?

BIN
bureau/admin/images/asc.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 B

File diff suppressed because one or more lines are too long

View File

@ -1063,3 +1063,19 @@ body .ui-widget-content a {
margin: 16px 0; margin: 16px 0;
padding: 0 16px; padding: 0 16px;
} }
th.headerSortUp {
background-image: url(../images/asc.gif);
background-repeat: no-repeat;
background-position: right;
cursor: pointer;
background-color: #3399FF;
}
th.headerSortDown {
background-image: url(../images/desc.gif);
background-repeat: no-repeat;
background-position: right;
cursor: pointer;
background-color: #3399FF;
}