Skip to content
Browse files

Changes to match mootools forge standards

 + add yaml header to source js file
 + 'Usage' readme section change to 'How to Use'
  • Loading branch information...
1 parent 8fad4a5 commit 780884a4f642eb2af12fcb6a48ec07b8500e59d2 @reednj committed
Showing with 22 additions and 9 deletions.
  1. +2 −2 README.md
  2. +20 −7 Source/jsTable.js
View
4 README.md
@@ -8,8 +8,8 @@ Demo
-----
See [this page](http://popacular.com/jstable/Test/demo.html) for a demo of jsTable in action.
-Usage
-------
+How to Use
+----------
(This is only a summary. Please see [the documentation](https://github.com/reednj/jsTable/blob/master/Docs/jsTable.md) for a method by method description of usage)
View
27 Source/jsTable.js
@@ -1,8 +1,21 @@
/*
- * jsTable
- *
- * Nathan Reed, 2011-08-13
- */
+---
+description: jsTable - Simple javascript table control
+
+license: MIT-style
+
+authors:
+- Nathan Reed
+
+requires:
+- core/1.2.4: [Class, Event, Element, Selectors, JSON, Request]
+
+provides:
+- jsTable
+- $e
+
+...
+*/
var jsTable = new Class({
initialize: function(elem, options) {
@@ -25,7 +38,7 @@ var jsTable = new Class({
this._createTable();
},
-
+
_getCellElementId: function(row_id, column_name) {
if($type(column_name) != 'string') {
column_name = this.column_list[column_name].name;
@@ -87,9 +100,9 @@ var jsTable = new Class({
addColumn: function(name, desc) {
name = name || 'none';
desc = desc || name;
-
+
this.column_list.push({'name': name, 'description': desc});
-
+
// now create the header element
$e('th', {'text': desc, 'class':'jst-'+name}).inject(this.thead.getElement('tr'));
},

0 comments on commit 780884a

Please sign in to comment.
Something went wrong with that request. Please try again.