Permalink
Browse files

updating demo / tests

  • Loading branch information...
1 parent 3a47479 commit 2b66c29138a7771880cb9b03f761fd0d6a6dcfee @uditha-atukorala committed with Sep 24, 2012
@@ -1,6 +1,6 @@
@charset "UTF-8";
-.pag-container {
+.pagination-window {
border: 1px solid #FFEBFF;
height: 500px;
margin: 0 auto;
@@ -10,22 +10,22 @@
width: 600px;
}
-#pag-content-01 {
+#container-left {
background-color: #9DDEFF;
height: 500px;
left: -700px;
position: absolute;
width: 600px;
}
-#pag-content-02 {
+#container-active {
background-color: #D6FFAC;
height: 500px;
position: absolute;
width: 600px;
}
-#pag-content-03 {
+#container-right {
background-color: #FFCDB4;
height: 500px;
left: 700px;
@@ -1,24 +1,24 @@
var data = {
total: 75,
- template: 'template string',
+ template: 'id: {{id}}, name: {{name}}, age: {{age}}',
data: [
- {name: "John Smith", age: 26},
- {name: "Johny Smith", age: 23},
- {name: "John Smithy", age: 24},
- {name: "Johny Smithy", age: 25},
- {name: "Jo Smith", age: 27}
+ {id: 1, name: "John Smith", age: 26},
+ {id: 2, name: "Johny Smith", age: 23},
+ {id: 3, name: "John Smithy", age: 24},
+ {id: 4, name: "Johny Smithy", age: 25},
+ {id: 5, name: "Jo Smith", age: 27}
]
};
var pagination = {};
window.addEvent('domready', function(){
- pagination = new xPagination.JSON(
- $('pag-content-01'),
- $('pag-content-02'),
- $('pag-content-03'),
+ pagination = new xPagination.JSON.mustache(
+ $('container-left'),
+ $('container-active'),
+ $('container-right'),
data,
{
records_per_page: 2,
@@ -0,0 +1,79 @@
+// MooTools: the javascript framework.
+// Load this file's selection again by visiting: http://mootools.net/more/fa5d2958be95347119c21f8e64f99d8e
+// Or build this file again with packager using: packager build More/Elements.From
+/*
+---
+
+script: More.js
+
+name: More
+
+description: MooTools More
+
+license: MIT-style license
+
+authors:
+ - Guillermo Rauch
+ - Thomas Aylott
+ - Scott Kyle
+ - Arian Stolwijk
+ - Tim Wienk
+ - Christoph Pojer
+ - Aaron Newton
+ - Jacob Thornton
+
+requires:
+ - Core/MooTools
+
+provides: [MooTools.More]
+
+...
+*/
+
+MooTools.More = {
+ 'version': '1.4.0.1',
+ 'build': 'a4244edf2aa97ac8a196fc96082dd35af1abab87'
+};
+
+
+/*
+---
+
+script: Elements.From.js
+
+name: Elements.From
+
+description: Returns a collection of elements from a string of html.
+
+license: MIT-style license
+
+authors:
+ - Aaron Newton
+
+requires:
+ - Core/String
+ - Core/Element
+ - /MooTools.More
+
+provides: [Elements.from, Elements.From]
+
+...
+*/
+
+Elements.from = function(text, excludeScripts){
+ if (excludeScripts || excludeScripts == null) text = text.stripScripts();
+
+ var container, match = text.match(/^\s*<(t[dhr]|tbody|tfoot|thead)/i);
+
+ if (match){
+ container = new Element('table');
+ var tag = match[1].toLowerCase();
+ if (['td', 'th', 'tr'].contains(tag)){
+ container = new Element('tbody').inject(container);
+ if (tag != 'tr') container = new Element('tr').inject(container);
+ }
+ }
+
+ return (container || new Element('div')).set('html', text).getChildren();
+};
+
Oops, something went wrong.

0 comments on commit 2b66c29

Please sign in to comment.