From 749996bfbf1b0dfe20246493996b25c06c59a679 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Wed, 15 Jan 2014 17:23:05 +0000 Subject: [PATCH] Permet de trier les tableau dans alternc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Appliquer sur les liste de FTP et les liste sur les sous domaines (là, c'est utile) --- .gitattributes | 3 +++ bureau/admin/dom_edit.php | 16 +++++++++++++++- bureau/admin/ftp_list.php | 16 ++++++++++++++-- bureau/admin/head.php | 2 ++ bureau/admin/images/asc.gif | Bin 0 -> 54 bytes bureau/admin/images/desc.gif | Bin 0 -> 54 bytes bureau/admin/js/jquery.tablesorter.min.js | 4 ++++ bureau/admin/styles/style.css | 16 ++++++++++++++++ 8 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 bureau/admin/images/asc.gif create mode 100644 bureau/admin/images/desc.gif create mode 100644 bureau/admin/js/jquery.tablesorter.min.js diff --git a/.gitattributes b/.gitattributes index aa3bd0c4..7f7f4d62 100644 --- a/.gitattributes +++ b/.gitattributes @@ -177,6 +177,7 @@ bureau/admin/icon/winresize.gif -text bureau/admin/icon/xls.png -text bureau/admin/icon/zip.png -text bureau/admin/images/admin.png -text +bureau/admin/images/asc.gif -text bureau/admin/images/bgborder.gif -text bureau/admin/images/blank.gif -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/danger.png -text bureau/admin/images/delete.png -text +bureau/admin/images/desc.gif -text bureau/admin/images/dom.png -text bureau/admin/images/edit.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/js/alternc.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/ui-bg_flat_0_aaaaaa_40x100.png -text bureau/admin/js/jquery_ui/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png -text diff --git a/bureau/admin/dom_edit.php b/bureau/admin/dom_edit.php index 2cd0ca24..5d1bc31b 100644 --- a/bureau/admin/dom_edit.php +++ b/bureau/admin/dom_edit.php @@ -126,8 +126,10 @@ if ($r['dns_action']=='UPDATE') {?>

- +
+ +domains_type_lst(); for($i=0;$i<$r["nsub"];$i++) { @@ -271,6 +273,7 @@ if (!$r['noerase']) { + @@ -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(); + } +); diff --git a/bureau/admin/ftp_list.php b/bureau/admin/ftp_list.php index e3c47eca..87ba07d9 100644 --- a/bureau/admin/ftp_list.php +++ b/bureau/admin/ftp_list.php @@ -68,8 +68,10 @@ if (isset($error) && $error && !$noftp) { ?> -
+
+ + @@ -80,11 +82,12 @@ while (list($key,$val)=each($r)) { ?> ').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((ab)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((ba)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i
' onClick='return confirm("");'>"; + echo "ENABLED"; // for tablesorter } else { echo "\""._("Disabled")."\"/"; + echo "DISABLED"; // for tablesorter } - ?> ]' value='' /> @@ -117,4 +120,13 @@ if ( $val['enabled']) { show_help("ftp_list"); ?> + + diff --git a/bureau/admin/head.php b/bureau/admin/head.php index 66a9c65f..ff39a518 100644 --- a/bureau/admin/head.php +++ b/bureau/admin/head.php @@ -50,6 +50,8 @@ if (file_exists("styles/style-custom.css") ) { + + EGoD<#VNP?1QCB1* GgEatI(+xQQ literal 0 HcmV?d00001 diff --git a/bureau/admin/js/jquery.tablesorter.min.js b/bureau/admin/js/jquery.tablesorter.min.js new file mode 100644 index 00000000..b8605df1 --- /dev/null +++ b/bureau/admin/js/jquery.tablesorter.min.js @@ -0,0 +1,4 @@ + +(function($){$.extend({tablesorter:new +function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('