cleanup
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 14 Jan 2009 12:25:17 +0000 (12:25 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 14 Jan 2009 12:25:17 +0000 (12:25 +0000)
planetlab/css/plc_paginate.css [deleted file]
planetlab/css/plc_tables.css [moved from planetlab/css/plc_table.css with 50% similarity]
planetlab/js/plc_paginate.js [deleted file]
planetlab/js/plc_tables.js [moved from planetlab/js/plc_filter.js with 55% similarity]
planetlab/nodes/newindex.php

diff --git a/planetlab/css/plc_paginate.css b/planetlab/css/plc_paginate.css
deleted file mode 100644 (file)
index 0163d8c..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/* $Id$ */
-
-/* Pagination list styles */
-ul.fdtablePaginater
-        {
-        display:table;
-        list-style:none;
-        padding:0;
-        margin:0 auto;
-        text-align:center;
-        height:1.5em;
-        width:auto;
-        margin-bottom:1em;
-        }
-ul.fdtablePaginater li
-        {
-        display:table-cell;
-        padding-right:4px;
-        color:#666;
-        list-style:none;
-        
-        -moz-user-select:none;
-        -khtml-user-select:none;
-        }
-ul.fdtablePaginater li a.currentPage
-        {
-        border-color:#a84444 !important;
-        color:#000;
-        }
-ul.fdtablePaginater li a:active
-        {
-        border-color:#222 !important;
-        color:#222;
-        }
-ul.fdtablePaginater li a,
-ul.fdtablePaginater li div
-        {
-        display:block;
-        width:2em;
-        font-size:1em;
-        color:#666;
-        padding:0;
-        margin:0;
-        text-decoration:none;
-        outline:none;
-        border:1px solid #ccc;
-        font-family:georgia, serif;
-        }
-ul.fdtablePaginater li div
-        {
-        cursor:normal;
-        opacity:.5;
-        filter:alpha(opacity=50);
-        }
-ul.fdtablePaginater li a span,
-ul.fdtablePaginater li div span
-        {
-        display:block;
-        line-height:2em;
-        border:1px solid #fff;
-        background:#fff url(/planetlab/icons/tablesort_gradient.gif) repeat-x 0 -20px;
-        }
-ul.fdtablePaginater li a
-        {
-        cursor:pointer;
-        }
-ul.fdtablePaginater li a:focus
-        {
-        color:#333;
-        text-decoration:none;
-        border-color:#aaa;
-        }
-.fdtablePaginaterWrap
-        {
-        text-align:center;
-        clear:both;
-        text-decoration:none;
-        }
-ul.fdtablePaginater li .next-page span,
-ul.fdtablePaginater li .previous-page span,
-ul.fdtablePaginater li .first-page span,
-ul.fdtablePaginater li .last-page span
-        {
-        font-weight:bold !important;
-        }
-/* Keep the table columns an equal size during pagination */
-td.sized1
-        {
-        width:16em;
-        text-align:left;
-        }
-td.sized2
-        {
-        width:10em;
-        text-align:left;
-        }
-td.sized3
-        {
-        width:7em;
-        text-align:left;
-        }
-/*
-   tfoot td
-        {
-        text-align:right;
-        font-weight:bold;
-        text-transform:uppercase;
-        letter-spacing:1px;
-        }
-   */
-#visibleTotal
-        {
-        text-align:center;
-        letter-spacing:auto;
-        }
-* html ul.fdtablePaginater li div span,
-* html ul.fdtablePaginater li div span
-        {
-        background:#eee;
-        }
-tr.invisibleRow
-        {
-        display:none;
-        visibility:hidden;
-        }
-p.paginationText
-        {
-        font-style:oblique;
-        }
-p.plc_filter_note
-       {
-    font-style:oblique;
-    font-size:0.6em;
-    font-family: georgia;
-    text-align: center
-       }
-
-<!--[if IE]>
-<style type="text/css">
-ul.fdtablePaginater {display:inline-block;}
-mul.fdtablePaginater {display:inline;}
-ul.fdtablePaginater li {float:left;}
-ul.fdtablePaginater {text-align:center;}
-table { border-bottom:1px solid #C1DAD7; }
-</style>
-<![endif]-->
similarity index 50%
rename from planetlab/css/plc_table.css
rename to planetlab/css/plc_tables.css
index 63398c6..f82053c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: plc_table.css 11549 2009-01-13 20:26:18Z thierry $ */
 table.plc_table
         {
         width: auto;
@@ -116,3 +116,149 @@ table.table_dialogs {
 .table_reset {
     border:1px;
 }
+/* $Id: plc_paginate.css 11544 2009-01-13 13:54:34Z thierry $ */
+
+/* Pagination list styles */
+ul.fdtablePaginater
+        {
+        display:table;
+        list-style:none;
+        padding:0;
+        margin:0 auto;
+        text-align:center;
+        height:1.5em;
+        width:auto;
+        margin-bottom:1em;
+        }
+ul.fdtablePaginater li
+        {
+        display:table-cell;
+        padding-right:4px;
+        color:#666;
+        list-style:none;
+        
+        -moz-user-select:none;
+        -khtml-user-select:none;
+        }
+ul.fdtablePaginater li a.currentPage
+        {
+        border-color:#a84444 !important;
+        color:#000;
+        }
+ul.fdtablePaginater li a:active
+        {
+        border-color:#222 !important;
+        color:#222;
+        }
+ul.fdtablePaginater li a,
+ul.fdtablePaginater li div
+        {
+        display:block;
+        width:2em;
+        font-size:1em;
+        color:#666;
+        padding:0;
+        margin:0;
+        text-decoration:none;
+        outline:none;
+        border:1px solid #ccc;
+        font-family:georgia, serif;
+        }
+ul.fdtablePaginater li div
+        {
+        cursor:normal;
+        opacity:.5;
+        filter:alpha(opacity=50);
+        }
+ul.fdtablePaginater li a span,
+ul.fdtablePaginater li div span
+        {
+        display:block;
+        line-height:2em;
+        border:1px solid #fff;
+        background:#fff url(/planetlab/icons/tablesort_gradient.gif) repeat-x 0 -20px;
+        }
+ul.fdtablePaginater li a
+        {
+        cursor:pointer;
+        }
+ul.fdtablePaginater li a:focus
+        {
+        color:#333;
+        text-decoration:none;
+        border-color:#aaa;
+        }
+.fdtablePaginaterWrap
+        {
+        text-align:center;
+        clear:both;
+        text-decoration:none;
+        }
+ul.fdtablePaginater li .next-page span,
+ul.fdtablePaginater li .previous-page span,
+ul.fdtablePaginater li .first-page span,
+ul.fdtablePaginater li .last-page span
+        {
+        font-weight:bold !important;
+        }
+/* Keep the table columns an equal size during pagination */
+td.sized1
+        {
+        width:16em;
+        text-align:left;
+        }
+td.sized2
+        {
+        width:10em;
+        text-align:left;
+        }
+td.sized3
+        {
+        width:7em;
+        text-align:left;
+        }
+/*
+   tfoot td
+        {
+        text-align:right;
+        font-weight:bold;
+        text-transform:uppercase;
+        letter-spacing:1px;
+        }
+   */
+#visibleTotal
+        {
+        text-align:center;
+        letter-spacing:auto;
+        }
+* html ul.fdtablePaginater li div span,
+* html ul.fdtablePaginater li div span
+        {
+        background:#eee;
+        }
+tr.invisibleRow
+        {
+        display:none;
+        visibility:hidden;
+        }
+p.paginationText
+        {
+        font-style:oblique;
+        }
+p.plc_filter_note
+       {
+    font-style:oblique;
+    font-size:0.6em;
+    font-family: georgia;
+    text-align: center
+       }
+
+<!--[if IE]>
+<style type="text/css">
+ul.fdtablePaginater {display:inline-block;}
+mul.fdtablePaginater {display:inline;}
+ul.fdtablePaginater li {float:left;}
+ul.fdtablePaginater {text-align:center;}
+table { border-bottom:1px solid #C1DAD7; }
+</style>
+<![endif]-->
diff --git a/planetlab/js/plc_paginate.js b/planetlab/js/plc_paginate.js
deleted file mode 100644 (file)
index 861bd77..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/* $Id$ */
-
-/* when a table gets paginated, displays context info */
-function plc_table_paginator (opts,tablename) {
-
-  if(!("currentPage" in opts)) { return; }
-    
-  var p = document.createElement('p');
-  var t = document.getElementById(tablename+'-fdtablePaginaterWrapTop');
-  var b = document.getElementById(tablename+'-fdtablePaginaterWrapBottom');
-
-  /* when there's no visible entry, the pagination code removes the wrappers */
-  if ( (!t) || (!b) ) return;
-
-  /* get how many entries are matching:
-     opts.visibleRows only holds the contents of the current page
-     so we store the number of matching entries in the tbody's classname
-     see plc_table_tbody_matching
-  */
-  var totalMatches = opts.totalRows;
-  var tbody=document.getElementById(tablename).getElementsByTagName("tbody")[0];
-  var cn=tbody.className;
-  if (cn.match (/matching-\d+/)) {
-    totalMatches=cn.match(/matching-\d+/)[0].replace("matching-","");
-  } 
-
-  var label;
-
-  var matches_text;
-  if (totalMatches != opts.totalRows) {
-    matches_text = totalMatches + "/" + opts.totalRows;
-  } else {
-    matches_text = opts.totalRows;
-  }
-  var first = ((opts.currentPage-1) * opts.rowsPerPage) +1;
-  var last = Math.min((opts.currentPage * opts.rowsPerPage),totalMatches);
-  var items_text = "Items [" + first + " - " + last + "] of " + matches_text;
-  var page_text = "Page " + opts.currentPage + " of " + Math.ceil(totalMatches / opts.rowsPerPage);
-  label = items_text + " -- " + page_text;
-
-  p.className = "paginationText";    
-  p.appendChild(document.createTextNode(label));
-
-  t.insertBefore(p.cloneNode(true), t.firstChild);
-  b.appendChild(p);
-}
-
-
-/* locates a table from its id and alters the classname to reflect new table size */
-function plc_table_setsize (table_id,size_id,def_size) {
-  var table=document.getElementById(table_id);
-  var size_area=document.getElementById(size_id);
-  if ( ! size_area.value ) {
-    size_area.value=def_size;
-  }
-  var size=size_area.value;
-  table.className=table.className.replace(/paginate-\d+/,"paginate-"+size); 
-  tablePaginater.init(table_id);
-}
-
-function plc_table_size_reset(table_id, size_id, size) {
-  var table=document.getElementById(table_id);
-  var size_area=document.getElementById(size_id);
-  size_area.value=size;
-  table.className=table.className.replace(/paginate-\d+/,"paginate-"+size); 
-  tablePaginater.init(table_id);
-}
-  
similarity index 55%
rename from planetlab/js/plc_filter.js
rename to planetlab/js/plc_tables.js
index e91cfe8..7226ab4 100644 (file)
@@ -1,5 +1,71 @@
-/* $Id$ */
+/* $Id: plc_paginate.js 11544 2009-01-13 13:54:34Z thierry $ */
 
+/* when a table gets paginated, displays context info */
+function plc_table_paginator (opts,tablename) {
+
+  if(!("currentPage" in opts)) { return; }
+    
+  var p = document.createElement('p');
+  var t = document.getElementById(tablename+'-fdtablePaginaterWrapTop');
+  var b = document.getElementById(tablename+'-fdtablePaginaterWrapBottom');
+
+  /* when there's no visible entry, the pagination code removes the wrappers */
+  if ( (!t) || (!b) ) return;
+
+  /* get how many entries are matching:
+     opts.visibleRows only holds the contents of the current page
+     so we store the number of matching entries in the tbody's classname
+     see plc_table_tbody_matching
+  */
+  var totalMatches = opts.totalRows;
+  var tbody=document.getElementById(tablename).getElementsByTagName("tbody")[0];
+  var cn=tbody.className;
+  if (cn.match (/matching-\d+/)) {
+    totalMatches=cn.match(/matching-\d+/)[0].replace("matching-","");
+  } 
+
+  var label;
+
+  var matches_text;
+  if (totalMatches != opts.totalRows) {
+    matches_text = totalMatches + "/" + opts.totalRows;
+  } else {
+    matches_text = opts.totalRows;
+  }
+  var first = ((opts.currentPage-1) * opts.rowsPerPage) +1;
+  var last = Math.min((opts.currentPage * opts.rowsPerPage),totalMatches);
+  var items_text = "Items [" + first + " - " + last + "] of " + matches_text;
+  var page_text = "Page " + opts.currentPage + " of " + Math.ceil(totalMatches / opts.rowsPerPage);
+  label = items_text + " -- " + page_text;
+
+  p.className = "paginationText";    
+  p.appendChild(document.createTextNode(label));
+
+  t.insertBefore(p.cloneNode(true), t.firstChild);
+  b.appendChild(p);
+}
+
+
+/* locates a table from its id and alters the classname to reflect new table size */
+function plc_table_setsize (table_id,size_id,def_size) {
+  var table=document.getElementById(table_id);
+  var size_area=document.getElementById(size_id);
+  if ( ! size_area.value ) {
+    size_area.value=def_size;
+  }
+  var size=size_area.value;
+  table.className=table.className.replace(/paginate-\d+/,"paginate-"+size); 
+  tablePaginater.init(table_id);
+}
+
+function plc_table_size_reset(table_id, size_id, size) {
+  var table=document.getElementById(table_id);
+  var size_area=document.getElementById(size_id);
+  size_area.value=size;
+  table.className=table.className.replace(/paginate-\d+/,"paginate-"+size); 
+  tablePaginater.init(table_id);
+}
+  
 /* set or clear the ' invisibleRow' in the tr's classname, according to visible */
 function plc_table_row_visible (row,visible) {
   var cn=row.className;
index 7d8eaf0..d19e706 100644 (file)
@@ -27,15 +27,13 @@ $header_js='
 <script type="text/javascript" src="/planetlab/tablesort/customsort.js"></script>
 <script type="text/javascript" src="/planetlab/tablesort/paginate.js"></script>
 <script type="text/javascript" src="/planetlab/minitabs/minitabs.js"></script>
-<script type="text/javascript" src="/planetlab/js/plc_paginate.js"></script>
-<script type="text/javascript" src="/planetlab/js/plc_filter.js"></script>
+<script type="text/javascript" src="/planetlab/js/plc_tables.js"></script>
 ';
 
 $header_css='
 <link href="/planetlab/minitabs/minitabs.css" rel="stylesheet" type="text/css" />
 <link href="/planetlab/css/plc_style.css" rel="stylesheet" type="text/css" />
-<link href="/planetlab/css/plc_table.css" rel="stylesheet" type="text/css" />
-<link href="/planetlab/css/plc_paginate.css" rel="stylesheet" type="text/css" />
+<link href="/planetlab/css/plc_tables.css" rel="stylesheet" type="text/css" />
 ';
 
 drupal_set_html_head($header_js);