Permalink
Browse files

here come the files...

  • Loading branch information...
1 parent 98da233 commit ef439759c7436f757a40c8522b2d0fab2b8ec79e @jayarjo committed Sep 28, 2010
Showing with 1,965 additions and 0 deletions.
  1. +39 −0 css/bindings.xml
  2. +130 −0 css/tsort.css
  3. +22 −0 data.php
  4. BIN img/bg.png
  5. BIN img/bg_grid.png
  6. BIN img/dragged.png
  7. +37 −0 index.php
  8. +742 −0 js/requisites.js
  9. +68 −0 test.html
  10. +927 −0 tsort.js
View
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<binding id="none">
+ <content><children/></content>
+</binding>
+
+<binding id="ellipsis">
+ <content>
+ <xul:label crop="end"><children/></xul:label>
+ </content>
+ <implementation>
+ <field name="label"> document.getAnonymousNodes( this )[ 0 ] </field>
+ <field name="style"> this.label.style </field>
+ <property name="display">
+ <getter> this.style.display </getter>
+ <setter> if( this.style.display != val ) this.style.display= val </setter>
+ </property>
+ <property name="value">
+ <getter> this.label.value </getter>
+ <setter> if( this.label.value != val ) this.label.value= val </setter>
+ </property>
+ <method name="update">
+ <body>
+ var strings= this.textContent.split( /\s+/g )
+ if( !strings[ 0 ] ) strings.shift()
+ if( !strings[ strings.length - 1 ] ) strings.pop()
+ this.value= strings.join( ' ' )
+ this.display= strings.length ? '' : 'none'
+ </body>
+ </method>
+ <constructor> this.update() </constructor>
+ </implementation>
+ <handlers>
+ <handler event="DOMSubtreeModified"> this.update() </handler>
+ </handlers>
+</binding>
+
+</bindings>
View
@@ -0,0 +1,130 @@
+
+body {
+ font-family:Verdana, Geneva, sans-serif;
+ font-size:11px;
+}
+
+.t-wpr {
+ overflow:hidden;
+ -moz-user-select:none;
+ -webkit-user-select:none;
+ -khtml-user-select:none;
+ user-select: none;
+}
+
+/* temp hack for opera, needs a move to browser-specific js */
+.t-wpr ::selection {
+ background-color: transparent;
+}
+
+.t-hd-wpr {
+ overflow:hidden;
+}
+
+.t-bd-wpr {
+ overflow:auto;
+}
+
+.t-hd,
+.t-bd {
+ table-layout:fixed;
+}
+
+.t-hd th,
+.t-bd td {
+ overflow:hidden;
+ white-space:nowrap;
+ white-space:pre !ie6/7; /* white space nowrap fails in IE6/7, hence this hack */
+ text-overflow:ellipsis;
+ -o-text-overflow:ellipsis;
+ /*-moz-binding: url( 'bindings.xml#ellipsis' ); */
+ padding:0 5px;
+ cursor:pointer;
+}
+
+
+.t-hd th /* fixes background blinking */
+{
+ height:16px;
+ background:url(../img/bg.png) repeat-x 0px -500px;
+ border-right:1px solid #BCBCBC;
+ text-align:center;
+ font-weight:bold;
+ cursor:pointer;
+ padding-right:3px;
+}
+
+.t-hd th.ui-sortable-helper,
+.t-hd th.ui-sortable-helper:hover {
+ background-position:0px -500px;
+}
+
+
+.t-hd th.t-selected, /* fixes background blinking */
+.t-hd th:hover {
+ background-position:0px -516px;
+}
+
+.t-hd th.t-selected {
+ cursor:col-resize; /* fixes cursor blinking */
+}
+
+.t-hd th.t-placeholder {
+ background-position:0px -532px;
+}
+
+.t-bd {
+ background:url(../img/bg_grid.png);
+}
+
+.t-bd td {
+ height:18px;
+ border-right:1px solid #ddd;
+}
+
+.t-bd .t-selected {
+ background:#3d80df;
+ color:#fff;
+}
+
+
+/* resize */
+.t-hd-resizer {
+ float:right;
+ height:100%;
+ margin:-2px -5px -2px 0;
+ cursor:col-resize;
+}
+
+#t-hd-resize-helper {
+ position:absolute;
+ border:1px solid #777;
+ cursor:col-resize;
+}
+
+.t-hidden * {
+ display:none;
+}
+
+/* sort rows */
+#t-dragged {
+ width:44px;
+ height:45px;
+ background:url(../img/dragged.png) no-repeat center;
+}
+
+#t-dragged div {
+ position:absolute;
+ top:25px;
+ left:21px;
+ width:18px;
+ height:10px;
+ line-height:10px;
+ color:#fff;
+ font-weight:bold;
+ text-align:center;
+}
+
+.t-bd .t-insert-after-me td {
+ border-bottom:2px solid #000;
+}
View
@@ -0,0 +1,22 @@
+<?php
+
+$data = array(
+
+ 'OK' => 1,
+
+ 'page' => (is_numeric($_REQUEST['page']) ? $_REQUEST['page'] : 1),
+ 'totalRows' => 1000,
+
+ 'rows' => array()
+
+);
+
+
+for ($i = 0; $i < $_REQUEST['rowsPerPage']; $i++)
+ for ($ii = 0; $ii < 3; $ii++)
+ $data['rows'][$i][$ii] = "{$data['page']}-$ii-$i" . uniqid('', true);
+
+
+echo json_encode($data);
+
+?>
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Huge Table Test</title>
+<script type="text/javascript" src="js/requisites.js"></script>
+<script type="text/javascript" src="tsort.js"></script>
+
+<link rel="stylesheet" href="css/tsort.css" type="text/css" />
+
+
+</head>
+
+<body>
+
+<div id="grid"> </div>
+
+<button onclick="grid.tsort('hideCol', 'column_1')">Hide First Column</button>
+<button onclick="grid.tsort('unhideCol', 'column_1')">UnHide First Column</button>
+
+<br />
+
+<button onclick="grid.tsort('hideCol', 'column_2')">Hide Second Column</button>
+<button onclick="grid.tsort('unhideCol', 'column_2')">UnHide Second Column</button>
+
+<script>
+
+ var grid = $('#grid').tsort({
+ url: 'data.php'
+ });
+
+
+</script>
+
+
+</body>
+</html>
Oops, something went wrong.

0 comments on commit ef43975

Please sign in to comment.