diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 9c081df6..00000000 --- a/.eslintrc +++ /dev/null @@ -1,67 +0,0 @@ -{ - "parser": "babel-eslint", - "parserOptions": { - "ecmaVersion": 11, - "sourceType": "module", - "ecmaFeatures": { - "impliedStrict": true - } - }, - "env": { - "es2020": true, - "browser": true, - "commonjs": true, - "amd": true, - "jquery": true, - "qunit": true - }, - "extends": "google", - "plugins": [ - "compat" - ], - "rules": { - "compat/compat": "error", - "quotes": [ - "error", - "double", - { - "avoidEscape": true - } - ], - "space-before-function-paren": [ - "error", - "always" - ], - "brace-style": [ - "error", - "stroustrup", - { - "allowSingleLine": true - } - ], - "padded-blocks": "off", - "one-var": "off", - "no-var": "off", - "require-jsdoc": [ - "error", - { - "require": { - "FunctionDeclaration": false, - "ClassDeclaration": true, - "MethodDefinition": true - } - } - ], - "prefer-rest-params": "off", - "prefer-spread": "off", - "comma-dangle": [ - "error", - "only-multiline" - ], - "no-invalid-this": "off", - "max-len": [ - "error", - 100 - ] - } -} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..d5a8c65e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# Auto detect text files and perform LF normalization +* text=auto + diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 86c8d05a..00000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Docs - -on: - push: - tags: [ v* ] - -jobs: - build: - runs-on: ubuntu-latest - outputs: - PACKAGE_VERSION: ${{ steps.set-vars.outputs.PACKAGE_VERSION }} - - steps: - - uses: actions/checkout@v2 - - name: Setup NodeJS - uses: actions/setup-node@v1 - with: - node-version: 12.x - - uses: actions/cache@v1 - id: cache-node-modules - with: - path: node_modules - key: node-12.x-${{ hashFiles('**/package.json') }} - restore-keys: | - node-12.x- - - run: npm install - if: steps.cache-node-modules.outputs.cache-hit != 'true' - - name: Build API docs - run: npm run build:docs - - name: Set package version var - id: set-vars - run: | - echo "::set-env name=PACKAGE_VERSION::$( cat package.json | jq -r '.version' )" - echo "::set-output name=PACKAGE_VERSION::$( cat package.json | jq -r '.version' )" - - name: Upload artifacts - uses: actions/upload-artifact@v2 - if: success() - with: - name: docs-api-v${{ env.PACKAGE_VERSION }} - path: api - - deploy: - needs: build - if: success() - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - with: - ref: 'gh-pages' - - uses: actions/download-artifact@v2 - with: - name: docs-api-v${{ needs.build.outputs.PACKAGE_VERSION }} - path: api - - name: Commit docs - run: | - git config --local user.email $GITHUB_ACTOR@users.noreply.github.com - git config --local user.name "$GITHUB_ACTOR" - git add --all - git commit -m "Docs for v${{ needs.build.outputs.PACKAGE_VERSION }}" - - name: Push docs - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 21fc5cdc..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - paths: - - '*.js' - -jobs: - test: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [10.x, 12.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - uses: actions/cache@v1 - id: cache-node-modules - with: - path: node_modules - key: node-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }} - restore-keys: | - node-${{ matrix.node-version }}- - - run: npm install - if: steps.cache-node-modules.outputs.cache-hit != 'true' - - run: npm test -- --browsers ChromeHeadless,FirefoxHeadless --reporters=dots,coverage - env: - CI: true - - name: Report coverage - if: success() - uses: codecov/codecov-action@v1 - with: - file: ./test/coverage/lcov/lcov.info diff --git a/.gitignore b/.gitignore index 3aa02d57..a44058ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,3 @@ -/api -/lib -node_modules -.rbenv-gemsets -.rvmrc -\#*\# -.*~ -*~ -.\#* .DS_Store -.localized -Thumb.db -*.ithmb -test/coverage +node_modules +dist \ No newline at end of file diff --git a/.npmignore b/.npmignore deleted file mode 100644 index e449915a..00000000 --- a/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -api -examples -test -.* -babel.config.js -bower.json -CONTRIBUTING.md -Gruntfile.js -index.html -karma.conf.js -rollup.config.js diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 43c97e71..00000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..c9e32284 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - 0.8 +script: grunt test +notifications: + email: + on_success: never + on_failure: change diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..bb89b017 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,54 @@ +# Release History + +## 0.8.0-dev +* [Use Backbone.ajax instead of $.ajax](https://github.com/addyosmani/backbone.paginator/pull/170) +* [Fire 'sync' only once on Backbone 1.0.0](https://github.com/addyosmani/backbone.paginator/commit/8faf68e5adfc1f8c61dd2fb5b499a51b0f4d9fba) + +## 0.7.0 +[Commits](https://github.com/addyosmani/backbone.paginator/compare/v0.6...v0.7) +* [Support Backbone 1.0.0](https://github.com/addyosmani/backbone.paginator/pull/163) +* [Update Netflix request pager example to use Backbone 1.0.0 style events](https://github.com/addyosmani/backbone.paginator/issues/164) +* Migrate to grunt 0.4.0 + +## 0.6.0 +[Commits](https://github.com/addyosmani/backbone.paginator/compare/v0.5...v0.6) + +* [Propagate version number from `package.json` to codebase during build](https://github.com/addyosmani/backbone.paginator/commit/5f7d2ff0a8f7e6f87e5a6e2081dc029c3fd0e70c) +* [Transparently support both backbone 9.9 and 9.10 style `success` callback arguments](https://github.com/addyosmani/backbone.paginator/commit/c6c37ea6392c9427d67487e1316592a4a0475e92) +* [Unify interfaces of requestPager and clientPager](https://github.com/addyosmani/backbone.paginator/commit/d4135188c6c956999116157fb9c51e9779e78d57) +* [Allow bootstrapping of pager data without server interaction](https://github.com/addyosmani/backbone.paginator/commit/babb81d7f5245a52053a008a2b82bbbcd324cd4a) +* Bug fixes + +## 0.5 + +* Improved unit testing +* Improved demos +* Improved sorting +* Added filtering abilities +* Added setSort() and setFilter() methods +* Make pager() argument-less +* Don't force attributes +* Let the developer change the type of the request +* Make the API cleaner +* Some bug fixes + +## 0.15 + +* Rewrite to simplify the project API +* Unify components under the same collection hood + +## 0.14 + +* Rewrite of all components + +## 0.13 + +* Initial release of client and request pagers + +## 0.11 + +* Initial work on version to work with requests to a server + +## 0.1 + +* Basic pagination of a single response from the server diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index f827eb6f..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,125 +0,0 @@ -Bug Report -========== - -If you are submitting a bug report against a stable release, please check -whether you have the latest release and your bug has been fixed in one of the -newer versions. If it has been fixed, download the latest version and come back -if the issue persists. - -You should open a new issue ticket only if the issue has not been reported -before. Please search the issue list, including all the closed bugs before you -submit a new issue ticket. If the issue has been reported before, you should -reopen the old one. - -When reporting a new issue, you should use a succinct and concise subject -line. In the body, you should write down the precise steps to reproduce the -issues, and the browser vendor and version you are using. - -Basic Email etiquette applies. - -Feature Request -=============== - -Please search the issue list first to see if your feature has already been -requested. All features are tagged with the tag `enhancement`. If there already -is an enchancement ticket, you can vote on it by putting in a +/-1 comment. If -you cannot find the `enhancement` you are looking for, you can open a new issue. - -Please prefix the subject line with **[Feature Request]** so your issue will -stand out as a feature request. In the body, please lay out your rationale for -such new feature to aid decision making. - -Basic Email etiquette is appreciated. - -Building -======== - -Backbone-pageable uses [grunt](http://gruntjs.com), [uglifyjs](https://github.com/mishoo/UglifyJS2) -and [JSDuck](https://github.com/senchalabs/jsduck). - -### Note: - -You need to install [ruby](http://www.ruby-lang.org/en/downloads/), -[JSDuck](https://github.com/senchalabs/jsduck/wiki/Installation), -[node.js and npm](http://nodejs.org) and then: - -```shell -$ cd backbone.paginator -$ npm install -``` - -Once you have everything installed, you can do this to trigger a distribution -build: - -```shell -$ cd backbone.paginator -$ grunt -``` - -You can check available tasks with: - -```shell -$ grunt --help -``` - -Code Style -========== - -Please be aware that this project uses 2 spaces for indentation. This project -has a [.jshintrc](.jshintrc) file defined, which is handy if you use -[jshint](http://www.jshint.com). In general, you should follow the -[Google Javascript Style Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml). backbone-pageable's -code follows this coding style extremely closely, with 2 exceptions: - -- `else` should be on its own line instead of the same line of the close `}` of - the previous `if` block. -- " is preferred over ' in string literals because the project owner is cursed - by C. - -Testing -======= - -backbone-pageable uses [QUnit](http://qunitjs.com/) for testing. To facilitate -console based testing, there's a grunt task. You can use: - -```shell -$ grunt qunit -``` - -Commit Messages -=============== - -This -[Erlang/OTP commit message guideline](https://github.com/erlang/otp/wiki/Writing-good-commit-messages) -says it all. Take one minute to read it. If you are filing a pull request with -commit messages that don't follow this guideline, don't fret, take another -minute to rewrite them. - -```shell -git log # find out how many commits you need to go back -git rebase -i HEAD~ -git push origin +: -``` - -Documentation -============= - -If you change any Javascript comment documentation, you should rebuild the API -document and submit a separate pull request. There is also a grunt task for this -purpose, but make sure you have installed -[JSDuck](https://github.com/senchalabs/jsduck) first. - -```shell -$ grunt jsduck -``` - -Changes that come with tests are more equal than others. - -Pull requests that follow the above guidelines will get merged quicker than -others. - -### Note: - -Don't forget to keep your tree in sync with upstream and resolve any conflicts -before you submit a pull request. Usage of git-rebase is optional but -encouraged. diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..6b7027e4 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,75 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + meta: { + banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + + '<%= grunt.template.today("m/d/yyyy") %>\n' + + '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + + '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + + ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n' + }, + concat: { + options: { + banner: '<%= meta.banner %>', + process: true + }, + dist: { + src: 'lib/<%= pkg.name %>.js', + dest: 'dist/<%= pkg.name %>.js' + } + }, + uglify: { + options: { + banner: '<%= meta.banner %>' + }, + dist: { + files: { + 'dist/backbone.paginator.min.js' : ['<%= concat.dist.dest %>'] + } + } + }, + mocha: { + all: [ 'test/test*.html' ], + options: { + run: true + } + }, + watch: { + files: '', + tasks: 'lint' + }, + jshint: { + options: { + curly: true, + eqeqeq: true, + immed: true, + latedef: true, + newcap: true, + noarg: true, + sub: true, + undef: true, + boss: true, + eqnull: true, + indent: 2, + trailing: true, + globals: { + exports: true, + module: false + } + }, + files: ['Gruntfile.js', 'lib/**/*.js', 'test/*.js'] + } + }); + + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-mocha'); + + // Default task. + grunt.registerTask('default', ['test', 'concat', 'uglify']); + grunt.registerTask('test', ['jshint', 'mocha']); + +}; diff --git a/LICENSE-MIT b/LICENSE-MIT index 159c8ea6..6ba1b246 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (c) 2012-2014 Jimmy Yuen Ho Wong and contributors +Copyright (c) 2012 Addy Osmani Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/README.md b/README.md new file mode 100644 index 00000000..bf705801 --- /dev/null +++ b/README.md @@ -0,0 +1,524 @@ +# Backbone.Paginator (0.8.0-dev) + +[![Continuous Integration status](https://secure.travis-ci.org/addyosmani/backbone.paginator.png)](http://travis-ci.org/addyosmani/backbone.paginator) + +![](https://raw.github.com/addyosmani/backbone.paginator/master/media/logo.png) + +Backbone.Paginator is a set of opinionated components for paginating collections of data using Backbone.js. + +It aims to provide both solutions for assisting with pagination of requests to a server (e.g an API) as well as pagination of single-loads of data, where we may wish to further paginate a collection of N results into M pages within a view. + +## Downloads And Source Code + +You can either download the raw source code for the project, fork the repository or use one of these links: + +* Production: [production version][min] 10.2K file size (2.79K gzipped) +* Development: [development version][max] 30.1K file size (6.8K gzipped) +* Examples: [tarball](https://github.com/addyosmani/backbone.paginator/zipball/) + +[min]: https://raw.github.com/addyosmani/backbone.paginator/v0.7/dist/backbone.paginator.min.js +[max]: https://raw.github.com/addyosmani/backbone.paginator/v0.7/dist/backbone.paginator.js + +## Available on +We are available via [Bower](http://twitter.github.com/bower/): + +```bash +bower install backbone.paginator +``` + +and on CDNJS +```html + +``` + +## Paginator's pieces + +Backbone.Paginator supports two main pagination components: + +* **Backbone.Paginator.requestPager**: For pagination of requests between a client and a server-side API +* **Backbone.Paginator.clientPager**: For pagination of data returned from a server which you would like to further paginate within the UI (e.g 60 results are returned, paginate into 3 pages of 20) + +## Live Examples + +Live previews of both pagination components using the Netflix API can be found below. Fork the repository to experiment with these examples further. + +* [Backbone.Paginator.requestPager()](http://addyosmani.github.com/backbone.paginator/examples/netflix-request-paging/index.html) +* [Backbone.Paginator.clientPager()](http://addyosmani.github.com/backbone.paginator/examples/netflix-client-paging/index.html) +* [Infinite Pagination (Backbone.Paginator.requestPager())](http://addyosmani.github.com/backbone.paginator/examples/netflix-infinite-paging/index.html) +* [Diacritic Plugin](http://addyosmani.github.com/backbone.paginator/examples/google-diacritic/index.html) + +##Paginator.requestPager + +In this section we're going to walkthrough actually using the requestPager. + +####1. Create a new Paginated collection +First, we define a new Paginated collection using `Backbone.Paginator.requestPager()` as follows: + +```javascript +var PaginatedCollection = Backbone.Paginator.requestPager.extend({ +``` +####2: Set the model for the collection as normal + +Within our collection, we then (as normal) specify the model to be used with this collection followed by the URL (or base URL) for the service providing our data (e.g the Netflix API). + +```javascript + model: model, +``` +####3. Configure the base URL and the type of the request + +We need to set a base URL. The `type` of the request is `GET` by default, and the `dataType` is `jsonp` in order to enable cross-domain requests. + +```javascript + paginator_core: { + // the type of the request (GET by default) + type: 'GET', + + // the type of reply (jsonp by default) + dataType: 'jsonp', + + // the URL (or base URL) for the service + // if you want to have a more dynamic URL, you can make this a function + // that returns a string + url: 'http://odata.netflix.com/Catalog/People(49446)/TitlesActedIn?' + }, +``` + +## Gotchas! + +If you use `dataType` **NOT** jsonp, please remove the callback custom parameter inside the `server_api` configuration. + +####4. Configure how the library will show the results + +We need to tell the library how many items per page we would like to see, etc... + +```javascript + paginator_ui: { + // the lowest page index your API allows to be accessed + firstPage: 0, + + // which page should the paginator start from + // (also, the actual page the paginator is on) + currentPage: 0, + + // how many items per page should be shown + perPage: 3, + + // a default number of total pages to query in case the API or + // service you are using does not support providing the total + // number of pages for us. + // 10 as a default in case your service doesn't return the total + totalPages: 10 + }, +``` + +####5. Configure the parameters we want to send to the server + +Only the base URL won't be enough for most cases, so you can pass more parameters to the server. +Note how you can use functions instead of hardcoded values, and you can also refer to the values you specified in `paginator_ui`. + +```javascript + server_api: { + // the query field in the request + '$filter': '', + + // number of items to return per request/page + '$top': function() { return this.perPage }, + + // how many results the request should skip ahead to + // customize as needed. For the Netflix API, skipping ahead based on + // page * number of results per page was necessary. + '$skip': function() { return this.currentPage * this.perPage }, + + // field to sort by + '$orderby': 'ReleaseYear', + + // what format would you like to request results in? + '$format': 'json', + + // custom parameters + '$inlinecount': 'allpages', + '$callback': 'callback' + }, +``` + +## Gotchas! + +If you use `$callback`, please ensure that you did use the jsonp as a `dataType` inside your `paginator_core` configuration. + +####6. Finally, configure Collection.parse() and we're done + +The last thing we need to do is configure our collection's `parse()` method. We want to ensure we're returning the correct part of our JSON response containing the data our collection will be populated with, which below is `response.d.results` (for the Netflix API). + +You might also notice that we're setting `this.totalPages` to the total page count returned by the API. This allows us to define the maximum number of (result) pages available for the current/last request so that we can clearly display this in the UI. It also allows us to infuence whether clicking say, a 'next' button should proceed with a request or not. + +```javascript + parse: function (response) { + // Be sure to change this based on how your results + // are structured (e.g d.results is Netflix specific) + var tags = response.d.results; + //Normally this.totalPages would equal response.d.__count + //but as this particular NetFlix request only returns a + //total count of items for the search, we divide. + this.totalPages = Math.ceil(response.d.__count / this.perPage); + return tags; + } + }); + +}); +``` + +####Convenience methods: + +For your convenience, the following methods are made available for use in your views to interact with the `requestPager`: + +* **Collection.goTo( n, options )** - go to a specific page +* **Collection.nextPage( options )** - go to the next page +* **Collection.prevPage( options )** - go to the previous page +* **Collection.howManyPer( n )** - set the number of items to display per page + +**requestPager** collection's methods `.goTo()`, `.nextPage()` and `.prevPage()` are all extension of the original [Backbone Collection.fetch() method](http://documentcloud.github.com/backbone/#Collection-fetch). As so, they all can take the same option object as parameter. + +This option object can use `success` and `error` parameters to pass a function to be executed after server answer. + +```javascript +Collection.goTo(n, { + success: function( collection, response ) { + // called is server request success + }, + error: function( collection, response ) { + // called if server request fail + } +}); +``` + +To manage callback, you could also use the [jqXHR](http://api.jquery.com/jQuery.ajax/#jqXHR) returned by these methods to manage callback. + +```javascript +Collection + .requestNextPage() + .done(function( data, textStatus, jqXHR ) { + // called is server request success + }) + .fail(function( data, textStatus, jqXHR ) { + // called if server request fail + }) + .always(function( data, textStatus, jqXHR ) { + // do something after server request is complete + }); +}); +``` + +If you'd like to add the incoming models to the current collection, instead of replacing the collection's contents, pass `{update: true, remove: false}` as options to these methods. + +```javascript +Collection.prevPage({ update: true, remove: false }); +``` + +##Paginator.clientPager + +The `clientPager` works similar to the `requestPager`, except that our configuration values influence the pagination of data already returned at a UI-level. Whilst not shown (yet) there is also a lot more UI logic that ties in with the `clientPager`. An example of this can be seen in 'views/clientPagination.js'. + +####1. Create a new paginated collection with a model and URL +As with `requestPager`, let's first create a new Paginated `Backbone.Paginator.clientPager` collection, with a model: + +```javascript + var PaginatedCollection = Backbone.Paginator.clientPager.extend({ + + model: model, +``` + +####2. Configure the base URL and the type of the request + +We need to set a base URL. The `type` of the request is `GET` by default, and the `dataType` is `jsonp` in order to enable cross-domain requests. + +```javascript + paginator_core: { + // the type of the request (GET by default) + type: 'GET', + + // the type of reply (jsonp by default) + dataType: 'jsonp', + + // the URL (or base URL) for the service + url: 'http://odata.netflix.com/v2/Catalog/Titles?&' + }, +``` + +####3. Configure how the library will show the results + +We need to tell the library how many items per page we would like to see, etc... + +```javascript + paginator_ui: { + // the lowest page index your API allows to be accessed + firstPage: 1, + + // which page should the paginator start from + // (also, the actual page the paginator is on) + currentPage: 1, + + // how many items per page should be shown + perPage: 3, + + // a default number of total pages to query in case the API or + // service you are using does not support providing the total + // number of pages for us. + // 10 as a default in case your service doesn't return the total + totalPages: 10, + + // The total number of pages to be shown as a pagination + // list is calculated by (pagesInRange * 2) + 1. + pagesInRange: 4 + }, +``` + +####4. Configure the parameters we want to send to the server + +Only the base URL won't be enough for most cases, so you can pass more parameters to the server. +Note how you can use functions instead of hardcoded values, and you can also refer to the values you specified in `paginator_ui`. + +```javascript + server_api: { + // the query field in the request + '$filter': 'substringof(\'america\',Name)', + + // number of items to return per request/page + '$top': function() { return this.perPage }, + + // how many results the request should skip ahead to + // customize as needed. For the Netflix API, skipping ahead based on + // page * number of results per page was necessary. + '$skip': function() { return this.currentPage * this.perPage }, + + // field to sort by + '$orderby': 'ReleaseYear', + + // what format would you like to request results in? + '$format': 'json', + + // custom parameters + '$inlinecount': 'allpages', + '$callback': 'callback' + }, +``` + +####5. Finally, configure Collection.parse() and we're done + +And finally we have our `parse()` method, which in this case isn't concerned with the total number of result pages available on the server as we have our own total count of pages for the paginated data in the UI. + +```javascript + parse: function (response) { + var tags = response.d.results; + return tags; + } + + }); +``` + +####Convenience methods: + +As mentioned, your views can hook into a number of convenience methods to navigate around UI-paginated data. For `clientPager` these include: + +* **Collection.goTo(n, options)** - go to a specific page +* **Collection.prevPage(options)** - go to the previous page +* **Collection.nextPage(options)** - go to the next page +* **Collection.howManyPer(n)** - set how many items to display per page +* **Collection.setSort(sortBy, sortDirection)** - update sort on the current view. Sorting will automatically detect if you're trying to sort numbers (even if they're strored as strings) and will do the right thing. +* **Collection.setFilter(filterFields, filterWords)** - filter the current view. Filtering supports multiple words without any specific order, so you'll basically get a full-text search ability. Also, you can pass it only one field from the model, or you can pass an array with fields and all of them will get filtered. Last option is to pass it an object containing a comparison method and rules. Currently, only ```levenshtein``` method is available. + +The `goTo()`, `prevPage()`, and `nextPage()` functions do not require the `options` param since they will be executed synchronously. However, when specified, the success callback will be invoked before the function returns. For example: + +```javascript +nextPage(); // this works just fine! +nextPage({success: function() { }}); // this will call the success function +``` + +The options param exists to preserve (some) interface unification between the requestPaginator and clientPaginator so that they may be used interchangeably in your Backbone.Views. + +```javascript + this.collection.setFilter( + {'Name': {cmp_method: 'levenshtein', max_distance: 7}} + , "Amreican P" // Note the switched 'r' and 'e', and the 'P' from 'Pie' + ); +``` + +Also note that the Levenshtein plugin should be loaded and enabled using the ```useLevenshteinPlugin``` variable. +Last but not less important: performing Levenshtein comparison returns the ```distance``` between two strings. It won't let you *search* lengthy text. +The distance between two strings means the number of characters that should be added, removed or moved to the left or to the right so the strings get equal. +That means that comparing "Something" in "This is a test that could show something" will return 32, which is bigger than comparing "Something" and "ABCDEFG" (9). +Use Levenshtein only for short texts (titles, names, etc). + +* **Collection.doFakeFilter(filterFields, filterWords)** - returns the models count after fake-applying a call to ```Collection.setFilter```. + +* **Collection.setFieldFilter(rules)** - filter each value of each model according to `rules` that you pass as argument. Example: You have a collection of books with 'release year' and 'author'. You can filter only the books that were released between 1999 and 2003. And then you can add another `rule` that will filter those books only to authors who's name start with 'A'. Possible rules: function, required, min, max, range, minLength, maxLength, rangeLength, oneOf, equalTo, containsAllOf, pattern. Passing this an empty rules set will remove any FieldFilter rules applied. +```javascript + my_collection.setFieldFilter([ + {field: 'release_year', type: 'range', value: {min: '1999', max: '2003'}}, + {field: 'author', type: 'pattern', value: new RegExp('A*', 'igm')} + ]); + + //Rules: + // + //var my_var = 'green'; + // + //{field: 'color', type: 'equalTo', value: my_var} + //{field: 'color', type: 'function', value: function(field_value){ return field_value == my_var; } } + //{field: 'color', type: 'required'} + //{field: 'number_of_colors', type: 'min', value: '2'} + //{field: 'number_of_colors', type: 'max', value: '4'} + //{field: 'number_of_colors', type: 'range', value: {min: '2', max: '4'} } + //{field: 'color_name', type: 'minLength', value: '4'} + //{field: 'color_name', type: 'maxLength', value: '6'} + //{field: 'color_name', type: 'rangeLength', value: {min: '4', max: '6'}} + //{field: 'color_name', type: 'oneOf', value: ['green', 'yellow']} + //{field: 'color_name', type: 'pattern', value: new RegExp('gre*', 'ig')} + //{field: 'color_name', type: 'containsAllOf', value: ['green', 'yellow', 'blue']} +``` + +* **Collection.doFakeFieldFilter(rules)** - returns the models count after fake-applying a call to ```Collection.setFieldFilter```. + +####Implementation notes: + +You can use some variables in your ```View``` to represent the actual state of the paginator. + +```totalUnfilteredRecords``` - Contains the number of records, including all records filtered in any way. (Only available in ```clientPager```) + +```totalRecords``` - Contains the number of records + +```currentPage``` - The actual page were the paginator is at. + +```perPage``` - The number of records the paginator will show per page. + +```totalPages``` - The number of total pages. + +```startRecord``` - The position of the first record shown in the current page (eg 41 to 50 from 2000 records) (Only available in ```clientPager```) + +```endRecord``` - The position of the last record shown in the current page (eg 41 to 50 from 2000 records) (Only available in ```clientPager```) + +```pagesInRange``` - The number of pages to be drawn on each side of the current page. So if ```pagesInRange``` is 3 and ```currentPage``` is 13 you will get +the numbers 10, 11, 12, 13(selected), 14, 15, 16. + +```html + + +``` + +## Plugins + +**Diacritic.js** + +A plugin for Backbone.Paginator that replaces diacritic characters (`´`, `˝`, `̏`, `˚`,`~` etc.) with characters that match them most closely. This is particularly useful for filtering. + +To enable the plugin, set `this.useDiacriticsPlugin` to true, as can be seen in the example below: + +```javascript +Paginator.clientPager = Backbone.Collection.extend({ + + // Default values used when sorting and/or filtering. + initialize: function(){ + this.useDiacriticsPlugin = true; // use diacritics plugin if available + ... +``` + +## Bootstrapping + +By default, both the clientPager and requestPager will make an initial request to the server in order to populate their internal paging data. In order to avoid this additional request, it may be beneficial to bootstrap your Backbone.Paginator instance from data that already exists in the dom. + +**Backbone.Paginator.clientPager:** +```javascript +// Extend the Backbone.Paginator.clientPager with your own configuration options +var MyClientPager = Backbone.Paginator.clientPager.extend({paginator_ui: {}}); +// Create an instance of your class and populate with the models of your entire collection +var aClientPager = new MyClientPager([{id: 1, title: 'foo'}, {id: 2, title: 'bar'}]); +// Invoke the bootstrap function +aClientPager.bootstrap(); +``` +Note: If you intend to bootstrap a clientPager, there is no need to specify a 'paginator_core' object in your configuration (since you should have already populated the clientPager with the entirety of it's necessary data) + +**Backbone.Paginator.requestPager:** +```javascript +// Extend the Backbone.Paginator.requestPager with your own configuration options +var MyRequestPager = Backbone.Paginator.requestPager.extend({paginator_ui: {}}); +// Create an instance of your class with the first page of data +var aRequestPager = new MyRequestPager([{id: 1, title: 'foo'}, {id: 2, title: 'bar'}]); +// Invoke the bootstrap function and configure requestPager with 'totalRecords' +aRequestPager.bootstrap({totalRecords: 50}); +``` +Note: Both the clientPager and requestPager ```bootstrap``` function will accept an options param that will be extended by your Backbone.Paginator instance. However the 'totalRecords' property will be set implicitly by the clientPager. + +More on Backbone bootstrapping: http://ricostacruz.com/backbone-patterns/#bootstrapping_data + +## Release History + +Please check CHANGELOG.md for a complete release history/changelog. + +## Team + +* [Addy Osmani (addyosmani)](http://github.com/addyosmani) - Developer Programs Engineer, Google +* [Alexander Nestorov (alexandernst)](http://github.com/alexandernst) - Software Developer, EmeIEme +* [Srinivas Kusunam (skusunam)](http://github.com/skusunam) - Mobile\Agile Consultant, Liberty Leap Technologies +* [Leonard Ehrenfried (lenniboy)](http://github.com/lenniboy) + +## Contributing +Indent your code with 2 spaces, strip trailing whitespace and take care to +maintain the existing coding style. Add unit tests for any new or changed +functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt). + +_Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "lib" subdirectory!_ + +## License +Copyright (c) 2012 Addy Osmani +Licensed under the MIT license. diff --git a/README.rst b/README.rst deleted file mode 100644 index 07695db6..00000000 --- a/README.rst +++ /dev/null @@ -1,686 +0,0 @@ -backbone.paginator -================== - -|ci-status|_ -|cdnjs-version|_ - -A pageable, drop-in replacement for Backbone.Collection called -Backbone.PageableCollection. - - -.. contents:: Table of Contents - :backlinks: none - - -Migrating from Backbone.Paginator 1.0 -------------------------------------- - -Backbone.Paginator 2.0 was originally called backbone-pageable, which in turn -was inspired by Backbone.Paginator < 1.0 by @addyosmani. The two projects have -merged as of May 2014 and backbone-pageable has effectively become -Backbone.Paginator 2.0. This guide describes some of the differences and -similarities to ease migration. - -Package Naming -++++++++++++++ - -Backbone.Paginator 2.0 will continue to use the backbone.paginator name for the -file, ``npm`` and ``bower`` packages. In addition, a new ``component`` package -is also available, also inheriting the backbone.paginator name. - -Module Naming -+++++++++++++ - -The module exported by the packages will still be called ``PageableCollection`` -to emphasize the function of this Backbone plugin as a ``Collection`` instead of -a ``View``. - -API Changes -+++++++++++ - -=================================== ====================================================================================== -Backbone.Paginator <= 1.0 Backbone.Paginator 2.0 -=================================== ====================================================================================== -``Backbone.Paginator`` ``Backbone.PageableCollection`` -``Backbone.Paginator.requestPager`` ``PageableCollection.extend({mode: "server" | "infinite"})`` -``Backbone.Paginator.clientPager`` ``PageableCollection.extend({mode: "client"})`` -``paginator_core`` Override ``PageableCollection#sync`` -``paginator_ui`` ``state`` -``server_api`` ``queryParams`` -``bootstrap()`` ``new Backbone.PageableCollection([{...}, ...])`` -``parse()`` ``parse()``, ``parseRecords()``, ``parseState()``, ``parseLinks()`` -``goTo()`` ``getPage()`` -``prevPage()``, ``nextPage()`` ``getPreviousPage()``, ``getNextPage()`` -``howManyPer()`` ``setPageSize()`` -``setSort()`` ``setSorting()`` -``*Filter*()`` N/A. Implement your own ``View`` or use ``underscore`` methods on ``fullCollection`` -Diacritic plugin N/A. See above -N/A ``getPageByOffSet()`` -N/A ``hasPreviousPage()``, ``hasNextPage()`` -N/A ``switchMode()`` -=================================== ====================================================================================== - - -Advantages ----------- - -Supports client-side and server-side operations - You can initialize ``Backbone.PageableCollection`` to paginate and/or sort on - the client-side, server-side or both. -Infinite paging - Many public APIs like `Github `_ - or `Facebook - `_ support - infinite paging, ``Backbone.PageableCollection`` can handle them easily. -Comes with reasonable defaults - Server API parameters preconfigured to work with most Rails RESTful APIs by - default. -Works well with existing server-side APIs - Query parameter mappings are all configurable, and you can use either 0-based - or 1-based indices. -Bi-directional event handling - In client-mode, any changes done on one page is immediately reflected on the - others with the appropriate events propagated. -100% compatible with existing code - ``Backbone.PageableCollection`` is a strict superset of - ``Backbone.Collection`` and passes its `test suite - `_. -Well tested - Comes with 100s of tests in addition to the ``Backbone.Collection`` test - suite. -Well documented - Use cases and functionality are thoroughly documented. -No surprising behavior - ``Backbone.PageableCollection`` performs internal state sanity checks at - appropriate times, so it is next to impossible to get into a weird state. -Light-weight - The library is only 4.1KB minified and gzipped. - - -Playable Demos --------------- - -The following examples utilizes `Backgrid.js -`_ to render the collections. - -- `Server Mode `_ -- `Client Mode `_ -- `Infinite Mode `_ - - -Installation ------------- - -Installing from Component -+++++++++++++++++++++++++ - -.. code-block:: bash - - component install backbone.paginator - - -Installing from Node.js -+++++++++++++++++++++++ - -.. code-block:: bash - - npm install backbone.paginator - - -Installing from Bower -+++++++++++++++++++++ - -.. code-block:: bash - - bower install backbone.paginator - - -Browser -+++++++ - -.. code-block:: html - - - - - - -Getting to the Backbone.PageableCollection Class from Node.js and AMD -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -.. code-block:: javascript - - var PageableCollection = require("backbone.paginator"); - - -Getting to the Backbone.PageableCollection Class in the Browser -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -.. code-block:: javascript - - var PageableCollection = Backbone.PageableCollection; - - -Introduction ------------- - -Like Backbone.Collection, you can provide a URL endpoint, configure your initial -pagination state and server API mapping by extending -``Backbone.PageableCollection``: - -.. code-block:: javascript - - var Book = Backbone.Model.extend({}); - - var Books = Backbone.PageableCollection.extend({ - model: Book, - url: "api.mybookstore.com/books", - - // Any `state` or `queryParam` you override in a subclass will be merged with - // the defaults in `Backbone.PageableCollection` 's prototype. - state: { - - // You can use 0-based or 1-based indices, the default is 1-based. - // You can set to 0-based by setting ``firstPage`` to 0. - firstPage: 0, - - // Set this to the initial page index if different from `firstPage`. Can - // also be 0-based or 1-based. - currentPage: 2, - - // Required under server-mode - totalRecords: 200 - }, - - // You can configure the mapping from a `Backbone.PageableCollection#state` - // key to the query string parameters accepted by your server API. - queryParams: { - - // `Backbone.PageableCollection#queryParams` converts to ruby's - // will_paginate keys by default. - currentPage: "current_page", - pageSize: "page_size" - } - }); - - -You can initialize ``state`` and ``queryParams`` from the constructor too: - -.. code-block:: javascript - - var Books = Backbone.PageableCollection.extend({ - model: Book, - url:"api.mybookstore.com/books" - }); - - var books = new Books([], { - - // All the `state` and `queryParams` key value pairs are merged with - // the defaults too. - state: { - firstPage: 0, - currentPage: 0 - }, - - queryParams: { - currentPage: "current_page", - pageSize: "page_size" - } - }); - - -Adapting to a Server API -++++++++++++++++++++++++ - -To adapt to an existing server API that do not use ``will_paginate`` keys, you -can configure the ``queryParams`` object hash to map ``state`` keys to the query -parameters your server will accept. Those query parameters will be in the query -string of the URL used for fetching. You can also put extra items into -``queryParams`` and they will be in the query string as is. Setting ``null`` as -the value of any mapping will remove it from the query string. Finally, the -values in the ``queryParams`` can be either a literal value or a parameter-less -function that returns a value. - -This is a listing of the default ``state`` and ``queryParam`` values. - -============ ===== ============= ============================ - ``state`` ``queryParams`` ------------------- ------------------------------------------ -Attribute Value Attribute Value -============ ===== ============= ============================ -firstPage 1 -lastPage null -currentPage null currentPage "page" -pageSize 25 pageSize "per_page" -totalPages null totalPages "total_pages" -totalRecords null totalRecords "total_entries" -sortKey null sortKey "sort_by" -order -1 order "order" -\ directions { "-1": "asc", "1": "desc" } -============ ===== ============= ============================ - -You can consult the `API documentation -`_ -for a detailed explanation of these fields. - -Fetching Data and Managing States -+++++++++++++++++++++++++++++++++ - -You can access the pageable collection's internal state by looking at the -``state`` object attached to it. This state object, however, is generally -read-only after initialization. There are various methods to help you manage -this state, you should use them instead of manually modifying it. For the -unusual circumstances where you need to modify the ``state`` object directly, a -sanity check will be performed at the next time you perform any -pagination-specific operations to ensure internal state consistency. - -================================ =============================================== -Method Use When -================================ =============================================== -``setPageSize`` Changing the page size -``setSorting`` Changing the sorting -``switchMode`` Switching between modes -``state`` Need to read the internal state -``get*Page`` Need to go to a different page -``hasPreviousPage, hasNextPage`` Check if paging backward or forward is possible -================================ =============================================== - -In addition to the above methods, you can also synchronize the state with the -server during a fetch. ``Backbone.PageableCollection`` overrides the default -`Backbone.Collection#parse `_ method to -support an additional response data structure that contains an object hash of -pagination state. The following is a table of the response data structure -formats ``Backbone.PageableCollection`` accepts. - -In your UI code, you can listen to the ``pageable:state:change`` event on the -pageable collection to receive state updates. - -================= ======================================== -Without State With State -================= ======================================== -``[{}, {}, ...]`` ``[{ pagination state }, [{}, {} ...]]`` -================= ======================================== - -Most of the time, providing something like this in your response is sufficient -for updating the pagination state. - -``[{"total_entries": 100}, [{}, {}, ...]]`` - -Since 1.1.7, customizing ``parse`` has been simplified and the default -implementation now delegates to two new methods - ``parseState`` and -``parseRecords``. You are encouraged to override them instead of ``parse`` if it -is not clear how to do so. For infinite mode, you should override ``parseLinks`` -instead of ``parseState`` to return an object of links. - -See the examples below or the `API -`_ for details on -customizing ``parseState``, ``parseRecords`` and ``parseLinks``. - -Bootstrapping -------------- - -``Backbone.PageableCollection`` is 100% compatible with ``Backbone.Collection`` -'s interface, so you can bootstrap the models and supply a comparator to the -constructor just like you are used to: - -.. code-block:: javascript - - // Bootstrap with just 1 page of data for server-mode, or all the pages for - // client-mode. - var books = new Books([ - { name: "A Tale of Two Cities" }, - { name: "Lord of the Rings" }, - // ... - ], { - // Paginate and sort on the client side, default is `server`. - mode: "client", - // This will maintain the current page in the order the comparator defined - // on the client-side, regardless of modes. - comparator: function (model) { return model.get("name"); } - }); - - -Pagination ----------- - -Server-Mode -+++++++++++ - -``Backbone.Pagination`` defaults to server-mode, which means it only holds one -page of data at a time. All of the ``get*page`` operations are done by -delegating to ``fetch``. They return a ``jqXHR`` in this mode. - -.. code-block:: javascript - - books.getFirstPage(); - books.getPreviousPage(); - books.getNextPage(); - books.getLastPage(); - - // All the `get*Page` methods under server-mode delegates to `fetch`, so you - // can attach a callback to the returned `jqXHR` objects' `done` event. - books.getPage(2).done(function () { - // do something ... - }); - - -All of the ``get*Page`` methods accept the same options -`Backbone.Collection#fetch `_ accepts -under server-mode. - - -Client-Mode -+++++++++++ - -Client-mode is a very convenient mode for paginating a handful of pages entirely -on the client side without going through the network page-by-page. This mode is -best suited if you only have a small number of pages so sending all of the data -to the client is not too time-consuming. - -.. code-block:: javascript - - var books = new Books([ - // Bootstrap all the records for all the pages here - ], { mode: "client" }); - - -All of the ``get*Page`` methods reset the pageable collection's data to the models -belonging to the current page and return the collection itself instead of a -``jqXHR``. - -.. code-block:: javascript - - // You can immediately operate on the collection without waiting for jQuery to - // call your `done` callback. - var json = JSON.stringify(books.getLastPage()); - - // You can force a fetch in client-mode to get the most updated data if the - // collection has gone stale. - books.getFirstPage({ fetch: true }); - - // Do something interesting with books... - - -Infinite-Mode -+++++++++++++ - -Infinite paging mode is a hybrid of server mode and client mode. Once -initialized and bootstrapped, paging backwards will be done on the client-side -by default while paging forward will be done by fetching. - -As before, you can make use of ``getFirstPage``, ``getPreviousPage``, -``getNextPage``, and ``getLastPage`` for navigation under infinite-mode. If a -page has been fetched, you can use ``getPage`` directly with the page number, an -error will be thrown if the page has not been fetched yet. - -By default, ``Backbone.PageableCollection`` parses the response headers to find -out what the ``first``, ``next`` and ``prev`` links are. The parsed links are -available in the ``links`` field. - -.. code-block:: javascript - - var Issues = Backbone.PageableCollection.extend({ - url: "https://api.github.com/repos/documentclound/backbone/issues?state=closed", - mode: "infinite", - - // Initial pagination states - state: { - pageSize: 15, - sortKey: "updated", - order: 1 - }, - - // You can remap the query parameters from ``state`` keys from the default - // to those your server supports. Setting ``null`` on queryParams removed them - // from being appended to the request URLs. - queryParams: { - totalPages: null, - totalRecords: null, - sortKey: "sort", - order: "direction", - directions: { - "-1": "asc", - "1": "desc" - } - } - - }); - - var issues = new Issues(); - - issues.getFirstPage().done(function () { - // do something interesting... - }); - -If your server API does not return the links using the ``Link`` header like -`Github `_ does, you can subclass -``Backbone.PageableCollection`` to override the ``parseLinks`` methods to -return a links object. - -.. code-block:: javascript - - var FBComment = Backbone.Model.extend({}); - - var FBComments = Backbone.PageableCollection.extend({ - model: FBComment, - url: "https://graph.facebook.com/A_REALLY_LONG_FACEBOOK_OBJECT_ID", - mode: "infinite", - // Set the indices to 0-based for Graph API. - state: { - firstPage: 0 - }, - queryParams: { - pageSize: "limit", - // Setting a parameter mapping value to null removes it from the query string - currentPage: null, - // Any extra query string parameters are sent as is, values can be functions, - // which will be bound to the pageable collection instance temporarily - // when called. - offset: function () { return this.state.currentPage * this.state.pageSize; } - }, - // Return all the comments for this Facebook object - parseRecords: function (resp) { - return resp.comments.data; - }, - // Facebook's `paging` object is in the exact format - // `Backbone.PageableCollection` accepts. - parseLinks: function (resp, xhr) { - return resp.comments.paging; - } - }); - -To act on the newly fetched models under infinite mode, you can listen to the -``fullCollection`` reference's ``add`` event like you would under client mode, -and render the newly fetched models accordingly. - -.. code-block:: javascript - - var ToiletPaper = Backbone.View.extend({ - - events: { - "scroll": "fetchSheets" - }, - - initialize: function (options) { - this.listenTo(this.collection.fullCollection, "add", this.addSheet); - }, - - addSheet: function () { - // ... - }, - - fetchSheets: function () { - this.collection.getNextPage(); - }, - - // ... - - }); - - var wordsOfTheDay = new Backbone.PageableCollection({ - mode: "infinite", - // url, initial state, etc... - }); - - var toiletPaper = new ToiletPaper({collection: wordsOfTheDay}); - - $("#toilet-paper-dispenser").append(toiletPaper.render().el); - - wordsOfTheDay.fetch(); - - -Note: -+++++ - -**Don't** override ``parseState`` or send down a stateful list of records from -the server. - -Under infinite mode, ``totalRecords`` will always equal to the number of models -inside ``fullCollection`` i.e. ``fullCollection.length``. PagebleCollection will -automatically keep all the states consistent. Modifying the state during -infinite paging results in undefined behavior. As such, you shouldn't override -``parseState`` and should only send down a stateless list of records as -described in `Fetching Data and Managing States`_. - - -Sorting -------- - -Sorting has been drastically simplified in the 1.0 release while retaining the -full power it had in older versions. - -The main way to define a sorting for a pageable collection is to utilize the -``setSorting`` method. Given a ``sortKey`` and an ``order``, ``setSorting`` -sets ``state.sortKey`` and ``state.order`` to the given values. If ``order`` is -not given, ``state.order`` is assumed. By default a comparator is applied to the -full collection under client mode. Calling ``sort`` on the full collection will -then get the entire pageable collection sorted globally. When operating under -server or infinite mode, no comparator will be applied to the collection as -sorting is assumed to be done on the server by default. Set ``options.full`` to -``false`` to apply a comparator to the current page under any mode. To sort a -pageable collection under infinite mode on the client side, set ``options.side`` -to ``"client"`` will apply a comparator to the full collection. - -Setting ``sortKey`` to ``null`` removes the comparator from both the current -page and the full collection. - -.. code-block:: javascript - - var books = new Books([ - ... - ], { - mode: "client" - }); - - // Sets a comparator on `#fullCollection` that sorts the title in ascending - // order - books.setSorting("title"); - - // Don't forget to call `sort` just like you would on a `Backbone.Collection` - books.fullCollection.sort(); - - // Clears the comparator - books.setSorting(null); - - // Sets a comparator on the current page that sorts the title in descending - // order - books.setSorting("title", 1, {full: false}) - books.sort(); - - books.switchMode("infinite"); - - // Sorts the books collection under infinite paging mode on the client side - books.setSorting("title", -1, {side: "client"}); - books.fullCollection.sort(); - - books.switchMode("server"); - - // Sets a comparator on the current page under server mode - books.setSorting("title", {side: "client", full: false}); - books.sort(); - -Manipulation ------------- - -This is one of the areas where ``Backbone.PageableCollection`` truly shines. A -``Backbone.PageableCollection`` instance not only can do everything a plain -``Backbone.Collection`` can for the current page, in client-mode, it can also -synchronize changes and events across all of the pages. For example, you can add -or remove a model from either a ``Backbone.PageableCollection`` instance, which -is holding the current page, or the -``Backbone.PageableCollection#fullCollection`` collection, which is a plain -``Backbone.Collection`` holding the models for all of the pages, and the pages -will all update themselves to maintain within a page size. Any additions, -removals, resets, model attribute changes and synchronization actions are -communicated between all the pages throughout the two collections. - -.. code-block:: javascript - - // The books collection is initialized to start at the first page. - var books = new Books([ - // bootstrap with all of the models for all of the pages here - ], { - mode: "client" - }); - - // A book is added to the end of the current page, which will overflow to the - // next page and trigger an `add` event on `fullCollection`. - books.push({ name: "The Great Gatsby"}); - - books.fullCollection.at(books.state.currentPage - 1 * books.state.pageSize).get("name"); - >>> "The Great Gatsby" - - // Add a new book to the beginning of the first page. - books.fullCollection.unshift({ name: "Oliver Twist" }); - books.at(0).get("name"); - >>> "Oliver Twist" - - -API Reference -------------- - -See `here `_. - - -FAQ ---- - -#. Which package managers does backbone.paginator support? - - bower, npm, CommonJS and AMD and Component. - -#. Why doesn't backbone.paginator support filtering? - - Wheels should be reinvented only when they are crooked. backbone.paginator aims - to do one thing only and does it well, which is pagination and sorting. Besides, - since Backbone.PageableCollection is 100% compatible with Backbone.Collection, - you can do filtering fairly easily with Backbone's built-in support for - Underscore.js methods. - - -Legal ------ - -Copyright (c) 2012-2014 Jimmy Yuen Ho Wong and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -.. |ci-status| image:: https://github.com/backbone-paginator/backbone.paginator/workflows/CI/badge.svg?event=push -.. _ci-status: https://github.com/backbone-paginator/backbone.paginator/actions?query=branch%3Amaster -.. |cdnjs-version| image:: https://img.shields.io/cdnjs/v/backbone.paginator.svg -.. _cdnjs-version: https://cdnjs.com/libraries/backbone.paginator diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index b781161c..00000000 --- a/babel.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const plugins = [ - "@babel/plugin-transform-runtime" -]; - -const presets = [ - ["@babel/env", { - useBuiltIns: false - }] -]; - -module.exports = function (api) { - api.cache(true); - - return { - plugins, - presets - }; -}; diff --git a/bower.json b/bower.json deleted file mode 100644 index 480928e0..00000000 --- a/bower.json +++ /dev/null @@ -1,23 +0,0 @@ - { - "name": "backbone.paginator", - "description": "A pageable Backbone.Collection superset. Supports server-side/client-side/infinite pagination and sorting.", - "homepage": "https://github.com/backbone-paginator/backbone.paginator", - "main": "lib/backbone.paginator.js", - "authors": [ - "Jimmy Yuen Ho Wong " - ], - "keywords": [ - "backbone" - ], - "license": "MIT", - "dependencies": { - "underscore": "^1.8.3", - "backbone": "^1.2.3" - }, - "ignore": [ - "**/.*", - "test", - "api", - "examples" - ] -} diff --git a/examples/client-mode.html b/examples/client-mode.html deleted file mode 100644 index b89a98db..00000000 --- a/examples/client-mode.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - backbone.paginator client mode demo - - - - - - - - -
-
-
-
- Feel free to peek into the source of this page and play with the code in your browser's console. -
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - diff --git a/examples/css/backgrid.css b/examples/css/backgrid.css deleted file mode 100644 index 7eb59697..00000000 --- a/examples/css/backgrid.css +++ /dev/null @@ -1,240 +0,0 @@ -/* - backgrid - http://github.com/wyuenho/backgrid - - Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors - Licensed under the MIT license. -*/ - -.backgrid-container { - position: relative; - display: block; - width: 100%; - height: 465px; - padding: 0; - overflow: auto; - border: 0; -} - -.backgrid { - width: 100%; - max-width: 100%; - background-color: transparent; - border-collapse: collapse; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.backgrid th, -.backgrid td { - display: none; - height: 20px; - max-width: 250px; - padding: 4px 5px; - overflow: hidden; - line-height: 20px; - text-align: left; - text-overflow: ellipsis; - white-space: nowrap; - vertical-align: middle; - border-bottom: 1px solid #DDD; -} - -.backgrid th.renderable, -.backgrid td.renderable { - display: table-cell; -} - -.backgrid th { - font-weight: bold; - text-align: center; -} - -.backgrid th.sortable a { - text-decoration: none; - white-space: nowrap; - cursor: pointer; -} - -.backgrid thead th { - vertical-align: bottom; - background-color: #f9f9f9; -} - -.backgrid thead th a { - display: block; -} - -.backgrid.backgrid-striped tbody tr:nth-child(even) { - background-color: #f9f9f9; -} - -.backgrid tbody tr.empty { - font-style: italic; - color: gray; -} - -.backgrid tbody tr.empty td { - display: inherit; - text-align: center; -} - -.backgrid td.editor { - padding: 0; -} - -.backgrid td.editor, -.backgrid tbody tr:nth-child(odd) td.editor { - background-color: rgba(82, 168, 236, 0.1); - outline: 1px solid rgba(82, 168, 236, 0.8); - outline-offset: -1px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition-duration: 200ms; - -moz-transition-duration: 200ms; - -o-transition-duration: 200ms; - transition-duration: 200ms; - -webkit-transition-property: width, outline, background-color; - -moz-transition-property: width, outline, background-color; - -o-transition-property: width, outline, background-color; - transition-property: width, outline, background-color; - -webkit-transition-timing-function: ease-in-out; - -moz-transition-timing-function: ease-in-out; - -o-transition-timing-function: ease-in-out; - transition-timing-function: ease-in-out; -} - -.backgrid td.editor input[type=text] { - display: block; - width: 100%; - height: 100%; - padding: 0 5px; - margin: 0; - background-color: transparent; - border: 0; - outline: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-appearance: none; - -moz-appearance: none; -} - -.backgrid td.editor input[type=text]::-ms-clear { - display: none; -} - -.backgrid td.error, -.backgrid tbody tr:nth-child(odd) td.error { - background-color: rgba(255, 210, 77, 0.1); - outline: 1px solid #ffd24d; -} - -.backgrid td.editor :focus, -.backgrid th.editor :focus { - outline: 0; -} - -.backgrid .sort-caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 0.3em; - border: 0; - content: ""; -} - -.backgrid .ascending .sort-caret { - vertical-align: baseline; - border-top: none; - border-right: 4px solid transparent; - border-bottom: 4px solid #000000; - border-left: 4px solid transparent; -} - -.backgrid .descending .sort-caret { - vertical-align: super; - border-top: 4px solid #000000; - border-right: 4px solid transparent; - border-bottom: none; - border-left: 4px solid transparent; -} - -.backgrid .string-cell, -.backgrid .uri-cell, -.backgrid .email-cell, -.backgrid .string-cell.editor input[type=text], -.backgrid .uri-cell.editor input[type=text], -.backgrid .email-cell.editor input[type=text] { - text-align: left; -} - -.backgrid .date-cell, -.backgrid .time-cell, -.backgrid .datetime-cell, -.backgrid .number-cell, -.backgrid .integer-cell, -.backgrid .percent-cell, -.backgrid .date-cell.editor input[type=text], -.backgrid .time-cell.editor input[type=text], -.backgrid .datetime-cell.editor input[type=text], -.backgrid .number-cell.editor input[type=text], -.backgrid .integer-cell.editor input[type=text], -.backgrid .percent-cell.editor input[type=text] { - text-align: right; -} - -.backgrid .boolean-cell, -.backgrid .boolean-cell.editor input[type=checkbox] { - text-align: center; -} - -.backgrid .select-cell { - text-align: center; -} - -.backgrid .select-cell.editor { - padding: 0; -} - -.backgrid .select-cell.editor select { - display: block; - width: 100%; - height: 28px; - padding: 4px 5px; - margin: 0; - line-height: 28px; - vertical-align: middle; - background-color: white; - border: 0; - outline: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.backgrid .select-cell.editor select[multiple] { - height: auto; -} - -.backgrid .select-cell.editor :focus { - border: 0; - outline: 0; -} - -.backgrid .select-cell.editor select::-moz-focus-inner, -.backgrid .select-cell.editor optgroup::-moz-focus-inner, -.backgrid .select-cell.editor option::-moz-focus-inner, -.backgrid .select-cell.editor select::-o-focus-inner, -.backgrid .select-cell.editor optgroup::-o-focus-inner, -.backgrid .select-cell.editor option::-o-focus-inner { - border: 0; -} \ No newline at end of file diff --git a/examples/css/bootstrap-theme.css b/examples/css/bootstrap-theme.css deleted file mode 100644 index df2d3d96..00000000 --- a/examples/css/bootstrap-theme.css +++ /dev/null @@ -1,397 +0,0 @@ -/*! - * Bootstrap v3.0.3 (http://getbootstrap.com) - * Copyright 2013 Twitter, Inc. - * Licensed under http://www.apache.org/licenses/LICENSE-2.0 - */ - -.btn-default, -.btn-primary, -.btn-success, -.btn-info, -.btn-warning, -.btn-danger { - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.btn-default:active, -.btn-primary:active, -.btn-success:active, -.btn-info:active, -.btn-warning:active, -.btn-danger:active, -.btn-default.active, -.btn-primary.active, -.btn-success.active, -.btn-info.active, -.btn-warning.active, -.btn-danger.active { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} - -.btn:active, -.btn.active { - background-image: none; -} - -.btn-default { - text-shadow: 0 1px 0 #fff; - background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%); - background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%); - background-repeat: repeat-x; - border-color: #dbdbdb; - border-color: #ccc; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-default:hover, -.btn-default:focus { - background-color: #e0e0e0; - background-position: 0 -15px; -} - -.btn-default:active, -.btn-default.active { - background-color: #e0e0e0; - border-color: #dbdbdb; -} - -.btn-primary { - background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%); - background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%); - background-repeat: repeat-x; - border-color: #2b669a; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-primary:hover, -.btn-primary:focus { - background-color: #2d6ca2; - background-position: 0 -15px; -} - -.btn-primary:active, -.btn-primary.active { - background-color: #2d6ca2; - border-color: #2b669a; -} - -.btn-success { - background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); - background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); - background-repeat: repeat-x; - border-color: #3e8f3e; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-success:hover, -.btn-success:focus { - background-color: #419641; - background-position: 0 -15px; -} - -.btn-success:active, -.btn-success.active { - background-color: #419641; - border-color: #3e8f3e; -} - -.btn-warning { - background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); - background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); - background-repeat: repeat-x; - border-color: #e38d13; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-warning:hover, -.btn-warning:focus { - background-color: #eb9316; - background-position: 0 -15px; -} - -.btn-warning:active, -.btn-warning.active { - background-color: #eb9316; - border-color: #e38d13; -} - -.btn-danger { - background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); - background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); - background-repeat: repeat-x; - border-color: #b92c28; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-danger:hover, -.btn-danger:focus { - background-color: #c12e2a; - background-position: 0 -15px; -} - -.btn-danger:active, -.btn-danger.active { - background-color: #c12e2a; - border-color: #b92c28; -} - -.btn-info { - background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); - background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); - background-repeat: repeat-x; - border-color: #28a4c9; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.btn-info:hover, -.btn-info:focus { - background-color: #2aabd2; - background-position: 0 -15px; -} - -.btn-info:active, -.btn-info.active { - background-color: #2aabd2; - border-color: #28a4c9; -} - -.thumbnail, -.img-thumbnail { - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); -} - -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - background-color: #e8e8e8; - background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); -} - -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - background-color: #357ebd; - background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); - background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); -} - -.navbar-default { - background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%); - background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%); - background-repeat: repeat-x; - border-radius: 4px; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075); -} - -.navbar-default .navbar-nav > .active > a { - background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%); - background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0); - -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075); -} - -.navbar-brand, -.navbar-nav > li > a { - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); -} - -.navbar-inverse { - background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%); - background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.navbar-inverse .navbar-nav > .active > a { - background-image: -webkit-linear-gradient(top, #222222 0%, #282828 100%); - background-image: linear-gradient(to bottom, #222222 0%, #282828 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0); - -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25); - box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25); -} - -.navbar-inverse .navbar-brand, -.navbar-inverse .navbar-nav > li > a { - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); -} - -.navbar-static-top, -.navbar-fixed-top, -.navbar-fixed-bottom { - border-radius: 0; -} - -.alert { - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.alert-success { - background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); - background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); - background-repeat: repeat-x; - border-color: #b2dba1; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); -} - -.alert-info { - background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); - background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); - background-repeat: repeat-x; - border-color: #9acfea; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); -} - -.alert-warning { - background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); - background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); - background-repeat: repeat-x; - border-color: #f5e79e; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); -} - -.alert-danger { - background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); - background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); - background-repeat: repeat-x; - border-color: #dca7a7; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); -} - -.progress { - background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); - background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); -} - -.progress-bar { - background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%); - background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0); -} - -.progress-bar-success { - background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); - background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); -} - -.progress-bar-info { - background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); - background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); -} - -.progress-bar-warning { - background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); - background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); -} - -.progress-bar-danger { - background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); - background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); -} - -.list-group { - border-radius: 4px; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); -} - -.list-group-item.active, -.list-group-item.active:hover, -.list-group-item.active:focus { - text-shadow: 0 -1px 0 #3071a9; - background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%); - background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%); - background-repeat: repeat-x; - border-color: #3278b3; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0); -} - -.panel { - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -} - -.panel-default > .panel-heading { - background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); -} - -.panel-primary > .panel-heading { - background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); - background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); -} - -.panel-success > .panel-heading { - background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); - background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); -} - -.panel-info > .panel-heading { - background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); - background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); -} - -.panel-warning > .panel-heading { - background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); - background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); -} - -.panel-danger > .panel-heading { - background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); - background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); -} - -.well { - background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); - background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); - background-repeat: repeat-x; - border-color: #dcdcdc; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); - -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1); -} \ No newline at end of file diff --git a/examples/css/bootstrap.css b/examples/css/bootstrap.css deleted file mode 100644 index 377dff30..00000000 --- a/examples/css/bootstrap.css +++ /dev/null @@ -1,7118 +0,0 @@ -/*! - * Bootstrap v3.0.3 (http://getbootstrap.com) - * Copyright 2013 Twitter, Inc. - * Licensed under http://www.apache.org/licenses/LICENSE-2.0 - */ - -/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; -} - -audio, -canvas, -video { - display: inline-block; -} - -audio:not([controls]) { - display: none; - height: 0; -} - -[hidden], -template { - display: none; -} - -html { - font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -body { - margin: 0; -} - -a { - background: transparent; -} - -a:focus { - outline: thin dotted; -} - -a:active, -a:hover { - outline: 0; -} - -h1 { - margin: 0.67em 0; - font-size: 2em; -} - -abbr[title] { - border-bottom: 1px dotted; -} - -b, -strong { - font-weight: bold; -} - -dfn { - font-style: italic; -} - -hr { - height: 0; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -mark { - color: #000; - background: #ff0; -} - -code, -kbd, -pre, -samp { - font-family: monospace, serif; - font-size: 1em; -} - -pre { - white-space: pre-wrap; -} - -q { - quotes: "\201C" "\201D" "\2018" "\2019"; -} - -small { - font-size: 80%; -} - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -img { - border: 0; -} - -svg:not(:root) { - overflow: hidden; -} - -figure { - margin: 0; -} - -fieldset { - padding: 0.35em 0.625em 0.75em; - margin: 0 2px; - border: 1px solid #c0c0c0; -} - -legend { - padding: 0; - border: 0; -} - -button, -input, -select, -textarea { - margin: 0; - font-family: inherit; - font-size: 100%; -} - -button, -input { - line-height: normal; -} - -button, -select { - text-transform: none; -} - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - cursor: pointer; - -webkit-appearance: button; -} - -button[disabled], -html input[disabled] { - cursor: default; -} - -input[type="checkbox"], -input[type="radio"] { - padding: 0; - box-sizing: border-box; -} - -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} - -textarea { - overflow: auto; - vertical-align: top; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -@media print { - * { - color: #000 !important; - text-shadow: none !important; - background: transparent !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - a[href^="javascript:"]:after, - a[href^="#"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - @page { - margin: 2cm .5cm; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } - select { - background: #fff !important; - } - .navbar { - display: none; - } - .table td, - .table th { - background-color: #fff !important; - } - .btn > .caret, - .dropup > .btn > .caret { - border-top-color: #000 !important; - } - .label { - border: 1px solid #000; - } - .table { - border-collapse: collapse !important; - } - .table-bordered th, - .table-bordered td { - border: 1px solid #ddd !important; - } -} - -*, -*:before, -*:after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -html { - font-size: 62.5%; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} - -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.428571429; - color: #333333; - background-color: #ffffff; -} - -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} - -a { - color: #428bca; - text-decoration: none; -} - -a:hover, -a:focus { - color: #2a6496; - text-decoration: underline; -} - -a:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -img { - vertical-align: middle; -} - -.img-responsive { - display: block; - height: auto; - max-width: 100%; -} - -.img-rounded { - border-radius: 6px; -} - -.img-thumbnail { - display: inline-block; - height: auto; - max-width: 100%; - padding: 4px; - line-height: 1.428571429; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 4px; - -webkit-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} - -.img-circle { - border-radius: 50%; -} - -hr { - margin-top: 20px; - margin-bottom: 20px; - border: 0; - border-top: 1px solid #eeeeee; -} - -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} - -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: 500; - line-height: 1.1; - color: inherit; -} - -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small, -.h1 small, -.h2 small, -.h3 small, -.h4 small, -.h5 small, -.h6 small, -h1 .small, -h2 .small, -h3 .small, -h4 .small, -h5 .small, -h6 .small, -.h1 .small, -.h2 .small, -.h3 .small, -.h4 .small, -.h5 .small, -.h6 .small { - font-weight: normal; - line-height: 1; - color: #999999; -} - -h1, -h2, -h3 { - margin-top: 20px; - margin-bottom: 10px; -} - -h1 small, -h2 small, -h3 small, -h1 .small, -h2 .small, -h3 .small { - font-size: 65%; -} - -h4, -h5, -h6 { - margin-top: 10px; - margin-bottom: 10px; -} - -h4 small, -h5 small, -h6 small, -h4 .small, -h5 .small, -h6 .small { - font-size: 75%; -} - -h1, -.h1 { - font-size: 36px; -} - -h2, -.h2 { - font-size: 30px; -} - -h3, -.h3 { - font-size: 24px; -} - -h4, -.h4 { - font-size: 18px; -} - -h5, -.h5 { - font-size: 14px; -} - -h6, -.h6 { - font-size: 12px; -} - -p { - margin: 0 0 10px; -} - -.lead { - margin-bottom: 20px; - font-size: 16px; - font-weight: 200; - line-height: 1.4; -} - -@media (min-width: 768px) { - .lead { - font-size: 21px; - } -} - -small, -.small { - font-size: 85%; -} - -cite { - font-style: normal; -} - -.text-muted { - color: #999999; -} - -.text-primary { - color: #428bca; -} - -.text-primary:hover { - color: #3071a9; -} - -.text-warning { - color: #8a6d3b; -} - -.text-warning:hover { - color: #66512c; -} - -.text-danger { - color: #a94442; -} - -.text-danger:hover { - color: #843534; -} - -.text-success { - color: #3c763d; -} - -.text-success:hover { - color: #2b542c; -} - -.text-info { - color: #31708f; -} - -.text-info:hover { - color: #245269; -} - -.text-left { - text-align: left; -} - -.text-right { - text-align: right; -} - -.text-center { - text-align: center; -} - -.page-header { - padding-bottom: 9px; - margin: 40px 0 20px; - border-bottom: 1px solid #eeeeee; -} - -ul, -ol { - margin-top: 0; - margin-bottom: 10px; -} - -ul ul, -ol ul, -ul ol, -ol ol { - margin-bottom: 0; -} - -.list-unstyled { - padding-left: 0; - list-style: none; -} - -.list-inline { - padding-left: 0; - list-style: none; -} - -.list-inline > li { - display: inline-block; - padding-right: 5px; - padding-left: 5px; -} - -.list-inline > li:first-child { - padding-left: 0; -} - -dl { - margin-top: 0; - margin-bottom: 20px; -} - -dt, -dd { - line-height: 1.428571429; -} - -dt { - font-weight: bold; -} - -dd { - margin-left: 0; -} - -@media (min-width: 768px) { - .dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; - } - .dl-horizontal dd { - margin-left: 180px; - } - .dl-horizontal dd:before, - .dl-horizontal dd:after { - display: table; - content: " "; - } - .dl-horizontal dd:after { - clear: both; - } - .dl-horizontal dd:before, - .dl-horizontal dd:after { - display: table; - content: " "; - } - .dl-horizontal dd:after { - clear: both; - } -} - -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #999999; -} - -.initialism { - font-size: 90%; - text-transform: uppercase; -} - -blockquote { - padding: 10px 20px; - margin: 0 0 20px; - border-left: 5px solid #eeeeee; -} - -blockquote p { - font-size: 17.5px; - font-weight: 300; - line-height: 1.25; -} - -blockquote p:last-child { - margin-bottom: 0; -} - -blockquote small, -blockquote .small { - display: block; - line-height: 1.428571429; - color: #999999; -} - -blockquote small:before, -blockquote .small:before { - content: '\2014 \00A0'; -} - -blockquote.pull-right { - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; -} - -blockquote.pull-right p, -blockquote.pull-right small, -blockquote.pull-right .small { - text-align: right; -} - -blockquote.pull-right small:before, -blockquote.pull-right .small:before { - content: ''; -} - -blockquote.pull-right small:after, -blockquote.pull-right .small:after { - content: '\00A0 \2014'; -} - -blockquote:before, -blockquote:after { - content: ""; -} - -address { - margin-bottom: 20px; - font-style: normal; - line-height: 1.428571429; -} - -code, -kbd, -pre, -samp { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; -} - -code { - padding: 2px 4px; - font-size: 90%; - color: #c7254e; - white-space: nowrap; - background-color: #f9f2f4; - border-radius: 4px; -} - -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 1.428571429; - color: #333333; - word-break: break-all; - word-wrap: break-word; - background-color: #f5f5f5; - border: 1px solid #cccccc; - border-radius: 4px; -} - -pre code { - padding: 0; - font-size: inherit; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border-radius: 0; -} - -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} - -.container { - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; -} - -.container:before, -.container:after { - display: table; - content: " "; -} - -.container:after { - clear: both; -} - -.container:before, -.container:after { - display: table; - content: " "; -} - -.container:after { - clear: both; -} - -@media (min-width: 768px) { - .container { - width: 750px; - } -} - -@media (min-width: 992px) { - .container { - width: 970px; - } -} - -@media (min-width: 1200px) { - .container { - width: 1170px; - } -} - -.row { - margin-right: -15px; - margin-left: -15px; -} - -.row:before, -.row:after { - display: table; - content: " "; -} - -.row:after { - clear: both; -} - -.row:before, -.row:after { - display: table; - content: " "; -} - -.row:after { - clear: both; -} - -.col-xs-1, -.col-sm-1, -.col-md-1, -.col-lg-1, -.col-xs-2, -.col-sm-2, -.col-md-2, -.col-lg-2, -.col-xs-3, -.col-sm-3, -.col-md-3, -.col-lg-3, -.col-xs-4, -.col-sm-4, -.col-md-4, -.col-lg-4, -.col-xs-5, -.col-sm-5, -.col-md-5, -.col-lg-5, -.col-xs-6, -.col-sm-6, -.col-md-6, -.col-lg-6, -.col-xs-7, -.col-sm-7, -.col-md-7, -.col-lg-7, -.col-xs-8, -.col-sm-8, -.col-md-8, -.col-lg-8, -.col-xs-9, -.col-sm-9, -.col-md-9, -.col-lg-9, -.col-xs-10, -.col-sm-10, -.col-md-10, -.col-lg-10, -.col-xs-11, -.col-sm-11, -.col-md-11, -.col-lg-11, -.col-xs-12, -.col-sm-12, -.col-md-12, -.col-lg-12 { - position: relative; - min-height: 1px; - padding-right: 15px; - padding-left: 15px; -} - -.col-xs-1, -.col-xs-2, -.col-xs-3, -.col-xs-4, -.col-xs-5, -.col-xs-6, -.col-xs-7, -.col-xs-8, -.col-xs-9, -.col-xs-10, -.col-xs-11, -.col-xs-12 { - float: left; -} - -.col-xs-12 { - width: 100%; -} - -.col-xs-11 { - width: 91.66666666666666%; -} - -.col-xs-10 { - width: 83.33333333333334%; -} - -.col-xs-9 { - width: 75%; -} - -.col-xs-8 { - width: 66.66666666666666%; -} - -.col-xs-7 { - width: 58.333333333333336%; -} - -.col-xs-6 { - width: 50%; -} - -.col-xs-5 { - width: 41.66666666666667%; -} - -.col-xs-4 { - width: 33.33333333333333%; -} - -.col-xs-3 { - width: 25%; -} - -.col-xs-2 { - width: 16.666666666666664%; -} - -.col-xs-1 { - width: 8.333333333333332%; -} - -.col-xs-pull-12 { - right: 100%; -} - -.col-xs-pull-11 { - right: 91.66666666666666%; -} - -.col-xs-pull-10 { - right: 83.33333333333334%; -} - -.col-xs-pull-9 { - right: 75%; -} - -.col-xs-pull-8 { - right: 66.66666666666666%; -} - -.col-xs-pull-7 { - right: 58.333333333333336%; -} - -.col-xs-pull-6 { - right: 50%; -} - -.col-xs-pull-5 { - right: 41.66666666666667%; -} - -.col-xs-pull-4 { - right: 33.33333333333333%; -} - -.col-xs-pull-3 { - right: 25%; -} - -.col-xs-pull-2 { - right: 16.666666666666664%; -} - -.col-xs-pull-1 { - right: 8.333333333333332%; -} - -.col-xs-pull-0 { - right: 0; -} - -.col-xs-push-12 { - left: 100%; -} - -.col-xs-push-11 { - left: 91.66666666666666%; -} - -.col-xs-push-10 { - left: 83.33333333333334%; -} - -.col-xs-push-9 { - left: 75%; -} - -.col-xs-push-8 { - left: 66.66666666666666%; -} - -.col-xs-push-7 { - left: 58.333333333333336%; -} - -.col-xs-push-6 { - left: 50%; -} - -.col-xs-push-5 { - left: 41.66666666666667%; -} - -.col-xs-push-4 { - left: 33.33333333333333%; -} - -.col-xs-push-3 { - left: 25%; -} - -.col-xs-push-2 { - left: 16.666666666666664%; -} - -.col-xs-push-1 { - left: 8.333333333333332%; -} - -.col-xs-push-0 { - left: 0; -} - -.col-xs-offset-12 { - margin-left: 100%; -} - -.col-xs-offset-11 { - margin-left: 91.66666666666666%; -} - -.col-xs-offset-10 { - margin-left: 83.33333333333334%; -} - -.col-xs-offset-9 { - margin-left: 75%; -} - -.col-xs-offset-8 { - margin-left: 66.66666666666666%; -} - -.col-xs-offset-7 { - margin-left: 58.333333333333336%; -} - -.col-xs-offset-6 { - margin-left: 50%; -} - -.col-xs-offset-5 { - margin-left: 41.66666666666667%; -} - -.col-xs-offset-4 { - margin-left: 33.33333333333333%; -} - -.col-xs-offset-3 { - margin-left: 25%; -} - -.col-xs-offset-2 { - margin-left: 16.666666666666664%; -} - -.col-xs-offset-1 { - margin-left: 8.333333333333332%; -} - -.col-xs-offset-0 { - margin-left: 0; -} - -@media (min-width: 768px) { - .col-sm-1, - .col-sm-2, - .col-sm-3, - .col-sm-4, - .col-sm-5, - .col-sm-6, - .col-sm-7, - .col-sm-8, - .col-sm-9, - .col-sm-10, - .col-sm-11, - .col-sm-12 { - float: left; - } - .col-sm-12 { - width: 100%; - } - .col-sm-11 { - width: 91.66666666666666%; - } - .col-sm-10 { - width: 83.33333333333334%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-8 { - width: 66.66666666666666%; - } - .col-sm-7 { - width: 58.333333333333336%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-5 { - width: 41.66666666666667%; - } - .col-sm-4 { - width: 33.33333333333333%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-2 { - width: 16.666666666666664%; - } - .col-sm-1 { - width: 8.333333333333332%; - } - .col-sm-pull-12 { - right: 100%; - } - .col-sm-pull-11 { - right: 91.66666666666666%; - } - .col-sm-pull-10 { - right: 83.33333333333334%; - } - .col-sm-pull-9 { - right: 75%; - } - .col-sm-pull-8 { - right: 66.66666666666666%; - } - .col-sm-pull-7 { - right: 58.333333333333336%; - } - .col-sm-pull-6 { - right: 50%; - } - .col-sm-pull-5 { - right: 41.66666666666667%; - } - .col-sm-pull-4 { - right: 33.33333333333333%; - } - .col-sm-pull-3 { - right: 25%; - } - .col-sm-pull-2 { - right: 16.666666666666664%; - } - .col-sm-pull-1 { - right: 8.333333333333332%; - } - .col-sm-pull-0 { - right: 0; - } - .col-sm-push-12 { - left: 100%; - } - .col-sm-push-11 { - left: 91.66666666666666%; - } - .col-sm-push-10 { - left: 83.33333333333334%; - } - .col-sm-push-9 { - left: 75%; - } - .col-sm-push-8 { - left: 66.66666666666666%; - } - .col-sm-push-7 { - left: 58.333333333333336%; - } - .col-sm-push-6 { - left: 50%; - } - .col-sm-push-5 { - left: 41.66666666666667%; - } - .col-sm-push-4 { - left: 33.33333333333333%; - } - .col-sm-push-3 { - left: 25%; - } - .col-sm-push-2 { - left: 16.666666666666664%; - } - .col-sm-push-1 { - left: 8.333333333333332%; - } - .col-sm-push-0 { - left: 0; - } - .col-sm-offset-12 { - margin-left: 100%; - } - .col-sm-offset-11 { - margin-left: 91.66666666666666%; - } - .col-sm-offset-10 { - margin-left: 83.33333333333334%; - } - .col-sm-offset-9 { - margin-left: 75%; - } - .col-sm-offset-8 { - margin-left: 66.66666666666666%; - } - .col-sm-offset-7 { - margin-left: 58.333333333333336%; - } - .col-sm-offset-6 { - margin-left: 50%; - } - .col-sm-offset-5 { - margin-left: 41.66666666666667%; - } - .col-sm-offset-4 { - margin-left: 33.33333333333333%; - } - .col-sm-offset-3 { - margin-left: 25%; - } - .col-sm-offset-2 { - margin-left: 16.666666666666664%; - } - .col-sm-offset-1 { - margin-left: 8.333333333333332%; - } - .col-sm-offset-0 { - margin-left: 0; - } -} - -@media (min-width: 992px) { - .col-md-1, - .col-md-2, - .col-md-3, - .col-md-4, - .col-md-5, - .col-md-6, - .col-md-7, - .col-md-8, - .col-md-9, - .col-md-10, - .col-md-11, - .col-md-12 { - float: left; - } - .col-md-12 { - width: 100%; - } - .col-md-11 { - width: 91.66666666666666%; - } - .col-md-10 { - width: 83.33333333333334%; - } - .col-md-9 { - width: 75%; - } - .col-md-8 { - width: 66.66666666666666%; - } - .col-md-7 { - width: 58.333333333333336%; - } - .col-md-6 { - width: 50%; - } - .col-md-5 { - width: 41.66666666666667%; - } - .col-md-4 { - width: 33.33333333333333%; - } - .col-md-3 { - width: 25%; - } - .col-md-2 { - width: 16.666666666666664%; - } - .col-md-1 { - width: 8.333333333333332%; - } - .col-md-pull-12 { - right: 100%; - } - .col-md-pull-11 { - right: 91.66666666666666%; - } - .col-md-pull-10 { - right: 83.33333333333334%; - } - .col-md-pull-9 { - right: 75%; - } - .col-md-pull-8 { - right: 66.66666666666666%; - } - .col-md-pull-7 { - right: 58.333333333333336%; - } - .col-md-pull-6 { - right: 50%; - } - .col-md-pull-5 { - right: 41.66666666666667%; - } - .col-md-pull-4 { - right: 33.33333333333333%; - } - .col-md-pull-3 { - right: 25%; - } - .col-md-pull-2 { - right: 16.666666666666664%; - } - .col-md-pull-1 { - right: 8.333333333333332%; - } - .col-md-pull-0 { - right: 0; - } - .col-md-push-12 { - left: 100%; - } - .col-md-push-11 { - left: 91.66666666666666%; - } - .col-md-push-10 { - left: 83.33333333333334%; - } - .col-md-push-9 { - left: 75%; - } - .col-md-push-8 { - left: 66.66666666666666%; - } - .col-md-push-7 { - left: 58.333333333333336%; - } - .col-md-push-6 { - left: 50%; - } - .col-md-push-5 { - left: 41.66666666666667%; - } - .col-md-push-4 { - left: 33.33333333333333%; - } - .col-md-push-3 { - left: 25%; - } - .col-md-push-2 { - left: 16.666666666666664%; - } - .col-md-push-1 { - left: 8.333333333333332%; - } - .col-md-push-0 { - left: 0; - } - .col-md-offset-12 { - margin-left: 100%; - } - .col-md-offset-11 { - margin-left: 91.66666666666666%; - } - .col-md-offset-10 { - margin-left: 83.33333333333334%; - } - .col-md-offset-9 { - margin-left: 75%; - } - .col-md-offset-8 { - margin-left: 66.66666666666666%; - } - .col-md-offset-7 { - margin-left: 58.333333333333336%; - } - .col-md-offset-6 { - margin-left: 50%; - } - .col-md-offset-5 { - margin-left: 41.66666666666667%; - } - .col-md-offset-4 { - margin-left: 33.33333333333333%; - } - .col-md-offset-3 { - margin-left: 25%; - } - .col-md-offset-2 { - margin-left: 16.666666666666664%; - } - .col-md-offset-1 { - margin-left: 8.333333333333332%; - } - .col-md-offset-0 { - margin-left: 0; - } -} - -@media (min-width: 1200px) { - .col-lg-1, - .col-lg-2, - .col-lg-3, - .col-lg-4, - .col-lg-5, - .col-lg-6, - .col-lg-7, - .col-lg-8, - .col-lg-9, - .col-lg-10, - .col-lg-11, - .col-lg-12 { - float: left; - } - .col-lg-12 { - width: 100%; - } - .col-lg-11 { - width: 91.66666666666666%; - } - .col-lg-10 { - width: 83.33333333333334%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-8 { - width: 66.66666666666666%; - } - .col-lg-7 { - width: 58.333333333333336%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-5 { - width: 41.66666666666667%; - } - .col-lg-4 { - width: 33.33333333333333%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-2 { - width: 16.666666666666664%; - } - .col-lg-1 { - width: 8.333333333333332%; - } - .col-lg-pull-12 { - right: 100%; - } - .col-lg-pull-11 { - right: 91.66666666666666%; - } - .col-lg-pull-10 { - right: 83.33333333333334%; - } - .col-lg-pull-9 { - right: 75%; - } - .col-lg-pull-8 { - right: 66.66666666666666%; - } - .col-lg-pull-7 { - right: 58.333333333333336%; - } - .col-lg-pull-6 { - right: 50%; - } - .col-lg-pull-5 { - right: 41.66666666666667%; - } - .col-lg-pull-4 { - right: 33.33333333333333%; - } - .col-lg-pull-3 { - right: 25%; - } - .col-lg-pull-2 { - right: 16.666666666666664%; - } - .col-lg-pull-1 { - right: 8.333333333333332%; - } - .col-lg-pull-0 { - right: 0; - } - .col-lg-push-12 { - left: 100%; - } - .col-lg-push-11 { - left: 91.66666666666666%; - } - .col-lg-push-10 { - left: 83.33333333333334%; - } - .col-lg-push-9 { - left: 75%; - } - .col-lg-push-8 { - left: 66.66666666666666%; - } - .col-lg-push-7 { - left: 58.333333333333336%; - } - .col-lg-push-6 { - left: 50%; - } - .col-lg-push-5 { - left: 41.66666666666667%; - } - .col-lg-push-4 { - left: 33.33333333333333%; - } - .col-lg-push-3 { - left: 25%; - } - .col-lg-push-2 { - left: 16.666666666666664%; - } - .col-lg-push-1 { - left: 8.333333333333332%; - } - .col-lg-push-0 { - left: 0; - } - .col-lg-offset-12 { - margin-left: 100%; - } - .col-lg-offset-11 { - margin-left: 91.66666666666666%; - } - .col-lg-offset-10 { - margin-left: 83.33333333333334%; - } - .col-lg-offset-9 { - margin-left: 75%; - } - .col-lg-offset-8 { - margin-left: 66.66666666666666%; - } - .col-lg-offset-7 { - margin-left: 58.333333333333336%; - } - .col-lg-offset-6 { - margin-left: 50%; - } - .col-lg-offset-5 { - margin-left: 41.66666666666667%; - } - .col-lg-offset-4 { - margin-left: 33.33333333333333%; - } - .col-lg-offset-3 { - margin-left: 25%; - } - .col-lg-offset-2 { - margin-left: 16.666666666666664%; - } - .col-lg-offset-1 { - margin-left: 8.333333333333332%; - } - .col-lg-offset-0 { - margin-left: 0; - } -} - -table { - max-width: 100%; - background-color: transparent; -} - -th { - text-align: left; -} - -.table { - width: 100%; - margin-bottom: 20px; -} - -.table > thead > tr > th, -.table > tbody > tr > th, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - padding: 8px; - line-height: 1.428571429; - vertical-align: top; - border-top: 1px solid #dddddd; -} - -.table > thead > tr > th { - vertical-align: bottom; - border-bottom: 2px solid #dddddd; -} - -.table > caption + thead > tr:first-child > th, -.table > colgroup + thead > tr:first-child > th, -.table > thead:first-child > tr:first-child > th, -.table > caption + thead > tr:first-child > td, -.table > colgroup + thead > tr:first-child > td, -.table > thead:first-child > tr:first-child > td { - border-top: 0; -} - -.table > tbody + tbody { - border-top: 2px solid #dddddd; -} - -.table .table { - background-color: #ffffff; -} - -.table-condensed > thead > tr > th, -.table-condensed > tbody > tr > th, -.table-condensed > tfoot > tr > th, -.table-condensed > thead > tr > td, -.table-condensed > tbody > tr > td, -.table-condensed > tfoot > tr > td { - padding: 5px; -} - -.table-bordered { - border: 1px solid #dddddd; -} - -.table-bordered > thead > tr > th, -.table-bordered > tbody > tr > th, -.table-bordered > tfoot > tr > th, -.table-bordered > thead > tr > td, -.table-bordered > tbody > tr > td, -.table-bordered > tfoot > tr > td { - border: 1px solid #dddddd; -} - -.table-bordered > thead > tr > th, -.table-bordered > thead > tr > td { - border-bottom-width: 2px; -} - -.table-striped > tbody > tr:nth-child(odd) > td, -.table-striped > tbody > tr:nth-child(odd) > th { - background-color: #f9f9f9; -} - -.table-hover > tbody > tr:hover > td, -.table-hover > tbody > tr:hover > th { - background-color: #f5f5f5; -} - -table col[class*="col-"] { - position: static; - display: table-column; - float: none; -} - -table td[class*="col-"], -table th[class*="col-"] { - display: table-cell; - float: none; -} - -.table > thead > tr > .active, -.table > tbody > tr > .active, -.table > tfoot > tr > .active, -.table > thead > .active > td, -.table > tbody > .active > td, -.table > tfoot > .active > td, -.table > thead > .active > th, -.table > tbody > .active > th, -.table > tfoot > .active > th { - background-color: #f5f5f5; -} - -.table-hover > tbody > tr > .active:hover, -.table-hover > tbody > .active:hover > td, -.table-hover > tbody > .active:hover > th { - background-color: #e8e8e8; -} - -.table > thead > tr > .success, -.table > tbody > tr > .success, -.table > tfoot > tr > .success, -.table > thead > .success > td, -.table > tbody > .success > td, -.table > tfoot > .success > td, -.table > thead > .success > th, -.table > tbody > .success > th, -.table > tfoot > .success > th { - background-color: #dff0d8; -} - -.table-hover > tbody > tr > .success:hover, -.table-hover > tbody > .success:hover > td, -.table-hover > tbody > .success:hover > th { - background-color: #d0e9c6; -} - -.table > thead > tr > .danger, -.table > tbody > tr > .danger, -.table > tfoot > tr > .danger, -.table > thead > .danger > td, -.table > tbody > .danger > td, -.table > tfoot > .danger > td, -.table > thead > .danger > th, -.table > tbody > .danger > th, -.table > tfoot > .danger > th { - background-color: #f2dede; -} - -.table-hover > tbody > tr > .danger:hover, -.table-hover > tbody > .danger:hover > td, -.table-hover > tbody > .danger:hover > th { - background-color: #ebcccc; -} - -.table > thead > tr > .warning, -.table > tbody > tr > .warning, -.table > tfoot > tr > .warning, -.table > thead > .warning > td, -.table > tbody > .warning > td, -.table > tfoot > .warning > td, -.table > thead > .warning > th, -.table > tbody > .warning > th, -.table > tfoot > .warning > th { - background-color: #fcf8e3; -} - -.table-hover > tbody > tr > .warning:hover, -.table-hover > tbody > .warning:hover > td, -.table-hover > tbody > .warning:hover > th { - background-color: #faf2cc; -} - -@media (max-width: 767px) { - .table-responsive { - width: 100%; - margin-bottom: 15px; - overflow-x: scroll; - overflow-y: hidden; - border: 1px solid #dddddd; - -ms-overflow-style: -ms-autohiding-scrollbar; - -webkit-overflow-scrolling: touch; - } - .table-responsive > .table { - margin-bottom: 0; - } - .table-responsive > .table > thead > tr > th, - .table-responsive > .table > tbody > tr > th, - .table-responsive > .table > tfoot > tr > th, - .table-responsive > .table > thead > tr > td, - .table-responsive > .table > tbody > tr > td, - .table-responsive > .table > tfoot > tr > td { - white-space: nowrap; - } - .table-responsive > .table-bordered { - border: 0; - } - .table-responsive > .table-bordered > thead > tr > th:first-child, - .table-responsive > .table-bordered > tbody > tr > th:first-child, - .table-responsive > .table-bordered > tfoot > tr > th:first-child, - .table-responsive > .table-bordered > thead > tr > td:first-child, - .table-responsive > .table-bordered > tbody > tr > td:first-child, - .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; - } - .table-responsive > .table-bordered > thead > tr > th:last-child, - .table-responsive > .table-bordered > tbody > tr > th:last-child, - .table-responsive > .table-bordered > tfoot > tr > th:last-child, - .table-responsive > .table-bordered > thead > tr > td:last-child, - .table-responsive > .table-bordered > tbody > tr > td:last-child, - .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; - } - .table-responsive > .table-bordered > tbody > tr:last-child > th, - .table-responsive > .table-bordered > tfoot > tr:last-child > th, - .table-responsive > .table-bordered > tbody > tr:last-child > td, - .table-responsive > .table-bordered > tfoot > tr:last-child > td { - border-bottom: 0; - } -} - -fieldset { - padding: 0; - margin: 0; - border: 0; -} - -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: inherit; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} - -label { - display: inline-block; - margin-bottom: 5px; - font-weight: bold; -} - -input[type="search"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - /* IE8-9 */ - - line-height: normal; -} - -input[type="file"] { - display: block; -} - -select[multiple], -select[size] { - height: auto; -} - -select optgroup { - font-family: inherit; - font-size: inherit; - font-style: inherit; -} - -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -input[type="number"]::-webkit-outer-spin-button, -input[type="number"]::-webkit-inner-spin-button { - height: auto; -} - -output { - display: block; - padding-top: 7px; - font-size: 14px; - line-height: 1.428571429; - color: #555555; - vertical-align: middle; -} - -.form-control { - display: block; - width: 100%; - height: 34px; - padding: 6px 12px; - font-size: 14px; - line-height: 1.428571429; - color: #555555; - vertical-align: middle; - background-color: #ffffff; - background-image: none; - border: 1px solid #cccccc; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; - transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; -} - -.form-control:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); -} - -.form-control:-moz-placeholder { - color: #999999; -} - -.form-control::-moz-placeholder { - color: #999999; - opacity: 1; -} - -.form-control:-ms-input-placeholder { - color: #999999; -} - -.form-control::-webkit-input-placeholder { - color: #999999; -} - -.form-control[disabled], -.form-control[readonly], -fieldset[disabled] .form-control { - cursor: not-allowed; - background-color: #eeeeee; -} - -textarea.form-control { - height: auto; -} - -.form-group { - margin-bottom: 15px; -} - -.radio, -.checkbox { - display: block; - min-height: 20px; - padding-left: 20px; - margin-top: 10px; - margin-bottom: 10px; - vertical-align: middle; -} - -.radio label, -.checkbox label { - display: inline; - margin-bottom: 0; - font-weight: normal; - cursor: pointer; -} - -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - float: left; - margin-left: -20px; -} - -.radio + .radio, -.checkbox + .checkbox { - margin-top: -5px; -} - -.radio-inline, -.checkbox-inline { - display: inline-block; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - vertical-align: middle; - cursor: pointer; -} - -.radio-inline + .radio-inline, -.checkbox-inline + .checkbox-inline { - margin-top: 0; - margin-left: 10px; -} - -input[type="radio"][disabled], -input[type="checkbox"][disabled], -.radio[disabled], -.radio-inline[disabled], -.checkbox[disabled], -.checkbox-inline[disabled], -fieldset[disabled] input[type="radio"], -fieldset[disabled] input[type="checkbox"], -fieldset[disabled] .radio, -fieldset[disabled] .radio-inline, -fieldset[disabled] .checkbox, -fieldset[disabled] .checkbox-inline { - cursor: not-allowed; -} - -.input-sm { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} - -select.input-sm { - height: 30px; - line-height: 30px; -} - -textarea.input-sm { - height: auto; -} - -.input-lg { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} - -select.input-lg { - height: 46px; - line-height: 46px; -} - -textarea.input-lg { - height: auto; -} - -.has-warning .help-block, -.has-warning .control-label, -.has-warning .radio, -.has-warning .checkbox, -.has-warning .radio-inline, -.has-warning .checkbox-inline { - color: #8a6d3b; -} - -.has-warning .form-control { - border-color: #8a6d3b; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.has-warning .form-control:focus { - border-color: #66512c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; -} - -.has-warning .input-group-addon { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #8a6d3b; -} - -.has-error .help-block, -.has-error .control-label, -.has-error .radio, -.has-error .checkbox, -.has-error .radio-inline, -.has-error .checkbox-inline { - color: #a94442; -} - -.has-error .form-control { - border-color: #a94442; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.has-error .form-control:focus { - border-color: #843534; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; -} - -.has-error .input-group-addon { - color: #a94442; - background-color: #f2dede; - border-color: #a94442; -} - -.has-success .help-block, -.has-success .control-label, -.has-success .radio, -.has-success .checkbox, -.has-success .radio-inline, -.has-success .checkbox-inline { - color: #3c763d; -} - -.has-success .form-control { - border-color: #3c763d; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.has-success .form-control:focus { - border-color: #2b542c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; -} - -.has-success .input-group-addon { - color: #3c763d; - background-color: #dff0d8; - border-color: #3c763d; -} - -.form-control-static { - margin-bottom: 0; -} - -.help-block { - display: block; - margin-top: 5px; - margin-bottom: 10px; - color: #737373; -} - -@media (min-width: 768px) { - .form-inline .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .form-control { - display: inline-block; - } - .form-inline select.form-control { - width: auto; - } - .form-inline .radio, - .form-inline .checkbox { - display: inline-block; - padding-left: 0; - margin-top: 0; - margin-bottom: 0; - } - .form-inline .radio input[type="radio"], - .form-inline .checkbox input[type="checkbox"] { - float: none; - margin-left: 0; - } -} - -.form-horizontal .control-label, -.form-horizontal .radio, -.form-horizontal .checkbox, -.form-horizontal .radio-inline, -.form-horizontal .checkbox-inline { - padding-top: 7px; - margin-top: 0; - margin-bottom: 0; -} - -.form-horizontal .radio, -.form-horizontal .checkbox { - min-height: 27px; -} - -.form-horizontal .form-group { - margin-right: -15px; - margin-left: -15px; -} - -.form-horizontal .form-group:before, -.form-horizontal .form-group:after { - display: table; - content: " "; -} - -.form-horizontal .form-group:after { - clear: both; -} - -.form-horizontal .form-group:before, -.form-horizontal .form-group:after { - display: table; - content: " "; -} - -.form-horizontal .form-group:after { - clear: both; -} - -.form-horizontal .form-control-static { - padding-top: 7px; -} - -@media (min-width: 768px) { - .form-horizontal .control-label { - text-align: right; - } -} - -.btn { - display: inline-block; - padding: 6px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: normal; - line-height: 1.428571429; - text-align: center; - white-space: nowrap; - vertical-align: middle; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none; -} - -.btn:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.btn:hover, -.btn:focus { - color: #333333; - text-decoration: none; -} - -.btn:active, -.btn.active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} - -.btn.disabled, -.btn[disabled], -fieldset[disabled] .btn { - pointer-events: none; - cursor: not-allowed; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; -} - -.btn-default { - color: #333333; - background-color: #ffffff; - border-color: #cccccc; -} - -.btn-default:hover, -.btn-default:focus, -.btn-default:active, -.btn-default.active, -.open .dropdown-toggle.btn-default { - color: #333333; - background-color: #ebebeb; - border-color: #adadad; -} - -.btn-default:active, -.btn-default.active, -.open .dropdown-toggle.btn-default { - background-image: none; -} - -.btn-default.disabled, -.btn-default[disabled], -fieldset[disabled] .btn-default, -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled:active, -.btn-default[disabled]:active, -fieldset[disabled] .btn-default:active, -.btn-default.disabled.active, -.btn-default[disabled].active, -fieldset[disabled] .btn-default.active { - background-color: #ffffff; - border-color: #cccccc; -} - -.btn-default .badge { - color: #ffffff; - background-color: #fff; -} - -.btn-primary { - color: #ffffff; - background-color: #428bca; - border-color: #357ebd; -} - -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active, -.open .dropdown-toggle.btn-primary { - color: #ffffff; - background-color: #3276b1; - border-color: #285e8e; -} - -.btn-primary:active, -.btn-primary.active, -.open .dropdown-toggle.btn-primary { - background-image: none; -} - -.btn-primary.disabled, -.btn-primary[disabled], -fieldset[disabled] .btn-primary, -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled:active, -.btn-primary[disabled]:active, -fieldset[disabled] .btn-primary:active, -.btn-primary.disabled.active, -.btn-primary[disabled].active, -fieldset[disabled] .btn-primary.active { - background-color: #428bca; - border-color: #357ebd; -} - -.btn-primary .badge { - color: #428bca; - background-color: #fff; -} - -.btn-warning { - color: #ffffff; - background-color: #f0ad4e; - border-color: #eea236; -} - -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active, -.open .dropdown-toggle.btn-warning { - color: #ffffff; - background-color: #ed9c28; - border-color: #d58512; -} - -.btn-warning:active, -.btn-warning.active, -.open .dropdown-toggle.btn-warning { - background-image: none; -} - -.btn-warning.disabled, -.btn-warning[disabled], -fieldset[disabled] .btn-warning, -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled:active, -.btn-warning[disabled]:active, -fieldset[disabled] .btn-warning:active, -.btn-warning.disabled.active, -.btn-warning[disabled].active, -fieldset[disabled] .btn-warning.active { - background-color: #f0ad4e; - border-color: #eea236; -} - -.btn-warning .badge { - color: #f0ad4e; - background-color: #fff; -} - -.btn-danger { - color: #ffffff; - background-color: #d9534f; - border-color: #d43f3a; -} - -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active, -.open .dropdown-toggle.btn-danger { - color: #ffffff; - background-color: #d2322d; - border-color: #ac2925; -} - -.btn-danger:active, -.btn-danger.active, -.open .dropdown-toggle.btn-danger { - background-image: none; -} - -.btn-danger.disabled, -.btn-danger[disabled], -fieldset[disabled] .btn-danger, -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled:active, -.btn-danger[disabled]:active, -fieldset[disabled] .btn-danger:active, -.btn-danger.disabled.active, -.btn-danger[disabled].active, -fieldset[disabled] .btn-danger.active { - background-color: #d9534f; - border-color: #d43f3a; -} - -.btn-danger .badge { - color: #d9534f; - background-color: #fff; -} - -.btn-success { - color: #ffffff; - background-color: #5cb85c; - border-color: #4cae4c; -} - -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active, -.open .dropdown-toggle.btn-success { - color: #ffffff; - background-color: #47a447; - border-color: #398439; -} - -.btn-success:active, -.btn-success.active, -.open .dropdown-toggle.btn-success { - background-image: none; -} - -.btn-success.disabled, -.btn-success[disabled], -fieldset[disabled] .btn-success, -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled:active, -.btn-success[disabled]:active, -fieldset[disabled] .btn-success:active, -.btn-success.disabled.active, -.btn-success[disabled].active, -fieldset[disabled] .btn-success.active { - background-color: #5cb85c; - border-color: #4cae4c; -} - -.btn-success .badge { - color: #5cb85c; - background-color: #fff; -} - -.btn-info { - color: #ffffff; - background-color: #5bc0de; - border-color: #46b8da; -} - -.btn-info:hover, -.btn-info:focus, -.btn-info:active, -.btn-info.active, -.open .dropdown-toggle.btn-info { - color: #ffffff; - background-color: #39b3d7; - border-color: #269abc; -} - -.btn-info:active, -.btn-info.active, -.open .dropdown-toggle.btn-info { - background-image: none; -} - -.btn-info.disabled, -.btn-info[disabled], -fieldset[disabled] .btn-info, -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled:active, -.btn-info[disabled]:active, -fieldset[disabled] .btn-info:active, -.btn-info.disabled.active, -.btn-info[disabled].active, -fieldset[disabled] .btn-info.active { - background-color: #5bc0de; - border-color: #46b8da; -} - -.btn-info .badge { - color: #5bc0de; - background-color: #fff; -} - -.btn-link { - font-weight: normal; - color: #428bca; - cursor: pointer; - border-radius: 0; -} - -.btn-link, -.btn-link:active, -.btn-link[disabled], -fieldset[disabled] .btn-link { - background-color: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} - -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active { - border-color: transparent; -} - -.btn-link:hover, -.btn-link:focus { - color: #2a6496; - text-decoration: underline; - background-color: transparent; -} - -.btn-link[disabled]:hover, -fieldset[disabled] .btn-link:hover, -.btn-link[disabled]:focus, -fieldset[disabled] .btn-link:focus { - color: #999999; - text-decoration: none; -} - -.btn-lg { - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} - -.btn-sm { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} - -.btn-xs { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} - -.btn-block { - display: block; - width: 100%; - padding-right: 0; - padding-left: 0; -} - -.btn-block + .btn-block { - margin-top: 5px; -} - -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} - -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} - -.fade.in { - opacity: 1; -} - -.collapse { - display: none; -} - -.collapse.in { - display: block; -} - -.collapsing { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - transition: height 0.35s ease; -} - -@font-face { - font-family: 'Glyphicons Halflings'; - src: url('http://github.com/fonts/glyphicons-halflings-regular.eot'); - src: url('http://github.com/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('http://github.com/fonts/glyphicons-halflings-regular.woff') format('woff'), url('http://github.com/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('http://github.com/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); -} - -.glyphicon { - position: relative; - top: 1px; - display: inline-block; - font-family: 'Glyphicons Halflings'; - -webkit-font-smoothing: antialiased; - font-style: normal; - font-weight: normal; - line-height: 1; - -moz-osx-font-smoothing: grayscale; -} - -.glyphicon:empty { - width: 1em; -} - -.glyphicon-asterisk:before { - content: "\2a"; -} - -.glyphicon-plus:before { - content: "\2b"; -} - -.glyphicon-euro:before { - content: "\20ac"; -} - -.glyphicon-minus:before { - content: "\2212"; -} - -.glyphicon-cloud:before { - content: "\2601"; -} - -.glyphicon-envelope:before { - content: "\2709"; -} - -.glyphicon-pencil:before { - content: "\270f"; -} - -.glyphicon-glass:before { - content: "\e001"; -} - -.glyphicon-music:before { - content: "\e002"; -} - -.glyphicon-search:before { - content: "\e003"; -} - -.glyphicon-heart:before { - content: "\e005"; -} - -.glyphicon-star:before { - content: "\e006"; -} - -.glyphicon-star-empty:before { - content: "\e007"; -} - -.glyphicon-user:before { - content: "\e008"; -} - -.glyphicon-film:before { - content: "\e009"; -} - -.glyphicon-th-large:before { - content: "\e010"; -} - -.glyphicon-th:before { - content: "\e011"; -} - -.glyphicon-th-list:before { - content: "\e012"; -} - -.glyphicon-ok:before { - content: "\e013"; -} - -.glyphicon-remove:before { - content: "\e014"; -} - -.glyphicon-zoom-in:before { - content: "\e015"; -} - -.glyphicon-zoom-out:before { - content: "\e016"; -} - -.glyphicon-off:before { - content: "\e017"; -} - -.glyphicon-signal:before { - content: "\e018"; -} - -.glyphicon-cog:before { - content: "\e019"; -} - -.glyphicon-trash:before { - content: "\e020"; -} - -.glyphicon-home:before { - content: "\e021"; -} - -.glyphicon-file:before { - content: "\e022"; -} - -.glyphicon-time:before { - content: "\e023"; -} - -.glyphicon-road:before { - content: "\e024"; -} - -.glyphicon-download-alt:before { - content: "\e025"; -} - -.glyphicon-download:before { - content: "\e026"; -} - -.glyphicon-upload:before { - content: "\e027"; -} - -.glyphicon-inbox:before { - content: "\e028"; -} - -.glyphicon-play-circle:before { - content: "\e029"; -} - -.glyphicon-repeat:before { - content: "\e030"; -} - -.glyphicon-refresh:before { - content: "\e031"; -} - -.glyphicon-list-alt:before { - content: "\e032"; -} - -.glyphicon-lock:before { - content: "\e033"; -} - -.glyphicon-flag:before { - content: "\e034"; -} - -.glyphicon-headphones:before { - content: "\e035"; -} - -.glyphicon-volume-off:before { - content: "\e036"; -} - -.glyphicon-volume-down:before { - content: "\e037"; -} - -.glyphicon-volume-up:before { - content: "\e038"; -} - -.glyphicon-qrcode:before { - content: "\e039"; -} - -.glyphicon-barcode:before { - content: "\e040"; -} - -.glyphicon-tag:before { - content: "\e041"; -} - -.glyphicon-tags:before { - content: "\e042"; -} - -.glyphicon-book:before { - content: "\e043"; -} - -.glyphicon-bookmark:before { - content: "\e044"; -} - -.glyphicon-print:before { - content: "\e045"; -} - -.glyphicon-camera:before { - content: "\e046"; -} - -.glyphicon-font:before { - content: "\e047"; -} - -.glyphicon-bold:before { - content: "\e048"; -} - -.glyphicon-italic:before { - content: "\e049"; -} - -.glyphicon-text-height:before { - content: "\e050"; -} - -.glyphicon-text-width:before { - content: "\e051"; -} - -.glyphicon-align-left:before { - content: "\e052"; -} - -.glyphicon-align-center:before { - content: "\e053"; -} - -.glyphicon-align-right:before { - content: "\e054"; -} - -.glyphicon-align-justify:before { - content: "\e055"; -} - -.glyphicon-list:before { - content: "\e056"; -} - -.glyphicon-indent-left:before { - content: "\e057"; -} - -.glyphicon-indent-right:before { - content: "\e058"; -} - -.glyphicon-facetime-video:before { - content: "\e059"; -} - -.glyphicon-picture:before { - content: "\e060"; -} - -.glyphicon-map-marker:before { - content: "\e062"; -} - -.glyphicon-adjust:before { - content: "\e063"; -} - -.glyphicon-tint:before { - content: "\e064"; -} - -.glyphicon-edit:before { - content: "\e065"; -} - -.glyphicon-share:before { - content: "\e066"; -} - -.glyphicon-check:before { - content: "\e067"; -} - -.glyphicon-move:before { - content: "\e068"; -} - -.glyphicon-step-backward:before { - content: "\e069"; -} - -.glyphicon-fast-backward:before { - content: "\e070"; -} - -.glyphicon-backward:before { - content: "\e071"; -} - -.glyphicon-play:before { - content: "\e072"; -} - -.glyphicon-pause:before { - content: "\e073"; -} - -.glyphicon-stop:before { - content: "\e074"; -} - -.glyphicon-forward:before { - content: "\e075"; -} - -.glyphicon-fast-forward:before { - content: "\e076"; -} - -.glyphicon-step-forward:before { - content: "\e077"; -} - -.glyphicon-eject:before { - content: "\e078"; -} - -.glyphicon-chevron-left:before { - content: "\e079"; -} - -.glyphicon-chevron-right:before { - content: "\e080"; -} - -.glyphicon-plus-sign:before { - content: "\e081"; -} - -.glyphicon-minus-sign:before { - content: "\e082"; -} - -.glyphicon-remove-sign:before { - content: "\e083"; -} - -.glyphicon-ok-sign:before { - content: "\e084"; -} - -.glyphicon-question-sign:before { - content: "\e085"; -} - -.glyphicon-info-sign:before { - content: "\e086"; -} - -.glyphicon-screenshot:before { - content: "\e087"; -} - -.glyphicon-remove-circle:before { - content: "\e088"; -} - -.glyphicon-ok-circle:before { - content: "\e089"; -} - -.glyphicon-ban-circle:before { - content: "\e090"; -} - -.glyphicon-arrow-left:before { - content: "\e091"; -} - -.glyphicon-arrow-right:before { - content: "\e092"; -} - -.glyphicon-arrow-up:before { - content: "\e093"; -} - -.glyphicon-arrow-down:before { - content: "\e094"; -} - -.glyphicon-share-alt:before { - content: "\e095"; -} - -.glyphicon-resize-full:before { - content: "\e096"; -} - -.glyphicon-resize-small:before { - content: "\e097"; -} - -.glyphicon-exclamation-sign:before { - content: "\e101"; -} - -.glyphicon-gift:before { - content: "\e102"; -} - -.glyphicon-leaf:before { - content: "\e103"; -} - -.glyphicon-fire:before { - content: "\e104"; -} - -.glyphicon-eye-open:before { - content: "\e105"; -} - -.glyphicon-eye-close:before { - content: "\e106"; -} - -.glyphicon-warning-sign:before { - content: "\e107"; -} - -.glyphicon-plane:before { - content: "\e108"; -} - -.glyphicon-calendar:before { - content: "\e109"; -} - -.glyphicon-random:before { - content: "\e110"; -} - -.glyphicon-comment:before { - content: "\e111"; -} - -.glyphicon-magnet:before { - content: "\e112"; -} - -.glyphicon-chevron-up:before { - content: "\e113"; -} - -.glyphicon-chevron-down:before { - content: "\e114"; -} - -.glyphicon-retweet:before { - content: "\e115"; -} - -.glyphicon-shopping-cart:before { - content: "\e116"; -} - -.glyphicon-folder-close:before { - content: "\e117"; -} - -.glyphicon-folder-open:before { - content: "\e118"; -} - -.glyphicon-resize-vertical:before { - content: "\e119"; -} - -.glyphicon-resize-horizontal:before { - content: "\e120"; -} - -.glyphicon-hdd:before { - content: "\e121"; -} - -.glyphicon-bullhorn:before { - content: "\e122"; -} - -.glyphicon-bell:before { - content: "\e123"; -} - -.glyphicon-certificate:before { - content: "\e124"; -} - -.glyphicon-thumbs-up:before { - content: "\e125"; -} - -.glyphicon-thumbs-down:before { - content: "\e126"; -} - -.glyphicon-hand-right:before { - content: "\e127"; -} - -.glyphicon-hand-left:before { - content: "\e128"; -} - -.glyphicon-hand-up:before { - content: "\e129"; -} - -.glyphicon-hand-down:before { - content: "\e130"; -} - -.glyphicon-circle-arrow-right:before { - content: "\e131"; -} - -.glyphicon-circle-arrow-left:before { - content: "\e132"; -} - -.glyphicon-circle-arrow-up:before { - content: "\e133"; -} - -.glyphicon-circle-arrow-down:before { - content: "\e134"; -} - -.glyphicon-globe:before { - content: "\e135"; -} - -.glyphicon-wrench:before { - content: "\e136"; -} - -.glyphicon-tasks:before { - content: "\e137"; -} - -.glyphicon-filter:before { - content: "\e138"; -} - -.glyphicon-briefcase:before { - content: "\e139"; -} - -.glyphicon-fullscreen:before { - content: "\e140"; -} - -.glyphicon-dashboard:before { - content: "\e141"; -} - -.glyphicon-paperclip:before { - content: "\e142"; -} - -.glyphicon-heart-empty:before { - content: "\e143"; -} - -.glyphicon-link:before { - content: "\e144"; -} - -.glyphicon-phone:before { - content: "\e145"; -} - -.glyphicon-pushpin:before { - content: "\e146"; -} - -.glyphicon-usd:before { - content: "\e148"; -} - -.glyphicon-gbp:before { - content: "\e149"; -} - -.glyphicon-sort:before { - content: "\e150"; -} - -.glyphicon-sort-by-alphabet:before { - content: "\e151"; -} - -.glyphicon-sort-by-alphabet-alt:before { - content: "\e152"; -} - -.glyphicon-sort-by-order:before { - content: "\e153"; -} - -.glyphicon-sort-by-order-alt:before { - content: "\e154"; -} - -.glyphicon-sort-by-attributes:before { - content: "\e155"; -} - -.glyphicon-sort-by-attributes-alt:before { - content: "\e156"; -} - -.glyphicon-unchecked:before { - content: "\e157"; -} - -.glyphicon-expand:before { - content: "\e158"; -} - -.glyphicon-collapse-down:before { - content: "\e159"; -} - -.glyphicon-collapse-up:before { - content: "\e160"; -} - -.glyphicon-log-in:before { - content: "\e161"; -} - -.glyphicon-flash:before { - content: "\e162"; -} - -.glyphicon-log-out:before { - content: "\e163"; -} - -.glyphicon-new-window:before { - content: "\e164"; -} - -.glyphicon-record:before { - content: "\e165"; -} - -.glyphicon-save:before { - content: "\e166"; -} - -.glyphicon-open:before { - content: "\e167"; -} - -.glyphicon-saved:before { - content: "\e168"; -} - -.glyphicon-import:before { - content: "\e169"; -} - -.glyphicon-export:before { - content: "\e170"; -} - -.glyphicon-send:before { - content: "\e171"; -} - -.glyphicon-floppy-disk:before { - content: "\e172"; -} - -.glyphicon-floppy-saved:before { - content: "\e173"; -} - -.glyphicon-floppy-remove:before { - content: "\e174"; -} - -.glyphicon-floppy-save:before { - content: "\e175"; -} - -.glyphicon-floppy-open:before { - content: "\e176"; -} - -.glyphicon-credit-card:before { - content: "\e177"; -} - -.glyphicon-transfer:before { - content: "\e178"; -} - -.glyphicon-cutlery:before { - content: "\e179"; -} - -.glyphicon-header:before { - content: "\e180"; -} - -.glyphicon-compressed:before { - content: "\e181"; -} - -.glyphicon-earphone:before { - content: "\e182"; -} - -.glyphicon-phone-alt:before { - content: "\e183"; -} - -.glyphicon-tower:before { - content: "\e184"; -} - -.glyphicon-stats:before { - content: "\e185"; -} - -.glyphicon-sd-video:before { - content: "\e186"; -} - -.glyphicon-hd-video:before { - content: "\e187"; -} - -.glyphicon-subtitles:before { - content: "\e188"; -} - -.glyphicon-sound-stereo:before { - content: "\e189"; -} - -.glyphicon-sound-dolby:before { - content: "\e190"; -} - -.glyphicon-sound-5-1:before { - content: "\e191"; -} - -.glyphicon-sound-6-1:before { - content: "\e192"; -} - -.glyphicon-sound-7-1:before { - content: "\e193"; -} - -.glyphicon-copyright-mark:before { - content: "\e194"; -} - -.glyphicon-registration-mark:before { - content: "\e195"; -} - -.glyphicon-cloud-download:before { - content: "\e197"; -} - -.glyphicon-cloud-upload:before { - content: "\e198"; -} - -.glyphicon-tree-conifer:before { - content: "\e199"; -} - -.glyphicon-tree-deciduous:before { - content: "\e200"; -} - -.caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: 4px solid; - border-right: 4px solid transparent; - border-left: 4px solid transparent; -} - -.dropdown { - position: relative; -} - -.dropdown-toggle:focus { - outline: 0; -} - -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - font-size: 14px; - list-style: none; - background-color: #ffffff; - border: 1px solid #cccccc; - border: 1px solid rgba(0, 0, 0, 0.15); - border-radius: 4px; - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - background-clip: padding-box; -} - -.dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.dropdown-menu .divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} - -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.428571429; - color: #333333; - white-space: nowrap; -} - -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - color: #262626; - text-decoration: none; - background-color: #f5f5f5; -} - -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #ffffff; - text-decoration: none; - background-color: #428bca; - outline: 0; -} - -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #999999; -} - -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: not-allowed; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.open > .dropdown-menu { - display: block; -} - -.open > a { - outline: 0; -} - -.dropdown-header { - display: block; - padding: 3px 20px; - font-size: 12px; - line-height: 1.428571429; - color: #999999; -} - -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} - -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - border-top: 0; - border-bottom: 4px solid; - content: ""; -} - -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} - -@media (min-width: 768px) { - .navbar-right .dropdown-menu { - right: 0; - left: auto; - } -} - -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-block; - vertical-align: middle; -} - -.btn-group > .btn, -.btn-group-vertical > .btn { - position: relative; - float: left; -} - -.btn-group > .btn:hover, -.btn-group-vertical > .btn:hover, -.btn-group > .btn:focus, -.btn-group-vertical > .btn:focus, -.btn-group > .btn:active, -.btn-group-vertical > .btn:active, -.btn-group > .btn.active, -.btn-group-vertical > .btn.active { - z-index: 2; -} - -.btn-group > .btn:focus, -.btn-group-vertical > .btn:focus { - outline: none; -} - -.btn-group .btn + .btn, -.btn-group .btn + .btn-group, -.btn-group .btn-group + .btn, -.btn-group .btn-group + .btn-group { - margin-left: -1px; -} - -.btn-toolbar:before, -.btn-toolbar:after { - display: table; - content: " "; -} - -.btn-toolbar:after { - clear: both; -} - -.btn-toolbar:before, -.btn-toolbar:after { - display: table; - content: " "; -} - -.btn-toolbar:after { - clear: both; -} - -.btn-toolbar .btn-group { - float: left; -} - -.btn-toolbar > .btn + .btn, -.btn-toolbar > .btn-group + .btn, -.btn-toolbar > .btn + .btn-group, -.btn-toolbar > .btn-group + .btn-group { - margin-left: 5px; -} - -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} - -.btn-group > .btn:first-child { - margin-left: 0; -} - -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.btn-group > .btn:last-child:not(:first-child), -.btn-group > .dropdown-toggle:not(:first-child) { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} - -.btn-group > .btn-group { - float: left; -} - -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} - -.btn-group > .btn-group:first-child > .btn:last-child, -.btn-group > .btn-group:first-child > .dropdown-toggle { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.btn-group > .btn-group:last-child > .btn:first-child { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} - -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} - -.btn-group-xs > .btn { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} - -.btn-group-sm > .btn { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} - -.btn-group-lg > .btn { - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} - -.btn-group > .btn + .dropdown-toggle { - padding-right: 8px; - padding-left: 8px; -} - -.btn-group > .btn-lg + .dropdown-toggle { - padding-right: 12px; - padding-left: 12px; -} - -.btn-group.open .dropdown-toggle { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} - -.btn-group.open .dropdown-toggle.btn-link { - -webkit-box-shadow: none; - box-shadow: none; -} - -.btn .caret { - margin-left: 0; -} - -.btn-lg .caret { - border-width: 5px 5px 0; - border-bottom-width: 0; -} - -.dropup .btn-lg .caret { - border-width: 0 5px 5px; -} - -.btn-group-vertical > .btn, -.btn-group-vertical > .btn-group, -.btn-group-vertical > .btn-group > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; -} - -.btn-group-vertical > .btn-group:before, -.btn-group-vertical > .btn-group:after { - display: table; - content: " "; -} - -.btn-group-vertical > .btn-group:after { - clear: both; -} - -.btn-group-vertical > .btn-group:before, -.btn-group-vertical > .btn-group:after { - display: table; - content: " "; -} - -.btn-group-vertical > .btn-group:after { - clear: both; -} - -.btn-group-vertical > .btn-group > .btn { - float: none; -} - -.btn-group-vertical > .btn + .btn, -.btn-group-vertical > .btn + .btn-group, -.btn-group-vertical > .btn-group + .btn, -.btn-group-vertical > .btn-group + .btn-group { - margin-top: -1px; - margin-left: 0; -} - -.btn-group-vertical > .btn:not(:first-child):not(:last-child) { - border-radius: 0; -} - -.btn-group-vertical > .btn:first-child:not(:last-child) { - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.btn-group-vertical > .btn:last-child:not(:first-child) { - border-top-right-radius: 0; - border-bottom-left-radius: 4px; - border-top-left-radius: 0; -} - -.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} - -.btn-group-vertical > .btn-group:first-child > .btn:last-child, -.btn-group-vertical > .btn-group:first-child > .dropdown-toggle { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.btn-group-vertical > .btn-group:last-child > .btn:first-child { - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -.btn-group-justified { - display: table; - width: 100%; - border-collapse: separate; - table-layout: fixed; -} - -.btn-group-justified > .btn, -.btn-group-justified > .btn-group { - display: table-cell; - float: none; - width: 1%; -} - -.btn-group-justified > .btn-group .btn { - width: 100%; -} - -[data-toggle="buttons"] > .btn > input[type="radio"], -[data-toggle="buttons"] > .btn > input[type="checkbox"] { - display: none; -} - -.input-group { - position: relative; - display: table; - border-collapse: separate; -} - -.input-group[class*="col-"] { - float: none; - padding-right: 0; - padding-left: 0; -} - -.input-group .form-control { - width: 100%; - margin-bottom: 0; -} - -.input-group-lg > .form-control, -.input-group-lg > .input-group-addon, -.input-group-lg > .input-group-btn > .btn { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} - -select.input-group-lg > .form-control, -select.input-group-lg > .input-group-addon, -select.input-group-lg > .input-group-btn > .btn { - height: 46px; - line-height: 46px; -} - -textarea.input-group-lg > .form-control, -textarea.input-group-lg > .input-group-addon, -textarea.input-group-lg > .input-group-btn > .btn { - height: auto; -} - -.input-group-sm > .form-control, -.input-group-sm > .input-group-addon, -.input-group-sm > .input-group-btn > .btn { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} - -select.input-group-sm > .form-control, -select.input-group-sm > .input-group-addon, -select.input-group-sm > .input-group-btn > .btn { - height: 30px; - line-height: 30px; -} - -textarea.input-group-sm > .form-control, -textarea.input-group-sm > .input-group-addon, -textarea.input-group-sm > .input-group-btn > .btn { - height: auto; -} - -.input-group-addon, -.input-group-btn, -.input-group .form-control { - display: table-cell; -} - -.input-group-addon:not(:first-child):not(:last-child), -.input-group-btn:not(:first-child):not(:last-child), -.input-group .form-control:not(:first-child):not(:last-child) { - border-radius: 0; -} - -.input-group-addon, -.input-group-btn { - width: 1%; - white-space: nowrap; - vertical-align: middle; -} - -.input-group-addon { - padding: 6px 12px; - font-size: 14px; - font-weight: normal; - line-height: 1; - color: #555555; - text-align: center; - background-color: #eeeeee; - border: 1px solid #cccccc; - border-radius: 4px; -} - -.input-group-addon.input-sm { - padding: 5px 10px; - font-size: 12px; - border-radius: 3px; -} - -.input-group-addon.input-lg { - padding: 10px 16px; - font-size: 18px; - border-radius: 6px; -} - -.input-group-addon input[type="radio"], -.input-group-addon input[type="checkbox"] { - margin-top: 0; -} - -.input-group .form-control:first-child, -.input-group-addon:first-child, -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.input-group-addon:first-child { - border-right: 0; -} - -.input-group .form-control:last-child, -.input-group-addon:last-child, -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child) { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} - -.input-group-addon:last-child { - border-left: 0; -} - -.input-group-btn { - position: relative; - white-space: nowrap; -} - -.input-group-btn:first-child > .btn { - margin-right: -1px; -} - -.input-group-btn:last-child > .btn { - margin-left: -1px; -} - -.input-group-btn > .btn { - position: relative; -} - -.input-group-btn > .btn + .btn { - margin-left: -4px; -} - -.input-group-btn > .btn:hover, -.input-group-btn > .btn:active { - z-index: 2; -} - -.nav { - padding-left: 0; - margin-bottom: 0; - list-style: none; -} - -.nav:before, -.nav:after { - display: table; - content: " "; -} - -.nav:after { - clear: both; -} - -.nav:before, -.nav:after { - display: table; - content: " "; -} - -.nav:after { - clear: both; -} - -.nav > li { - position: relative; - display: block; -} - -.nav > li > a { - position: relative; - display: block; - padding: 10px 15px; -} - -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} - -.nav > li.disabled > a { - color: #999999; -} - -.nav > li.disabled > a:hover, -.nav > li.disabled > a:focus { - color: #999999; - text-decoration: none; - cursor: not-allowed; - background-color: transparent; -} - -.nav .open > a, -.nav .open > a:hover, -.nav .open > a:focus { - background-color: #eeeeee; - border-color: #428bca; -} - -.nav .nav-divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} - -.nav > li > a > img { - max-width: none; -} - -.nav-tabs { - border-bottom: 1px solid #dddddd; -} - -.nav-tabs > li { - float: left; - margin-bottom: -1px; -} - -.nav-tabs > li > a { - margin-right: 2px; - line-height: 1.428571429; - border: 1px solid transparent; - border-radius: 4px 4px 0 0; -} - -.nav-tabs > li > a:hover { - border-color: #eeeeee #eeeeee #dddddd; -} - -.nav-tabs > li.active > a, -.nav-tabs > li.active > a:hover, -.nav-tabs > li.active > a:focus { - color: #555555; - cursor: default; - background-color: #ffffff; - border: 1px solid #dddddd; - border-bottom-color: transparent; -} - -.nav-tabs.nav-justified { - width: 100%; - border-bottom: 0; -} - -.nav-tabs.nav-justified > li { - float: none; -} - -.nav-tabs.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} - -.nav-tabs.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} - -@media (min-width: 768px) { - .nav-tabs.nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-tabs.nav-justified > li > a { - margin-bottom: 0; - } -} - -.nav-tabs.nav-justified > li > a { - margin-right: 0; - border-radius: 4px; -} - -.nav-tabs.nav-justified > .active > a, -.nav-tabs.nav-justified > .active > a:hover, -.nav-tabs.nav-justified > .active > a:focus { - border: 1px solid #dddddd; -} - -@media (min-width: 768px) { - .nav-tabs.nav-justified > li > a { - border-bottom: 1px solid #dddddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs.nav-justified > .active > a, - .nav-tabs.nav-justified > .active > a:hover, - .nav-tabs.nav-justified > .active > a:focus { - border-bottom-color: #ffffff; - } -} - -.nav-pills > li { - float: left; -} - -.nav-pills > li > a { - border-radius: 4px; -} - -.nav-pills > li + li { - margin-left: 2px; -} - -.nav-pills > li.active > a, -.nav-pills > li.active > a:hover, -.nav-pills > li.active > a:focus { - color: #ffffff; - background-color: #428bca; -} - -.nav-stacked > li { - float: none; -} - -.nav-stacked > li + li { - margin-top: 2px; - margin-left: 0; -} - -.nav-justified { - width: 100%; -} - -.nav-justified > li { - float: none; -} - -.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} - -.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} - -@media (min-width: 768px) { - .nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-justified > li > a { - margin-bottom: 0; - } -} - -.nav-tabs-justified { - border-bottom: 0; -} - -.nav-tabs-justified > li > a { - margin-right: 0; - border-radius: 4px; -} - -.nav-tabs-justified > .active > a, -.nav-tabs-justified > .active > a:hover, -.nav-tabs-justified > .active > a:focus { - border: 1px solid #dddddd; -} - -@media (min-width: 768px) { - .nav-tabs-justified > li > a { - border-bottom: 1px solid #dddddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs-justified > .active > a, - .nav-tabs-justified > .active > a:hover, - .nav-tabs-justified > .active > a:focus { - border-bottom-color: #ffffff; - } -} - -.tab-content > .tab-pane { - display: none; -} - -.tab-content > .active { - display: block; -} - -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -.navbar { - position: relative; - min-height: 50px; - margin-bottom: 20px; - border: 1px solid transparent; -} - -.navbar:before, -.navbar:after { - display: table; - content: " "; -} - -.navbar:after { - clear: both; -} - -.navbar:before, -.navbar:after { - display: table; - content: " "; -} - -.navbar:after { - clear: both; -} - -@media (min-width: 768px) { - .navbar { - border-radius: 4px; - } -} - -.navbar-header:before, -.navbar-header:after { - display: table; - content: " "; -} - -.navbar-header:after { - clear: both; -} - -.navbar-header:before, -.navbar-header:after { - display: table; - content: " "; -} - -.navbar-header:after { - clear: both; -} - -@media (min-width: 768px) { - .navbar-header { - float: left; - } -} - -.navbar-collapse { - max-height: 340px; - padding-right: 15px; - padding-left: 15px; - overflow-x: visible; - border-top: 1px solid transparent; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); - -webkit-overflow-scrolling: touch; -} - -.navbar-collapse:before, -.navbar-collapse:after { - display: table; - content: " "; -} - -.navbar-collapse:after { - clear: both; -} - -.navbar-collapse:before, -.navbar-collapse:after { - display: table; - content: " "; -} - -.navbar-collapse:after { - clear: both; -} - -.navbar-collapse.in { - overflow-y: auto; -} - -@media (min-width: 768px) { - .navbar-collapse { - width: auto; - border-top: 0; - box-shadow: none; - } - .navbar-collapse.collapse { - display: block !important; - height: auto !important; - padding-bottom: 0; - overflow: visible !important; - } - .navbar-collapse.in { - overflow-y: visible; - } - .navbar-fixed-top .navbar-collapse, - .navbar-static-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - padding-right: 0; - padding-left: 0; - } -} - -.container > .navbar-header, -.container > .navbar-collapse { - margin-right: -15px; - margin-left: -15px; -} - -@media (min-width: 768px) { - .container > .navbar-header, - .container > .navbar-collapse { - margin-right: 0; - margin-left: 0; - } -} - -.navbar-static-top { - z-index: 1000; - border-width: 0 0 1px; -} - -@media (min-width: 768px) { - .navbar-static-top { - border-radius: 0; - } -} - -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; -} - -@media (min-width: 768px) { - .navbar-fixed-top, - .navbar-fixed-bottom { - border-radius: 0; - } -} - -.navbar-fixed-top { - top: 0; - border-width: 0 0 1px; -} - -.navbar-fixed-bottom { - bottom: 0; - margin-bottom: 0; - border-width: 1px 0 0; -} - -.navbar-brand { - float: left; - padding: 15px 15px; - font-size: 18px; - line-height: 20px; -} - -.navbar-brand:hover, -.navbar-brand:focus { - text-decoration: none; -} - -@media (min-width: 768px) { - .navbar > .container .navbar-brand { - margin-left: -15px; - } -} - -.navbar-toggle { - position: relative; - float: right; - padding: 9px 10px; - margin-top: 8px; - margin-right: 15px; - margin-bottom: 8px; - background-color: transparent; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} - -.navbar-toggle .icon-bar { - display: block; - width: 22px; - height: 2px; - border-radius: 1px; -} - -.navbar-toggle .icon-bar + .icon-bar { - margin-top: 4px; -} - -@media (min-width: 768px) { - .navbar-toggle { - display: none; - } -} - -.navbar-nav { - margin: 7.5px -15px; -} - -.navbar-nav > li > a { - padding-top: 10px; - padding-bottom: 10px; - line-height: 20px; -} - -@media (max-width: 767px) { - .navbar-nav .open .dropdown-menu { - position: static; - float: none; - width: auto; - margin-top: 0; - background-color: transparent; - border: 0; - box-shadow: none; - } - .navbar-nav .open .dropdown-menu > li > a, - .navbar-nav .open .dropdown-menu .dropdown-header { - padding: 5px 15px 5px 25px; - } - .navbar-nav .open .dropdown-menu > li > a { - line-height: 20px; - } - .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-nav .open .dropdown-menu > li > a:focus { - background-image: none; - } -} - -@media (min-width: 768px) { - .navbar-nav { - float: left; - margin: 0; - } - .navbar-nav > li { - float: left; - } - .navbar-nav > li > a { - padding-top: 15px; - padding-bottom: 15px; - } - .navbar-nav.navbar-right:last-child { - margin-right: -15px; - } -} - -@media (min-width: 768px) { - .navbar-left { - float: left !important; - } - .navbar-right { - float: right !important; - } -} - -.navbar-form { - padding: 10px 15px; - margin-top: 8px; - margin-right: -15px; - margin-bottom: 8px; - margin-left: -15px; - border-top: 1px solid transparent; - border-bottom: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); -} - -@media (min-width: 768px) { - .navbar-form .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .form-control { - display: inline-block; - } - .navbar-form select.form-control { - width: auto; - } - .navbar-form .radio, - .navbar-form .checkbox { - display: inline-block; - padding-left: 0; - margin-top: 0; - margin-bottom: 0; - } - .navbar-form .radio input[type="radio"], - .navbar-form .checkbox input[type="checkbox"] { - float: none; - margin-left: 0; - } -} - -@media (max-width: 767px) { - .navbar-form .form-group { - margin-bottom: 5px; - } -} - -@media (min-width: 768px) { - .navbar-form { - width: auto; - padding-top: 0; - padding-bottom: 0; - margin-right: 0; - margin-left: 0; - border: 0; - -webkit-box-shadow: none; - box-shadow: none; - } - .navbar-form.navbar-right:last-child { - margin-right: -15px; - } -} - -.navbar-nav > li > .dropdown-menu { - margin-top: 0; - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.navbar-nav.pull-right > li > .dropdown-menu, -.navbar-nav > li > .dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.navbar-btn { - margin-top: 8px; - margin-bottom: 8px; -} - -.navbar-btn.btn-sm { - margin-top: 10px; - margin-bottom: 10px; -} - -.navbar-btn.btn-xs { - margin-top: 14px; - margin-bottom: 14px; -} - -.navbar-text { - margin-top: 15px; - margin-bottom: 15px; -} - -@media (min-width: 768px) { - .navbar-text { - float: left; - margin-right: 15px; - margin-left: 15px; - } - .navbar-text.navbar-right:last-child { - margin-right: 0; - } -} - -.navbar-default { - background-color: #f8f8f8; - border-color: #e7e7e7; -} - -.navbar-default .navbar-brand { - color: #777777; -} - -.navbar-default .navbar-brand:hover, -.navbar-default .navbar-brand:focus { - color: #5e5e5e; - background-color: transparent; -} - -.navbar-default .navbar-text { - color: #777777; -} - -.navbar-default .navbar-nav > li > a { - color: #777777; -} - -.navbar-default .navbar-nav > li > a:hover, -.navbar-default .navbar-nav > li > a:focus { - color: #333333; - background-color: transparent; -} - -.navbar-default .navbar-nav > .active > a, -.navbar-default .navbar-nav > .active > a:hover, -.navbar-default .navbar-nav > .active > a:focus { - color: #555555; - background-color: #e7e7e7; -} - -.navbar-default .navbar-nav > .disabled > a, -.navbar-default .navbar-nav > .disabled > a:hover, -.navbar-default .navbar-nav > .disabled > a:focus { - color: #cccccc; - background-color: transparent; -} - -.navbar-default .navbar-toggle { - border-color: #dddddd; -} - -.navbar-default .navbar-toggle:hover, -.navbar-default .navbar-toggle:focus { - background-color: #dddddd; -} - -.navbar-default .navbar-toggle .icon-bar { - background-color: #cccccc; -} - -.navbar-default .navbar-collapse, -.navbar-default .navbar-form { - border-color: #e7e7e7; -} - -.navbar-default .navbar-nav > .open > a, -.navbar-default .navbar-nav > .open > a:hover, -.navbar-default .navbar-nav > .open > a:focus { - color: #555555; - background-color: #e7e7e7; -} - -@media (max-width: 767px) { - .navbar-default .navbar-nav .open .dropdown-menu > li > a { - color: #777777; - } - .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { - color: #333333; - background-color: transparent; - } - .navbar-default .navbar-nav .open .dropdown-menu > .active > a, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #555555; - background-color: #e7e7e7; - } - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #cccccc; - background-color: transparent; - } -} - -.navbar-default .navbar-link { - color: #777777; -} - -.navbar-default .navbar-link:hover { - color: #333333; -} - -.navbar-inverse { - background-color: #222222; - border-color: #080808; -} - -.navbar-inverse .navbar-brand { - color: #999999; -} - -.navbar-inverse .navbar-brand:hover, -.navbar-inverse .navbar-brand:focus { - color: #ffffff; - background-color: transparent; -} - -.navbar-inverse .navbar-text { - color: #999999; -} - -.navbar-inverse .navbar-nav > li > a { - color: #999999; -} - -.navbar-inverse .navbar-nav > li > a:hover, -.navbar-inverse .navbar-nav > li > a:focus { - color: #ffffff; - background-color: transparent; -} - -.navbar-inverse .navbar-nav > .active > a, -.navbar-inverse .navbar-nav > .active > a:hover, -.navbar-inverse .navbar-nav > .active > a:focus { - color: #ffffff; - background-color: #080808; -} - -.navbar-inverse .navbar-nav > .disabled > a, -.navbar-inverse .navbar-nav > .disabled > a:hover, -.navbar-inverse .navbar-nav > .disabled > a:focus { - color: #444444; - background-color: transparent; -} - -.navbar-inverse .navbar-toggle { - border-color: #333333; -} - -.navbar-inverse .navbar-toggle:hover, -.navbar-inverse .navbar-toggle:focus { - background-color: #333333; -} - -.navbar-inverse .navbar-toggle .icon-bar { - background-color: #ffffff; -} - -.navbar-inverse .navbar-collapse, -.navbar-inverse .navbar-form { - border-color: #101010; -} - -.navbar-inverse .navbar-nav > .open > a, -.navbar-inverse .navbar-nav > .open > a:hover, -.navbar-inverse .navbar-nav > .open > a:focus { - color: #ffffff; - background-color: #080808; -} - -@media (max-width: 767px) { - .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { - border-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu .divider { - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { - color: #999999; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { - color: #ffffff; - background-color: transparent; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #ffffff; - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #444444; - background-color: transparent; - } -} - -.navbar-inverse .navbar-link { - color: #999999; -} - -.navbar-inverse .navbar-link:hover { - color: #ffffff; -} - -.breadcrumb { - padding: 8px 15px; - margin-bottom: 20px; - list-style: none; - background-color: #f5f5f5; - border-radius: 4px; -} - -.breadcrumb > li { - display: inline-block; -} - -.breadcrumb > li + li:before { - padding: 0 5px; - color: #cccccc; - content: "/\00a0"; -} - -.breadcrumb > .active { - color: #999999; -} - -.pagination { - display: inline-block; - padding-left: 0; - margin: 20px 0; - border-radius: 4px; -} - -.pagination > li { - display: inline; -} - -.pagination > li > a, -.pagination > li > span { - position: relative; - float: left; - padding: 6px 12px; - margin-left: -1px; - line-height: 1.428571429; - text-decoration: none; - background-color: #ffffff; - border: 1px solid #dddddd; -} - -.pagination > li:first-child > a, -.pagination > li:first-child > span { - margin-left: 0; - border-bottom-left-radius: 4px; - border-top-left-radius: 4px; -} - -.pagination > li:last-child > a, -.pagination > li:last-child > span { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -.pagination > li > a:hover, -.pagination > li > span:hover, -.pagination > li > a:focus, -.pagination > li > span:focus { - background-color: #eeeeee; -} - -.pagination > .active > a, -.pagination > .active > span, -.pagination > .active > a:hover, -.pagination > .active > span:hover, -.pagination > .active > a:focus, -.pagination > .active > span:focus { - z-index: 2; - color: #ffffff; - cursor: default; - background-color: #428bca; - border-color: #428bca; -} - -.pagination > .disabled > span, -.pagination > .disabled > span:hover, -.pagination > .disabled > span:focus, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: #999999; - cursor: not-allowed; - background-color: #ffffff; - border-color: #dddddd; -} - -.pagination-lg > li > a, -.pagination-lg > li > span { - padding: 10px 16px; - font-size: 18px; -} - -.pagination-lg > li:first-child > a, -.pagination-lg > li:first-child > span { - border-bottom-left-radius: 6px; - border-top-left-radius: 6px; -} - -.pagination-lg > li:last-child > a, -.pagination-lg > li:last-child > span { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} - -.pagination-sm > li > a, -.pagination-sm > li > span { - padding: 5px 10px; - font-size: 12px; -} - -.pagination-sm > li:first-child > a, -.pagination-sm > li:first-child > span { - border-bottom-left-radius: 3px; - border-top-left-radius: 3px; -} - -.pagination-sm > li:last-child > a, -.pagination-sm > li:last-child > span { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} - -.pager { - padding-left: 0; - margin: 20px 0; - text-align: center; - list-style: none; -} - -.pager:before, -.pager:after { - display: table; - content: " "; -} - -.pager:after { - clear: both; -} - -.pager:before, -.pager:after { - display: table; - content: " "; -} - -.pager:after { - clear: both; -} - -.pager li { - display: inline; -} - -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 15px; -} - -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} - -.pager .next > a, -.pager .next > span { - float: right; -} - -.pager .previous > a, -.pager .previous > span { - float: left; -} - -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #999999; - cursor: not-allowed; - background-color: #ffffff; -} - -.label { - display: inline; - padding: .2em .6em .3em; - font-size: 75%; - font-weight: bold; - line-height: 1; - color: #ffffff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; -} - -.label[href]:hover, -.label[href]:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} - -.label:empty { - display: none; -} - -.btn .label { - position: relative; - top: -1px; -} - -.label-default { - background-color: #999999; -} - -.label-default[href]:hover, -.label-default[href]:focus { - background-color: #808080; -} - -.label-primary { - background-color: #428bca; -} - -.label-primary[href]:hover, -.label-primary[href]:focus { - background-color: #3071a9; -} - -.label-success { - background-color: #5cb85c; -} - -.label-success[href]:hover, -.label-success[href]:focus { - background-color: #449d44; -} - -.label-info { - background-color: #5bc0de; -} - -.label-info[href]:hover, -.label-info[href]:focus { - background-color: #31b0d5; -} - -.label-warning { - background-color: #f0ad4e; -} - -.label-warning[href]:hover, -.label-warning[href]:focus { - background-color: #ec971f; -} - -.label-danger { - background-color: #d9534f; -} - -.label-danger[href]:hover, -.label-danger[href]:focus { - background-color: #c9302c; -} - -.badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: 12px; - font-weight: bold; - line-height: 1; - color: #ffffff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - background-color: #999999; - border-radius: 10px; -} - -.badge:empty { - display: none; -} - -.btn .badge { - position: relative; - top: -1px; -} - -a.badge:hover, -a.badge:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} - -a.list-group-item.active > .badge, -.nav-pills > .active > a > .badge { - color: #428bca; - background-color: #ffffff; -} - -.nav-pills > li > a > .badge { - margin-left: 3px; -} - -.jumbotron { - padding: 30px; - margin-bottom: 30px; - font-size: 21px; - font-weight: 200; - line-height: 2.1428571435; - color: inherit; - background-color: #eeeeee; -} - -.jumbotron h1, -.jumbotron .h1 { - line-height: 1; - color: inherit; -} - -.jumbotron p { - line-height: 1.4; -} - -.container .jumbotron { - border-radius: 6px; -} - -.jumbotron .container { - max-width: 100%; -} - -@media screen and (min-width: 768px) { - .jumbotron { - padding-top: 48px; - padding-bottom: 48px; - } - .container .jumbotron { - padding-right: 60px; - padding-left: 60px; - } - .jumbotron h1, - .jumbotron .h1 { - font-size: 63px; - } -} - -.thumbnail { - display: block; - padding: 4px; - margin-bottom: 20px; - line-height: 1.428571429; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 4px; - -webkit-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} - -.thumbnail > img, -.thumbnail a > img { - display: block; - height: auto; - max-width: 100%; - margin-right: auto; - margin-left: auto; -} - -a.thumbnail:hover, -a.thumbnail:focus, -a.thumbnail.active { - border-color: #428bca; -} - -.thumbnail .caption { - padding: 9px; - color: #333333; -} - -.alert { - padding: 15px; - margin-bottom: 20px; - border: 1px solid transparent; - border-radius: 4px; -} - -.alert h4 { - margin-top: 0; - color: inherit; -} - -.alert .alert-link { - font-weight: bold; -} - -.alert > p, -.alert > ul { - margin-bottom: 0; -} - -.alert > p + p { - margin-top: 5px; -} - -.alert-dismissable { - padding-right: 35px; -} - -.alert-dismissable .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} - -.alert-success { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.alert-success hr { - border-top-color: #c9e2b3; -} - -.alert-success .alert-link { - color: #2b542c; -} - -.alert-info { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.alert-info hr { - border-top-color: #a6e1ec; -} - -.alert-info .alert-link { - color: #245269; -} - -.alert-warning { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} - -.alert-warning hr { - border-top-color: #f7e1b5; -} - -.alert-warning .alert-link { - color: #66512c; -} - -.alert-danger { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} - -.alert-danger hr { - border-top-color: #e4b9c0; -} - -.alert-danger .alert-link { - color: #843534; -} - -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f5f5f5; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} - -.progress-bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - line-height: 20px; - color: #ffffff; - text-align: center; - background-color: #428bca; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-transition: width 0.6s ease; - transition: width 0.6s ease; -} - -.progress-striped .progress-bar { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: 40px 40px; -} - -.progress.active .progress-bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} - -.progress-bar-success { - background-color: #5cb85c; -} - -.progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-bar-info { - background-color: #5bc0de; -} - -.progress-striped .progress-bar-info { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-bar-warning { - background-color: #f0ad4e; -} - -.progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-bar-danger { - background-color: #d9534f; -} - -.progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.media, -.media-body { - overflow: hidden; - zoom: 1; -} - -.media, -.media .media { - margin-top: 15px; -} - -.media:first-child { - margin-top: 0; -} - -.media-object { - display: block; -} - -.media-heading { - margin: 0 0 5px; -} - -.media > .pull-left { - margin-right: 10px; -} - -.media > .pull-right { - margin-left: 10px; -} - -.media-list { - padding-left: 0; - list-style: none; -} - -.list-group { - padding-left: 0; - margin-bottom: 20px; -} - -.list-group-item { - position: relative; - display: block; - padding: 10px 15px; - margin-bottom: -1px; - background-color: #ffffff; - border: 1px solid #dddddd; -} - -.list-group-item:first-child { - border-top-right-radius: 4px; - border-top-left-radius: 4px; -} - -.list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} - -.list-group-item > .badge { - float: right; -} - -.list-group-item > .badge + .badge { - margin-right: 5px; -} - -a.list-group-item { - color: #555555; -} - -a.list-group-item .list-group-item-heading { - color: #333333; -} - -a.list-group-item:hover, -a.list-group-item:focus { - text-decoration: none; - background-color: #f5f5f5; -} - -a.list-group-item.active, -a.list-group-item.active:hover, -a.list-group-item.active:focus { - z-index: 2; - color: #ffffff; - background-color: #428bca; - border-color: #428bca; -} - -a.list-group-item.active .list-group-item-heading, -a.list-group-item.active:hover .list-group-item-heading, -a.list-group-item.active:focus .list-group-item-heading { - color: inherit; -} - -a.list-group-item.active .list-group-item-text, -a.list-group-item.active:hover .list-group-item-text, -a.list-group-item.active:focus .list-group-item-text { - color: #e1edf7; -} - -.list-group-item-heading { - margin-top: 0; - margin-bottom: 5px; -} - -.list-group-item-text { - margin-bottom: 0; - line-height: 1.3; -} - -.panel { - margin-bottom: 20px; - background-color: #ffffff; - border: 1px solid transparent; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); -} - -.panel-body { - padding: 15px; -} - -.panel-body:before, -.panel-body:after { - display: table; - content: " "; -} - -.panel-body:after { - clear: both; -} - -.panel-body:before, -.panel-body:after { - display: table; - content: " "; -} - -.panel-body:after { - clear: both; -} - -.panel > .list-group { - margin-bottom: 0; -} - -.panel > .list-group .list-group-item { - border-width: 1px 0; -} - -.panel > .list-group .list-group-item:first-child { - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -.panel > .list-group .list-group-item:last-child { - border-bottom: 0; -} - -.panel-heading + .list-group .list-group-item:first-child { - border-top-width: 0; -} - -.panel > .table, -.panel > .table-responsive > .table { - margin-bottom: 0; -} - -.panel > .panel-body + .table, -.panel > .panel-body + .table-responsive { - border-top: 1px solid #dddddd; -} - -.panel > .table > tbody:first-child th, -.panel > .table > tbody:first-child td { - border-top: 0; -} - -.panel > .table-bordered, -.panel > .table-responsive > .table-bordered { - border: 0; -} - -.panel > .table-bordered > thead > tr > th:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, -.panel > .table-bordered > tbody > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, -.panel > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-bordered > thead > tr > td:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, -.panel > .table-bordered > tbody > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, -.panel > .table-bordered > tfoot > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; -} - -.panel > .table-bordered > thead > tr > th:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, -.panel > .table-bordered > tbody > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, -.panel > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-bordered > thead > tr > td:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, -.panel > .table-bordered > tbody > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, -.panel > .table-bordered > tfoot > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; -} - -.panel > .table-bordered > thead > tr:last-child > th, -.panel > .table-responsive > .table-bordered > thead > tr:last-child > th, -.panel > .table-bordered > tbody > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, -.panel > .table-bordered > tfoot > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th, -.panel > .table-bordered > thead > tr:last-child > td, -.panel > .table-responsive > .table-bordered > thead > tr:last-child > td, -.panel > .table-bordered > tbody > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, -.panel > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td { - border-bottom: 0; -} - -.panel > .table-responsive { - margin-bottom: 0; - border: 0; -} - -.panel-heading { - padding: 10px 15px; - border-bottom: 1px solid transparent; - border-top-right-radius: 3px; - border-top-left-radius: 3px; -} - -.panel-heading > .dropdown .dropdown-toggle { - color: inherit; -} - -.panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: 16px; - color: inherit; -} - -.panel-title > a { - color: inherit; -} - -.panel-footer { - padding: 10px 15px; - background-color: #f5f5f5; - border-top: 1px solid #dddddd; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} - -.panel-group .panel { - margin-bottom: 0; - overflow: hidden; - border-radius: 4px; -} - -.panel-group .panel + .panel { - margin-top: 5px; -} - -.panel-group .panel-heading { - border-bottom: 0; -} - -.panel-group .panel-heading + .panel-collapse .panel-body { - border-top: 1px solid #dddddd; -} - -.panel-group .panel-footer { - border-top: 0; -} - -.panel-group .panel-footer + .panel-collapse .panel-body { - border-bottom: 1px solid #dddddd; -} - -.panel-default { - border-color: #dddddd; -} - -.panel-default > .panel-heading { - color: #333333; - background-color: #f5f5f5; - border-color: #dddddd; -} - -.panel-default > .panel-heading + .panel-collapse .panel-body { - border-top-color: #dddddd; -} - -.panel-default > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #dddddd; -} - -.panel-primary { - border-color: #428bca; -} - -.panel-primary > .panel-heading { - color: #ffffff; - background-color: #428bca; - border-color: #428bca; -} - -.panel-primary > .panel-heading + .panel-collapse .panel-body { - border-top-color: #428bca; -} - -.panel-primary > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #428bca; -} - -.panel-success { - border-color: #d6e9c6; -} - -.panel-success > .panel-heading { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.panel-success > .panel-heading + .panel-collapse .panel-body { - border-top-color: #d6e9c6; -} - -.panel-success > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #d6e9c6; -} - -.panel-warning { - border-color: #faebcc; -} - -.panel-warning > .panel-heading { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} - -.panel-warning > .panel-heading + .panel-collapse .panel-body { - border-top-color: #faebcc; -} - -.panel-warning > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #faebcc; -} - -.panel-danger { - border-color: #ebccd1; -} - -.panel-danger > .panel-heading { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} - -.panel-danger > .panel-heading + .panel-collapse .panel-body { - border-top-color: #ebccd1; -} - -.panel-danger > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #ebccd1; -} - -.panel-info { - border-color: #bce8f1; -} - -.panel-info > .panel-heading { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.panel-info > .panel-heading + .panel-collapse .panel-body { - border-top-color: #bce8f1; -} - -.panel-info > .panel-footer + .panel-collapse .panel-body { - border-bottom-color: #bce8f1; -} - -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} - -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} - -.well-lg { - padding: 24px; - border-radius: 6px; -} - -.well-sm { - padding: 9px; - border-radius: 3px; -} - -.close { - float: right; - font-size: 21px; - font-weight: bold; - line-height: 1; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} - -.close:hover, -.close:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.5; - filter: alpha(opacity=50); -} - -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - -.modal-open { - overflow: hidden; -} - -.modal { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - display: none; - overflow: auto; - overflow-y: scroll; -} - -.modal.fade .modal-dialog { - -webkit-transform: translate(0, -25%); - -ms-transform: translate(0, -25%); - transform: translate(0, -25%); - -webkit-transition: -webkit-transform 0.3s ease-out; - -moz-transition: -moz-transform 0.3s ease-out; - -o-transition: -o-transform 0.3s ease-out; - transition: transform 0.3s ease-out; -} - -.modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); -} - -.modal-dialog { - position: relative; - z-index: 1050; - width: auto; - margin: 10px; -} - -.modal-content { - position: relative; - background-color: #ffffff; - border: 1px solid #999999; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 6px; - outline: none; - -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - background-clip: padding-box; -} - -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1030; - background-color: #000000; -} - -.modal-backdrop.fade { - opacity: 0; - filter: alpha(opacity=0); -} - -.modal-backdrop.in { - opacity: 0.5; - filter: alpha(opacity=50); -} - -.modal-header { - min-height: 16.428571429px; - padding: 15px; - border-bottom: 1px solid #e5e5e5; -} - -.modal-header .close { - margin-top: -2px; -} - -.modal-title { - margin: 0; - line-height: 1.428571429; -} - -.modal-body { - position: relative; - padding: 20px; -} - -.modal-footer { - padding: 19px 20px 20px; - margin-top: 15px; - text-align: right; - border-top: 1px solid #e5e5e5; -} - -.modal-footer:before, -.modal-footer:after { - display: table; - content: " "; -} - -.modal-footer:after { - clear: both; -} - -.modal-footer:before, -.modal-footer:after { - display: table; - content: " "; -} - -.modal-footer:after { - clear: both; -} - -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} - -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} - -@media screen and (min-width: 768px) { - .modal-dialog { - width: 600px; - margin: 30px auto; - } - .modal-content { - -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - } -} - -.tooltip { - position: absolute; - z-index: 1030; - display: block; - font-size: 12px; - line-height: 1.4; - opacity: 0; - filter: alpha(opacity=0); - visibility: visible; -} - -.tooltip.in { - opacity: 0.9; - filter: alpha(opacity=90); -} - -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} - -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} - -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} - -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} - -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: #000000; - border-radius: 4px; -} - -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-top-color: #000000; - border-width: 5px 5px 0; -} - -.tooltip.top-left .tooltip-arrow { - bottom: 0; - left: 5px; - border-top-color: #000000; - border-width: 5px 5px 0; -} - -.tooltip.top-right .tooltip-arrow { - right: 5px; - bottom: 0; - border-top-color: #000000; - border-width: 5px 5px 0; -} - -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-right-color: #000000; - border-width: 5px 5px 5px 0; -} - -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-left-color: #000000; - border-width: 5px 0 5px 5px; -} - -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-bottom-color: #000000; - border-width: 0 5px 5px; -} - -.tooltip.bottom-left .tooltip-arrow { - top: 0; - left: 5px; - border-bottom-color: #000000; - border-width: 0 5px 5px; -} - -.tooltip.bottom-right .tooltip-arrow { - top: 0; - right: 5px; - border-bottom-color: #000000; - border-width: 0 5px 5px; -} - -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - max-width: 276px; - padding: 1px; - text-align: left; - white-space: normal; - background-color: #ffffff; - border: 1px solid #cccccc; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - background-clip: padding-box; -} - -.popover.top { - margin-top: -10px; -} - -.popover.right { - margin-left: 10px; -} - -.popover.bottom { - margin-top: 10px; -} - -.popover.left { - margin-left: -10px; -} - -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - font-weight: normal; - line-height: 18px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 5px 5px 0 0; -} - -.popover-content { - padding: 9px 14px; -} - -.popover .arrow, -.popover .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.popover .arrow { - border-width: 11px; -} - -.popover .arrow:after { - border-width: 10px; - content: ""; -} - -.popover.top .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999999; - border-top-color: rgba(0, 0, 0, 0.25); - border-bottom-width: 0; -} - -.popover.top .arrow:after { - bottom: 1px; - margin-left: -10px; - border-top-color: #ffffff; - border-bottom-width: 0; - content: " "; -} - -.popover.right .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999999; - border-right-color: rgba(0, 0, 0, 0.25); - border-left-width: 0; -} - -.popover.right .arrow:after { - bottom: -10px; - left: 1px; - border-right-color: #ffffff; - border-left-width: 0; - content: " "; -} - -.popover.bottom .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-bottom-color: #999999; - border-bottom-color: rgba(0, 0, 0, 0.25); - border-top-width: 0; -} - -.popover.bottom .arrow:after { - top: 1px; - margin-left: -10px; - border-bottom-color: #ffffff; - border-top-width: 0; - content: " "; -} - -.popover.left .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-left-color: #999999; - border-left-color: rgba(0, 0, 0, 0.25); - border-right-width: 0; -} - -.popover.left .arrow:after { - right: 1px; - bottom: -10px; - border-left-color: #ffffff; - border-right-width: 0; - content: " "; -} - -.carousel { - position: relative; -} - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} - -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} - -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - height: auto; - max-width: 100%; - line-height: 1; -} - -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} - -.carousel-inner > .active { - left: 0; -} - -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} - -.carousel-inner > .next { - left: 100%; -} - -.carousel-inner > .prev { - left: -100%; -} - -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} - -.carousel-inner > .active.left { - left: -100%; -} - -.carousel-inner > .active.right { - left: 100%; -} - -.carousel-control { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 15%; - font-size: 20px; - color: #ffffff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); - opacity: 0.5; - filter: alpha(opacity=50); -} - -.carousel-control.left { - background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0), color-stop(rgba(0, 0, 0, 0.0001) 100%)); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); -} - -.carousel-control.right { - right: 0; - left: auto; - background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0), color-stop(rgba(0, 0, 0, 0.5) 100%)); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); -} - -.carousel-control:hover, -.carousel-control:focus { - color: #ffffff; - text-decoration: none; - outline: none; - opacity: 0.9; - filter: alpha(opacity=90); -} - -.carousel-control .icon-prev, -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-left, -.carousel-control .glyphicon-chevron-right { - position: absolute; - top: 50%; - z-index: 5; - display: inline-block; -} - -.carousel-control .icon-prev, -.carousel-control .glyphicon-chevron-left { - left: 50%; -} - -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-right { - right: 50%; -} - -.carousel-control .icon-prev, -.carousel-control .icon-next { - width: 20px; - height: 20px; - margin-top: -10px; - margin-left: -10px; - font-family: serif; -} - -.carousel-control .icon-prev:before { - content: '\2039'; -} - -.carousel-control .icon-next:before { - content: '\203a'; -} - -.carousel-indicators { - position: absolute; - bottom: 10px; - left: 50%; - z-index: 15; - width: 60%; - padding-left: 0; - margin-left: -30%; - text-align: center; - list-style: none; -} - -.carousel-indicators li { - display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - cursor: pointer; - background-color: #000 \9; - background-color: rgba(0, 0, 0, 0); - border: 1px solid #ffffff; - border-radius: 10px; -} - -.carousel-indicators .active { - width: 12px; - height: 12px; - margin: 0; - background-color: #ffffff; -} - -.carousel-caption { - position: absolute; - right: 15%; - bottom: 20px; - left: 15%; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: #ffffff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); -} - -.carousel-caption .btn { - text-shadow: none; -} - -@media screen and (min-width: 768px) { - .carousel-control .glyphicons-chevron-left, - .carousel-control .glyphicons-chevron-right, - .carousel-control .icon-prev, - .carousel-control .icon-next { - width: 30px; - height: 30px; - margin-top: -15px; - margin-left: -15px; - font-size: 30px; - } - .carousel-caption { - right: 20%; - left: 20%; - padding-bottom: 30px; - } - .carousel-indicators { - bottom: 20px; - } -} - -.clearfix:before, -.clearfix:after { - display: table; - content: " "; -} - -.clearfix:after { - clear: both; -} - -.center-block { - display: block; - margin-right: auto; - margin-left: auto; -} - -.pull-right { - float: right !important; -} - -.pull-left { - float: left !important; -} - -.hide { - display: none !important; -} - -.show { - display: block !important; -} - -.invisible { - visibility: hidden; -} - -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.hidden { - display: none !important; - visibility: hidden !important; -} - -.affix { - position: fixed; -} - -@-ms-viewport { - width: device-width; -} - -.visible-xs, -tr.visible-xs, -th.visible-xs, -td.visible-xs { - display: none !important; -} - -@media (max-width: 767px) { - .visible-xs { - display: block !important; - } - table.visible-xs { - display: table; - } - tr.visible-xs { - display: table-row !important; - } - th.visible-xs, - td.visible-xs { - display: table-cell !important; - } -} - -@media (min-width: 768px) and (max-width: 991px) { - .visible-xs.visible-sm { - display: block !important; - } - table.visible-xs.visible-sm { - display: table; - } - tr.visible-xs.visible-sm { - display: table-row !important; - } - th.visible-xs.visible-sm, - td.visible-xs.visible-sm { - display: table-cell !important; - } -} - -@media (min-width: 992px) and (max-width: 1199px) { - .visible-xs.visible-md { - display: block !important; - } - table.visible-xs.visible-md { - display: table; - } - tr.visible-xs.visible-md { - display: table-row !important; - } - th.visible-xs.visible-md, - td.visible-xs.visible-md { - display: table-cell !important; - } -} - -@media (min-width: 1200px) { - .visible-xs.visible-lg { - display: block !important; - } - table.visible-xs.visible-lg { - display: table; - } - tr.visible-xs.visible-lg { - display: table-row !important; - } - th.visible-xs.visible-lg, - td.visible-xs.visible-lg { - display: table-cell !important; - } -} - -.visible-sm, -tr.visible-sm, -th.visible-sm, -td.visible-sm { - display: none !important; -} - -@media (max-width: 767px) { - .visible-sm.visible-xs { - display: block !important; - } - table.visible-sm.visible-xs { - display: table; - } - tr.visible-sm.visible-xs { - display: table-row !important; - } - th.visible-sm.visible-xs, - td.visible-sm.visible-xs { - display: table-cell !important; - } -} - -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm { - display: block !important; - } - table.visible-sm { - display: table; - } - tr.visible-sm { - display: table-row !important; - } - th.visible-sm, - td.visible-sm { - display: table-cell !important; - } -} - -@media (min-width: 992px) and (max-width: 1199px) { - .visible-sm.visible-md { - display: block !important; - } - table.visible-sm.visible-md { - display: table; - } - tr.visible-sm.visible-md { - display: table-row !important; - } - th.visible-sm.visible-md, - td.visible-sm.visible-md { - display: table-cell !important; - } -} - -@media (min-width: 1200px) { - .visible-sm.visible-lg { - display: block !important; - } - table.visible-sm.visible-lg { - display: table; - } - tr.visible-sm.visible-lg { - display: table-row !important; - } - th.visible-sm.visible-lg, - td.visible-sm.visible-lg { - display: table-cell !important; - } -} - -.visible-md, -tr.visible-md, -th.visible-md, -td.visible-md { - display: none !important; -} - -@media (max-width: 767px) { - .visible-md.visible-xs { - display: block !important; - } - table.visible-md.visible-xs { - display: table; - } - tr.visible-md.visible-xs { - display: table-row !important; - } - th.visible-md.visible-xs, - td.visible-md.visible-xs { - display: table-cell !important; - } -} - -@media (min-width: 768px) and (max-width: 991px) { - .visible-md.visible-sm { - display: block !important; - } - table.visible-md.visible-sm { - display: table; - } - tr.visible-md.visible-sm { - display: table-row !important; - } - th.visible-md.visible-sm, - td.visible-md.visible-sm { - display: table-cell !important; - } -} - -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md { - display: block !important; - } - table.visible-md { - display: table; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } -} - -@media (min-width: 1200px) { - .visible-md.visible-lg { - display: block !important; - } - table.visible-md.visible-lg { - display: table; - } - tr.visible-md.visible-lg { - display: table-row !important; - } - th.visible-md.visible-lg, - td.visible-md.visible-lg { - display: table-cell !important; - } -} - -.visible-lg, -tr.visible-lg, -th.visible-lg, -td.visible-lg { - display: none !important; -} - -@media (max-width: 767px) { - .visible-lg.visible-xs { - display: block !important; - } - table.visible-lg.visible-xs { - display: table; - } - tr.visible-lg.visible-xs { - display: table-row !important; - } - th.visible-lg.visible-xs, - td.visible-lg.visible-xs { - display: table-cell !important; - } -} - -@media (min-width: 768px) and (max-width: 991px) { - .visible-lg.visible-sm { - display: block !important; - } - table.visible-lg.visible-sm { - display: table; - } - tr.visible-lg.visible-sm { - display: table-row !important; - } - th.visible-lg.visible-sm, - td.visible-lg.visible-sm { - display: table-cell !important; - } -} - -@media (min-width: 992px) and (max-width: 1199px) { - .visible-lg.visible-md { - display: block !important; - } - table.visible-lg.visible-md { - display: table; - } - tr.visible-lg.visible-md { - display: table-row !important; - } - th.visible-lg.visible-md, - td.visible-lg.visible-md { - display: table-cell !important; - } -} - -@media (min-width: 1200px) { - .visible-lg { - display: block !important; - } - table.visible-lg { - display: table; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } -} - -.hidden-xs { - display: block !important; -} - -table.hidden-xs { - display: table; -} - -tr.hidden-xs { - display: table-row !important; -} - -th.hidden-xs, -td.hidden-xs { - display: table-cell !important; -} - -@media (max-width: 767px) { - .hidden-xs, - tr.hidden-xs, - th.hidden-xs, - td.hidden-xs { - display: none !important; - } -} - -@media (min-width: 768px) and (max-width: 991px) { - .hidden-xs.hidden-sm, - tr.hidden-xs.hidden-sm, - th.hidden-xs.hidden-sm, - td.hidden-xs.hidden-sm { - display: none !important; - } -} - -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-xs.hidden-md, - tr.hidden-xs.hidden-md, - th.hidden-xs.hidden-md, - td.hidden-xs.hidden-md { - display: none !important; - } -} - -@media (min-width: 1200px) { - .hidden-xs.hidden-lg, - tr.hidden-xs.hidden-lg, - th.hidden-xs.hidden-lg, - td.hidden-xs.hidden-lg { - display: none !important; - } -} - -.hidden-sm { - display: block !important; -} - -table.hidden-sm { - display: table; -} - -tr.hidden-sm { - display: table-row !important; -} - -th.hidden-sm, -td.hidden-sm { - display: table-cell !important; -} - -@media (max-width: 767px) { - .hidden-sm.hidden-xs, - tr.hidden-sm.hidden-xs, - th.hidden-sm.hidden-xs, - td.hidden-sm.hidden-xs { - display: none !important; - } -} - -@media (min-width: 768px) and (max-width: 991px) { - .hidden-sm, - tr.hidden-sm, - th.hidden-sm, - td.hidden-sm { - display: none !important; - } -} - -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-sm.hidden-md, - tr.hidden-sm.hidden-md, - th.hidden-sm.hidden-md, - td.hidden-sm.hidden-md { - display: none !important; - } -} - -@media (min-width: 1200px) { - .hidden-sm.hidden-lg, - tr.hidden-sm.hidden-lg, - th.hidden-sm.hidden-lg, - td.hidden-sm.hidden-lg { - display: none !important; - } -} - -.hidden-md { - display: block !important; -} - -table.hidden-md { - display: table; -} - -tr.hidden-md { - display: table-row !important; -} - -th.hidden-md, -td.hidden-md { - display: table-cell !important; -} - -@media (max-width: 767px) { - .hidden-md.hidden-xs, - tr.hidden-md.hidden-xs, - th.hidden-md.hidden-xs, - td.hidden-md.hidden-xs { - display: none !important; - } -} - -@media (min-width: 768px) and (max-width: 991px) { - .hidden-md.hidden-sm, - tr.hidden-md.hidden-sm, - th.hidden-md.hidden-sm, - td.hidden-md.hidden-sm { - display: none !important; - } -} - -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md, - tr.hidden-md, - th.hidden-md, - td.hidden-md { - display: none !important; - } -} - -@media (min-width: 1200px) { - .hidden-md.hidden-lg, - tr.hidden-md.hidden-lg, - th.hidden-md.hidden-lg, - td.hidden-md.hidden-lg { - display: none !important; - } -} - -.hidden-lg { - display: block !important; -} - -table.hidden-lg { - display: table; -} - -tr.hidden-lg { - display: table-row !important; -} - -th.hidden-lg, -td.hidden-lg { - display: table-cell !important; -} - -@media (max-width: 767px) { - .hidden-lg.hidden-xs, - tr.hidden-lg.hidden-xs, - th.hidden-lg.hidden-xs, - td.hidden-lg.hidden-xs { - display: none !important; - } -} - -@media (min-width: 768px) and (max-width: 991px) { - .hidden-lg.hidden-sm, - tr.hidden-lg.hidden-sm, - th.hidden-lg.hidden-sm, - td.hidden-lg.hidden-sm { - display: none !important; - } -} - -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-lg.hidden-md, - tr.hidden-lg.hidden-md, - th.hidden-lg.hidden-md, - td.hidden-lg.hidden-md { - display: none !important; - } -} - -@media (min-width: 1200px) { - .hidden-lg, - tr.hidden-lg, - th.hidden-lg, - td.hidden-lg { - display: none !important; - } -} - -.visible-print, -tr.visible-print, -th.visible-print, -td.visible-print { - display: none !important; -} - -@media print { - .visible-print { - display: block !important; - } - table.visible-print { - display: table; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } - .hidden-print, - tr.hidden-print, - th.hidden-print, - td.hidden-print { - display: none !important; - } -} \ No newline at end of file diff --git a/examples/css/bootstrap.min.css b/examples/css/bootstrap.min.css new file mode 100644 index 00000000..2c8a80df --- /dev/null +++ b/examples/css/bootstrap.min.css @@ -0,0 +1,366 @@ +html,body{margin:0;padding:0;} +h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;} +table{border-collapse:collapse;border-spacing:0;} +ol,ul{list-style:none;} +q:before,q:after,blockquote:before,blockquote:after{content:"";} +html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} +a:focus{outline:thin dotted;} +a:hover,a:active{outline:0;} +article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} +audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} +audio:not([controls]){display:none;} +sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;} +sup{top:-0.5em;} +sub{bottom:-0.25em;} +img{border:0;-ms-interpolation-mode:bicubic;} +button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;} +button,input{line-height:normal;*overflow:visible;} +button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;} +button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} +input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;} +input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;} +textarea{overflow:auto;vertical-align:top;} +body{background-color:#ffffff;margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;} +.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;} +.container:after{clear:both;} +.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;} +.container-fluid:after{clear:both;} +.container-fluid>.sidebar{position:absolute;top:0;left:20px;width:220px;} +.container-fluid>.content{margin-left:240px;} +a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;} +.pull-right{float:right;} +.pull-left{float:left;} +.hide{display:none;} +.show{display:block;} +.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;} +.row:after{clear:both;} +.row>[class*="span"]{display:inline;float:left;margin-left:20px;} +.span1{width:40px;} +.span2{width:100px;} +.span3{width:160px;} +.span4{width:220px;} +.span5{width:280px;} +.span6{width:340px;} +.span7{width:400px;} +.span8{width:460px;} +.span9{width:520px;} +.span10{width:580px;} +.span11{width:640px;} +.span12{width:700px;} +.span13{width:760px;} +.span14{width:820px;} +.span15{width:880px;} +.span16{width:940px;} +.span17{width:1000px;} +.span18{width:1060px;} +.span19{width:1120px;} +.span20{width:1180px;} +.span21{width:1240px;} +.span22{width:1300px;} +.span23{width:1360px;} +.span24{width:1420px;} +.row>.offset1{margin-left:80px;} +.row>.offset2{margin-left:140px;} +.row>.offset3{margin-left:200px;} +.row>.offset4{margin-left:260px;} +.row>.offset5{margin-left:320px;} +.row>.offset6{margin-left:380px;} +.row>.offset7{margin-left:440px;} +.row>.offset8{margin-left:500px;} +.row>.offset9{margin-left:560px;} +.row>.offset10{margin-left:620px;} +.row>.offset11{margin-left:680px;} +.row>.offset12{margin-left:740px;} +.span-one-third{width:300px;} +.span-two-thirds{width:620px;} +.row>.offset-one-third{margin-left:340px;} +.row>.offset-two-thirds{margin-left:660px;} +p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;} +h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;} +h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;} +h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;} +h3,h4,h5,h6{line-height:36px;} +h3{font-size:18px;}h3 small{font-size:14px;} +h4{font-size:16px;}h4 small{font-size:12px;} +h5{font-size:14px;} +h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;} +ul,ol{margin:0 0 18px 25px;} +ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} +ul{list-style:disc;} +ol{list-style:decimal;} +li{line-height:18px;color:#808080;} +ul.unstyled{list-style:none;margin-left:0;} +dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;} +dl dt{font-weight:bold;} +dl dd{margin-left:9px;} +hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;} +strong{font-style:inherit;font-weight:bold;} +em{font-style:italic;font-weight:inherit;line-height:inherit;} +.muted{color:#bfbfbf;} +blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;} +blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';} +address{display:block;line-height:18px;margin-bottom:18px;} +code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +code{background-color:#fee9cc;color:rgba(0, 0, 0, 0.75);padding:1px 3px;} +pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word;} +form{margin-bottom:18px;} +fieldset{margin-bottom:18px;padding-top:18px;}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5;} +form .clearfix{margin-bottom:18px;zoom:1;}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1;} +form .clearfix:after{clear:both;} +label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;} +label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;} +form .input{margin-left:150px;} +input[type=checkbox],input[type=radio]{cursor:pointer;} +input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +select{padding:initial;} +input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none;} +input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;} +select,input[type=file]{height:27px;*height:auto;line-height:27px;*margin-top:4px;} +select[multiple]{height:inherit;background-color:#ffffff;} +textarea{height:auto;} +.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;} +:-moz-placeholder{color:#bfbfbf;} +::-webkit-input-placeholder{color:#bfbfbf;} +input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);} +input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);} +input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;} +form .clearfix.error>label,form .clearfix.error .help-block,form .clearfix.error .help-inline{color:#b94a48;} +form .clearfix.error input,form .clearfix.error textarea{color:#b94a48;border-color:#ee5f5b;}form .clearfix.error input:focus,form .clearfix.error textarea:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;} +form .clearfix.error .input-prepend .add-on,form .clearfix.error .input-append .add-on{color:#b94a48;background-color:#fce6e6;border-color:#b94a48;} +form .clearfix.warning>label,form .clearfix.warning .help-block,form .clearfix.warning .help-inline{color:#c09853;} +form .clearfix.warning input,form .clearfix.warning textarea{color:#c09853;border-color:#ccae64;}form .clearfix.warning input:focus,form .clearfix.warning textarea:focus{border-color:#be9a3f;-webkit-box-shadow:0 0 6px #e5d6b1;-moz-box-shadow:0 0 6px #e5d6b1;box-shadow:0 0 6px #e5d6b1;} +form .clearfix.warning .input-prepend .add-on,form .clearfix.warning .input-append .add-on{color:#c09853;background-color:#d2b877;border-color:#c09853;} +form .clearfix.success>label,form .clearfix.success .help-block,form .clearfix.success .help-inline{color:#468847;} +form .clearfix.success input,form .clearfix.success textarea{color:#468847;border-color:#57a957;}form .clearfix.success input:focus,form .clearfix.success textarea:focus{border-color:#458845;-webkit-box-shadow:0 0 6px #9acc9a;-moz-box-shadow:0 0 6px #9acc9a;box-shadow:0 0 6px #9acc9a;} +form .clearfix.success .input-prepend .add-on,form .clearfix.success .input-append .add-on{color:#468847;background-color:#bcddbc;border-color:#468847;} +.input-mini,input.mini,textarea.mini,select.mini{width:60px;} +.input-small,input.small,textarea.small,select.small{width:90px;} +.input-medium,input.medium,textarea.medium,select.medium{width:150px;} +.input-large,input.large,textarea.large,select.large{width:210px;} +.input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;} +.input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;} +textarea.xxlarge{overflow-y:auto;} +input.span1,textarea.span1{display:inline-block;float:none;width:30px;margin-left:0;} +input.span2,textarea.span2{display:inline-block;float:none;width:90px;margin-left:0;} +input.span3,textarea.span3{display:inline-block;float:none;width:150px;margin-left:0;} +input.span4,textarea.span4{display:inline-block;float:none;width:210px;margin-left:0;} +input.span5,textarea.span5{display:inline-block;float:none;width:270px;margin-left:0;} +input.span6,textarea.span6{display:inline-block;float:none;width:330px;margin-left:0;} +input.span7,textarea.span7{display:inline-block;float:none;width:390px;margin-left:0;} +input.span8,textarea.span8{display:inline-block;float:none;width:450px;margin-left:0;} +input.span9,textarea.span9{display:inline-block;float:none;width:510px;margin-left:0;} +input.span10,textarea.span10{display:inline-block;float:none;width:570px;margin-left:0;} +input.span11,textarea.span11{display:inline-block;float:none;width:630px;margin-left:0;} +input.span12,textarea.span12{display:inline-block;float:none;width:690px;margin-left:0;} +input.span13,textarea.span13{display:inline-block;float:none;width:750px;margin-left:0;} +input.span14,textarea.span14{display:inline-block;float:none;width:810px;margin-left:0;} +input.span15,textarea.span15{display:inline-block;float:none;width:870px;margin-left:0;} +input.span16,textarea.span16{display:inline-block;float:none;width:930px;margin-left:0;} +input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;} +.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;} +.help-inline,.help-block{font-size:13px;line-height:18px;color:#bfbfbf;} +.help-inline{padding-left:5px;*position:relative;*top:-5px;} +.help-block{display:block;max-width:600px;} +.inline-inputs{color:#808080;}.inline-inputs span{padding:0 2px 0 1px;} +.input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} +.input-prepend .add-on,.input-append .add-on{position:relative;background:#f5f5f5;border:1px solid #ccc;z-index:2;float:left;display:block;width:auto;min-width:16px;height:18px;padding:4px 4px 4px 5px;margin-right:-1px;font-weight:normal;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0 #ffffff;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.input-prepend .active,.input-append .active{background:#a9dba9;border-color:#46a546;} +.input-prepend .add-on{*margin-top:1px;} +.input-append input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.input-append .add-on{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:0;margin-left:-1px;} +.inputs-list{margin:0 0 5px;width:100%;}.inputs-list li{display:block;padding:0;width:100%;} +.inputs-list label{display:block;float:none;width:auto;padding:0;margin-left:20px;line-height:18px;text-align:left;white-space:normal;}.inputs-list label strong{color:#808080;} +.inputs-list label small{font-size:11px;font-weight:normal;} +.inputs-list .inputs-list{margin-left:25px;margin-bottom:10px;padding-top:0;} +.inputs-list:first-child{padding-top:6px;} +.inputs-list li+li{padding-top:2px;} +.inputs-list input[type=radio],.inputs-list input[type=checkbox]{margin-bottom:0;margin-left:-20px;float:left;} +.form-stacked{padding-left:20px;}.form-stacked fieldset{padding-top:9px;} +.form-stacked legend{padding-left:0;} +.form-stacked label{display:block;float:none;width:auto;font-weight:bold;text-align:left;line-height:20px;padding-top:0;} +.form-stacked .clearfix{margin-bottom:9px;}.form-stacked .clearfix div.input{margin-left:0;} +.form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;} +.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;} +.form-stacked .actions{margin-left:-20px;padding-left:20px;} +table{width:100%;margin-bottom:18px;padding:0;font-size:13px;border-collapse:collapse;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;} +table th{padding-top:9px;font-weight:bold;vertical-align:middle;} +table td{vertical-align:top;border-top:1px solid #ddd;} +table tbody th{border-top:1px solid #ddd;vertical-align:top;} +.condensed-table th,.condensed-table td{padding:5px 5px 4px;} +.bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td{border-left:1px solid #ddd;} +.bordered-table thead tr:first-child th:first-child,.bordered-table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;} +.bordered-table thead tr:first-child th:last-child,.bordered-table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;} +.bordered-table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;} +.bordered-table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;} +table .span1{width:20px;} +table .span2{width:60px;} +table .span3{width:100px;} +table .span4{width:140px;} +table .span5{width:180px;} +table .span6{width:220px;} +table .span7{width:260px;} +table .span8{width:300px;} +table .span9{width:340px;} +table .span10{width:380px;} +table .span11{width:420px;} +table .span12{width:460px;} +table .span13{width:500px;} +table .span14{width:540px;} +table .span15{width:580px;} +table .span16{width:620px;} +.zebra-striped tbody tr:nth-child(odd) td,.zebra-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;} +.zebra-striped tbody tr:hover td,.zebra-striped tbody tr:hover th{background-color:#f5f5f5;} +table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;} +table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);} +table .header:hover:after{visibility:visible;} +table .headerSortDown:after,table .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} +table .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} +table .blue{color:#049cdb;border-bottom-color:#049cdb;} +table .headerSortUp.blue,table .headerSortDown.blue{background-color:#ade6fe;} +table .green{color:#46a546;border-bottom-color:#46a546;} +table .headerSortUp.green,table .headerSortDown.green{background-color:#cdeacd;} +table .red{color:#9d261d;border-bottom-color:#9d261d;} +table .headerSortUp.red,table .headerSortDown.red{background-color:#f4c8c5;} +table .yellow{color:#ffc40d;border-bottom-color:#ffc40d;} +table .headerSortUp.yellow,table .headerSortDown.yellow{background-color:#fff6d9;} +table .orange{color:#f89406;border-bottom-color:#f89406;} +table .headerSortUp.orange,table .headerSortDown.orange{background-color:#fee9cc;} +table .purple{color:#7a43b6;border-bottom-color:#7a43b6;} +table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0;} +.topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} +.topbar h3 a:hover,.topbar .brand:hover,.topbar ul .active>a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;} +.topbar h3{position:relative;} +.topbar h3 a,.topbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;} +.topbar p{margin:0;line-height:40px;}.topbar p a:hover{background-color:transparent;color:#ffffff;} +.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;} +.topbar form.pull-right{float:right;} +.topbar input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#ffffff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.topbar input:-moz-placeholder{color:#e6e6e6;} +.topbar input::-webkit-input-placeholder{color:#e6e6e6;} +.topbar input:hover{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.5);color:#ffffff;} +.topbar input:focus,.topbar input.focused{outline:0;background-color:#ffffff;color:#404040;text-shadow:0 1px 0 #ffffff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);} +.topbar-inner,.topbar .fill{background-color:#222;background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);} +.topbar div>ul,.nav{display:block;float:left;margin:0 10px 0 0;position:relative;left:0;}.topbar div>ul>li,.nav>li{display:block;float:left;} +.topbar div>ul a,.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}.topbar div>ul a:hover,.nav a:hover{color:#ffffff;text-decoration:none;} +.topbar div>ul .active>a,.nav .active>a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);} +.topbar div>ul.secondary-nav,.nav.secondary-nav{float:right;margin-left:10px;margin-right:0;}.topbar div>ul.secondary-nav .menu-dropdown,.nav.secondary-nav .menu-dropdown,.topbar div>ul.secondary-nav .dropdown-menu,.nav.secondary-nav .dropdown-menu{right:0;border:0;} +.topbar div>ul a.menu:hover,.nav a.menu:hover,.topbar div>ul li.open .menu,.nav li.open .menu,.topbar div>ul .dropdown-toggle:hover,.nav .dropdown-toggle:hover,.topbar div>ul .dropdown.open .dropdown-toggle,.nav .dropdown.open .dropdown-toggle{background:#444;background:rgba(255, 255, 255, 0.05);} +.topbar div>ul .menu-dropdown,.nav .menu-dropdown,.topbar div>ul .dropdown-menu,.nav .dropdown-menu{background-color:#333;}.topbar div>ul .menu-dropdown a.menu,.nav .menu-dropdown a.menu,.topbar div>ul .dropdown-menu a.menu,.nav .dropdown-menu a.menu,.topbar div>ul .menu-dropdown .dropdown-toggle,.nav .menu-dropdown .dropdown-toggle,.topbar div>ul .dropdown-menu .dropdown-toggle,.nav .dropdown-menu .dropdown-toggle{color:#ffffff;}.topbar div>ul .menu-dropdown a.menu.open,.nav .menu-dropdown a.menu.open,.topbar div>ul .dropdown-menu a.menu.open,.nav .dropdown-menu a.menu.open,.topbar div>ul .menu-dropdown .dropdown-toggle.open,.nav .menu-dropdown .dropdown-toggle.open,.topbar div>ul .dropdown-menu .dropdown-toggle.open,.nav .dropdown-menu .dropdown-toggle.open{background:#444;background:rgba(255, 255, 255, 0.05);} +.topbar div>ul .menu-dropdown li a,.nav .menu-dropdown li a,.topbar div>ul .dropdown-menu li a,.nav .dropdown-menu li a{color:#999;text-shadow:0 1px 0 rgba(0, 0, 0, 0.5);}.topbar div>ul .menu-dropdown li a:hover,.nav .menu-dropdown li a:hover,.topbar div>ul .dropdown-menu li a:hover,.nav .dropdown-menu li a:hover{background-color:#191919;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));background-image:-moz-linear-gradient(top, #292929, #191919);background-image:-ms-linear-gradient(top, #292929, #191919);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));background-image:-webkit-linear-gradient(top, #292929, #191919);background-image:-o-linear-gradient(top, #292929, #191919);background-image:linear-gradient(top, #292929, #191919);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);color:#ffffff;} +.topbar div>ul .menu-dropdown .active a,.nav .menu-dropdown .active a,.topbar div>ul .dropdown-menu .active a,.nav .dropdown-menu .active a{color:#ffffff;} +.topbar div>ul .menu-dropdown .divider,.nav .menu-dropdown .divider,.topbar div>ul .dropdown-menu .divider,.nav .dropdown-menu .divider{background-color:#222;border-color:#444;} +.topbar ul .menu-dropdown li a,.topbar ul .dropdown-menu li a{padding:4px 15px;} +li.menu,.dropdown{position:relative;} +a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;content:"↓";text-indent:-99999px;vertical-align:top;margin-top:8px;margin-left:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ffffff;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;} +.menu-dropdown,.dropdown-menu{background-color:#ffffff;float:left;display:none;position:absolute;top:40px;z-index:900;min-width:160px;max-width:220px;_width:160px;margin-left:0;margin-right:0;padding:6px 0;zoom:1;border-color:#999;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:0 1px 1px;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.menu-dropdown li,.dropdown-menu li{float:none;display:block;background-color:none;} +.menu-dropdown .divider,.dropdown-menu .divider{height:1px;margin:5px 0;overflow:hidden;background-color:#eee;border-bottom:1px solid #ffffff;} +.topbar .dropdown-menu a,.dropdown-menu a{display:block;padding:4px 15px;clear:both;font-weight:normal;line-height:18px;color:#808080;text-shadow:0 1px 0 #ffffff;}.topbar .dropdown-menu a:hover,.dropdown-menu a:hover,.topbar .dropdown-menu a.hover,.dropdown-menu a.hover{background-color:#dddddd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));background-image:-moz-linear-gradient(top, #eeeeee, #dddddd);background-image:-ms-linear-gradient(top, #eeeeee, #dddddd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));background-image:-webkit-linear-gradient(top, #eeeeee, #dddddd);background-image:-o-linear-gradient(top, #eeeeee, #dddddd);background-image:linear-gradient(top, #eeeeee, #dddddd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);color:#404040;text-decoration:none;-webkit-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);} +.open .menu,.dropdown.open .menu,.open .dropdown-toggle,.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);} +.open .menu-dropdown,.dropdown.open .menu-dropdown,.open .dropdown-menu,.dropdown.open .dropdown-menu{display:block;} +.tabs,.pills{margin:0 0 18px;padding:0;list-style:none;zoom:1;}.tabs:before,.pills:before,.tabs:after,.pills:after{display:table;content:"";zoom:1;} +.tabs:after,.pills:after{clear:both;} +.tabs>li,.pills>li{float:left;}.tabs>li>a,.pills>li>a{display:block;} +.tabs{border-color:#ddd;border-style:solid;border-width:0 0 1px;}.tabs>li{position:relative;margin-bottom:-1px;}.tabs>li>a{padding:0 15px;margin-right:2px;line-height:34px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.tabs>li>a:hover{text-decoration:none;background-color:#eee;border-color:#eee #eee #ddd;} +.tabs .active>a,.tabs .active>a:hover{color:#808080;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;} +.tabs .menu-dropdown,.tabs .dropdown-menu{top:35px;border-width:1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;} +.tabs a.menu:after,.tabs .dropdown-toggle:after{border-top-color:#999;margin-top:15px;margin-left:5px;} +.tabs li.open.menu .menu,.tabs .open.dropdown .dropdown-toggle{border-color:#999;} +.tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555;} +.pills a{margin:5px 3px 5px 0;padding:0 15px;line-height:30px;text-shadow:0 1px 1px #ffffff;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.pills a:hover{color:#ffffff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#00438a;} +.pills .active a{color:#ffffff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#0069d6;} +.pills-vertical>li{float:none;} +.tab-content>.tab-pane,.pill-content>.pill-pane,.tab-content>div,.pill-content>div{display:none;} +.tab-content>.active,.pill-content>.active{display:block;} +.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#f5f5f5;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;} +.breadcrumb .divider{padding:0 5px;color:#bfbfbf;} +.breadcrumb .active a{color:#404040;} +.hero-unit{background-color:#f5f5f5;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;} +.hero-unit p{font-size:18px;font-weight:200;line-height:27px;} +footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;} +.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;} +.btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#ffffff;} +.btn .close,.alert-message .close{font-family:Arial,sans-serif;line-height:18px;} +.btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} +.btn.success,.alert-message.success{background-color:#57a957;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#57a957 #57a957 #3d773d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} +.btn.info,.alert-message.info{background-color:#339bb9;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#339bb9 #339bb9 #22697d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} +.btn{cursor:pointer;display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);padding:5px 14px 6px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333;font-size:13px;line-height:normal;border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;-ms-transition:0.1s linear all;-o-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333;text-decoration:none;} +.btn:focus{outline:1px dotted #666;} +.btn.primary{color:#ffffff;background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(top, #049cdb, #0064cd);background-image:-ms-linear-gradient(top, #049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(top, #049cdb, #0064cd);background-image:-o-linear-gradient(top, #049cdb, #0064cd);background-image:linear-gradient(top, #049cdb, #0064cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#0064cd #0064cd #003f81;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} +.btn.active,.btn:active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);} +.btn.disabled{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.btn[disabled]{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.btn.large{font-size:15px;line-height:normal;padding:9px 14px 9px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} +.btn.small{padding:7px 9px 7px;font-size:11px;} +:root .alert-message,:root .btn{border-radius:0 \0;} +button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0;} +.close{float:right;color:#000000;font-size:20px;font-weight:bold;line-height:13.5px;text-shadow:0 1px 0 #ffffff;filter:alpha(opacity=25);-khtml-opacity:0.25;-moz-opacity:0.25;opacity:0.25;}.close:hover{color:#000000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:0.4;-moz-opacity:0.4;opacity:0.4;} +.alert-message{position:relative;padding:7px 15px;margin-bottom:18px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));background-image:-moz-linear-gradient(top, #fceec1, #eedc94);background-image:-ms-linear-gradient(top, #fceec1, #eedc94);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));background-image:-webkit-linear-gradient(top, #fceec1, #eedc94);background-image:-o-linear-gradient(top, #fceec1, #eedc94);background-image:linear-gradient(top, #fceec1, #eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);}.alert-message .close{margin-top:1px;*margin-top:0;} +.alert-message a{font-weight:bold;color:#404040;} +.alert-message.danger p a,.alert-message.error p a,.alert-message.success p a,.alert-message.info p a{color:#ffffff;} +.alert-message h5{line-height:18px;} +.alert-message p{margin-bottom:0;} +.alert-message div{margin-top:5px;margin-bottom:2px;line-height:28px;} +.alert-message .btn{-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);} +.alert-message.block-message{background-image:none;background-color:#fdf5d9;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);padding:14px;border-color:#fceec1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}.alert-message.block-message ul,.alert-message.block-message p{margin-right:30px;} +.alert-message.block-message ul{margin-bottom:0;} +.alert-message.block-message li{color:#404040;} +.alert-message.block-message .alert-actions{margin-top:5px;} +.alert-message.block-message.error,.alert-message.block-message.success,.alert-message.block-message.info{color:#404040;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);} +.alert-message.block-message.error{background-color:#fddfde;border-color:#fbc7c6;} +.alert-message.block-message.success{background-color:#d1eed1;border-color:#bfe7bf;} +.alert-message.block-message.info{background-color:#ddf4fb;border-color:#c6edf9;} +.alert-message.block-message.danger p a,.alert-message.block-message.error p a,.alert-message.block-message.success p a,.alert-message.block-message.info p a{color:#404040;} +.pagination{height:36px;margin:18px 0;}.pagination ul{float:left;margin:0;border:1px solid #ddd;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} +.pagination li{display:inline;} +.pagination a{float:left;padding:0 14px;line-height:34px;border-right:1px solid;border-right-color:#ddd;border-right-color:rgba(0, 0, 0, 0.15);*border-right-color:#ddd;text-decoration:none;} +.pagination a:hover,.pagination .active a{background-color:#c7eefe;} +.pagination .disabled a,.pagination .disabled a:hover{background-color:transparent;color:#bfbfbf;} +.pagination .next a{border:0;} +.well{background-color:#f5f5f5;margin-bottom:20px;padding:19px;min-height:20px;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} +.modal-backdrop{background-color:#000000;position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;}.modal-backdrop.fade{opacity:0;} +.modal-backdrop,.modal-backdrop.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;} +.modal{position:fixed;top:50%;left:50%;z-index:11000;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal .close{margin-top:7px;} +.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;} +.modal.fade.in{top:50%;} +.modal-header{border-bottom:1px solid #eee;padding:5px 15px;} +.modal-body{padding:15px;} +.modal-body form{margin-bottom:0;} +.modal-footer{background-color:#f5f5f5;padding:14px 15px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;margin-bottom:0;}.modal-footer:before,.modal-footer:after{display:table;content:"";zoom:1;} +.modal-footer:after{clear:both;} +.modal-footer .btn{float:right;margin-left:5px;} +.modal .popover,.modal .twipsy{z-index:12000;} +.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}.twipsy.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;} +.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} +.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} +.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} +.twipsy-inner{padding:3px 8px;background-color:#000000;color:white;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.twipsy-arrow{position:absolute;width:0;height:0;} +.popover{position:absolute;top:0;left:0;z-index:1000;padding:5px;display:none;}.popover.above .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} +.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} +.popover.below .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} +.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +.popover .arrow{position:absolute;width:0;height:0;} +.popover .inner{background:#000000;background:rgba(0, 0, 0, 0.8);padding:3px;overflow:hidden;width:280px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);} +.popover .title{background-color:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee;} +.popover .content{background-color:#ffffff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0;} +.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;} +.label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;white-space:nowrap;background-color:#bfbfbf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label.important{background-color:#c43c35;} +.label.warning{background-color:#f89406;} +.label.success{background-color:#46a546;} +.label.notice{background-color:#62cffc;} +.media-grid{margin-left:-20px;margin-bottom:0;zoom:1;}.media-grid:before,.media-grid:after{display:table;content:"";zoom:1;} +.media-grid:after{clear:both;} +.media-grid li{display:inline;} +.media-grid a{float:left;padding:4px;margin:0 0 18px 20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}.media-grid a img{display:block;} +.media-grid a:hover{border-color:#0069d6;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} + +#content { list-style-type:none; display:block; clear:both;} +.result { clear:both; padding-bottom:10px;} +.result .cover { display:block; margin-left:0px;} +.result .cover img{ float:left; margin-right:10px;} +.result .cover .synop{ } +.result .meta { padding-bottom:5px; color:#404040;} + + +.long { width: 500px; text-align:center;} \ No newline at end of file diff --git a/examples/css/extensions/paginator/backgrid-paginator.css b/examples/css/extensions/paginator/backgrid-paginator.css deleted file mode 100644 index 20ebbd26..00000000 --- a/examples/css/extensions/paginator/backgrid-paginator.css +++ /dev/null @@ -1,58 +0,0 @@ -/* - backgrid-paginator - http://github.com/wyuenho/backgrid - - Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors - Licensed under the MIT license. -*/ - -.backgrid-paginator { - text-align: center; - border-top: none; - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.backgrid-paginator ul { - display: inline-block; - *display: inline; - margin: 5px 0; - *zoom: 1; -} - -.backgrid-paginator ul > li { - display: inline; -} - -.backgrid-paginator ul > li > a, -.backgrid-paginator ul > li > span { - float: left; - width: 30px; - height: 30px; - padding: 0; - line-height: 30px; - text-decoration: none; -} - -.backgrid-paginator ul > li > a:hover, -.backgrid-paginator ul > .active > a, -.backgrid-paginator ul > .active > span { - background-color: #f5f5f5; -} - -.backgrid-paginator ul > .active > a, -.backgrid-paginator ul > .active > span { - color: #999999; - cursor: default; -} - -.backgrid-paginator ul > .disabled > span, -.backgrid-paginator ul > .disabled > a, -.backgrid-paginator ul > .disabled > a:hover { - color: #999999; - cursor: default; -} \ No newline at end of file diff --git a/examples/css/extensions/text-cell/backgrid-text-cell.css b/examples/css/extensions/text-cell/backgrid-text-cell.css deleted file mode 100644 index dfe23413..00000000 --- a/examples/css/extensions/text-cell/backgrid-text-cell.css +++ /dev/null @@ -1,31 +0,0 @@ -/* - backgrid-text-cell - http://github.com/wyuenho/backgrid - - Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors - Licensed under the MIT license. -*/ - -.backgrid .text-cell { - max-width: 150px; - overflow: hidden; - text-align: left; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; -} - -.backgrid .text-cell.editor { - height: 28px; - max-width: 100%; -} - -.backgrid .text-cell.editor * { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.backgrid .text-cell.editor textarea { - width: 100%; -} \ No newline at end of file diff --git a/examples/google-diacritic/app.js b/examples/google-diacritic/app.js new file mode 100644 index 00000000..7629ef36 --- /dev/null +++ b/examples/google-diacritic/app.js @@ -0,0 +1,19 @@ +//Top-level namespaces for our code + +(function(){ + + window.app = {}; + app.collections = {}; + app.models = {}; + app.views = {}; + app.mixins = {}; + + // Defer initialization until doc ready. + $(function(){ + app.collections.paginatedItems = new app.collections.PaginatedCollection(); + app.views.app = new app.views.AppView({collection: app.collections.paginatedItems}); + app.views.pagination = new app.views.PaginationView({collection: app.collections.paginatedItems}); + }); + +})(); + diff --git a/examples/google-diacritic/collections/PaginatedCollection.js b/examples/google-diacritic/collections/PaginatedCollection.js new file mode 100644 index 00000000..d57cbccc --- /dev/null +++ b/examples/google-diacritic/collections/PaginatedCollection.js @@ -0,0 +1,62 @@ +(function (collections, model, paginator) { + + collections.PaginatedCollection = paginator.clientPager.extend({ + + model: model, + + paginator_core: { + // the type of the request (GET by default) + type: 'GET', + + // the type of reply (jsonp by default) + dataType: 'jsonp', + + // the URL (or base URL) for the service + url: 'http://query.yahooapis.com/v1/public/yql?' + }, + + paginator_ui: { + // the lowest page index your API allows to be accessed + firstPage: 1, + + // which page should the paginator start from + // (also, the actual page the paginator is on) + currentPage: 1, + + // how many items per page should be shown + perPage: 5, + + // a default number of total pages to query in case the API or + // service you are using does not support providing the total + // number of pages for us. + // 10 as a default in case your service doesn't return the total + totalPages: 5 + }, + + server_api: { + // the query field in the request + 'q': function() { return encodeURIComponent('select title, content, url from google.search where q = "aksenttimerkkejä"') }, + + // how many results the request should skip ahead to + // customize as needed. For the Netflix API, skipping ahead based on + // page * number of results per page was necessary. + 'start': function() { return this.currentPage * this.perPage }, + + // what format would you like to request results in? + 'format': 'json', + + 'diagnostics': 'false', + 'env': function() { return encodeURIComponent('store://datatables.org/alltableswithkeys') } + }, + + parse: function (response) { + // Be sure to change this based on how your results + // are structured + + var tags = response.query.results.results; + return tags; + } + + }); + +})( app.collections, app.models.Item, Backbone.Paginator); diff --git a/examples/google-diacritic/index.html b/examples/google-diacritic/index.html new file mode 100644 index 00000000..65975dc2 --- /dev/null +++ b/examples/google-diacritic/index.html @@ -0,0 +1,132 @@ + + + + + + + Backbone.js pagination + + + + + +
+ +

 

+ + +
    + +
+ +
    +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/google-diacritic/models/Item.js b/examples/google-diacritic/models/Item.js new file mode 100644 index 00000000..a4751b0e --- /dev/null +++ b/examples/google-diacritic/models/Item.js @@ -0,0 +1,3 @@ +(function ( models ) { + models.Item = Backbone.Model.extend({}); +})( app.models ); \ No newline at end of file diff --git a/examples/google-diacritic/views/AppView.js b/examples/google-diacritic/views/AppView.js new file mode 100644 index 00000000..c27a4415 --- /dev/null +++ b/examples/google-diacritic/views/AppView.js @@ -0,0 +1,37 @@ +(function ( views ) { + + views.AppView = Backbone.View.extend({ + + el : '#content', + + initialize : function () { + + var tags = this.collection; + + tags.on('reset', this.addAll, this); + tags.on('all', this.render, this); + + tags.fetch({ + success: function(){ + tags.pager(); + }, + silent:true + }); + + + }, + addAll : function () { + this.$el.empty(); + this.collection.each (this.addOne); + }, + + addOne : function ( item ) { + var view = new views.ResultView({model:item}); + $('#content').append(view.render().el); + }, + + render: function(){ + } + }); + +})( app.views ); diff --git a/examples/google-diacritic/views/PaginationView.js b/examples/google-diacritic/views/PaginationView.js new file mode 100644 index 00000000..327b3e1e --- /dev/null +++ b/examples/google-diacritic/views/PaginationView.js @@ -0,0 +1,97 @@ +(function (views) { + + views.PaginationView = Backbone.View.extend({ + + events: { + 'click a.first': 'gotoFirst', + 'click a.prev': 'gotoPrev', + 'click a.next': 'gotoNext', + 'click a.last': 'gotoLast', + 'click a.page': 'gotoPage', + 'click .howmany a': 'changeCount', + 'click a.filter': 'filter' + }, + + tagName: 'aside', + + pagingTemplate: _.template($('#tmpClientPagination').html()), + + initialize: function () { + + this.collection.on('reset', this.render, this); + this.$el.appendTo('#pagination'); + + }, + render: function () { + var html = this.pagingTemplate(this.collection.info()); + this.$el.html(html); + }, + + gotoFirst: function (e) { + e.preventDefault(); + this.collection.goTo(1); + }, + + gotoPrev: function (e) { + e.preventDefault(); + this.collection.previousPage(); + }, + + gotoNext: function (e) { + e.preventDefault(); + this.collection.nextPage(); + }, + + gotoLast: function (e) { + e.preventDefault(); + this.collection.goTo(this.collection.information.lastPage); + }, + + gotoPage: function (e) { + e.preventDefault(); + var page = $(e.target).text(); + this.collection.goTo(page); + }, + + changeCount: function (e) { + e.preventDefault(); + var per = $(e.target).text(); + this.collection.howManyPer(per); + }, + + getFilterField: function () { + return $('#filterByOption').val(); + }, + + getFilterValue: function () { + return $('#filterString').val(); + }, + + preserveFilterField: function (field) { + $('#filterByOption').val(field); + }, + + preserveFilterValue: function (value) { + $('#filterString').val(value); + }, + + filter: function (e) { + e.preventDefault(); + + var fields = this.getFilterField(); + /*Note that this is an example! + * You can create an array like + * + * fields = ['Name', 'Description', ...]; + */ + + var filter = this.getFilterValue(); + + this.collection.setFilter(fields, filter); + this.collection.pager(); + + this.preserveFilterField(fields); + this.preserveFilterValue(filter); + } + }); +})( app.views ); \ No newline at end of file diff --git a/examples/google-diacritic/views/ResultView.js b/examples/google-diacritic/views/ResultView.js new file mode 100644 index 00000000..348e97d0 --- /dev/null +++ b/examples/google-diacritic/views/ResultView.js @@ -0,0 +1,18 @@ +( function ( views ){ + + views.ResultView = Backbone.View.extend({ + tagName : 'li', + template: _.template($('#resultItemTemplate').html()), + + initialize: function() { + this.model.bind('change', this.render, this); + this.model.bind('destroy', this.remove, this); + }, + + render : function () { + this.$el.html(this.template(this.model.toJSON())); + return this; + } + }); + +})( app.views ); \ No newline at end of file diff --git a/examples/img/glyphicons-halflings-white.png b/examples/img/glyphicons-halflings-white.png deleted file mode 100644 index 3bf6484a..00000000 Binary files a/examples/img/glyphicons-halflings-white.png and /dev/null differ diff --git a/examples/img/glyphicons-halflings.png b/examples/img/glyphicons-halflings.png deleted file mode 100644 index a9969993..00000000 Binary files a/examples/img/glyphicons-halflings.png and /dev/null differ diff --git a/examples/infinite-mode.html b/examples/infinite-mode.html deleted file mode 100644 index d6e6a7f1..00000000 --- a/examples/infinite-mode.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - backbone.paginator infinite mode demo - - - - - - - - - -
-
-
-
- Feel free to peek into the source of this page and play with the code in your browser's console. -
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - diff --git a/examples/js/backgrid.js b/examples/js/backgrid.js deleted file mode 100644 index 6f8da79e..00000000 --- a/examples/js/backgrid.js +++ /dev/null @@ -1,2883 +0,0 @@ -/*! - backgrid - http://github.com/wyuenho/backgrid - - Copyright (c) 2014 Jimmy Yuen Ho Wong and contributors - Licensed under the MIT license. -*/ - -(function (factory) { - - // CommonJS - if (typeof exports == "object") { - module.exports = factory(module.exports, - require("underscore"), - require("backbone")); - } - // Browser - else factory(this, this._, this.Backbone); -}(function (root, _, Backbone) { - - "use strict"; - -/* - backgrid - http://github.com/wyuenho/backgrid - - Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors - Licensed under the MIT license. -*/ - -// Copyright 2009, 2010 Kristopher Michael Kowal -// https://github.com/kriskowal/es5-shim -// ES5 15.5.4.20 -// http://es5.github.com/#x15.5.4.20 -var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + - "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + - "\u2029\uFEFF"; -if (!String.prototype.trim || ws.trim()) { - // http://blog.stevenlevithan.com/archives/faster-trim-javascript - // http://perfectionkills.com/whitespace-deviations/ - ws = "[" + ws + "]"; - var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), - trimEndRegexp = new RegExp(ws + ws + "*$"); - String.prototype.trim = function trim() { - if (this === undefined || this === null) { - throw new TypeError("can't convert " + this + " to object"); - } - return String(this) - .replace(trimBeginRegexp, "") - .replace(trimEndRegexp, ""); - }; -} - -function lpad(str, length, padstr) { - var paddingLen = length - (str + '').length; - paddingLen = paddingLen < 0 ? 0 : paddingLen; - var padding = ''; - for (var i = 0; i < paddingLen; i++) { - padding = padding + padstr; - } - return padding + str; -} - -var $ = Backbone.$; - -var Backgrid = root.Backgrid = { - - Extension: {}, - - resolveNameToClass: function (name, suffix) { - if (_.isString(name)) { - var key = _.map(name.split('-'), function (e) { - return e.slice(0, 1).toUpperCase() + e.slice(1); - }).join('') + suffix; - var klass = Backgrid[key] || Backgrid.Extension[key]; - if (_.isUndefined(klass)) { - throw new ReferenceError("Class '" + key + "' not found"); - } - return klass; - } - - return name; - }, - - callByNeed: function () { - var value = arguments[0]; - if (!_.isFunction(value)) return value; - - var context = arguments[1]; - var args = [].slice.call(arguments, 2); - return value.apply(context, !!(args + '') ? args : []); - } - -}; -_.extend(Backgrid, Backbone.Events); - -/** - Command translates a DOM Event into commands that Backgrid - recognizes. Interested parties can listen on selected Backgrid events that - come with an instance of this class and act on the commands. - - It is also possible to globally rebind the keyboard shortcuts by replacing - the methods in this class' prototype. - - @class Backgrid.Command - @constructor - */ -var Command = Backgrid.Command = function (evt) { - _.extend(this, { - altKey: !!evt.altKey, - "char": evt["char"], - charCode: evt.charCode, - ctrlKey: !!evt.ctrlKey, - key: evt.key, - keyCode: evt.keyCode, - locale: evt.locale, - location: evt.location, - metaKey: !!evt.metaKey, - repeat: !!evt.repeat, - shiftKey: !!evt.shiftKey, - which: evt.which - }); -}; -_.extend(Command.prototype, { - /** - Up Arrow - - @member Backgrid.Command - */ - moveUp: function () { return this.keyCode == 38; }, - /** - Down Arrow - - @member Backgrid.Command - */ - moveDown: function () { return this.keyCode === 40; }, - /** - Shift Tab - - @member Backgrid.Command - */ - moveLeft: function () { return this.shiftKey && this.keyCode === 9; }, - /** - Tab - - @member Backgrid.Command - */ - moveRight: function () { return !this.shiftKey && this.keyCode === 9; }, - /** - Enter - - @member Backgrid.Command - */ - save: function () { return this.keyCode === 13; }, - /** - Esc - - @member Backgrid.Command - */ - cancel: function () { return this.keyCode === 27; }, - /** - None of the above. - - @member Backgrid.Command - */ - passThru: function () { - return !(this.moveUp() || this.moveDown() || this.moveLeft() || - this.moveRight() || this.save() || this.cancel()); - } -}); - -/* - backgrid - http://github.com/wyuenho/backgrid - - Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors - Licensed under the MIT license. -*/ - -/** - Just a convenient class for interested parties to subclass. - - The default Cell classes don't require the formatter to be a subclass of - Formatter as long as the fromRaw(rawData) and toRaw(formattedData) methods - are defined. - - @abstract - @class Backgrid.CellFormatter - @constructor -*/ -var CellFormatter = Backgrid.CellFormatter = function () {}; -_.extend(CellFormatter.prototype, { - - /** - Takes a raw value from a model and returns an optionally formatted string - for display. The default implementation simply returns the supplied value - as is without any type conversion. - - @member Backgrid.CellFormatter - @param {*} rawData - @param {Backbone.Model} model Used for more complicated formatting - @return {*} - */ - fromRaw: function (rawData, model) { - return rawData; - }, - - /** - Takes a formatted string, usually from user input, and returns a - appropriately typed value for persistence in the model. - - If the user input is invalid or unable to be converted to a raw value - suitable for persistence in the model, toRaw must return `undefined`. - - @member Backgrid.CellFormatter - @param {string} formattedData - @param {Backbone.Model} model Used for more complicated formatting - @return {*|undefined} - */ - toRaw: function (formattedData, model) { - return formattedData; - } - -}); - -/** - A floating point number formatter. Doesn't understand scientific notation at - the moment. - - @class Backgrid.NumberFormatter - @extends Backgrid.CellFormatter - @constructor - @throws {RangeError} If decimals < 0 or > 20. -*/ -var NumberFormatter = Backgrid.NumberFormatter = function (options) { - _.extend(this, this.defaults, options || {}); - - if (this.decimals < 0 || this.decimals > 20) { - throw new RangeError("decimals must be between 0 and 20"); - } -}; -NumberFormatter.prototype = new CellFormatter(); -_.extend(NumberFormatter.prototype, { - - /** - @member Backgrid.NumberFormatter - @cfg {Object} options - - @cfg {number} [options.decimals=2] Number of decimals to display. Must be an integer. - - @cfg {string} [options.decimalSeparator='.'] The separator to use when - displaying decimals. - - @cfg {string} [options.orderSeparator=','] The separator to use to - separator thousands. May be an empty string. - */ - defaults: { - decimals: 2, - decimalSeparator: '.', - orderSeparator: ',' - }, - - HUMANIZED_NUM_RE: /(\d)(?=(?:\d{3})+$)/g, - - /** - Takes a floating point number and convert it to a formatted string where - every thousand is separated by `orderSeparator`, with a `decimal` number of - decimals separated by `decimalSeparator`. The number returned is rounded - the usual way. - - @member Backgrid.NumberFormatter - @param {number} number - @param {Backbone.Model} model Used for more complicated formatting - @return {string} - */ - fromRaw: function (number, model) { - if (_.isNull(number) || _.isUndefined(number)) return ''; - - number = number.toFixed(~~this.decimals); - - var parts = number.split('.'); - var integerPart = parts[0]; - var decimalPart = parts[1] ? (this.decimalSeparator || '.') + parts[1] : ''; - - return integerPart.replace(this.HUMANIZED_NUM_RE, '$1' + this.orderSeparator) + decimalPart; - }, - - /** - Takes a string, possibly formatted with `orderSeparator` and/or - `decimalSeparator`, and convert it back to a number. - - @member Backgrid.NumberFormatter - @param {string} formattedData - @param {Backbone.Model} model Used for more complicated formatting - @return {number|undefined} Undefined if the string cannot be converted to - a number. - */ - toRaw: function (formattedData, model) { - formattedData = formattedData.trim(); - - if (formattedData === '') return null; - - var rawData = ''; - - var thousands = formattedData.split(this.orderSeparator); - for (var i = 0; i < thousands.length; i++) { - rawData += thousands[i]; - } - - var decimalParts = rawData.split(this.decimalSeparator); - rawData = ''; - for (var i = 0; i < decimalParts.length; i++) { - rawData = rawData + decimalParts[i] + '.'; - } - - if (rawData[rawData.length - 1] === '.') { - rawData = rawData.slice(0, rawData.length - 1); - } - - var result = (rawData * 1).toFixed(~~this.decimals) * 1; - if (_.isNumber(result) && !_.isNaN(result)) return result; - } - -}); - -/** - A number formatter that converts a floating point number, optionally - multiplied by a multiplier, to a percentage string and vice versa. - - @class Backgrid.PercentFormatter - @extends Backgrid.NumberFormatter - @constructor - @throws {RangeError} If decimals < 0 or > 20. - */ -var PercentFormatter = Backgrid.PercentFormatter = function () { - Backgrid.NumberFormatter.apply(this, arguments); -}; - -PercentFormatter.prototype = new Backgrid.NumberFormatter(), - -_.extend(PercentFormatter.prototype, { - - /** - @member Backgrid.PercentFormatter - @cfg {Object} options - - @cfg {number} [options.multiplier=1] The number used to multiply the model - value for display. - - @cfg {string} [options.symbol='%'] The symbol to append to the percentage - string. - */ - defaults: _.extend({}, NumberFormatter.prototype.defaults, { - multiplier: 1, - symbol: "%" - }), - - /** - Takes a floating point number, where the number is first multiplied by - `multiplier`, then converted to a formatted string like - NumberFormatter#fromRaw, then finally append `symbol` to the end. - - @member Backgrid.PercentFormatter - @param {number} rawValue - @param {Backbone.Model} model Used for more complicated formatting - @return {string} - */ - fromRaw: function (number, model) { - var args = [].slice.call(arguments, 1); - args.unshift(number * this.multiplier); - return (NumberFormatter.prototype.fromRaw.apply(this, args) || "0") + this.symbol; - }, - - /** - Takes a string, possibly appended with `symbol` and/or `decimalSeparator`, - and convert it back to a number for the model like NumberFormatter#toRaw, - and then dividing it by `multiplier`. - - @member Backgrid.PercentFormatter - @param {string} formattedData - @param {Backbone.Model} model Used for more complicated formatting - @return {number|undefined} Undefined if the string cannot be converted to - a number. - */ - toRaw: function (formattedValue, model) { - var tokens = formattedValue.split(this.symbol); - if (tokens && tokens[0] && tokens[1] === "" || tokens[1] == null) { - var rawValue = NumberFormatter.prototype.toRaw.call(this, tokens[0]); - if (_.isUndefined(rawValue)) return rawValue; - return rawValue / this.multiplier; - } - } - -}); - -/** - Formatter to converts between various datetime formats. - - This class only understands ISO-8601 formatted datetime strings and UNIX - offset (number of milliseconds since UNIX Epoch). See - Backgrid.Extension.MomentFormatter if you need a much more flexible datetime - formatter. - - @class Backgrid.DatetimeFormatter - @extends Backgrid.CellFormatter - @constructor - @throws {Error} If both `includeDate` and `includeTime` are false. -*/ -var DatetimeFormatter = Backgrid.DatetimeFormatter = function (options) { - _.extend(this, this.defaults, options || {}); - - if (!this.includeDate && !this.includeTime) { - throw new Error("Either includeDate or includeTime must be true"); - } -}; -DatetimeFormatter.prototype = new CellFormatter(); -_.extend(DatetimeFormatter.prototype, { - - /** - @member Backgrid.DatetimeFormatter - - @cfg {Object} options - - @cfg {boolean} [options.includeDate=true] Whether the values include the - date part. - - @cfg {boolean} [options.includeTime=true] Whether the values include the - time part. - - @cfg {boolean} [options.includeMilli=false] If `includeTime` is true, - whether to include the millisecond part, if it exists. - */ - defaults: { - includeDate: true, - includeTime: true, - includeMilli: false - }, - - DATE_RE: /^([+\-]?\d{4})-(\d{2})-(\d{2})$/, - TIME_RE: /^(\d{2}):(\d{2}):(\d{2})(\.(\d{3}))?$/, - ISO_SPLITTER_RE: /T|Z| +/, - - _convert: function (data, validate) { - if ((data + '').trim() === '') return null; - - var date, time = null; - if (_.isNumber(data)) { - var jsDate = new Date(data); - date = lpad(jsDate.getUTCFullYear(), 4, 0) + '-' + lpad(jsDate.getUTCMonth() + 1, 2, 0) + '-' + lpad(jsDate.getUTCDate(), 2, 0); - time = lpad(jsDate.getUTCHours(), 2, 0) + ':' + lpad(jsDate.getUTCMinutes(), 2, 0) + ':' + lpad(jsDate.getUTCSeconds(), 2, 0); - } - else { - data = data.trim(); - var parts = data.split(this.ISO_SPLITTER_RE) || []; - date = this.DATE_RE.test(parts[0]) ? parts[0] : ''; - time = date && parts[1] ? parts[1] : this.TIME_RE.test(parts[0]) ? parts[0] : ''; - } - - var YYYYMMDD = this.DATE_RE.exec(date) || []; - var HHmmssSSS = this.TIME_RE.exec(time) || []; - - if (validate) { - if (this.includeDate && _.isUndefined(YYYYMMDD[0])) return; - if (this.includeTime && _.isUndefined(HHmmssSSS[0])) return; - if (!this.includeDate && date) return; - if (!this.includeTime && time) return; - } - - var jsDate = new Date(Date.UTC(YYYYMMDD[1] * 1 || 0, - YYYYMMDD[2] * 1 - 1 || 0, - YYYYMMDD[3] * 1 || 0, - HHmmssSSS[1] * 1 || null, - HHmmssSSS[2] * 1 || null, - HHmmssSSS[3] * 1 || null, - HHmmssSSS[5] * 1 || null)); - - var result = ''; - - if (this.includeDate) { - result = lpad(jsDate.getUTCFullYear(), 4, 0) + '-' + lpad(jsDate.getUTCMonth() + 1, 2, 0) + '-' + lpad(jsDate.getUTCDate(), 2, 0); - } - - if (this.includeTime) { - result = result + (this.includeDate ? 'T' : '') + lpad(jsDate.getUTCHours(), 2, 0) + ':' + lpad(jsDate.getUTCMinutes(), 2, 0) + ':' + lpad(jsDate.getUTCSeconds(), 2, 0); - - if (this.includeMilli) { - result = result + '.' + lpad(jsDate.getUTCMilliseconds(), 3, 0); - } - } - - if (this.includeDate && this.includeTime) { - result += "Z"; - } - - return result; - }, - - /** - Converts an ISO-8601 formatted datetime string to a datetime string, date - string or a time string. The timezone is ignored if supplied. - - @member Backgrid.DatetimeFormatter - @param {string} rawData - @param {Backbone.Model} model Used for more complicated formatting - @return {string|null|undefined} ISO-8601 string in UTC. Null and undefined - values are returned as is. - */ - fromRaw: function (rawData, model) { - if (_.isNull(rawData) || _.isUndefined(rawData)) return ''; - return this._convert(rawData); - }, - - /** - Converts an ISO-8601 formatted datetime string to a datetime string, date - string or a time string. The timezone is ignored if supplied. This method - parses the input values exactly the same way as - Backgrid.Extension.MomentFormatter#fromRaw(), in addition to doing some - sanity checks. - - @member Backgrid.DatetimeFormatter - @param {string} formattedData - @param {Backbone.Model} model Used for more complicated formatting - @return {string|undefined} ISO-8601 string in UTC. Undefined if a date is - found when `includeDate` is false, or a time is found when `includeTime` is - false, or if `includeDate` is true and a date is not found, or if - `includeTime` is true and a time is not found. - */ - toRaw: function (formattedData, model) { - return this._convert(formattedData, true); - } - -}); - -/** - Formatter to convert any value to string. - - @class Backgrid.StringFormatter - @extends Backgrid.CellFormatter - @constructor - */ -var StringFormatter = Backgrid.StringFormatter = function () {}; -StringFormatter.prototype = new CellFormatter(); -_.extend(StringFormatter.prototype, { - /** - Converts any value to a string using Ecmascript's implicit type - conversion. If the given value is `null` or `undefined`, an empty string is - returned instead. - - @member Backgrid.StringFormatter - @param {*} rawValue - @param {Backbone.Model} model Used for more complicated formatting - @return {string} - */ - fromRaw: function (rawValue, model) { - if (_.isUndefined(rawValue) || _.isNull(rawValue)) return ''; - return rawValue + ''; - } -}); - -/** - Simple email validation formatter. - - @class Backgrid.EmailFormatter - @extends Backgrid.CellFormatter - @constructor - */ -var EmailFormatter = Backgrid.EmailFormatter = function () {}; -EmailFormatter.prototype = new CellFormatter(); -_.extend(EmailFormatter.prototype, { - /** - Return the input if it is a string that contains an '@' character and if - the strings before and after '@' are non-empty. If the input does not - validate, `undefined` is returned. - - @member Backgrid.EmailFormatter - @param {*} formattedData - @param {Backbone.Model} model Used for more complicated formatting - @return {string|undefined} - */ - toRaw: function (formattedData, model) { - var parts = formattedData.trim().split("@"); - if (parts.length === 2 && _.all(parts)) { - return formattedData; - } - } -}); - -/** - Formatter for SelectCell. - - If the type of a model value is not a string, it is expected that a subclass - of this formatter is provided to the SelectCell, with #toRaw overridden to - convert the string value returned from the DOM back to whatever value is - expected in the model. - - @class Backgrid.SelectFormatter - @extends Backgrid.CellFormatter - @constructor -*/ -var SelectFormatter = Backgrid.SelectFormatter = function () {}; -SelectFormatter.prototype = new CellFormatter(); -_.extend(SelectFormatter.prototype, { - - /** - Normalizes raw scalar or array values to an array. - - @member Backgrid.SelectFormatter - @param {*} rawValue - @param {Backbone.Model} model Used for more complicated formatting - @return {Array.<*>} - */ - fromRaw: function (rawValue, model) { - return _.isArray(rawValue) ? rawValue : rawValue != null ? [rawValue] : []; - } -}); - -/* - backgrid - http://github.com/wyuenho/backgrid - - Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors - Licensed under the MIT license. -*/ - -/** - Generic cell editor base class. Only defines an initializer for a number of - required parameters. - - @abstract - @class Backgrid.CellEditor - @extends Backbone.View -*/ -var CellEditor = Backgrid.CellEditor = Backbone.View.extend({ - - /** - Initializer. - - @param {Object} options - @param {Backgrid.CellFormatter} options.formatter - @param {Backgrid.Column} options.column - @param {Backbone.Model} options.model - - @throws {TypeError} If `formatter` is not a formatter instance, or when - `model` or `column` are undefined. - */ - initialize: function (options) { - this.formatter = options.formatter; - this.column = options.column; - if (!(this.column instanceof Column)) { - this.column = new Column(this.column); - } - - this.listenTo(this.model, "backgrid:editing", this.postRender); - }, - - /** - Post-rendering setup and initialization. Focuses the cell editor's `el` in - this default implementation. **Should** be called by Cell classes after - calling Backgrid.CellEditor#render. - */ - postRender: function (model, column) { - if (column == null || column.get("name") == this.column.get("name")) { - this.$el.focus(); - } - return this; - } - -}); - -/** - InputCellEditor the cell editor type used by most core cell types. This cell - editor renders a text input box as its editor. The input will render a - placeholder if the value is empty on supported browsers. - - @class Backgrid.InputCellEditor - @extends Backgrid.CellEditor -*/ -var InputCellEditor = Backgrid.InputCellEditor = CellEditor.extend({ - - /** @property */ - tagName: "input", - - /** @property */ - attributes: { - type: "text" - }, - - /** @property */ - events: { - "blur": "saveOrCancel", - "keydown": "saveOrCancel" - }, - - /** - Initializer. Removes this `el` from the DOM when a `done` event is - triggered. - - @param {Object} options - @param {Backgrid.CellFormatter} options.formatter - @param {Backgrid.Column} options.column - @param {Backbone.Model} options.model - @param {string} [options.placeholder] - */ - initialize: function (options) { - InputCellEditor.__super__.initialize.apply(this, arguments); - - if (options.placeholder) { - this.$el.attr("placeholder", options.placeholder); - } - }, - - /** - Renders a text input with the cell value formatted for display, if it - exists. - */ - render: function () { - var model = this.model; - this.$el.val(this.formatter.fromRaw(model.get(this.column.get("name")), model)); - return this; - }, - - /** - If the key pressed is `enter`, `tab`, `up`, or `down`, converts the value - in the editor to a raw value for saving into the model using the formatter. - - If the key pressed is `esc` the changes are undone. - - If the editor goes out of focus (`blur`) but the value is invalid, the - event is intercepted and cancelled so the cell remains in focus pending for - further action. The changes are saved otherwise. - - Triggers a Backbone `backgrid:edited` event from the model when successful, - and `backgrid:error` if the value cannot be converted. Classes listening to - the `error` event, usually the Cell classes, should respond appropriately, - usually by rendering some kind of error feedback. - - @param {Event} e - */ - saveOrCancel: function (e) { - - var formatter = this.formatter; - var model = this.model; - var column = this.column; - - var command = new Command(e); - var blurred = e.type === "blur"; - - if (command.moveUp() || command.moveDown() || command.moveLeft() || command.moveRight() || - command.save() || blurred) { - - e.preventDefault(); - e.stopPropagation(); - - var val = this.$el.val(); - var newValue = formatter.toRaw(val, model); - if (_.isUndefined(newValue)) { - model.trigger("backgrid:error", model, column, val); - } - else { - model.set(column.get("name"), newValue); - model.trigger("backgrid:edited", model, column, command); - } - } - // esc - else if (command.cancel()) { - // undo - e.stopPropagation(); - model.trigger("backgrid:edited", model, column, command); - } - }, - - postRender: function (model, column) { - if (column == null || column.get("name") == this.column.get("name")) { - // move the cursor to the end on firefox if text is right aligned - if (this.$el.css("text-align") === "right") { - var val = this.$el.val(); - this.$el.focus().val(null).val(val); - } - else this.$el.focus(); - } - return this; - } - -}); - -/** - The super-class for all Cell types. By default, this class renders a plain - table cell with the model value converted to a string using the - formatter. The table cell is clickable, upon which the cell will go into - editor mode, which is rendered by a Backgrid.InputCellEditor instance by - default. Upon encountering any formatting errors, this class will add an - `error` CSS class to the table cell. - - @abstract - @class Backgrid.Cell - @extends Backbone.View -*/ -var Cell = Backgrid.Cell = Backbone.View.extend({ - - /** @property */ - tagName: "td", - - /** - @property {Backgrid.CellFormatter|Object|string} [formatter=CellFormatter] - */ - formatter: CellFormatter, - - /** - @property {Backgrid.CellEditor} [editor=Backgrid.InputCellEditor] The - default editor for all cell instances of this class. This value must be a - class, it will be automatically instantiated upon entering edit mode. - - See Backgrid.CellEditor - */ - editor: InputCellEditor, - - /** @property */ - events: { - "click": "enterEditMode" - }, - - /** - Initializer. - - @param {Object} options - @param {Backbone.Model} options.model - @param {Backgrid.Column} options.column - - @throws {ReferenceError} If formatter is a string but a formatter class of - said name cannot be found in the Backgrid module. - */ - initialize: function (options) { - this.column = options.column; - if (!(this.column instanceof Column)) { - this.column = new Column(this.column); - } - - var column = this.column, model = this.model, $el = this.$el; - - var formatter = Backgrid.resolveNameToClass(column.get("formatter") || - this.formatter, "Formatter"); - - if (!_.isFunction(formatter.fromRaw) && !_.isFunction(formatter.toRaw)) { - formatter = new formatter(); - } - - this.formatter = formatter; - - this.editor = Backgrid.resolveNameToClass(this.editor, "CellEditor"); - - this.listenTo(model, "change:" + column.get("name"), function () { - if (!$el.hasClass("editor")) this.render(); - }); - - this.listenTo(model, "backgrid:error", this.renderError); - - this.listenTo(column, "change:editable change:sortable change:renderable", - function (column) { - var changed = column.changedAttributes(); - for (var key in changed) { - if (changed.hasOwnProperty(key)) { - $el.toggleClass(key, changed[key]); - } - } - }); - - if (Backgrid.callByNeed(column.editable(), column, model)) $el.addClass("editable"); - if (Backgrid.callByNeed(column.sortable(), column, model)) $el.addClass("sortable"); - if (Backgrid.callByNeed(column.renderable(), column, model)) $el.addClass("renderable"); - }, - - /** - Render a text string in a table cell. The text is converted from the - model's raw value for this cell's column. - */ - render: function () { - this.$el.empty(); - var model = this.model; - this.$el.text(this.formatter.fromRaw(model.get(this.column.get("name")), model)); - this.delegateEvents(); - return this; - }, - - /** - If this column is editable, a new CellEditor instance is instantiated with - its required parameters. An `editor` CSS class is added to the cell upon - entering edit mode. - - This method triggers a Backbone `backgrid:edit` event from the model when - the cell is entering edit mode and an editor instance has been constructed, - but before it is rendered and inserted into the DOM. The cell and the - constructed cell editor instance are sent as event parameters when this - event is triggered. - - When this cell has finished switching to edit mode, a Backbone - `backgrid:editing` event is triggered from the model. The cell and the - constructed cell instance are also sent as parameters in the event. - - When the model triggers a `backgrid:error` event, it means the editor is - unable to convert the current user input to an apprpriate value for the - model's column, and an `error` CSS class is added to the cell accordingly. - */ - enterEditMode: function () { - var model = this.model; - var column = this.column; - - var editable = Backgrid.callByNeed(column.editable(), column, model); - if (editable) { - - this.currentEditor = new this.editor({ - column: this.column, - model: this.model, - formatter: this.formatter - }); - - model.trigger("backgrid:edit", model, column, this, this.currentEditor); - - // Need to redundantly undelegate events for Firefox - this.undelegateEvents(); - this.$el.empty(); - this.$el.append(this.currentEditor.$el); - this.currentEditor.render(); - this.$el.addClass("editor"); - - model.trigger("backgrid:editing", model, column, this, this.currentEditor); - } - }, - - /** - Put an `error` CSS class on the table cell. - */ - renderError: function (model, column) { - if (column == null || column.get("name") == this.column.get("name")) { - this.$el.addClass("error"); - } - }, - - /** - Removes the editor and re-render in display mode. - */ - exitEditMode: function () { - this.$el.removeClass("error"); - this.currentEditor.remove(); - this.stopListening(this.currentEditor); - delete this.currentEditor; - this.$el.removeClass("editor"); - this.render(); - }, - - /** - Clean up this cell. - - @chainable - */ - remove: function () { - if (this.currentEditor) { - this.currentEditor.remove.apply(this.currentEditor, arguments); - delete this.currentEditor; - } - return Cell.__super__.remove.apply(this, arguments); - } - -}); - -/** - StringCell displays HTML escaped strings and accepts anything typed in. - - @class Backgrid.StringCell - @extends Backgrid.Cell -*/ -var StringCell = Backgrid.StringCell = Cell.extend({ - - /** @property */ - className: "string-cell", - - formatter: StringFormatter - -}); - -/** - UriCell renders an HTML `` anchor for the value and accepts URIs as user - input values. No type conversion or URL validation is done by the formatter - of this cell. Users who need URL validation are encourage to subclass UriCell - to take advantage of the parsing capabilities of the HTMLAnchorElement - available on HTML5-capable browsers or using a third-party library like - [URI.js](https://github.com/medialize/URI.js). - - @class Backgrid.UriCell - @extends Backgrid.Cell -*/ -var UriCell = Backgrid.UriCell = Cell.extend({ - - /** @property */ - className: "uri-cell", - - /** - @property {string} [title] The title attribute of the generated anchor. It - uses the display value formatted by the `formatter.fromRaw` by default. - */ - title: null, - - /** - @property {string} [target="_blank"] The target attribute of the generated - anchor. - */ - target: "_blank", - - initialize: function (options) { - UriCell.__super__.initialize.apply(this, arguments); - this.title = options.title || this.title; - this.target = options.target || this.target; - }, - - render: function () { - this.$el.empty(); - var rawValue = this.model.get(this.column.get("name")); - var formattedValue = this.formatter.fromRaw(rawValue, this.model); - this.$el.append($("", { - tabIndex: -1, - href: rawValue, - title: this.title || formattedValue, - target: this.target - }).text(formattedValue)); - this.delegateEvents(); - return this; - } - -}); - -/** - Like Backgrid.UriCell, EmailCell renders an HTML `` anchor for the - value. The `href` in the anchor is prefixed with `mailto:`. EmailCell will - complain if the user enters a string that doesn't contain the `@` sign. - - @class Backgrid.EmailCell - @extends Backgrid.StringCell -*/ -var EmailCell = Backgrid.EmailCell = StringCell.extend({ - - /** @property */ - className: "email-cell", - - formatter: EmailFormatter, - - render: function () { - this.$el.empty(); - var model = this.model; - var formattedValue = this.formatter.fromRaw(model.get(this.column.get("name")), model); - this.$el.append($("", { - tabIndex: -1, - href: "mailto:" + formattedValue, - title: formattedValue - }).text(formattedValue)); - this.delegateEvents(); - return this; - } - -}); - -/** - NumberCell is a generic cell that renders all numbers. Numbers are formatted - using a Backgrid.NumberFormatter. - - @class Backgrid.NumberCell - @extends Backgrid.Cell -*/ -var NumberCell = Backgrid.NumberCell = Cell.extend({ - - /** @property */ - className: "number-cell", - - /** - @property {number} [decimals=2] Must be an integer. - */ - decimals: NumberFormatter.prototype.defaults.decimals, - - /** @property {string} [decimalSeparator='.'] */ - decimalSeparator: NumberFormatter.prototype.defaults.decimalSeparator, - - /** @property {string} [orderSeparator=','] */ - orderSeparator: NumberFormatter.prototype.defaults.orderSeparator, - - /** @property {Backgrid.CellFormatter} [formatter=Backgrid.NumberFormatter] */ - formatter: NumberFormatter, - - /** - Initializes this cell and the number formatter. - - @param {Object} options - @param {Backbone.Model} options.model - @param {Backgrid.Column} options.column - */ - initialize: function (options) { - NumberCell.__super__.initialize.apply(this, arguments); - var formatter = this.formatter; - formatter.decimals = this.decimals; - formatter.decimalSeparator = this.decimalSeparator; - formatter.orderSeparator = this.orderSeparator; - } - -}); - -/** - An IntegerCell is just a Backgrid.NumberCell with 0 decimals. If a floating - point number is supplied, the number is simply rounded the usual way when - displayed. - - @class Backgrid.IntegerCell - @extends Backgrid.NumberCell -*/ -var IntegerCell = Backgrid.IntegerCell = NumberCell.extend({ - - /** @property */ - className: "integer-cell", - - /** - @property {number} decimals Must be an integer. - */ - decimals: 0 -}); - -/** - A PercentCell is another Backgrid.NumberCell that takes a floating number, - optionally multiplied by a multiplier and display it as a percentage. - - @class Backgrid.PercentCell - @extends Backgrid.NumberCell - */ -var PercentCell = Backgrid.PercentCell = NumberCell.extend({ - - /** @property */ - className: "percent-cell", - - /** @property {number} [multiplier=1] */ - multiplier: PercentFormatter.prototype.defaults.multiplier, - - /** @property {string} [symbol='%'] */ - symbol: PercentFormatter.prototype.defaults.symbol, - - /** @property {Backgrid.CellFormatter} [formatter=Backgrid.PercentFormatter] */ - formatter: PercentFormatter, - - /** - Initializes this cell and the percent formatter. - - @param {Object} options - @param {Backbone.Model} options.model - @param {Backgrid.Column} options.column - */ - initialize: function () { - PercentCell.__super__.initialize.apply(this, arguments); - var formatter = this.formatter; - formatter.multiplier = this.multiplier; - formatter.symbol = this.symbol; - } - -}); - -/** - DatetimeCell is a basic cell that accepts datetime string values in RFC-2822 - or W3C's subset of ISO-8601 and displays them in ISO-8601 format. For a much - more sophisticated date time cell with better datetime formatting, take a - look at the Backgrid.Extension.MomentCell extension. - - @class Backgrid.DatetimeCell - @extends Backgrid.Cell - - See: - - - Backgrid.Extension.MomentCell - - Backgrid.DatetimeFormatter -*/ -var DatetimeCell = Backgrid.DatetimeCell = Cell.extend({ - - /** @property */ - className: "datetime-cell", - - /** - @property {boolean} [includeDate=true] - */ - includeDate: DatetimeFormatter.prototype.defaults.includeDate, - - /** - @property {boolean} [includeTime=true] - */ - includeTime: DatetimeFormatter.prototype.defaults.includeTime, - - /** - @property {boolean} [includeMilli=false] - */ - includeMilli: DatetimeFormatter.prototype.defaults.includeMilli, - - /** @property {Backgrid.CellFormatter} [formatter=Backgrid.DatetimeFormatter] */ - formatter: DatetimeFormatter, - - /** - Initializes this cell and the datetime formatter. - - @param {Object} options - @param {Backbone.Model} options.model - @param {Backgrid.Column} options.column - */ - initialize: function (options) { - DatetimeCell.__super__.initialize.apply(this, arguments); - var formatter = this.formatter; - formatter.includeDate = this.includeDate; - formatter.includeTime = this.includeTime; - formatter.includeMilli = this.includeMilli; - - var placeholder = this.includeDate ? "YYYY-MM-DD" : ""; - placeholder += (this.includeDate && this.includeTime) ? "T" : ""; - placeholder += this.includeTime ? "HH:mm:ss" : ""; - placeholder += (this.includeTime && this.includeMilli) ? ".SSS" : ""; - - this.editor = this.editor.extend({ - attributes: _.extend({}, this.editor.prototype.attributes, this.editor.attributes, { - placeholder: placeholder - }) - }); - } - -}); - -/** - DateCell is a Backgrid.DatetimeCell without the time part. - - @class Backgrid.DateCell - @extends Backgrid.DatetimeCell -*/ -var DateCell = Backgrid.DateCell = DatetimeCell.extend({ - - /** @property */ - className: "date-cell", - - /** @property */ - includeTime: false - -}); - -/** - TimeCell is a Backgrid.DatetimeCell without the date part. - - @class Backgrid.TimeCell - @extends Backgrid.DatetimeCell -*/ -var TimeCell = Backgrid.TimeCell = DatetimeCell.extend({ - - /** @property */ - className: "time-cell", - - /** @property */ - includeDate: false - -}); - -/** - BooleanCellEditor renders a checkbox as its editor. - - @class Backgrid.BooleanCellEditor - @extends Backgrid.CellEditor -*/ -var BooleanCellEditor = Backgrid.BooleanCellEditor = CellEditor.extend({ - - /** @property */ - tagName: "input", - - /** @property */ - attributes: { - tabIndex: -1, - type: "checkbox" - }, - - /** @property */ - events: { - "mousedown": function () { - this.mouseDown = true; - }, - "blur": "enterOrExitEditMode", - "mouseup": function () { - this.mouseDown = false; - }, - "change": "saveOrCancel", - "keydown": "saveOrCancel" - }, - - /** - Renders a checkbox and check it if the model value of this column is true, - uncheck otherwise. - */ - render: function () { - var model = this.model; - var val = this.formatter.fromRaw(model.get(this.column.get("name")), model); - this.$el.prop("checked", val); - return this; - }, - - /** - Event handler. Hack to deal with the case where `blur` is fired before - `change` and `click` on a checkbox. - */ - enterOrExitEditMode: function (e) { - if (!this.mouseDown) { - var model = this.model; - model.trigger("backgrid:edited", model, this.column, new Command(e)); - } - }, - - /** - Event handler. Save the value into the model if the event is `change` or - one of the keyboard navigation key presses. Exit edit mode without saving - if `escape` was pressed. - */ - saveOrCancel: function (e) { - var model = this.model; - var column = this.column; - var formatter = this.formatter; - var command = new Command(e); - // skip ahead to `change` when space is pressed - if (command.passThru() && e.type != "change") return true; - if (command.cancel()) { - e.stopPropagation(); - model.trigger("backgrid:edited", model, column, command); - } - - var $el = this.$el; - if (command.save() || command.moveLeft() || command.moveRight() || command.moveUp() || - command.moveDown()) { - e.preventDefault(); - e.stopPropagation(); - var val = formatter.toRaw($el.prop("checked"), model); - model.set(column.get("name"), val); - model.trigger("backgrid:edited", model, column, command); - } - else if (e.type == "change") { - var val = formatter.toRaw($el.prop("checked"), model); - model.set(column.get("name"), val); - $el.focus(); - } - } - -}); - -/** - BooleanCell renders a checkbox both during display mode and edit mode. The - checkbox is checked if the model value is true, unchecked otherwise. - - @class Backgrid.BooleanCell - @extends Backgrid.Cell -*/ -var BooleanCell = Backgrid.BooleanCell = Cell.extend({ - - /** @property */ - className: "boolean-cell", - - /** @property */ - editor: BooleanCellEditor, - - /** @property */ - events: { - "click": "enterEditMode" - }, - - /** - Renders a checkbox and check it if the model value of this column is true, - uncheck otherwise. - */ - render: function () { - this.$el.empty(); - var model = this.model, column = this.column; - var editable = Backgrid.callByNeed(column.editable(), column, model); - this.$el.append($("", { - tabIndex: -1, - type: "checkbox", - checked: this.formatter.fromRaw(model.get(column.get("name")), model), - disabled: !editable - })); - this.delegateEvents(); - return this; - } - -}); - -/** - SelectCellEditor renders an HTML `', null, {variable: null}), - - /** @property */ - cols: 80, - - /** @property */ - rows: 10, - - /** @property */ - events: { - "keydown textarea": "clearError", - "submit": "saveOrCancel", - "hide.bs.modal": "saveOrCancel", - "hidden.bs.modal": "close", - "shown.bs.modal": "focus" - }, - - /** - @property {Object} modalOptions The options passed to Bootstrap's modal - plugin. - */ - modalOptions: { - backdrop: false - }, - - /** - Renders a modal form dialog with a textarea, submit button and a close button. - */ - render: function () { - this.$el.html($(this.template({ - column: this.column, - cols: this.cols, - rows: this.rows, - content: this.formatter.fromRaw(this.model.get(this.column.get("name"))) - }))); - - this.delegateEvents(); - - this.$el.modal(this.modalOptions); - - return this; - }, - - /** - Event handler. Saves the text in the text area to the model when - submitting. When cancelling, if the text area is dirty, a confirmation - dialog will pop up. If the user clicks confirm, the text will be saved to - the model. - - Triggers a Backbone `backgrid:error` event from the model along with the - model, column and the existing value as the parameters if the value - cannot be converted. - - @param {Event} e - */ - saveOrCancel: function (e) { - if (e && e.type == "submit") { - e.preventDefault(); - e.stopPropagation(); - } - - var model = this.model; - var column = this.column; - var val = this.$el.find("textarea").val(); - var newValue = this.formatter.toRaw(val); - - if (_.isUndefined(newValue)) { - model.trigger("backgrid:error", model, column, val); - - if (e) { - e.preventDefault(); - e.stopPropagation(); - } - } - else if (!e || e.type == "submit" || - (e.type == "hide" && - newValue !== (this.model.get(this.column.get("name")) || '').replace(/\r/g, '') && - confirm("Would you like to save your changes?"))) { - - model.set(column.get("name"), newValue); - this.$el.modal("hide"); - } - else if (e.type != "hide") this.$el.modal("hide"); - }, - - /** - Clears the error class on the parent cell. - */ - clearError: _.debounce(function () { - if (!_.isUndefined(this.formatter.toRaw(this.$el.find("textarea").val()))) { - this.$el.parent().removeClass("error"); - } - }, 150), - - /** - Triggers a `backgrid:edited` event along with the cell editor as the - parameter after the modal is hidden. - - @param {Event} e - */ - close: function (e) { - var model = this.model; - model.trigger("backgrid:edited", model, this.column, - new Backgrid.Command(e)); - }, - - /** - Focuses the textarea when the modal is shown. - */ - focus: function () { - this.$el.find("textarea").focus(); - } - - }); - - /** - TextCell is a string cell type that renders a form with a text area in a - modal dialog instead of an input box editor. It is best suited for entering - a large body of text. - - @class Backgrid.Extension.TextCell - @extends Backgrid.StringCell - */ - Backgrid.Extension.TextCell = Backgrid.StringCell.extend({ - - /** @property */ - className: "text-cell", - - /** @property */ - editor: TextareaEditor - - }); - -})); diff --git a/examples/js/underscore.js b/examples/js/underscore.js deleted file mode 100644 index 8219dc50..00000000 --- a/examples/js/underscore.js +++ /dev/null @@ -1,1692 +0,0 @@ -// Underscore.js 1.9.1 -// http://underscorejs.org -// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` (`self`) in the browser, `global` - // on the server, or `this` in some virtual machines. We use `self` - // instead of `window` for `WebWorker` support. - var root = typeof self == 'object' && self.self === self && self || - typeof global == 'object' && global.global === global && global || - this || - {}; - - // Save the previous value of the `_` variable. - var previousUnderscore = root._; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype; - var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; - - // Create quick reference variables for speed access to core prototypes. - var push = ArrayProto.push, - slice = ArrayProto.slice, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // All **ECMAScript 5** native function implementations that we hope to use - // are declared here. - var nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeCreate = Object.create; - - // Naked function reference for surrogate-prototype-swapping. - var Ctor = function(){}; - - // Create a safe reference to the Underscore object for use below. - var _ = function(obj) { - if (obj instanceof _) return obj; - if (!(this instanceof _)) return new _(obj); - this._wrapped = obj; - }; - - // Export the Underscore object for **Node.js**, with - // backwards-compatibility for their old module API. If we're in - // the browser, add `_` as a global object. - // (`nodeType` is checked to ensure that `module` - // and `exports` are not HTML elements.) - if (typeof exports != 'undefined' && !exports.nodeType) { - if (typeof module != 'undefined' && !module.nodeType && module.exports) { - exports = module.exports = _; - } - exports._ = _; - } else { - root._ = _; - } - - // Current version. - _.VERSION = '1.9.1'; - - // Internal function that returns an efficient (for current engines) version - // of the passed-in callback, to be repeatedly applied in other Underscore - // functions. - var optimizeCb = function(func, context, argCount) { - if (context === void 0) return func; - switch (argCount == null ? 3 : argCount) { - case 1: return function(value) { - return func.call(context, value); - }; - // The 2-argument case is omitted because we’re not using it. - case 3: return function(value, index, collection) { - return func.call(context, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(context, accumulator, value, index, collection); - }; - } - return function() { - return func.apply(context, arguments); - }; - }; - - var builtinIteratee; - - // An internal function to generate callbacks that can be applied to each - // element in a collection, returning the desired result — either `identity`, - // an arbitrary callback, a property matcher, or a property accessor. - var cb = function(value, context, argCount) { - if (_.iteratee !== builtinIteratee) return _.iteratee(value, context); - if (value == null) return _.identity; - if (_.isFunction(value)) return optimizeCb(value, context, argCount); - if (_.isObject(value) && !_.isArray(value)) return _.matcher(value); - return _.property(value); - }; - - // External wrapper for our callback generator. Users may customize - // `_.iteratee` if they want additional predicate/iteratee shorthand styles. - // This abstraction hides the internal-only argCount argument. - _.iteratee = builtinIteratee = function(value, context) { - return cb(value, context, Infinity); - }; - - // Some functions take a variable number of arguments, or a few expected - // arguments at the beginning and then a variable number of values to operate - // on. This helper accumulates all remaining arguments past the function’s - // argument length (or an explicit `startIndex`), into an array that becomes - // the last argument. Similar to ES6’s "rest parameter". - var restArguments = function(func, startIndex) { - startIndex = startIndex == null ? func.length - 1 : +startIndex; - return function() { - var length = Math.max(arguments.length - startIndex, 0), - rest = Array(length), - index = 0; - for (; index < length; index++) { - rest[index] = arguments[index + startIndex]; - } - switch (startIndex) { - case 0: return func.call(this, rest); - case 1: return func.call(this, arguments[0], rest); - case 2: return func.call(this, arguments[0], arguments[1], rest); - } - var args = Array(startIndex + 1); - for (index = 0; index < startIndex; index++) { - args[index] = arguments[index]; - } - args[startIndex] = rest; - return func.apply(this, args); - }; - }; - - // An internal function for creating a new object that inherits from another. - var baseCreate = function(prototype) { - if (!_.isObject(prototype)) return {}; - if (nativeCreate) return nativeCreate(prototype); - Ctor.prototype = prototype; - var result = new Ctor; - Ctor.prototype = null; - return result; - }; - - var shallowProperty = function(key) { - return function(obj) { - return obj == null ? void 0 : obj[key]; - }; - }; - - var has = function(obj, path) { - return obj != null && hasOwnProperty.call(obj, path); - } - - var deepGet = function(obj, path) { - var length = path.length; - for (var i = 0; i < length; i++) { - if (obj == null) return void 0; - obj = obj[path[i]]; - } - return length ? obj : void 0; - }; - - // Helper for collection methods to determine whether a collection - // should be iterated as an array or as an object. - // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength - // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 - var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; - var getLength = shallowProperty('length'); - var isArrayLike = function(collection) { - var length = getLength(collection); - return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; - }; - - // Collection Functions - // -------------------- - - // The cornerstone, an `each` implementation, aka `forEach`. - // Handles raw objects in addition to array-likes. Treats all - // sparse array-likes as if they were dense. - _.each = _.forEach = function(obj, iteratee, context) { - iteratee = optimizeCb(iteratee, context); - var i, length; - if (isArrayLike(obj)) { - for (i = 0, length = obj.length; i < length; i++) { - iteratee(obj[i], i, obj); - } - } else { - var keys = _.keys(obj); - for (i = 0, length = keys.length; i < length; i++) { - iteratee(obj[keys[i]], keys[i], obj); - } - } - return obj; - }; - - // Return the results of applying the iteratee to each element. - _.map = _.collect = function(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length, - results = Array(length); - for (var index = 0; index < length; index++) { - var currentKey = keys ? keys[index] : index; - results[index] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - }; - - // Create a reducing function iterating left or right. - var createReduce = function(dir) { - // Wrap code that reassigns argument variables in a separate function than - // the one that accesses `arguments.length` to avoid a perf hit. (#1991) - var reducer = function(obj, iteratee, memo, initial) { - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length, - index = dir > 0 ? 0 : length - 1; - if (!initial) { - memo = obj[keys ? keys[index] : index]; - index += dir; - } - for (; index >= 0 && index < length; index += dir) { - var currentKey = keys ? keys[index] : index; - memo = iteratee(memo, obj[currentKey], currentKey, obj); - } - return memo; - }; - - return function(obj, iteratee, memo, context) { - var initial = arguments.length >= 3; - return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); - }; - }; - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. - _.reduce = _.foldl = _.inject = createReduce(1); - - // The right-associative version of reduce, also known as `foldr`. - _.reduceRight = _.foldr = createReduce(-1); - - // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, predicate, context) { - var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey; - var key = keyFinder(obj, predicate, context); - if (key !== void 0 && key !== -1) return obj[key]; - }; - - // Return all the elements that pass a truth test. - // Aliased as `select`. - _.filter = _.select = function(obj, predicate, context) { - var results = []; - predicate = cb(predicate, context); - _.each(obj, function(value, index, list) { - if (predicate(value, index, list)) results.push(value); - }); - return results; - }; - - // Return all the elements for which a truth test fails. - _.reject = function(obj, predicate, context) { - return _.filter(obj, _.negate(cb(predicate)), context); - }; - - // Determine whether all of the elements match a truth test. - // Aliased as `all`. - _.every = _.all = function(obj, predicate, context) { - predicate = cb(predicate, context); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = keys ? keys[index] : index; - if (!predicate(obj[currentKey], currentKey, obj)) return false; - } - return true; - }; - - // Determine if at least one element in the object matches a truth test. - // Aliased as `any`. - _.some = _.any = function(obj, predicate, context) { - predicate = cb(predicate, context); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = keys ? keys[index] : index; - if (predicate(obj[currentKey], currentKey, obj)) return true; - } - return false; - }; - - // Determine if the array or object contains a given item (using `===`). - // Aliased as `includes` and `include`. - _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) { - if (!isArrayLike(obj)) obj = _.values(obj); - if (typeof fromIndex != 'number' || guard) fromIndex = 0; - return _.indexOf(obj, item, fromIndex) >= 0; - }; - - // Invoke a method (with arguments) on every item in a collection. - _.invoke = restArguments(function(obj, path, args) { - var contextPath, func; - if (_.isFunction(path)) { - func = path; - } else if (_.isArray(path)) { - contextPath = path.slice(0, -1); - path = path[path.length - 1]; - } - return _.map(obj, function(context) { - var method = func; - if (!method) { - if (contextPath && contextPath.length) { - context = deepGet(context, contextPath); - } - if (context == null) return void 0; - method = context[path]; - } - return method == null ? method : method.apply(context, args); - }); - }); - - // Convenience version of a common use case of `map`: fetching a property. - _.pluck = function(obj, key) { - return _.map(obj, _.property(key)); - }; - - // Convenience version of a common use case of `filter`: selecting only objects - // containing specific `key:value` pairs. - _.where = function(obj, attrs) { - return _.filter(obj, _.matcher(attrs)); - }; - - // Convenience version of a common use case of `find`: getting the first object - // containing specific `key:value` pairs. - _.findWhere = function(obj, attrs) { - return _.find(obj, _.matcher(attrs)); - }; - - // Return the maximum element (or element-based computation). - _.max = function(obj, iteratee, context) { - var result = -Infinity, lastComputed = -Infinity, - value, computed; - if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { - obj = isArrayLike(obj) ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value > result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - _.each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed > lastComputed || computed === -Infinity && result === -Infinity) { - result = v; - lastComputed = computed; - } - }); - } - return result; - }; - - // Return the minimum element (or element-based computation). - _.min = function(obj, iteratee, context) { - var result = Infinity, lastComputed = Infinity, - value, computed; - if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { - obj = isArrayLike(obj) ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value < result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - _.each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed < lastComputed || computed === Infinity && result === Infinity) { - result = v; - lastComputed = computed; - } - }); - } - return result; - }; - - // Shuffle a collection. - _.shuffle = function(obj) { - return _.sample(obj, Infinity); - }; - - // Sample **n** random values from a collection using the modern version of the - // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). - // If **n** is not specified, returns a single random element. - // The internal `guard` argument allows it to work with `map`. - _.sample = function(obj, n, guard) { - if (n == null || guard) { - if (!isArrayLike(obj)) obj = _.values(obj); - return obj[_.random(obj.length - 1)]; - } - var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj); - var length = getLength(sample); - n = Math.max(Math.min(n, length), 0); - var last = length - 1; - for (var index = 0; index < n; index++) { - var rand = _.random(index, last); - var temp = sample[index]; - sample[index] = sample[rand]; - sample[rand] = temp; - } - return sample.slice(0, n); - }; - - // Sort the object's values by a criterion produced by an iteratee. - _.sortBy = function(obj, iteratee, context) { - var index = 0; - iteratee = cb(iteratee, context); - return _.pluck(_.map(obj, function(value, key, list) { - return { - value: value, - index: index++, - criteria: iteratee(value, key, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index - right.index; - }), 'value'); - }; - - // An internal function used for aggregate "group by" operations. - var group = function(behavior, partition) { - return function(obj, iteratee, context) { - var result = partition ? [[], []] : {}; - iteratee = cb(iteratee, context); - _.each(obj, function(value, index) { - var key = iteratee(value, index, obj); - behavior(result, value, key); - }); - return result; - }; - }; - - // Groups the object's values by a criterion. Pass either a string attribute - // to group by, or a function that returns the criterion. - _.groupBy = group(function(result, value, key) { - if (has(result, key)) result[key].push(value); else result[key] = [value]; - }); - - // Indexes the object's values by a criterion, similar to `groupBy`, but for - // when you know that your index values will be unique. - _.indexBy = group(function(result, value, key) { - result[key] = value; - }); - - // Counts instances of an object that group by a certain criterion. Pass - // either a string attribute to count by, or a function that returns the - // criterion. - _.countBy = group(function(result, value, key) { - if (has(result, key)) result[key]++; else result[key] = 1; - }); - - var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; - // Safely create a real, live array from anything iterable. - _.toArray = function(obj) { - if (!obj) return []; - if (_.isArray(obj)) return slice.call(obj); - if (_.isString(obj)) { - // Keep surrogate pair characters together - return obj.match(reStrSymbol); - } - if (isArrayLike(obj)) return _.map(obj, _.identity); - return _.values(obj); - }; - - // Return the number of elements in an object. - _.size = function(obj) { - if (obj == null) return 0; - return isArrayLike(obj) ? obj.length : _.keys(obj).length; - }; - - // Split a collection into two arrays: one whose elements all satisfy the given - // predicate, and one whose elements all do not satisfy the predicate. - _.partition = group(function(result, value, pass) { - result[pass ? 0 : 1].push(value); - }, true); - - // Array Functions - // --------------- - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. Aliased as `head` and `take`. The **guard** check - // allows it to work with `_.map`. - _.first = _.head = _.take = function(array, n, guard) { - if (array == null || array.length < 1) return n == null ? void 0 : []; - if (n == null || guard) return array[0]; - return _.initial(array, array.length - n); - }; - - // Returns everything but the last entry of the array. Especially useful on - // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. - _.initial = function(array, n, guard) { - return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); - }; - - // Get the last element of an array. Passing **n** will return the last N - // values in the array. - _.last = function(array, n, guard) { - if (array == null || array.length < 1) return n == null ? void 0 : []; - if (n == null || guard) return array[array.length - 1]; - return _.rest(array, Math.max(0, array.length - n)); - }; - - // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. - // Especially useful on the arguments object. Passing an **n** will return - // the rest N values in the array. - _.rest = _.tail = _.drop = function(array, n, guard) { - return slice.call(array, n == null || guard ? 1 : n); - }; - - // Trim out all falsy values from an array. - _.compact = function(array) { - return _.filter(array, Boolean); - }; - - // Internal implementation of a recursive `flatten` function. - var flatten = function(input, shallow, strict, output) { - output = output || []; - var idx = output.length; - for (var i = 0, length = getLength(input); i < length; i++) { - var value = input[i]; - if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { - // Flatten current level of array or arguments object. - if (shallow) { - var j = 0, len = value.length; - while (j < len) output[idx++] = value[j++]; - } else { - flatten(value, shallow, strict, output); - idx = output.length; - } - } else if (!strict) { - output[idx++] = value; - } - } - return output; - }; - - // Flatten out an array, either recursively (by default), or just one level. - _.flatten = function(array, shallow) { - return flatten(array, shallow, false); - }; - - // Return a version of the array that does not contain the specified value(s). - _.without = restArguments(function(array, otherArrays) { - return _.difference(array, otherArrays); - }); - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // The faster algorithm will not work with an iteratee if the iteratee - // is not a one-to-one function, so providing an iteratee will disable - // the faster algorithm. - // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted, iteratee, context) { - if (!_.isBoolean(isSorted)) { - context = iteratee; - iteratee = isSorted; - isSorted = false; - } - if (iteratee != null) iteratee = cb(iteratee, context); - var result = []; - var seen = []; - for (var i = 0, length = getLength(array); i < length; i++) { - var value = array[i], - computed = iteratee ? iteratee(value, i, array) : value; - if (isSorted && !iteratee) { - if (!i || seen !== computed) result.push(value); - seen = computed; - } else if (iteratee) { - if (!_.contains(seen, computed)) { - seen.push(computed); - result.push(value); - } - } else if (!_.contains(result, value)) { - result.push(value); - } - } - return result; - }; - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - _.union = restArguments(function(arrays) { - return _.uniq(flatten(arrays, true, true)); - }); - - // Produce an array that contains every item shared between all the - // passed-in arrays. - _.intersection = function(array) { - var result = []; - var argsLength = arguments.length; - for (var i = 0, length = getLength(array); i < length; i++) { - var item = array[i]; - if (_.contains(result, item)) continue; - var j; - for (j = 1; j < argsLength; j++) { - if (!_.contains(arguments[j], item)) break; - } - if (j === argsLength) result.push(item); - } - return result; - }; - - // Take the difference between one array and a number of other arrays. - // Only the elements present in just the first array will remain. - _.difference = restArguments(function(array, rest) { - rest = flatten(rest, true, true); - return _.filter(array, function(value){ - return !_.contains(rest, value); - }); - }); - - // Complement of _.zip. Unzip accepts an array of arrays and groups - // each array's elements on shared indices. - _.unzip = function(array) { - var length = array && _.max(array, getLength).length || 0; - var result = Array(length); - - for (var index = 0; index < length; index++) { - result[index] = _.pluck(array, index); - } - return result; - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = restArguments(_.unzip); - - // Converts lists into objects. Pass either a single array of `[key, value]` - // pairs, or two parallel arrays of the same length -- one of keys, and one of - // the corresponding values. Passing by pairs is the reverse of _.pairs. - _.object = function(list, values) { - var result = {}; - for (var i = 0, length = getLength(list); i < length; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; - }; - - // Generator function to create the findIndex and findLastIndex functions. - var createPredicateIndexFinder = function(dir) { - return function(array, predicate, context) { - predicate = cb(predicate, context); - var length = getLength(array); - var index = dir > 0 ? 0 : length - 1; - for (; index >= 0 && index < length; index += dir) { - if (predicate(array[index], index, array)) return index; - } - return -1; - }; - }; - - // Returns the first index on an array-like that passes a predicate test. - _.findIndex = createPredicateIndexFinder(1); - _.findLastIndex = createPredicateIndexFinder(-1); - - // Use a comparator function to figure out the smallest index at which - // an object should be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iteratee, context) { - iteratee = cb(iteratee, context, 1); - var value = iteratee(obj); - var low = 0, high = getLength(array); - while (low < high) { - var mid = Math.floor((low + high) / 2); - if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; - } - return low; - }; - - // Generator function to create the indexOf and lastIndexOf functions. - var createIndexFinder = function(dir, predicateFind, sortedIndex) { - return function(array, item, idx) { - var i = 0, length = getLength(array); - if (typeof idx == 'number') { - if (dir > 0) { - i = idx >= 0 ? idx : Math.max(idx + length, i); - } else { - length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; - } - } else if (sortedIndex && idx && length) { - idx = sortedIndex(array, item); - return array[idx] === item ? idx : -1; - } - if (item !== item) { - idx = predicateFind(slice.call(array, i, length), _.isNaN); - return idx >= 0 ? idx + i : -1; - } - for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { - if (array[idx] === item) return idx; - } - return -1; - }; - }; - - // Return the position of the first occurrence of an item in an array, - // or -1 if the item is not included in the array. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex); - _.lastIndexOf = createIndexFinder(-1, _.findLastIndex); - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](http://docs.python.org/library/functions.html#range). - _.range = function(start, stop, step) { - if (stop == null) { - stop = start || 0; - start = 0; - } - if (!step) { - step = stop < start ? -1 : 1; - } - - var length = Math.max(Math.ceil((stop - start) / step), 0); - var range = Array(length); - - for (var idx = 0; idx < length; idx++, start += step) { - range[idx] = start; - } - - return range; - }; - - // Chunk a single array into multiple arrays, each containing `count` or fewer - // items. - _.chunk = function(array, count) { - if (count == null || count < 1) return []; - var result = []; - var i = 0, length = array.length; - while (i < length) { - result.push(slice.call(array, i, i += count)); - } - return result; - }; - - // Function (ahem) Functions - // ------------------ - - // Determines whether to execute a function as a constructor - // or a normal function with the provided arguments. - var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { - if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); - var self = baseCreate(sourceFunc.prototype); - var result = sourceFunc.apply(self, args); - if (_.isObject(result)) return result; - return self; - }; - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if - // available. - _.bind = restArguments(function(func, context, args) { - if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); - var bound = restArguments(function(callArgs) { - return executeBound(func, bound, context, this, args.concat(callArgs)); - }); - return bound; - }); - - // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. _ acts - // as a placeholder by default, allowing any combination of arguments to be - // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. - _.partial = restArguments(function(func, boundArgs) { - var placeholder = _.partial.placeholder; - var bound = function() { - var position = 0, length = boundArgs.length; - var args = Array(length); - for (var i = 0; i < length; i++) { - args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; - } - while (position < arguments.length) args.push(arguments[position++]); - return executeBound(func, bound, this, this, args); - }; - return bound; - }); - - _.partial.placeholder = _; - - // Bind a number of an object's methods to that object. Remaining arguments - // are the method names to be bound. Useful for ensuring that all callbacks - // defined on an object belong to it. - _.bindAll = restArguments(function(obj, keys) { - keys = flatten(keys, false, false); - var index = keys.length; - if (index < 1) throw new Error('bindAll must be passed function names'); - while (index--) { - var key = keys[index]; - obj[key] = _.bind(obj[key], obj); - } - }); - - // Memoize an expensive function by storing its results. - _.memoize = function(func, hasher) { - var memoize = function(key) { - var cache = memoize.cache; - var address = '' + (hasher ? hasher.apply(this, arguments) : key); - if (!has(cache, address)) cache[address] = func.apply(this, arguments); - return cache[address]; - }; - memoize.cache = {}; - return memoize; - }; - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - _.delay = restArguments(function(func, wait, args) { - return setTimeout(function() { - return func.apply(null, args); - }, wait); - }); - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - _.defer = _.partial(_.delay, _, 1); - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. Normally, the throttled function will run - // as much as it can, without ever going more than once per `wait` duration; - // but if you'd like to disable the execution on the leading edge, pass - // `{leading: false}`. To disable execution on the trailing edge, ditto. - _.throttle = function(func, wait, options) { - var timeout, context, args, result; - var previous = 0; - if (!options) options = {}; - - var later = function() { - previous = options.leading === false ? 0 : _.now(); - timeout = null; - result = func.apply(context, args); - if (!timeout) context = args = null; - }; - - var throttled = function() { - var now = _.now(); - if (!previous && options.leading === false) previous = now; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0 || remaining > wait) { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - previous = now; - result = func.apply(context, args); - if (!timeout) context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - - throttled.cancel = function() { - clearTimeout(timeout); - previous = 0; - timeout = context = args = null; - }; - - return throttled; - }; - - // Returns a function, that, as long as it continues to be invoked, will not - // be triggered. The function will be called after it stops being called for - // N milliseconds. If `immediate` is passed, trigger the function on the - // leading edge, instead of the trailing. - _.debounce = function(func, wait, immediate) { - var timeout, result; - - var later = function(context, args) { - timeout = null; - if (args) result = func.apply(context, args); - }; - - var debounced = restArguments(function(args) { - if (timeout) clearTimeout(timeout); - if (immediate) { - var callNow = !timeout; - timeout = setTimeout(later, wait); - if (callNow) result = func.apply(this, args); - } else { - timeout = _.delay(later, wait, this, args); - } - - return result; - }); - - debounced.cancel = function() { - clearTimeout(timeout); - timeout = null; - }; - - return debounced; - }; - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - _.wrap = function(func, wrapper) { - return _.partial(wrapper, func); - }; - - // Returns a negated version of the passed-in predicate. - _.negate = function(predicate) { - return function() { - return !predicate.apply(this, arguments); - }; - }; - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - _.compose = function() { - var args = arguments; - var start = args.length - 1; - return function() { - var i = start; - var result = args[start].apply(this, arguments); - while (i--) result = args[i].call(this, result); - return result; - }; - }; - - // Returns a function that will only be executed on and after the Nth call. - _.after = function(times, func) { - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; - }; - - // Returns a function that will only be executed up to (but not including) the Nth call. - _.before = function(times, func) { - var memo; - return function() { - if (--times > 0) { - memo = func.apply(this, arguments); - } - if (times <= 1) func = null; - return memo; - }; - }; - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = _.partial(_.before, 2); - - _.restArguments = restArguments; - - // Object Functions - // ---------------- - - // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. - var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); - var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', - 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; - - var collectNonEnumProps = function(obj, keys) { - var nonEnumIdx = nonEnumerableProps.length; - var constructor = obj.constructor; - var proto = _.isFunction(constructor) && constructor.prototype || ObjProto; - - // Constructor is a special case. - var prop = 'constructor'; - if (has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); - - while (nonEnumIdx--) { - prop = nonEnumerableProps[nonEnumIdx]; - if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { - keys.push(prop); - } - } - }; - - // Retrieve the names of an object's own properties. - // Delegates to **ECMAScript 5**'s native `Object.keys`. - _.keys = function(obj) { - if (!_.isObject(obj)) return []; - if (nativeKeys) return nativeKeys(obj); - var keys = []; - for (var key in obj) if (has(obj, key)) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; - }; - - // Retrieve all the property names of an object. - _.allKeys = function(obj) { - if (!_.isObject(obj)) return []; - var keys = []; - for (var key in obj) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; - }; - - // Retrieve the values of an object's properties. - _.values = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var values = Array(length); - for (var i = 0; i < length; i++) { - values[i] = obj[keys[i]]; - } - return values; - }; - - // Returns the results of applying the iteratee to each element of the object. - // In contrast to _.map it returns an object. - _.mapObject = function(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var keys = _.keys(obj), - length = keys.length, - results = {}; - for (var index = 0; index < length; index++) { - var currentKey = keys[index]; - results[currentKey] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - }; - - // Convert an object into a list of `[key, value]` pairs. - // The opposite of _.object. - _.pairs = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var pairs = Array(length); - for (var i = 0; i < length; i++) { - pairs[i] = [keys[i], obj[keys[i]]]; - } - return pairs; - }; - - // Invert the keys and values of an object. The values must be serializable. - _.invert = function(obj) { - var result = {}; - var keys = _.keys(obj); - for (var i = 0, length = keys.length; i < length; i++) { - result[obj[keys[i]]] = keys[i]; - } - return result; - }; - - // Return a sorted list of the function names available on the object. - // Aliased as `methods`. - _.functions = _.methods = function(obj) { - var names = []; - for (var key in obj) { - if (_.isFunction(obj[key])) names.push(key); - } - return names.sort(); - }; - - // An internal function for creating assigner functions. - var createAssigner = function(keysFunc, defaults) { - return function(obj) { - var length = arguments.length; - if (defaults) obj = Object(obj); - if (length < 2 || obj == null) return obj; - for (var index = 1; index < length; index++) { - var source = arguments[index], - keys = keysFunc(source), - l = keys.length; - for (var i = 0; i < l; i++) { - var key = keys[i]; - if (!defaults || obj[key] === void 0) obj[key] = source[key]; - } - } - return obj; - }; - }; - - // Extend a given object with all the properties in passed-in object(s). - _.extend = createAssigner(_.allKeys); - - // Assigns a given object with all the own properties in the passed-in object(s). - // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) - _.extendOwn = _.assign = createAssigner(_.keys); - - // Returns the first key on an object that passes a predicate test. - _.findKey = function(obj, predicate, context) { - predicate = cb(predicate, context); - var keys = _.keys(obj), key; - for (var i = 0, length = keys.length; i < length; i++) { - key = keys[i]; - if (predicate(obj[key], key, obj)) return key; - } - }; - - // Internal pick helper function to determine if `obj` has key `key`. - var keyInObj = function(value, key, obj) { - return key in obj; - }; - - // Return a copy of the object only containing the whitelisted properties. - _.pick = restArguments(function(obj, keys) { - var result = {}, iteratee = keys[0]; - if (obj == null) return result; - if (_.isFunction(iteratee)) { - if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); - keys = _.allKeys(obj); - } else { - iteratee = keyInObj; - keys = flatten(keys, false, false); - obj = Object(obj); - } - for (var i = 0, length = keys.length; i < length; i++) { - var key = keys[i]; - var value = obj[key]; - if (iteratee(value, key, obj)) result[key] = value; - } - return result; - }); - - // Return a copy of the object without the blacklisted properties. - _.omit = restArguments(function(obj, keys) { - var iteratee = keys[0], context; - if (_.isFunction(iteratee)) { - iteratee = _.negate(iteratee); - if (keys.length > 1) context = keys[1]; - } else { - keys = _.map(flatten(keys, false, false), String); - iteratee = function(value, key) { - return !_.contains(keys, key); - }; - } - return _.pick(obj, iteratee, context); - }); - - // Fill in a given object with default properties. - _.defaults = createAssigner(_.allKeys, true); - - // Creates an object that inherits from the given prototype object. - // If additional properties are provided then they will be added to the - // created object. - _.create = function(prototype, props) { - var result = baseCreate(prototype); - if (props) _.extendOwn(result, props); - return result; - }; - - // Create a (shallow-cloned) duplicate of an object. - _.clone = function(obj) { - if (!_.isObject(obj)) return obj; - return _.isArray(obj) ? obj.slice() : _.extend({}, obj); - }; - - // Invokes interceptor with the obj, and then returns obj. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - _.tap = function(obj, interceptor) { - interceptor(obj); - return obj; - }; - - // Returns whether an object has a given set of `key:value` pairs. - _.isMatch = function(object, attrs) { - var keys = _.keys(attrs), length = keys.length; - if (object == null) return !length; - var obj = Object(object); - for (var i = 0; i < length; i++) { - var key = keys[i]; - if (attrs[key] !== obj[key] || !(key in obj)) return false; - } - return true; - }; - - - // Internal recursive comparison function for `isEqual`. - var eq, deepEq; - eq = function(a, b, aStack, bStack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - if (a === b) return a !== 0 || 1 / a === 1 / b; - // `null` or `undefined` only equal to itself (strict comparison). - if (a == null || b == null) return false; - // `NaN`s are equivalent, but non-reflexive. - if (a !== a) return b !== b; - // Exhaust primitive checks - var type = typeof a; - if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; - return deepEq(a, b, aStack, bStack); - }; - - // Internal recursive comparison function for `isEqual`. - deepEq = function(a, b, aStack, bStack) { - // Unwrap any wrapped objects. - if (a instanceof _) a = a._wrapped; - if (b instanceof _) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className !== toString.call(b)) return false; - switch (className) { - // Strings, numbers, regular expressions, dates, and booleans are compared by value. - case '[object RegExp]': - // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return '' + a === '' + b; - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. - // Object(NaN) is equivalent to NaN. - if (+a !== +a) return +b !== +b; - // An `egal` comparison is performed for other numeric values. - return +a === 0 ? 1 / +a === 1 / b : +a === +b; - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a === +b; - case '[object Symbol]': - return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); - } - - var areArrays = className === '[object Array]'; - if (!areArrays) { - if (typeof a != 'object' || typeof b != 'object') return false; - - // Objects with different constructors are not equivalent, but `Object`s or `Array`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && - _.isFunction(bCtor) && bCtor instanceof bCtor) - && ('constructor' in a && 'constructor' in b)) { - return false; - } - } - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - - // Initializing stack of traversed objects. - // It's done here since we only need them for objects and arrays comparison. - aStack = aStack || []; - bStack = bStack || []; - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] === a) return bStack[length] === b; - } - - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - - // Recursively compare objects and arrays. - if (areArrays) { - // Compare array lengths to determine if a deep comparison is necessary. - length = a.length; - if (length !== b.length) return false; - // Deep compare the contents, ignoring non-numeric properties. - while (length--) { - if (!eq(a[length], b[length], aStack, bStack)) return false; - } - } else { - // Deep compare objects. - var keys = _.keys(a), key; - length = keys.length; - // Ensure that both objects contain the same number of properties before comparing deep equality. - if (_.keys(b).length !== length) return false; - while (length--) { - // Deep compare each member - key = keys[length]; - if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return true; - }; - - // Perform a deep comparison to check if two objects are equal. - _.isEqual = function(a, b) { - return eq(a, b); - }; - - // Is a given array, string, or object empty? - // An "empty" object has no enumerable own-properties. - _.isEmpty = function(obj) { - if (obj == null) return true; - if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; - return _.keys(obj).length === 0; - }; - - // Is a given value a DOM element? - _.isElement = function(obj) { - return !!(obj && obj.nodeType === 1); - }; - - // Is a given value an array? - // Delegates to ECMA5's native Array.isArray - _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) === '[object Array]'; - }; - - // Is a given variable an object? - _.isObject = function(obj) { - var type = typeof obj; - return type === 'function' || type === 'object' && !!obj; - }; - - // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet. - _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) { - _['is' + name] = function(obj) { - return toString.call(obj) === '[object ' + name + ']'; - }; - }); - - // Define a fallback version of the method in browsers (ahem, IE < 9), where - // there isn't any inspectable "Arguments" type. - if (!_.isArguments(arguments)) { - _.isArguments = function(obj) { - return has(obj, 'callee'); - }; - } - - // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, - // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). - var nodelist = root.document && root.document.childNodes; - if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') { - _.isFunction = function(obj) { - return typeof obj == 'function' || false; - }; - } - - // Is a given object a finite number? - _.isFinite = function(obj) { - return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj)); - }; - - // Is the given value `NaN`? - _.isNaN = function(obj) { - return _.isNumber(obj) && isNaN(obj); - }; - - // Is a given value a boolean? - _.isBoolean = function(obj) { - return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; - }; - - // Is a given value equal to null? - _.isNull = function(obj) { - return obj === null; - }; - - // Is a given variable undefined? - _.isUndefined = function(obj) { - return obj === void 0; - }; - - // Shortcut function for checking if an object has a given property directly - // on itself (in other words, not on a prototype). - _.has = function(obj, path) { - if (!_.isArray(path)) { - return has(obj, path); - } - var length = path.length; - for (var i = 0; i < length; i++) { - var key = path[i]; - if (obj == null || !hasOwnProperty.call(obj, key)) { - return false; - } - obj = obj[key]; - } - return !!length; - }; - - // Utility Functions - // ----------------- - - // Run Underscore.js in *noConflict* mode, returning the `_` variable to its - // previous owner. Returns a reference to the Underscore object. - _.noConflict = function() { - root._ = previousUnderscore; - return this; - }; - - // Keep the identity function around for default iteratees. - _.identity = function(value) { - return value; - }; - - // Predicate-generating functions. Often useful outside of Underscore. - _.constant = function(value) { - return function() { - return value; - }; - }; - - _.noop = function(){}; - - // Creates a function that, when passed an object, will traverse that object’s - // properties down the given `path`, specified as an array of keys or indexes. - _.property = function(path) { - if (!_.isArray(path)) { - return shallowProperty(path); - } - return function(obj) { - return deepGet(obj, path); - }; - }; - - // Generates a function for a given object that returns a given property. - _.propertyOf = function(obj) { - if (obj == null) { - return function(){}; - } - return function(path) { - return !_.isArray(path) ? obj[path] : deepGet(obj, path); - }; - }; - - // Returns a predicate for checking whether an object has a given set of - // `key:value` pairs. - _.matcher = _.matches = function(attrs) { - attrs = _.extendOwn({}, attrs); - return function(obj) { - return _.isMatch(obj, attrs); - }; - }; - - // Run a function **n** times. - _.times = function(n, iteratee, context) { - var accum = Array(Math.max(0, n)); - iteratee = optimizeCb(iteratee, context, 1); - for (var i = 0; i < n; i++) accum[i] = iteratee(i); - return accum; - }; - - // Return a random integer between min and max (inclusive). - _.random = function(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); - }; - - // A (possibly faster) way to get the current timestamp as an integer. - _.now = Date.now || function() { - return new Date().getTime(); - }; - - // List of HTML entities for escaping. - var escapeMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' - }; - var unescapeMap = _.invert(escapeMap); - - // Functions for escaping and unescaping strings to/from HTML interpolation. - var createEscaper = function(map) { - var escaper = function(match) { - return map[match]; - }; - // Regexes for identifying a key that needs to be escaped. - var source = '(?:' + _.keys(map).join('|') + ')'; - var testRegexp = RegExp(source); - var replaceRegexp = RegExp(source, 'g'); - return function(string) { - string = string == null ? '' : '' + string; - return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; - }; - }; - _.escape = createEscaper(escapeMap); - _.unescape = createEscaper(unescapeMap); - - // Traverses the children of `obj` along `path`. If a child is a function, it - // is invoked with its parent as context. Returns the value of the final - // child, or `fallback` if any child is undefined. - _.result = function(obj, path, fallback) { - if (!_.isArray(path)) path = [path]; - var length = path.length; - if (!length) { - return _.isFunction(fallback) ? fallback.call(obj) : fallback; - } - for (var i = 0; i < length; i++) { - var prop = obj == null ? void 0 : obj[path[i]]; - if (prop === void 0) { - prop = fallback; - i = length; // Ensure we don't continue iterating. - } - obj = _.isFunction(prop) ? prop.call(obj) : prop; - } - return obj; - }; - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - _.uniqueId = function(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate: /<%([\s\S]+?)%>/g, - interpolate: /<%=([\s\S]+?)%>/g, - escape: /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; - - var escapeChar = function(match) { - return '\\' + escapes[match]; - }; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - // NB: `oldSettings` only exists for backwards compatibility. - _.template = function(text, settings, oldSettings) { - if (!settings && oldSettings) settings = oldSettings; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset).replace(escapeRegExp, escapeChar); - index = offset + match.length; - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } else if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } else if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - - // Adobe VMs need the match returned to produce the correct offset. - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + 'return __p;\n'; - - var render; - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled source as a convenience for precompilation. - var argument = settings.variable || 'obj'; - template.source = 'function(' + argument + '){\n' + source + '}'; - - return template; - }; - - // Add a "chain" function. Start chaining a wrapped Underscore object. - _.chain = function(obj) { - var instance = _(obj); - instance._chain = true; - return instance; - }; - - // OOP - // --------------- - // If Underscore is called as a function, it returns a wrapped object that - // can be used OO-style. This wrapper holds altered versions of all the - // underscore functions. Wrapped objects may be chained. - - // Helper function to continue chaining intermediate results. - var chainResult = function(instance, obj) { - return instance._chain ? _(obj).chain() : obj; - }; - - // Add your own custom functions to the Underscore object. - _.mixin = function(obj) { - _.each(_.functions(obj), function(name) { - var func = _[name] = obj[name]; - _.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return chainResult(this, func.apply(_, args)); - }; - }); - return _; - }; - - // Add all of the Underscore functions to the wrapper object. - _.mixin(_); - - // Add all mutator Array functions to the wrapper. - _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - var obj = this._wrapped; - method.apply(obj, arguments); - if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; - return chainResult(this, obj); - }; - }); - - // Add all accessor Array functions to the wrapper. - _.each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - return chainResult(this, method.apply(this._wrapped, arguments)); - }; - }); - - // Extracts the result from a wrapped and chained object. - _.prototype.value = function() { - return this._wrapped; - }; - - // Provide unwrapping proxy for some methods used in engine operations - // such as arithmetic and JSON stringification. - _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; - - _.prototype.toString = function() { - return String(this._wrapped); - }; - - // AMD registration happens at the end for compatibility with AMD loaders - // that may not enforce next-turn semantics on modules. Even though general - // practice for AMD registration is to be anonymous, underscore registers - // as a named module because, like jQuery, it is a base library that is - // popular enough to be bundled in a third party lib, but not be part of - // an AMD load request. Those cases could generate an error when an - // anonymous define() is called outside of a loader request. - if (typeof define == 'function' && define.amd) { - define('underscore', [], function() { - return _; - }); - } -}()); diff --git a/examples/json/pageable-territories.json b/examples/json/pageable-territories.json deleted file mode 100644 index 86c82e37..00000000 --- a/examples/json/pageable-territories.json +++ /dev/null @@ -1 +0,0 @@ -[{"per_page": 15, "total_entries": 241, "total_pages": 17, "page": 1}, [{"name": "Afghanistan", "url": "http://en.wikipedia.org/wiki/Afghanistan", "pop": 25500100, "date": "2013-01-01", "percentage": 0.36, "id": 1}, {"name": "Albania", "url": "http://en.wikipedia.org/wiki/Albania", "pop": 2831741, "date": "2011-10-01", "percentage": 0.04, "id": 2}, {"name": "Algeria", "url": "http://en.wikipedia.org/wiki/Algeria", "pop": 37100000, "date": "2012-01-01", "percentage": 0.53, "id": 3}, {"name": "American Samoa (USA)", "url": "http://en.wikipedia.org/wiki/American_Samoa", "pop": 55519, "date": "2010-04-01", "percentage": 0.00079, "id": 4}, {"name": "Andorra", "url": "http://en.wikipedia.org/wiki/Andorra", "pop": 78115, "date": "2011-07-01", "percentage": 0.0011, "id": 5}, {"name": "Angola", "url": "http://en.wikipedia.org/wiki/Angola", "pop": 20609294, "date": "2012-07-01", "percentage": 0.29, "id": 6}, {"name": "Anguilla (UK)", "url": "http://en.wikipedia.org/wiki/Anguilla", "pop": 13452, "date": "2011-05-11", "percentage": 0.00019, "id": 7}, {"name": "Antigua and Barbuda", "url": "http://en.wikipedia.org/wiki/Antigua_and_Barbuda", "pop": 86295, "date": "2011-05-27", "percentage": 0.0012, "id": 8}, {"name": "Argentina", "url": "http://en.wikipedia.org/wiki/Argentina", "pop": 40117096, "date": "2010-10-27", "percentage": 0.57, "id": 9}, {"name": "Armenia", "url": "http://en.wikipedia.org/wiki/Armenia", "pop": 3275700, "date": "2012-06-01", "percentage": 0.046, "id": 10}, {"name": "Aruba (Netherlands)", "url": "http://en.wikipedia.org/wiki/Aruba", "pop": 101484, "date": "2010-09-29", "percentage": 0.0014, "id": 11}, {"name": "Australia", "url": "http://en.wikipedia.org/wiki/Australia", "pop": 22808690, "date": "2012-11-11", "percentage": 0.32, "id": 12}, {"name": "Austria", "url": "http://en.wikipedia.org/wiki/Austria", "pop": 8452835, "date": "2012-07-01", "percentage": 0.12, "id": 13}, {"name": "Azerbaijan", "url": "http://en.wikipedia.org/wiki/Azerbaijan", "pop": 9235100, "date": "2012-01-01", "percentage": 0.13, "id": 14}, {"name": "Bahamas", "url": "http://en.wikipedia.org/wiki/The_Bahamas", "pop": 353658, "date": "2010-05-03", "percentage": 0.005, "id": 15}, {"name": "Bahrain", "url": "http://en.wikipedia.org/wiki/Bahrain", "pop": 1234571, "date": "2010-04-27", "percentage": 0.018, "id": 16}, {"name": "Bangladesh", "url": "http://en.wikipedia.org/wiki/Bangladesh", "pop": 152518015, "date": "2012-07-16", "percentage": 2.16, "id": 17}, {"name": "Barbados", "url": "http://en.wikipedia.org/wiki/Barbados", "pop": 274200, "date": "2010-07-01", "percentage": 0.0039, "id": 18}, {"name": "Belarus", "url": "http://en.wikipedia.org/wiki/Belarus", "pop": 9459000, "date": "2012-09-01", "percentage": 0.13, "id": 19}, {"name": "Belgium", "url": "http://en.wikipedia.org/wiki/Belgium", "pop": 10839905, "date": "2010-01-01", "percentage": 0.15, "id": 20}, {"name": "Belize", "url": "http://en.wikipedia.org/wiki/Belize", "pop": 312971, "date": "2010-05-12", "percentage": 0.0044, "id": 21}, {"name": "Benin", "url": "http://en.wikipedia.org/wiki/Benin", "pop": 9352000, "date": "2012-07-01", "percentage": 0.13, "id": 22}, {"name": "Bermuda (UK)", "url": "http://en.wikipedia.org/wiki/Bermuda", "pop": 64237, "date": "2010-05-20", "percentage": 0.00091, "id": 23}, {"name": "Bhutan", "url": "http://en.wikipedia.org/wiki/Bhutan", "pop": 720679, "date": "2012-07-01", "percentage": 0.01, "id": 24}, {"name": "Bolivia", "url": "http://en.wikipedia.org/wiki/Bolivia", "pop": 10426155, "date": "2010-07-01", "percentage": 0.15, "id": 25}, {"name": "Bosnia and Herzegovina", "url": "http://en.wikipedia.org/wiki/Bosnia_and_Herzegovina", "pop": 3868621, "date": "2012-06-30", "percentage": 0.055, "id": 26}, {"name": "Botswana", "url": "http://en.wikipedia.org/wiki/Botswana", "pop": 2024904, "date": "2011-08-22", "percentage": 0.029, "id": 27}, {"name": "Brazil", "url": "http://en.wikipedia.org/wiki/Brazil", "pop": 193946886, "date": "2012-07-01", "percentage": 2.75, "id": 28}, {"name": "British Virgin Islands (UK)", "url": "http://en.wikipedia.org/wiki/British_Virgin_Islands", "pop": 29537, "date": "2010-07-01", "percentage": 0.00042, "id": 29}, {"name": "Brunei", "url": "http://en.wikipedia.org/wiki/Brunei", "pop": 393162, "date": "2011-06-20", "percentage": 0.0056, "id": 30}, {"name": "Bulgaria", "url": "http://en.wikipedia.org/wiki/Bulgaria", "pop": 7364570, "date": "2011-02-01", "percentage": 0.1, "id": 31}, {"name": "Burkina Faso", "url": "http://en.wikipedia.org/wiki/Burkina_Faso", "pop": 15730977, "date": "2010-07-01", "percentage": 0.22, "id": 32}, {"name": "Burundi", "url": "http://en.wikipedia.org/wiki/Burundi", "pop": 8749000, "date": "2012-07-01", "percentage": 0.12, "id": 33}, {"name": "Cambodia", "url": "http://en.wikipedia.org/wiki/Cambodia", "pop": 14478000, "date": "2012-07-01", "percentage": 0.21, "id": 34}, {"name": "Cameroon", "url": "http://en.wikipedia.org/wiki/Cameroon", "pop": 19406100, "date": "2010-01-01", "percentage": 0.28, "id": 35}, {"name": "Canada", "url": "http://en.wikipedia.org/wiki/Canada", "pop": 34974700, "date": "2012-11-11", "percentage": 0.5, "id": 36}, {"name": "Cape Verde", "url": "http://en.wikipedia.org/wiki/Cape_Verde", "pop": 491875, "date": "2010-06-16", "percentage": 0.007, "id": 37}, {"name": "Caribbean Netherlands (Netherlands)", "url": "http://en.wikipedia.org/wiki/Caribbean_Netherlands", "pop": 21133, "date": "2011-01-01", "percentage": 0.0003, "id": 38}, {"name": "Cayman Islands (UK)", "url": "http://en.wikipedia.org/wiki/Cayman_Islands", "pop": 55456, "date": "2010-10-10", "percentage": 0.00079, "id": 39}, {"name": "Central African Republic", "url": "http://en.wikipedia.org/wiki/Central_African_Republic", "pop": 4576000, "date": "2012-07-01", "percentage": 0.065, "id": 40}, {"name": "Chad", "url": "http://en.wikipedia.org/wiki/Chad", "pop": 11274106, "date": "2009-05-20", "percentage": 0.16, "id": 41}, {"name": "Chile", "url": "http://en.wikipedia.org/wiki/Chile", "pop": 16572475, "date": "2012-04-09", "percentage": 0.24, "id": 42}, {"name": "China[8]", "url": "http://en.wikipedia.org/wiki/China", "pop": 1347350000, "date": "2011-12-31", "percentage": 19.11, "id": 43}, {"name": "Christmas Island (Australia)", "url": "http://en.wikipedia.org/wiki/Christmas_Island", "pop": 2072, "date": "2011-08-09", "percentage": 2e-05, "id": 44}, {"name": "Cocos (Keeling) Islands (Australia)", "url": "http://en.wikipedia.org/wiki/Cocos_(Keeling)_Islands", "pop": 550, "date": "2011-08-09", "percentage": 8e-06, "id": 45}, {"name": "Colombia", "url": "http://en.wikipedia.org/wiki/Colombia", "pop": 46780000, "date": "2012-11-11", "percentage": 0.66, "id": 46}, {"name": "Comoros[18]", "url": "http://en.wikipedia.org/wiki/Comoros", "pop": 669300, "date": "2009-07-01", "percentage": 0.0095, "id": 47}, {"name": "Cook Islands (NZ)", "url": "http://en.wikipedia.org/wiki/Cook_Islands", "pop": 17791, "date": "2011-12-01", "percentage": 0.00025, "id": 48}, {"name": "Costa Rica", "url": "http://en.wikipedia.org/wiki/Costa_Rica", "pop": 4301712, "date": "2011-06-03", "percentage": 0.061, "id": 49}, {"name": "Croatia", "url": "http://en.wikipedia.org/wiki/Croatia", "pop": 4290612, "date": "2011-03-31", "percentage": 0.061, "id": 50}, {"name": "Cuba", "url": "http://en.wikipedia.org/wiki/Cuba", "pop": 11247925, "date": "2011-12-31", "percentage": 0.16, "id": 51}, {"name": "Cura\u00e7ao (Netherlands)", "url": "http://en.wikipedia.org/wiki/Cura%C3%A7ao", "pop": 149679, "date": "2011-03-26", "percentage": 0.0021, "id": 52}, {"name": "Cyprus[17]", "url": "http://en.wikipedia.org/wiki/Cyprus", "pop": 838897, "date": "2011-10-01", "percentage": 0.012, "id": 53}, {"name": "Czech Republic", "url": "http://en.wikipedia.org/wiki/Czech_Republic", "pop": 10507566, "date": "2012-03-31", "percentage": 0.15, "id": 54}, {"name": "Democratic Republic of the Congo", "url": "http://en.wikipedia.org/wiki/Democratic_Republic_of_the_Congo", "pop": 69575000, "date": "2012-07-01", "percentage": 0.99, "id": 55}, {"name": "Denmark", "url": "http://en.wikipedia.org/wiki/Denmark", "pop": 5587085, "date": "2012-07-01", "percentage": 0.079, "id": 56}, {"name": "Djibouti", "url": "http://en.wikipedia.org/wiki/Djibouti", "pop": 818159, "date": "2009-05-29", "percentage": 0.012, "id": 57}, {"name": "Dominica", "url": "http://en.wikipedia.org/wiki/Dominica", "pop": 71293, "date": "2011-05-14", "percentage": 0.001, "id": 58}, {"name": "Dominican Republic", "url": "http://en.wikipedia.org/wiki/Dominican_Republic", "pop": 9445281, "date": "2010-12-01", "percentage": 0.13, "id": 59}, {"name": "Ecuador", "url": "http://en.wikipedia.org/wiki/Ecuador", "pop": 14483499, "date": "2010-11-28", "percentage": 0.21, "id": 60}, {"name": "Egypt", "url": "http://en.wikipedia.org/wiki/Egypt", "pop": 82814000, "date": "2012-11-11", "percentage": 1.17, "id": 61}, {"name": "El Salvador", "url": "http://en.wikipedia.org/wiki/El_Salvador", "pop": 6183000, "date": "2010-06-30", "percentage": 0.088, "id": 62}, {"name": "Equatorial Guinea", "url": "http://en.wikipedia.org/wiki/Equatorial_Guinea", "pop": 740000, "date": "2012-07-01", "percentage": 0.01, "id": 63}, {"name": "Eritrea", "url": "http://en.wikipedia.org/wiki/Eritrea", "pop": 5581000, "date": "2012-07-01", "percentage": 0.079, "id": 64}, {"name": "Estonia", "url": "http://en.wikipedia.org/wiki/Estonia", "pop": 1294236, "date": "2012-03-31", "percentage": 0.018, "id": 65}, {"name": "Ethiopia", "url": "http://en.wikipedia.org/wiki/Ethiopia", "pop": 84320987, "date": "2012-07-01", "percentage": 1.2, "id": 66}, {"name": "Falkland Islands (UK)[21]", "url": "http://en.wikipedia.org/wiki/Falkland_Islands", "pop": 2563, "date": "2012-04-15", "percentage": 3e-05, "id": 67}, {"name": "Faroe Islands (Denmark)", "url": "http://en.wikipedia.org/wiki/Faroe_Islands", "pop": 48459, "date": "2012-07-01", "percentage": 0.00069, "id": 68}, {"name": "Federated States of Micronesia", "url": "http://en.wikipedia.org/wiki/Federated_States_of_Micronesia", "pop": 102843, "date": "2010-04-04", "percentage": 0.0015, "id": 69}, {"name": "Fiji", "url": "http://en.wikipedia.org/wiki/Fiji", "pop": 876000, "date": "2012-07-01", "percentage": 0.012, "id": 70}, {"name": "Finland", "url": "http://en.wikipedia.org/wiki/Finland", "pop": 5424220, "date": "2012-11-11", "percentage": 0.08, "id": 71}, {"name": "France[9]", "url": "http://en.wikipedia.org/wiki/France", "pop": 65350000, "date": "2012-01-01", "percentage": 0.93, "id": 72}, {"name": "French Guiana (France)", "url": "http://en.wikipedia.org/wiki/French_Guiana", "pop": 224469, "date": "2009-01-01", "percentage": 0.0032, "id": 73}, {"name": "French Polynesia (France)", "url": "http://en.wikipedia.org/wiki/French_Polynesia", "pop": 277000, "date": "2012-07-01", "percentage": 0.0039, "id": 74}, {"name": "Gabon", "url": "http://en.wikipedia.org/wiki/Gabon", "pop": 1564000, "date": "2012-07-01", "percentage": 0.022, "id": 75}, {"name": "Gambia", "url": "http://en.wikipedia.org/wiki/The_Gambia", "pop": 1825000, "date": "2012-07-01", "percentage": 0.026, "id": 76}, {"name": "Georgia[14]", "url": "http://en.wikipedia.org/wiki/Georgia_(country)", "pop": 4497600, "date": "2012-01-01", "percentage": 0.064, "id": 77}, {"name": "Germany", "url": "http://en.wikipedia.org/wiki/Germany", "pop": 81857000, "date": "2012-04-30", "percentage": 1.16, "id": 78}, {"name": "Ghana", "url": "http://en.wikipedia.org/wiki/Ghana", "pop": 24658823, "date": "2010-09-26", "percentage": 0.35, "id": 79}, {"name": "Gibraltar (UK)[20]", "url": "http://en.wikipedia.org/wiki/Gibraltar", "pop": 29752, "date": "2011-07-01", "percentage": 0.00042, "id": 80}, {"name": "Greece", "url": "http://en.wikipedia.org/wiki/Greece", "pop": 10787690, "date": "2011-05-24", "percentage": 0.15, "id": 81}, {"name": "Greenland (Denmark)", "url": "http://en.wikipedia.org/wiki/Greenland", "pop": 56749, "date": "2012-01-01", "percentage": 0.0008, "id": 82}, {"name": "Grenada", "url": "http://en.wikipedia.org/wiki/Grenada", "pop": 110821, "date": "2009-07-01", "percentage": 0.0016, "id": 83}, {"name": "Guadeloupe (France)", "url": "http://en.wikipedia.org/wiki/Guadeloupe", "pop": 401554, "date": "2009-01-01", "percentage": 0.0057, "id": 84}, {"name": "Guam (USA)", "url": "http://en.wikipedia.org/wiki/Guam", "pop": 159358, "date": "2010-04-01", "percentage": 0.0023, "id": 85}, {"name": "Guatemala", "url": "http://en.wikipedia.org/wiki/Guatemala", "pop": 14713763, "date": "2011-07-01", "percentage": 0.21, "id": 86}, {"name": "Guernsey (UK)", "url": "http://en.wikipedia.org/wiki/Guernsey", "pop": 62431, "date": "2010-03-31", "percentage": 0.00089, "id": 87}, {"name": "Guinea", "url": "http://en.wikipedia.org/wiki/Guinea", "pop": 10824200, "date": "2010-07-01", "percentage": 0.15, "id": 88}, {"name": "Guinea-Bissau", "url": "http://en.wikipedia.org/wiki/Guinea-Bissau", "pop": 1520830, "date": "2009-03-01", "percentage": 0.022, "id": 89}, {"name": "Guyana", "url": "http://en.wikipedia.org/wiki/Guyana", "pop": 784894, "date": "2010-07-01", "percentage": 0.011, "id": 90}, {"name": "Haiti", "url": "http://en.wikipedia.org/wiki/Haiti", "pop": 10085214, "date": "2010-07-01", "percentage": 0.14, "id": 91}, {"name": "Honduras", "url": "http://en.wikipedia.org/wiki/Honduras", "pop": 8385072, "date": "2012-07-01", "percentage": 0.12, "id": 92}, {"name": "Hong Kong (China)[13]", "url": "http://en.wikipedia.org/wiki/Hong_Kong", "pop": 7103700, "date": "2011-12-31", "percentage": 0.1, "id": 93}, {"name": "Hungary", "url": "http://en.wikipedia.org/wiki/Hungary", "pop": 9957731, "date": "2012-01-01", "percentage": 0.14, "id": 94}, {"name": "Iceland", "url": "http://en.wikipedia.org/wiki/Iceland", "pop": 320060, "date": "2012-04-01", "percentage": 0.0045, "id": 95}, {"name": "India", "url": "http://en.wikipedia.org/wiki/India", "pop": 1210193422, "date": "2011-03-01", "percentage": 17.16, "id": 96}, {"name": "Indonesia", "url": "http://en.wikipedia.org/wiki/Indonesia", "pop": 237641326, "date": "2010-05-01", "percentage": 3.37, "id": 97}, {"name": "Iran", "url": "http://en.wikipedia.org/wiki/Iran", "pop": 75149669, "date": "2011-10-24", "percentage": 1.07, "id": 98}, {"name": "Iraq", "url": "http://en.wikipedia.org/wiki/Iraq", "pop": 33330000, "date": "2011-07-01", "percentage": 0.47, "id": 99}, {"name": "Ireland", "url": "http://en.wikipedia.org/wiki/Republic_of_Ireland", "pop": 4588252, "date": "2011-04-10", "percentage": 0.065, "id": 100}, {"name": "Isle of Man (UK)", "url": "http://en.wikipedia.org/wiki/Isle_of_Man", "pop": 84497, "date": "2011-03-27", "percentage": 0.0012, "id": 101}, {"name": "Israel", "url": "http://en.wikipedia.org/wiki/Israel", "pop": 7928500, "date": "2012-08-31", "percentage": 0.11, "id": 102}, {"name": "Italy", "url": "http://en.wikipedia.org/wiki/Italy", "pop": 60849247, "date": "2012-03-31", "percentage": 0.86, "id": 103}, {"name": "Ivory Coast", "url": "http://en.wikipedia.org/wiki/Ivory_Coast", "pop": 21395000, "date": "2009-07-01", "percentage": 0.3, "id": 104}, {"name": "Jamaica", "url": "http://en.wikipedia.org/wiki/Jamaica", "pop": 2709300, "date": "2011-12-31", "percentage": 0.038, "id": 105}, {"name": "Japan", "url": "http://en.wikipedia.org/wiki/Japan", "pop": 127520000, "date": "2012-09-01", "percentage": 1.81, "id": 106}, {"name": "Jersey (UK)", "url": "http://en.wikipedia.org/wiki/Jersey", "pop": 97857, "date": "2011-03-27", "percentage": 0.0014, "id": 107}, {"name": "Jordan", "url": "http://en.wikipedia.org/wiki/Jordan", "pop": 6368400, "date": "2012-11-11", "percentage": 0.09, "id": 108}, {"name": "Kazakhstan", "url": "http://en.wikipedia.org/wiki/Kazakhstan", "pop": 16815000, "date": "2012-08-01", "percentage": 0.24, "id": 109}, {"name": "Kenya", "url": "http://en.wikipedia.org/wiki/Kenya", "pop": 38610097, "date": "2009-08-24", "percentage": 0.55, "id": 110}, {"name": "Kiribati", "url": "http://en.wikipedia.org/wiki/Kiribati", "pop": 103000, "date": "2012-07-01", "percentage": 0.0015, "id": 111}, {"name": "Kuwait", "url": "http://en.wikipedia.org/wiki/Kuwait", "pop": 3582054, "date": "2010-12-31", "percentage": 0.051, "id": 112}, {"name": "Kyrgyzstan", "url": "http://en.wikipedia.org/wiki/Kyrgyzstan", "pop": 5477600, "date": "2011-07-01", "percentage": 0.078, "id": 113}, {"name": "Laos", "url": "http://en.wikipedia.org/wiki/Laos", "pop": 6465800, "date": "2012-07-01", "percentage": 0.092, "id": 114}, {"name": "Latvia", "url": "http://en.wikipedia.org/wiki/Latvia", "pop": 2070371, "date": "2011-03-01", "percentage": 0.029, "id": 115}, {"name": "Lebanon", "url": "http://en.wikipedia.org/wiki/Lebanon", "pop": 4292000, "date": "2012-07-01", "percentage": 0.061, "id": 116}, {"name": "Lesotho", "url": "http://en.wikipedia.org/wiki/Lesotho", "pop": 2217000, "date": "2012-07-01", "percentage": 0.031, "id": 117}, {"name": "Liberia", "url": "http://en.wikipedia.org/wiki/Liberia", "pop": 4245000, "date": "2012-07-01", "percentage": 0.06, "id": 118}, {"name": "Libya", "url": "http://en.wikipedia.org/wiki/Libya", "pop": 6469000, "date": "2012-07-01", "percentage": 0.092, "id": 119}, {"name": "Liechtenstein", "url": "http://en.wikipedia.org/wiki/Liechtenstein", "pop": 36476, "date": "2011-12-31", "percentage": 0.00052, "id": 120}, {"name": "Lithuania", "url": "http://en.wikipedia.org/wiki/Lithuania", "pop": 3180394, "date": "2012-08-01", "percentage": 0.045, "id": 121}, {"name": "Luxembourg", "url": "http://en.wikipedia.org/wiki/Luxembourg", "pop": 511800, "date": "2010-12-31", "percentage": 0.0073, "id": 122}, {"name": "Macau (China)[19]", "url": "http://en.wikipedia.org/wiki/Macau", "pop": 568700, "date": "2012-06-30", "percentage": 0.0081, "id": 123}, {"name": "Macedonia", "url": "http://en.wikipedia.org/wiki/Republic_of_Macedonia", "pop": 2059794, "date": "2011-12-31", "percentage": 0.029, "id": 124}, {"name": "Madagascar", "url": "http://en.wikipedia.org/wiki/Madagascar", "pop": 20696070, "date": "2011-07-01", "percentage": 0.29, "id": 125}, {"name": "Malawi", "url": "http://en.wikipedia.org/wiki/Malawi", "pop": 15883000, "date": "2012-07-01", "percentage": 0.23, "id": 126}, {"name": "Malaysia", "url": "http://en.wikipedia.org/wiki/Malaysia", "pop": 29547000, "date": "2012-11-11", "percentage": 0.42, "id": 127}, {"name": "Maldives", "url": "http://en.wikipedia.org/wiki/Maldives", "pop": 317280, "date": "2010-07-01", "percentage": 0.0045, "id": 128}, {"name": "Mali", "url": "http://en.wikipedia.org/wiki/Mali", "pop": 14528662, "date": "2009-04-01", "percentage": 0.21, "id": 129}, {"name": "Malta", "url": "http://en.wikipedia.org/wiki/Malta", "pop": 417617, "date": "2010-12-31", "percentage": 0.0059, "id": 130}, {"name": "Marshall Islands", "url": "http://en.wikipedia.org/wiki/Marshall_Islands", "pop": 54305, "date": "2010-07-01", "percentage": 0.00077, "id": 131}, {"name": "Martinique (France)", "url": "http://en.wikipedia.org/wiki/Martinique", "pop": 396404, "date": "2009-01-01", "percentage": 0.0056, "id": 132}, {"name": "Mauritania", "url": "http://en.wikipedia.org/wiki/Mauritania", "pop": 3378254, "date": "2012-07-01", "percentage": 0.048, "id": 133}, {"name": "Mauritius", "url": "http://en.wikipedia.org/wiki/Mauritius", "pop": 1286051, "date": "2011-07-01", "percentage": 0.018, "id": 134}, {"name": "Mayotte (France)", "url": "http://en.wikipedia.org/wiki/Mayotte", "pop": 217000, "date": "2012-07-01", "percentage": 0.0031, "id": 135}, {"name": "Mexico", "url": "http://en.wikipedia.org/wiki/Mexico", "pop": 112336538, "date": "2010-06-12", "percentage": 1.59, "id": 136}, {"name": "Moldova[16]", "url": "http://en.wikipedia.org/wiki/Moldova", "pop": 3559500, "date": "2012-01-01", "percentage": 0.05, "id": 137}, {"name": "Monaco", "url": "http://en.wikipedia.org/wiki/Monaco", "pop": 35000, "date": "2012-07-01", "percentage": 0.0005, "id": 138}, {"name": "Mongolia", "url": "http://en.wikipedia.org/wiki/Mongolia", "pop": 2736800, "date": "2009-07-01", "percentage": 0.039, "id": 139}, {"name": "Montenegro", "url": "http://en.wikipedia.org/wiki/Montenegro", "pop": 620029, "date": "2011-04-01", "percentage": 0.0088, "id": 140}, {"name": "Montserrat (UK)", "url": "http://en.wikipedia.org/wiki/Montserrat", "pop": 4922, "date": "2011-05-12", "percentage": 5e-05, "id": 141}, {"name": "Morocco", "url": "http://en.wikipedia.org/wiki/Morocco", "pop": 32725600, "date": "2012-11-11", "percentage": 0.46, "id": 142}, {"name": "Mozambique", "url": "http://en.wikipedia.org/wiki/Mozambique", "pop": 23700715, "date": "2012-07-01", "percentage": 0.34, "id": 143}, {"name": "Myanmar", "url": "http://en.wikipedia.org/wiki/Myanmar", "pop": 48724000, "date": "2012-07-01", "percentage": 0.69, "id": 144}, {"name": "Namibia", "url": "http://en.wikipedia.org/wiki/Namibia", "pop": 2104900, "date": "2011-08-28", "percentage": 0.03, "id": 145}, {"name": "Nauru", "url": "http://en.wikipedia.org/wiki/Nauru", "pop": 10000, "date": "2012-07-01", "percentage": 0.00014, "id": 146}, {"name": "Nepal", "url": "http://en.wikipedia.org/wiki/Nepal", "pop": 26620809, "date": "2011-06-22", "percentage": 0.38, "id": 147}, {"name": "Netherlands", "url": "http://en.wikipedia.org/wiki/Netherlands", "pop": 16751323, "date": "2012-08-31", "percentage": 0.24, "id": 148}, {"name": "New Caledonia (France)", "url": "http://en.wikipedia.org/wiki/New_Caledonia", "pop": 245580, "date": "2009-07-27", "percentage": 0.0035, "id": 149}, {"name": "New Zealand", "url": "http://en.wikipedia.org/wiki/New_Zealand", "pop": 4445430, "date": "2012-11-11", "percentage": 0.063, "id": 150}, {"name": "Nicaragua", "url": "http://en.wikipedia.org/wiki/Nicaragua", "pop": 6071045, "date": "2012-06-30", "percentage": 0.086, "id": 151}, {"name": "Niger", "url": "http://en.wikipedia.org/wiki/Niger", "pop": 16274738, "date": "2012-07-01", "percentage": 0.23, "id": 152}, {"name": "Nigeria", "url": "http://en.wikipedia.org/wiki/Nigeria", "pop": 166629000, "date": "2012-07-01", "percentage": 2.36, "id": 153}, {"name": "Niue (NZ)", "url": "http://en.wikipedia.org/wiki/Niue", "pop": 1000, "date": "2012-07-01", "percentage": 1e-05, "id": 154}, {"name": "Norfolk Island (Australia)", "url": "http://en.wikipedia.org/wiki/Norfolk_Island", "pop": 2302, "date": "2011-08-09", "percentage": 2e-05, "id": 155}, {"name": "North Korea", "url": "http://en.wikipedia.org/wiki/North_Korea", "pop": 24554000, "date": "2012-07-01", "percentage": 0.35, "id": 156}, {"name": "Northern Mariana Islands (USA)", "url": "http://en.wikipedia.org/wiki/Northern_Mariana_Islands", "pop": 53883, "date": "2010-04-01", "percentage": 0.00076, "id": 157}, {"name": "Norway", "url": "http://en.wikipedia.org/wiki/Norway", "pop": 5047000, "date": "2012-11-11", "percentage": 0.072, "id": 158}, {"name": "Oman", "url": "http://en.wikipedia.org/wiki/Oman", "pop": 2773479, "date": "2010-12-12", "percentage": 0.039, "id": 159}, {"name": "Pakistan", "url": "http://en.wikipedia.org/wiki/Pakistan", "pop": 181192000, "date": "2012-11-11", "percentage": 2.57, "id": 160}, {"name": "Palau", "url": "http://en.wikipedia.org/wiki/Palau", "pop": 21000, "date": "2012-07-01", "percentage": 0.0003, "id": 161}, {"name": "Palestinian territories[15]", "url": "http://en.wikipedia.org/wiki/Palestinian_territories", "pop": 4293313, "date": "2012-07-01", "percentage": 0.061, "id": 162}, {"name": "Panama", "url": "http://en.wikipedia.org/wiki/Panama", "pop": 3405813, "date": "2010-05-16", "percentage": 0.048, "id": 163}, {"name": "Papua New Guinea", "url": "http://en.wikipedia.org/wiki/Papua_New_Guinea", "pop": 7170000, "date": "2012-07-01", "percentage": 0.1, "id": 164}, {"name": "Paraguay", "url": "http://en.wikipedia.org/wiki/Paraguay", "pop": 6337127, "date": "2010-07-01", "percentage": 0.09, "id": 165}, {"name": "Peru", "url": "http://en.wikipedia.org/wiki/Peru", "pop": 30135875, "date": "2012-06-30", "percentage": 0.43, "id": 166}, {"name": "Philippines", "url": "http://en.wikipedia.org/wiki/Philippines", "pop": 92337852, "date": "2010-05-01", "percentage": 1.31, "id": 167}, {"name": "Pitcairn Islands (UK)", "url": "http://en.wikipedia.org/wiki/Pitcairn_Islands", "pop": 66, "date": "2008-07-01", "percentage": 1e-06, "id": 168}, {"name": "Poland", "url": "http://en.wikipedia.org/wiki/Poland", "pop": 38538447, "date": "2011-12-31", "percentage": 0.55, "id": 169}, {"name": "Portugal", "url": "http://en.wikipedia.org/wiki/Portugal", "pop": 10561614, "date": "2011-03-21", "percentage": 0.15, "id": 170}, {"name": "Puerto Rico (USA)", "url": "http://en.wikipedia.org/wiki/Puerto_Rico", "pop": 3706690, "date": "2011-07-01", "percentage": 0.053, "id": 171}, {"name": "Qatar", "url": "http://en.wikipedia.org/wiki/Qatar", "pop": 1757540, "date": "2012-10-31", "percentage": 0.025, "id": 172}, {"name": "Republic of the Congo", "url": "http://en.wikipedia.org/wiki/Republic_of_the_Congo", "pop": 4233000, "date": "2012-07-01", "percentage": 0.06, "id": 173}, {"name": "Romania", "url": "http://en.wikipedia.org/wiki/Romania", "pop": 19042936, "date": "2011-10-20", "percentage": 0.27, "id": 174}, {"name": "Russia", "url": "http://en.wikipedia.org/wiki/Russia", "pop": 143228300, "date": "2012-09-01", "percentage": 2.03, "id": 175}, {"name": "Rwanda", "url": "http://en.wikipedia.org/wiki/Rwanda", "pop": 10718379, "date": "2011-07-01", "percentage": 0.15, "id": 176}, {"name": "R\u00e9union (France)", "url": "http://en.wikipedia.org/wiki/R%C3%A9union", "pop": 816364, "date": "2009-01-01", "percentage": 0.012, "id": 177}, {"name": "Saint Barth\u00e9lemy (France)", "url": "http://en.wikipedia.org/wiki/Saint_Barth%C3%A9lemy", "pop": 8902, "date": "2009-01-01", "percentage": 0.00013, "id": 178}, {"name": "Saint Helena, Ascension and Tristan da Cunha (UK)", "url": "http://en.wikipedia.org/wiki/Saint_Helena,_Ascension_and_Tristan_da_Cunha", "pop": 4000, "date": "2012-07-01", "percentage": 4e-05, "id": 179}, {"name": "Saint Kitts and Nevis", "url": "http://en.wikipedia.org/wiki/Saint_Kitts_and_Nevis", "pop": 51970, "date": "2009-07-01", "percentage": 0.00074, "id": 180}, {"name": "Saint Lucia", "url": "http://en.wikipedia.org/wiki/Saint_Lucia", "pop": 166526, "date": "2010-05-10", "percentage": 0.0024, "id": 181}, {"name": "Saint Martin (France)", "url": "http://en.wikipedia.org/wiki/Collectivity_of_Saint_Martin", "pop": 36824, "date": "2009-01-01", "percentage": 0.00052, "id": 182}, {"name": "Saint Pierre and Miquelon (France)", "url": "http://en.wikipedia.org/wiki/Saint_Pierre_and_Miquelon", "pop": 6082, "date": "2009-01-01", "percentage": 6e-05, "id": 183}, {"name": "Saint Vincent and the Grenadines", "url": "http://en.wikipedia.org/wiki/Saint_Vincent_and_the_Grenadines", "pop": 100892, "date": "2009-07-01", "percentage": 0.0014, "id": 184}, {"name": "Samoa", "url": "http://en.wikipedia.org/wiki/Samoa", "pop": 186340, "date": "2011-11-07", "percentage": 0.0026, "id": 185}, {"name": "San Marino", "url": "http://en.wikipedia.org/wiki/San_Marino", "pop": 32404, "date": "2012-07-31", "percentage": 0.00046, "id": 186}, {"name": "Saudi Arabia", "url": "http://en.wikipedia.org/wiki/Saudi_Arabia", "pop": 28376355, "date": "2011-07-01", "percentage": 0.4, "id": 187}, {"name": "Senegal", "url": "http://en.wikipedia.org/wiki/Senegal", "pop": 12855153, "date": "2011-07-01", "percentage": 0.18, "id": 188}, {"name": "Serbia[12]", "url": "http://en.wikipedia.org/wiki/Serbia", "pop": 7120666, "date": "2011-10-01", "percentage": 0.1, "id": 189}, {"name": "Seychelles", "url": "http://en.wikipedia.org/wiki/Seychelles", "pop": 90945, "date": "2010-08-26", "percentage": 0.0013, "id": 190}, {"name": "Sierra Leone", "url": "http://en.wikipedia.org/wiki/Sierra_Leone", "pop": 6126000, "date": "2012-07-01", "percentage": 0.087, "id": 191}, {"name": "Singapore", "url": "http://en.wikipedia.org/wiki/Singapore", "pop": 5312400, "date": "2012-10-30", "percentage": 0.074, "id": 192}, {"name": "Sint Maarten (Netherlands)", "url": "http://en.wikipedia.org/wiki/Sint_Maarten", "pop": 37429, "date": "2010-01-01", "percentage": 0.00053, "id": 193}, {"name": "Slovakia", "url": "http://en.wikipedia.org/wiki/Slovakia", "pop": 5445324, "date": "2011-09-30", "percentage": 0.077, "id": 194}, {"name": "Slovenia", "url": "http://en.wikipedia.org/wiki/Slovenia", "pop": 2061350, "date": "2012-11-11", "percentage": 0.029, "id": 195}, {"name": "Solomon Islands", "url": "http://en.wikipedia.org/wiki/Solomon_Islands", "pop": 553935, "date": "2012-07-01", "percentage": 0.0079, "id": 196}, {"name": "Somalia[11]", "url": "http://en.wikipedia.org/wiki/Somalia", "pop": 9797000, "date": "2012-07-01", "percentage": 0.14, "id": 197}, {"name": "South Africa", "url": "http://en.wikipedia.org/wiki/South_Africa", "pop": 51770560, "date": "2011-10-09", "percentage": 0.73, "id": 198}, {"name": "South Korea", "url": "http://en.wikipedia.org/wiki/South_Korea", "pop": 50004441, "date": "2012-07-01", "percentage": 0.71, "id": 199}, {"name": "South Sudan", "url": "http://en.wikipedia.org/wiki/South_Sudan", "pop": 8260490, "date": "2008-04-22", "percentage": 0.12, "id": 200}, {"name": "Spain", "url": "http://en.wikipedia.org/wiki/Spain", "pop": 46163116, "date": "2012-07-01", "percentage": 0.65, "id": 201}, {"name": "Sri Lanka", "url": "http://en.wikipedia.org/wiki/Sri_Lanka", "pop": 20277597, "date": "2012-03-20", "percentage": 0.29, "id": 202}, {"name": "Sudan", "url": "http://en.wikipedia.org/wiki/Sudan", "pop": 30894000, "date": "2008-04-22", "percentage": 0.44, "id": 203}, {"name": "Suriname", "url": "http://en.wikipedia.org/wiki/Suriname", "pop": 534000, "date": "2012-07-01", "percentage": 0.0076, "id": 204}, {"name": "Svalbard and Jan Mayen (Norway)", "url": "http://en.wikipedia.org/wiki/Svalbard_and_Jan_Mayen", "pop": 2495, "date": "2010-03-01", "percentage": 2e-05, "id": 205}, {"name": "Swaziland", "url": "http://en.wikipedia.org/wiki/Swaziland", "pop": 1220000, "date": "2012-07-01", "percentage": 0.017, "id": 206}, {"name": "Sweden", "url": "http://en.wikipedia.org/wiki/Sweden", "pop": 9532634, "date": "2012-08-31", "percentage": 0.14, "id": 207}, {"name": "Switzerland", "url": "http://en.wikipedia.org/wiki/Switzerland", "pop": 8000001, "date": "2012-08-02", "percentage": 0.11, "id": 208}, {"name": "Syria", "url": "http://en.wikipedia.org/wiki/Syria", "pop": 21829000, "date": "2012-11-11", "percentage": 0.31, "id": 209}, {"name": "S\u00e3o Tom\u00e9 and Pr\u00edncipe", "url": "http://en.wikipedia.org/wiki/S%C3%A3o_Tom%C3%A9_and_Pr%C3%ADncipe", "pop": 172000, "date": "2012-07-01", "percentage": 0.0024, "id": 210}, {"name": "Taiwan[10]", "url": "http://en.wikipedia.org/wiki/Taiwan", "pop": 23268372, "date": "2012-07-31", "percentage": 0.33, "id": 211}, {"name": "Tajikistan", "url": "http://en.wikipedia.org/wiki/Tajikistan", "pop": 7800000, "date": "2012-01-01", "percentage": 0.11, "id": 212}, {"name": "Tanzania", "url": "http://en.wikipedia.org/wiki/Tanzania", "pop": 43188000, "date": "2010-07-01", "percentage": 0.61, "id": 213}, {"name": "Thailand", "url": "http://en.wikipedia.org/wiki/Thailand", "pop": 65479453, "date": "2010-09-01", "percentage": 0.93, "id": 214}, {"name": "Timor-Leste", "url": "http://en.wikipedia.org/wiki/East_Timor", "pop": 1066409, "date": "2010-07-11", "percentage": 0.015, "id": 215}, {"name": "Togo", "url": "http://en.wikipedia.org/wiki/Togo", "pop": 6191155, "date": "2010-11-06", "percentage": 0.088, "id": 216}, {"name": "Tokelau (NZ)", "url": "http://en.wikipedia.org/wiki/Tokelau", "pop": 1411, "date": "2011-10-18", "percentage": 1e-05, "id": 217}, {"name": "Tonga", "url": "http://en.wikipedia.org/wiki/Tonga", "pop": 103036, "date": "2011-11-30", "percentage": 0.0015, "id": 218}, {"name": "Trinidad and Tobago", "url": "http://en.wikipedia.org/wiki/Trinidad_and_Tobago", "pop": 1317714, "date": "2010-07-01", "percentage": 0.019, "id": 219}, {"name": "Tunisia", "url": "http://en.wikipedia.org/wiki/Tunisia", "pop": 10673800, "date": "2011-07-01", "percentage": 0.15, "id": 220}, {"name": "Turkey", "url": "http://en.wikipedia.org/wiki/Turkey", "pop": 74724269, "date": "2011-12-31", "percentage": 1.06, "id": 221}, {"name": "Turkmenistan", "url": "http://en.wikipedia.org/wiki/Turkmenistan", "pop": 5170000, "date": "2012-07-01", "percentage": 0.073, "id": 222}, {"name": "Turks and Caicos Islands (UK)", "url": "http://en.wikipedia.org/wiki/Turks_and_Caicos_Islands", "pop": 31458, "date": "2012-01-25", "percentage": 0.00045, "id": 223}, {"name": "Tuvalu", "url": "http://en.wikipedia.org/wiki/Tuvalu", "pop": 10000, "date": "2012-07-01", "percentage": 0.00014, "id": 224}, {"name": "Uganda", "url": "http://en.wikipedia.org/wiki/Uganda", "pop": 32939800, "date": "2011-07-01", "percentage": 0.47, "id": 225}, {"name": "Ukraine", "url": "http://en.wikipedia.org/wiki/Ukraine", "pop": 45560272, "date": "2012-08-01", "percentage": 0.65, "id": 226}, {"name": "United Arab Emirates", "url": "http://en.wikipedia.org/wiki/United_Arab_Emirates", "pop": 8264070, "date": "2010-07-01", "percentage": 0.12, "id": 227}, {"name": "United Kingdom", "url": "http://en.wikipedia.org/wiki/United_Kingdom", "pop": 62262000, "date": "2010-07-01", "percentage": 0.88, "id": 228}, {"name": "United States", "url": "http://en.wikipedia.org/wiki/United_States", "pop": 314745000, "date": "2012-11-11", "percentage": 4.46, "id": 229}, {"name": "United States Virgin Islands", "url": "http://en.wikipedia.org/wiki/United_States_Virgin_Islands", "pop": 106405, "date": "2010-04-01", "percentage": 0.0015, "id": 230}, {"name": "Uruguay", "url": "http://en.wikipedia.org/wiki/Uruguay", "pop": 3286314, "date": "2011-09-30", "percentage": 0.047, "id": 231}, {"name": "Uzbekistan", "url": "http://en.wikipedia.org/wiki/Uzbekistan", "pop": 29123400, "date": "2011-07-01", "percentage": 0.41, "id": 232}, {"name": "Vanuatu", "url": "http://en.wikipedia.org/wiki/Vanuatu", "pop": 234023, "date": "2009-11-16", "percentage": 0.0033, "id": 233}, {"name": "Vatican City", "url": "http://en.wikipedia.org/wiki/Vatican_City", "pop": 800, "date": "2011-03-01", "percentage": 1e-05, "id": 234}, {"name": "Venezuela", "url": "http://en.wikipedia.org/wiki/Venezuela", "pop": 28946101, "date": "2011-11-30", "percentage": 0.41, "id": 235}, {"name": "Vietnam", "url": "http://en.wikipedia.org/wiki/Vietnam", "pop": 87840000, "date": "2011-07-01", "percentage": 1.25, "id": 236}, {"name": "Wallis and Futuna (France)", "url": "http://en.wikipedia.org/wiki/Wallis_and_Futuna", "pop": 13000, "date": "2012-07-01", "percentage": 0.00018, "id": 237}, {"name": "Western Sahara", "url": "http://en.wikipedia.org/wiki/Western_Sahara", "pop": 567000, "date": "2012-07-01", "percentage": 0.008, "id": 238}, {"name": "Yemen", "url": "http://en.wikipedia.org/wiki/Yemen", "pop": 24527000, "date": "2012-07-01", "percentage": 0.35, "id": 239}, {"name": "Zambia", "url": "http://en.wikipedia.org/wiki/Zambia", "pop": 13092666, "date": "2010-10-16", "percentage": 0.19, "id": 240}, {"name": "Zimbabwe", "url": "http://en.wikipedia.org/wiki/Zimbabwe", "pop": 13014000, "date": "2012-07-01", "percentage": 0.18, "id": 241}, {"name": "\u00c5land Islands (Finland)", "url": "http://en.wikipedia.org/wiki/%C3%85land_Islands", "pop": 28355, "date": "2011-12-31", "percentage": 0.0004, "id": 242}]] diff --git a/examples/libs/backbone-min.js b/examples/libs/backbone-min.js new file mode 100644 index 00000000..c1c0d4ff --- /dev/null +++ b/examples/libs/backbone-min.js @@ -0,0 +1,38 @@ +// Backbone.js 0.9.2 + +// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. +// Backbone may be freely distributed under the MIT license. +// For all details and documentation: +// http://backbonejs.org +(function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks= +{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g= +z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent= +{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null== +b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent: +b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)}; +a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error, +h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t(); +return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending= +{};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length|| +!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator); +this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c=b))this.iframe=i('