From 961430e823d31ecf76a7e90bfee0e6665accdd53 Mon Sep 17 00:00:00 2001 From: ozhozh Date: Wed, 4 Aug 2010 15:22:05 +0000 Subject: [PATCH] Rename #tblUrl with #main-table. I didn't like it and it didn't always make sense. git-svn-id: http://yourls.googlecode.com/svn/trunk@475 12232710-3e20-11de-b438-597f59cd7555 --- admin/index.php | 2 +- admin/plugins.php | 2 +- css/style.css | 2 +- js/insert.js | 12 ++++++------ js/jquery.tablesorter.min.js | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/admin/index.php b/admin/index.php index ba593b7..43b2c33 100644 --- a/admin/index.php +++ b/admin/index.php @@ -222,7 +222,7 @@ } ?> - +
diff --git a/admin/plugins.php b/admin/plugins.php index 8f24800..e161ea7 100644 --- a/admin/plugins.php +++ b/admin/plugins.php @@ -68,7 +68,7 @@

You currently have installed, and activated.

-
Short URL 
+
diff --git a/css/style.css b/css/style.css index 62ed36c..e2218dd 100644 --- a/css/style.css +++ b/css/style.css @@ -166,7 +166,7 @@ td.actions .button_stats { td.actions .button_stats:hover { text-decoration:none; } -#tblUrl tfoot th, #tblUrl tfoot th div { +#main_table tfoot th, #main_table tfoot th div { font-size:10px; } .error { diff --git a/js/insert.js b/js/insert.js index fda0c09..71550e1 100644 --- a/js/insert.js +++ b/js/insert.js @@ -25,7 +25,7 @@ function add() { {mode:'add', url: newurl, keyword: keyword}, function(data){ if(data.status == 'success') { - $('#tblUrl tbody').prepend( data.html ).trigger("update"); + $('#main_table tbody').prepend( data.html ).trigger("update"); $('#nourl_found').css('display', 'none'); zebra_table(); increment(); @@ -82,7 +82,7 @@ function remove(id) { if (data.success == 1) { $("#id-" + id).fadeOut(function(){ $(this).remove(); - if( $('#tblUrl tbody tr').length == 1 ) { + if( $('#main_table tbody tr').length == 1 ) { $('#nourl_found').css('display', ''); } @@ -132,7 +132,7 @@ function edit_save(id) { $("#keyword-" + id).html('' + data.url.keyword + ''); $("#timestamp-" + id).html(data.url.date); $("#edit-" + id).fadeOut(200, function(){ - $('#tblUrl tbody').trigger("update"); + $('#main_table tbody').trigger("update"); }); $('#keyword_'+id).val( newkeyword ); $('#statlink-'+id).attr( 'href', data.url.shorturl+'+' ); @@ -146,9 +146,9 @@ function edit_save(id) { // Prettify table with odd & even rows function zebra_table() { - $("#tblUrl tbody tr:even").removeClass('odd').addClass('even'); - $("#tblUrl tbody tr:odd").removeClass('even').addClass('odd'); - $('#tblUrl tbody').trigger("update"); + $("#main_table tbody tr:even").removeClass('odd').addClass('even'); + $("#main_table tbody tr:odd").removeClass('even').addClass('odd'); + $('#main_table tbody').trigger("update"); } // Ready to add another URL diff --git a/js/jquery.tablesorter.min.js b/js/jquery.tablesorter.min.js index 4ffbe95..1592188 100644 --- a/js/jquery.tablesorter.min.js +++ b/js/jquery.tablesorter.min.js @@ -6,7 +6,7 @@ var yourls_defaultorder = 1; // default order ('asc':0, 'desc':1) to sort on (ov // Initialise the table to sort $(document).ready(function(){ - if ($("#tblUrl").tablesorter && $("#tblUrl tr#nourl_found").length != 1) { + if ($("#main_table").tablesorter && $("#main_table tr#nourl_found").length != 1) { var order = {'id':0, 'url':1, 'timestamp':2, 'ip':3, 'clicks':4}; var order_by = {'asc':0, 'desc':1}; var s_by = order[query_string('s_by')]; @@ -16,7 +16,7 @@ $(document).ready(function(){ s_order = yourls_defaultorder; } - $("#tblUrl").tablesorter({ + $("#main_table").tablesorter({ sortList:[[ s_by, s_order ]], // Sort on column #3 (numbering starts at 0) headers: { 5: {sorter: false} }, // no sorter on column #6 widgets: ['zebra'] // prettify -- 2.45.0
Plugin Name