list.js-1.1.1/000077500000000000000000000000001231300700100130635ustar00rootroot00000000000000list.js-1.1.1/.gitignore000066400000000000000000000000551231300700100150530ustar00rootroot00000000000000.DS_Store lab/ components build node_modules list.js-1.1.1/Gruntfile.js000066400000000000000000000043301231300700100153600ustar00rootroot00000000000000module.exports = function(grunt) { "use strict"; grunt.initConfig({ pkg: require("./package.json"), watch: { scripts: { files: ['{,*/}*.js', '*.js', 'test/*.html', 'test/*.js'], tasks: ['default'], options: { spawn: false, }, }, }, shell: { install: { command: 'component install --dev', options: { stderr: true } }, build: { command: 'component build --dev', options: { stderr: true } }, standalone: { command: 'component build --standalone List -n list.standalone' }, mkdir: { command: 'mkdir -p dist' }, move: { command: 'mv build/list.standalone.js dist/list.js' }, remove: { command: 'rm -fr build components dist' } }, jshint: { code: { src: ['Gruntfile.js', '*.js', 'src/*.js'], options: { expr: true, multistr: false, globals: { module: true } } }, tests: { src: ['test/(*|!mocha).js'], options: { expr: true, multistr: true, globals: { jQuery: true, module: true } } } }, uglify: { target: { files: { 'dist/list.min.js': ['dist/list.js'] } } }, mocha: { cool: { src: [ 'test/index.html' ], options: { run: true, timeout: 10000, bail: false, log: true, reporter: 'Nyan', mocha: { ignoreLeaks: false } } } } }); grunt.loadNpmTasks("grunt-contrib-watch"); grunt.loadNpmTasks('grunt-shell'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-mocha'); grunt.registerTask('default', ['jshint:code', 'jshint:tests', 'shell:install', 'shell:build']); grunt.registerTask('dist', ['default', 'shell:standalone', 'shell:mkdir', 'shell:move', 'uglify']); grunt.registerTask('clean', ['shell:remove']); grunt.registerTask('test', ['mocha']); return grunt; }; list.js-1.1.1/History.md000066400000000000000000000116041231300700100150500ustar00rootroot00000000000000# Changelog ### 2014-02-03: 1.1.1 - *[Bugfix]* Update `javve/events` version which fixes critical bugs in Safari for PC and PhantomJS (which makes the command line tests work again). - *[Bugfix]* Clear search when clicking in the HTML5 clear button. - *[Misc]* Add History.md file for changelog instead of having it at Listjs.com. ### 2014-02-03: 1.1.0 - *[Change]* The sorting API is update so it looks like this `listObj.sort('name', { order: "asc "})` and `listObj.sort('name', { order: "desc "})` instead or `listObj.sort('name', { desc: true/false })`. - *[Feature]* Added support for default sort function `new List('id', { sortFunction: function(itemA, itemB) { .. }})Twitter Bootstraps pagination. - *[Improvement]* Make sorting case-insensitive (thanks @thomasklemm) - *[Improvement]* Add item._values for direct access to a items values. Simplifies debugging. Note: Always use item.values() when interacting with the values. - *[Bugfix]* `.add(items, callbak)` with `callback` set does no longer add an extra item. - *[Bugfix]* `templater.set()` no longer is called twice in a `templater.get()` call. - *[Bugfix]* Fix error when trying to sort `undefined,null,etc` values. - *[Bugfix]* Fix error when trying to search `undefined,null,etc` values. - *[Bugfix]* Fix issue #51, problems with filters/search + paging. - *[Misc]* Almost completely rewritten codebase and started using Component - *[Misc]* Moved the website into another repo called list-website - *[Misc]* Add documentation for searching in specific columns. - *[Change]* `listObj.get('valueName', value)` does now always returns an array. Previously it return an object if only one item matched and null if no match was found. - *[Change]* The default sort order is now `asc` instead of `desc`. - *[Change]* Syntax for searching in specific columns are now `.search('val', [ 'columnName', 'columnName2' ])` instead of `.search('val', { columnName: true, columnName2: true })`. - *[Change]* Move plugins into seperated repos: github.com/javve/list.pagination.js and github.com/javve/list.fuzzysearch.js - *[Change]* Plugin initiation have changed. See getting started with plugins ### 2012-04-24: 0.2.1 - Fuzzy Search plugin, `.filter()` changes and bug fixes *[Read more »](http://jonnystromberg.com/listjs-0-2-1-release-notes/)* ### 2012-01-23: 0.2.0 - Lots of updates and interesting features. *[Read more »](http://jonnystromberg.com/listjs-0-2-0-plugins-paging/)* ### 2011-12-15: 0.1.4 - `.filters()`, `.sort()` and `.search()` now deped on each other. If the list is filtered and then there is a search, the items hidden by the filters will stay hidden etc. - `.filter()` is the only way to reset filter. `.filter(false)` does not work anymore. ### 2011-11-29: 0.1.3 release - Added function `.clear()` that removes all items from the list - Changed the sort function to be based on `data-sort` instead of `rel` - When sorting one category, all sort-related classes will be removed from the other sort buttons - Updated `.sort(valueName, sortFunction)` to `.sort(valueName, options)`, se more info in the documentation ### 2011-11-16: 0.1.2 release - Sorting is now indicated by class `asc` or `desc` at sorting buttons - Added three new small helper functions `hasClass(element, class)`, `addClass(element, class) ### 2011-10-20: 0.1.1 release - Added possibility to reverse sort the list ### 2011-10-18: 0.1 release - Examples at Listjs.com works in IE7,8,9 (IE6 is not tested, should work) - More documentation - Misc bug fixes ### 2011-10-15 Final alpha 0.3 release - More documentation - Only show 200 items at same time, huge speed increase - Misc bug fixes ### 2011-08-08 Alpha 0.2 release - Added asynchronous item adding - Added asynchronous list indexing - Improved (but incomplete) documentation - Bugfixes and improved helper functions - Show helper functions non-minified ### 2011-07-25 Alpha 0.1 release list.js-1.1.1/README.md000066400000000000000000000105271231300700100143470ustar00rootroot00000000000000# List.js Perfect library for adding **search**, **sort**, **filters** and **flexibility** to **tables**, **lists** and various HTML elements. Built to be invisible and work on existing HTML. Really simple and easy to use! [![Donate](https://s3.amazonaws.com/listjs/donate-coffee.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) ### Core idea - Simple and invisible - Easy to apply to existing HTML - No dependencies - Fast - Small - Handle thousands of items ### Features - Works both lists, tables and almost anything else. E.g. `
`,`