Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

repo has moved

  • Loading branch information...
commit 5a77c2b99917e819ffe42def2f7c426bf58d8824 1 parent 7357b7c
Sascha Depold authored
Showing with 1 addition and 19,513 deletions.
  1. +0 −4 LICENSE
  2. +1 −234 README.md
  3. +0 −160 bin/sequelize
  4. +0 −250 changelog.md
  5. +0 −18 docs/api.js
  6. BIN  docs/assets/css/external-small.png
  7. BIN  docs/assets/css/logo.png
  8. +0 −782 docs/assets/css/main.css
  9. BIN  docs/assets/favicon.png
  10. BIN  docs/assets/img/spinner.gif
  11. +0 −10 docs/assets/index.html
  12. +0 −52 docs/assets/js/api-filter.js
  13. +0 −251 docs/assets/js/api-list.js
  14. +0 −98 docs/assets/js/api-search.js
  15. +0 −370 docs/assets/js/apidocs.js
  16. +0 −17 docs/assets/js/yui-prettify.js
  17. +0 −130 docs/assets/vendor/prettify/CHANGES.html
  18. +0 −202 docs/assets/vendor/prettify/COPYING
  19. +0 −203 docs/assets/vendor/prettify/README.html
  20. +0 −1  docs/assets/vendor/prettify/prettify-min.css
  21. +0 −1  docs/assets/vendor/prettify/prettify-min.js
  22. +0 −686 docs/classes/QueryInterface.html
  23. +0 −754 docs/classes/Sequelize.html
  24. +0 −10 docs/classes/index.html
  25. +0 −560 docs/data.json
  26. +0 −10 docs/files/index.html
  27. +0 −117 docs/files/index.js.html
  28. +0 −532 docs/files/lib_dao-factory.js.html
  29. +0 −553 docs/files/lib_dialects_abstract_query.js.html
  30. +0 −234 docs/files/lib_dialects_sqlite_query-interface.js.html
  31. +0 −335 docs/files/lib_sequelize.js.html
  32. +0 −126 docs/index.html
  33. +0 −155 docs/modules/Sequelize.html
  34. +0 −10 docs/modules/index.html
  35. +0 −59 examples/Associations/app.js
  36. +0 −26 examples/Count/app.js
  37. +0 −30 examples/MinMax/app.js
  38. +0 −41 examples/Performance/app.js
  39. +0 −28 examples/default-values/app.js
  40. +0 −21 examples/image-handling/app.js
  41. BIN  examples/image-handling/source.png
  42. +0 −63 examples/method-passing/app.js
  43. +0 −17 examples/sequelize-with-options/app.js
  44. +0 −6 examples/using-multiple-model-files/Project.js
  45. +0 −7 examples/using-multiple-model-files/Task.js
  46. +0 −25 examples/using-multiple-model-files/app.js
  47. +0 −5 index.js
  48. +0 −71 lib/associations/belongs-to.js
  49. +0 −143 lib/associations/has-many-double-linked.js
  50. +0 −61 lib/associations/has-many-single-linked.js
  51. +0 −191 lib/associations/has-many.js
  52. +0 −94 lib/associations/has-one.js
  53. +0 −78 lib/associations/mixin.js
  54. +0 −35 lib/dao-factory-manager.js
  55. +0 −420 lib/dao-factory.js
  56. +0 −352 lib/dao.js
  57. +0 −19 lib/data-types.js
  58. +0 −441 lib/dialects/abstract/query.js
  59. +0 −24 lib/dialects/connector-manager.js
  60. +0 −339 lib/dialects/mysql/connector-manager.js
  61. +0 −439 lib/dialects/mysql/query-generator.js
  62. +0 −41 lib/dialects/mysql/query.js
  63. +0 −103 lib/dialects/postgres/connector-manager.js
  64. +0 −598 lib/dialects/postgres/query-generator.js
  65. +0 −131 lib/dialects/postgres/query.js
  66. +0 −237 lib/dialects/query-generator.js
  67. +0 −17 lib/dialects/sqlite/connector-manager.js
  68. +0 −299 lib/dialects/sqlite/query-generator.js
  69. +0 −122 lib/dialects/sqlite/query-interface.js
  70. +0 −146 lib/dialects/sqlite/query.js
  71. +0 −46 lib/emitters/custom-event-emitter.js
  72. +0 −93 lib/migration.js
  73. +0 −236 lib/migrator.js
  74. +0 −143 lib/query-chainer.js
  75. +0 −311 lib/query-interface.js
  76. +0 −223 lib/sequelize.js
  77. +0 −136 lib/sql-string.js
  78. +0 −181 lib/utils.js
  79. +0 −75 package.json
  80. +0 −15 spec-jasmine/assets/migrations/20111117063700-createPerson.js
  81. +0 −4 spec-jasmine/assets/migrations/20111130161100-emptyMigration.js
  82. +0 −9 spec-jasmine/assets/migrations/20111205064000-renamePersonToUser.js
  83. +0 −13 spec-jasmine/assets/migrations/20111205162700-addSignatureColumnToUser.js
  84. +0 −9 spec-jasmine/assets/migrations/20111206061400-removeShopIdColumnFromUser.js
  85. +0 −11 spec-jasmine/assets/migrations/20111206063000-changeSignatureColumnOfUserToMendatory.js
  86. +0 −9 spec-jasmine/assets/migrations/20111206163300-renameSignatureColumnOfUserToSig.js
  87. +0 −5 spec-jasmine/assets/project.js
  88. +0 −112 spec-jasmine/associations/belongs-to.spec.js
  89. +0 −412 spec-jasmine/associations/has-many.spec.js
  90. +0 −162 spec-jasmine/associations/has-one.spec.js
  91. +0 −26 spec-jasmine/config/config.js
  92. +0 −40 spec-jasmine/config/factories.js
  93. +0 −46 spec-jasmine/config/helpers.js
  94. +0 −389 spec-jasmine/dao-factory.spec.js
  95. +0 −339 spec-jasmine/dao.spec.js
  96. +0 −100 spec-jasmine/mysql/associations.has-many.spec.js
  97. +0 −43 spec-jasmine/mysql/associations.spec.js
  98. +0 −38 spec-jasmine/mysql/connector-manager.spec.js
  99. +0 −69 spec-jasmine/mysql/dao-factory.spec.js
  100. +0 −248 spec-jasmine/mysql/query-generator.spec.js
  101. +0 −104 spec-jasmine/postgres/associations.has-many.spec.js
  102. +0 −47 spec-jasmine/postgres/associations.spec.js
  103. +0 −270 spec-jasmine/postgres/query-generator.spec.js
  104. +0 −106 spec-jasmine/sequelize.spec.js
  105. +0 −198 spec-jasmine/sqlite/dao-factory.spec.js
  106. +0 −26 spec-jasmine/sqlite/dao.spec.js
  107. +0 −97 spec-jasmine/sqlite/query-generator.spec.js
  108. +0 −127 spec-jasmine/utils.spec.js
  109. +0 −17 spec/assets/migrations/20111117063700-createPerson.js
  110. +0 −4 spec/assets/migrations/20111130161100-emptyMigration.js
  111. +0 −9 spec/assets/migrations/20111205064000-renamePersonToUser.js
  112. +0 −39 spec/assets/migrations/20111205162700-addSignatureColumnToUser.js
  113. +0 −9 spec/assets/migrations/20111206061400-removeShopIdColumnFromUser.js
  114. +0 −11 spec/assets/migrations/20111206063000-changeSignatureColumnOfUserToMendatory.js
  115. +0 −9 spec/assets/migrations/20111206163300-renameSignatureColumnOfUserToSig.js
  116. +0 −5 spec/assets/project.js
  117. +0 −50 spec/associations/belongs-to.spec.js
  118. +0 −326 spec/associations/has-many.spec.js
  119. +0 −50 spec/associations/has-one.spec.js
  120. +0 −32 spec/associations/mixin.spec.js
  121. +0 −109 spec/buster-helpers.js
  122. +0 −9 spec/buster.js
  123. +0 −31 spec/config/config.js
  124. +0 −40 spec/config/factories.js
  125. +0 −46 spec/config/helpers.js
  126. +0 −1,043 spec/dao-factory.spec.js
  127. +0 −412 spec/dao.spec.js
  128. +0 −282 spec/dao.validations.spec.js
  129. +0 −18 spec/data-types.spec.js
  130. +0 −272 spec/migrator.spec.js
  131. +0 −46 spec/postgres/dao.spec.js
  132. +0 −164 spec/query-chainer.spec.js
  133. +0 −119 spec/query-interface.spec.js
  134. +0 −196 spec/sequelize.spec.js
  135. +0 −53 spec/sqlite/dao.spec.js
4 LICENSE
View
@@ -1,4 +0,0 @@
-Copyright (c) 2011 Sascha Depold
-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.
235 README.md
View
@@ -1,234 +1 @@
-# Sequelize #
-
-The Sequelize library provides easy access to MySQL, SQLite or PostgreSQL databases by mapping database entries to objects and vice versa. To put it in a nutshell... it's an ORM (Object-Relational-Mapper). The library is written entirely in JavaScript and can be used in the Node.JS environment.
-
-## Important Notes ##
-
-### 1.6.0 ###
-
-- We changed the way timestamps are handled. From v1.6.0 on timestamps are stored and loaded as UTC.
-- Support for synchronous migrations has been dropped. `up` and `down` methods in migrations do have a third parameter which is the callback parameter. Pass an error or an error message as first parameter to the callback if something went wrong in the migration.
-
-## Blogposts/Changes ##
-- [v1.4.1](http://blog.sequelizejs.com/post/24403298792/changes-in-sequelize-1-4-1): deprecation of node < 0.6, logging customization, ...
-- [v1.4.0](http://blog.sequelizejs.com/post/24345409723/changes-in-sequelize-1-4-0): postgresql, connection pooling, ...
-- [v1.3.0](http://blog.depold.com/post/15283366633/changes-in-sequelize-1-3-0): migrations, cross-database, validations, new listener notation, ...
-- [v1.2.1](http://blog.depold.com/post/12319530694/changes-in-sequelize-1-2-1): changes some defaults and some interfaces
-- [v1.0.0](http://blog.depold.com/post/5936116582/changes-in-sequelize-1-0-0): complete rewrite
-
-## Features ##
-
-- Schema definition
-- Schema synchronization/dropping
-- Easy definition of class/instance methods
-- Instance saving/updating/dropping
-- Asynchronous library
-- Associations
-- Importing definitions from single files
-
-## Documentation, Examples and Updates ##
-
-You can find the documentation and announcements of updates on the [project's website](http://www.sequelizejs.com).
-If you want to know about latest development and releases, follow me on [Twitter](http://twitter.com/sdepold).
-Also make sure to take a look at the examples in the repository. The website will contain them soon, as well.
-
-- [Documentation](http://www.sequelizejs.com)
-- [Twitter](http://twitter.com/sdepold)
-- [IRC](irc://irc.freenode.net/sequelizejs)
-- [Google Groups](https://groups.google.com/forum/#!forum/sequelize)
-- [XING](https://www.xing.com/net/priec1b5cx/sequelize) (pretty much inactive, but you might want to name it on your profile)
-
-## Roadmap
-
-A very basic roadmap. Chances aren't too bad, that not mentioned things are implemented as well. Don't panic :)
-
-### 1.6.0 (ToDo)
-- ~~Fix last issues with eager loading of associated data~~
-- ~~Find out why Person.belongsTo(House) would add person_id to house. It should add house_id to person~~
-
-### 1.7.0
-- Check if lodash is a proper alternative to current underscore usage.
-- Transactions
-- Support for update of tables without primary key
-- MariaDB support
-- Support for update and delete calls for whole tables without previous loading of instances
-- Eager loading of nested associations [#388](https://github.com/sdepold/sequelize/issues/388#issuecomment-12019099)
-- Model#delete
-- Validate a model before it gets saved. (Move validation of enum attribute value to validate method)
-- BLOB [#99](https://github.com/sdepold/sequelize/issues/99)
-
-### 1.7.x
-- Complete support for non-id primary keys
-
-### 1.8.0
-- API sugar (like Model.select().where().group().include().all())
-- Schema dumping
-- ~~enum support~~
-- attributes / values of a dao instance should be scoped
-
-### 2.0.0
-- save datetimes in UTC
-
-## Collaboration 2.0 ##
-
-I'm glad to get pull request if any functionality is missing or something is buggy. But _please_ ... run the tests before you send me the pull request.
-
-Still interested? Coolio! Here is how to get started:
-
-### 1. Prepare your environment ###
-
-Here comes a little surprise: You need [Node.JS](http://nodejs.org). In order to be
-a productive developer, I would recommend the latest v0.8. Also I usually recommend
-[NVM](https://github.com/creationix/nvm).
-
-Once Node.JS is installed on your computer, you will also have access to the lovely
-Node Package Manager (NPM).
-
-### 2. Database... Come to me! ###
-
-First class citizen of Sequelize was MySQL. Over time, Sequelize began to
-become compatible to SQLite and PostgreSQL. In order to provide a fully
-featured pull request, you would most likely want to install of them. Give
-it a try, it's not that hard.
-
-If you are too lazy or just don't know how to get this work,
-feel free to join the IRC channel (freenode@#sequelizejs).
-
-For MySQL and PostgreSQL you'll need to create a DB called `sequelize_test`.
-For MySQL this would look like this:
-
-```console
-$ echo "CREATE DATABASE sequelize_test;" | mysql -uroot
-```
-
-**CLEVER NOTE:** your local MySQL install must be with username `root`
- without password. If you want to customize that just hack in the
- tests, but make sure to don't commit your credentials, we don't want
- to expose your personal data in sequelize codebase ;)
-
-**AND ONE LAST THING:** Once `npm install` worked for you (see below), you'll
-get SQLite tests for free :)
-
-
-### 3. Install the dependencies ###
-
-Just "cd" into sequelize directory and run `npm install`, see an example below:
-
-```console
-$ cd path/to/sequelize
-$ npm install
-```
-
-### 4. Run the tests ###
-
-Right now, the test base is split into the `spec` folder (which contains the
-lovely [BusterJS](http://busterjs.org) tests) and the `spec-jasmine` folder
-(which contains the ugly and awkward node-jasmine based tests). A main goal
-is to get rid of the jasmine tests!
-
-As you might haven't installed all of the supported SQL dialects, here is how
-to run the test suites for your development environment:
-
-```console
-$ # run all tests at once:
-$ npm test
-
-$ # run only the jasmine tests (for all dialects):
-$ npm run test-jasmine
-
-$ # run all of the buster specs (for all dialects):
-$ npm run test-buster
-
-$ # run the buster specs for mysql:
-$ npm run test-buster-mysql
-
-$ # run the buster specs for sqlite:
-$ npm run test-buster-sqlite
-
-$ # run the buster specs for postgresql:
-$ npm run test-buster-postgres
-```
-
-### 5. That's all ###
-
-Just commit and send pull requests.
-Happy hacking and thank you for contributing.
-Ah and one last thing: If you think you deserve it, feel free to add yourself to the
-`package.json`. Also I always look for projects which are using sequelize. If you have
-one of them, drop me a line!
-
-### 6. Some words about coding style ###
-
-As people are regularly complaining about missing semi-colons and strangely formatted
-things, I just want to explain the way I code JavaScript (including Sequelize
-... obviously). I won't reject any pull-request because of having a different code
-style than me but it would be good to have a consistent way of coding in the whole
-project. Here are my rules of thumb:
-
-- No semi-colons. Where possible I try to avoid semi-colons. Please don't discuss this topic with me. Thanks.
-- Curly braces for single line if blocks. I always add curly braces to if blocks. Same for loops and other places.
-- Spacing. Indentation = 2 spaces. Also I add a lot of spaces where possible. See below.
-- Anonymous functions over names functions. Usually I declare a function and assign it to a variable: `var foo = function() {}`
-- Variable declarations. If multiple variables are defined, I use a leading comma for separation.
-- Camelcased variable names. No underscores.
-- Make sure that key is in objects when iterating over it. See below.
-
-#### 6.1. Spaces ####
-
-Use spaces when defining functions.
-
-```js
-function(arg1, arg2, arg3) {
- return 1
-}
-```
-
-Use spaces for if statements.
-
-```js
-if (condition) {
- // do something
-} else {
- // something else
-}
-```
-
-#### 6.2. Variable declarations ####
-
-```js
-var num = 1
- , user = new User()
- , date = new Date()
-```
-
-#### 6.3. For-In-loops ####
-
-```js
-for (var key in obj) {
- if (obj.hasOwnProperty(key)) {
- console.log(obj[key])
- }
-}
-```
-
-#### 6.4. JSHint options ####
-
-```js
-{
- "camelcase": true,
- "curly": true,
- "forin": true,
- "indent": 2,
- "unused": true,
- "asi": true,
- "evil": false,
- "laxcomma": true
-}
-```
-
-# Build status
-
-The automated tests we talk about just so much are running on
-[Travis public CI](http://travis-ci.org), here is its status:
-
-[![Build Status](https://secure.travis-ci.org/sdepold/sequelize.png)](http://travis-ci.org/sdepold/sequelize)
+The repository has been moved to: [https://github.com/sequelize/sequelize](https://github.com/sequelize/sequelize)
160 bin/sequelize
View
@@ -1,160 +0,0 @@
-#!/usr/bin/env node
-
-const path = require("path")
- , fs = require("fs")
- , program = require("commander")
- , Sequelize = require(__dirname + '/../index')
- , moment = require("moment")
- , _ = Sequelize.Utils._
-
-var configPath = process.cwd() + '/config'
- , migrationsPath = process.cwd() + '/migrations'
- , packageJsonPath = __dirname + '/../package.json'
- , packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString())
- , configFile = configPath + '/config.json'
- , configPathExists = fs.existsSync(configPath)
- , configFileExists = fs.existsSync(configFile)
-
-var writeConfig = function(config) {
- !configPathExists && fs.mkdirSync(configPath)
-
- config = JSON.stringify(config)
- config = config.replace('{', '{\n ')
- config = config.replace(/,/g, ",\n ")
- config = config.replace('}', "\n}")
-
- fs.writeFileSync(configFile, config)
-}
-
-var createMigrationsFolder = function(force) {
- if(force) {
- console.log('Deleting the migrations folder.')
- try {
- fs.readdirSync(migrationsPath).forEach(function(filename) {
- fs.unlinkSync(migrationsPath + '/' + filename)
- })
- } catch(e) {}
- try {
- fs.rmdirSync(migrationsPath)
- console.log('Successfully deleted the migrations folder.')
- } catch(e) {}
- }
-
- console.log('Creating migrations folder.')
- try {
- fs.mkdirSync(migrationsPath)
- console.log('Successfully create migrations folder.')
- } catch(e) {
- console.log('Migrations folder already exist.')
- }
-}
-
-var readConfig = function() {
- try {
- var config = JSON.parse(fs.readFileSync(configFile))
- , env = process.env.NODE_ENV || 'development'
-
- if (config[env]) {
- config = config[env]
- }
-
- return config
- } catch(e) {
- throw new Error('The config.json is not available or contains invalid JSON.')
- }
-}
-
-program
- .version(packageJson.version)
- .option('-i, --init', 'Initializes the project. Creates a config/config.json')
- .option('-m, --migrate', 'Runs undone migrations')
- .option('-u, --undo', 'Undo the last migration.')
- .option('-f, --force', 'Forces the action to be done.')
- .option('-c, --create-migration [migration-name]', 'Create a new migration skeleton file.')
- .parse(process.argv)
-
-if(program.migrate) {
- if(configFileExists) {
- var config = readConfig()
- , options = {}
-
- _.each(config, function(value, key) {
- if(['database', 'username', 'password'].indexOf(key) == -1) {
- options[key] = value
- }
- })
-
- options = _.extend(options, { logging: false })
-
- var sequelize = new Sequelize(config.database, config.username, config.password, options)
- , migratorOptions = { path: migrationsPath }
- , migrator = sequelize.getMigrator(migratorOptions)
-
- if(program.undo) {
- sequelize.migrator.findOrCreateSequelizeMetaDAO().success(function(Meta) {
- Meta.find({ order: 'id DESC' }).success(function(meta) {
- if(meta) {
- migrator = sequelize.getMigrator(_.extend(migratorOptions, meta), true)
- }
-
- migrator.migrate({ method: 'down' })
- })
- })
- } else {
- sequelize.migrate()
- }
- } else {
- throw new Error('Please add a configuration file under config/config.json. You might run "sequelize --init".')
- }
-} else if(program.init) {
- if(!configFileExists || !!program.force) {
- writeConfig({
- development: {
- username: "root",
- password: null,
- database: 'database_development',
- host: '127.0.0.1'
- },
- test: {
- username: "root",
- password: null,
- database: 'database_test',
- host: '127.0.0.1'
- },
- production: {
- username: "root",
- password: null,
- database: 'database_production',
- host: '127.0.0.1'
- }
- })
-
- console.log('Successfully created config.json')
- } else {
- console.log('A config.json already exists. Run "sequelize --init --force" to overwrite it.')
- }
-
- createMigrationsFolder(program.force)
-} else if(program.createMigration) {
- createMigrationsFolder()
-
- var migrationName = [
- moment().format('YYYYMMDDHHmmss'),
- (typeof program.createMigration == 'string') ? program.createMigration : 'unnamed-migration'
- ].join('-') + '.js'
-
- var migrationContent = [
- "module.exports = {",
- " up: function(migration, DataTypes) {",
- " // add altering commands here",
- " },",
- " down: function(migration) {",
- " // add reverting commands here",
- " }",
- "}"
- ].join('\n')
-
- fs.writeFileSync(migrationsPath + '/' + migrationName, migrationContent)
-} else {
- console.log('Please define any params!')
-}
250 changelog.md
View
@@ -1,250 +0,0 @@
-# v2.0.0 #
-- [DEPENDENCIES] upgrade mysql to alpha7. You *MUST* use this version or newer for DATETIMEs to work
-
-# v1.6.0 #
-- [DEPENDENCIES] upgraded most dependencies. most important: mysql was upgraded to 2.0.0-alpha-3
-- [DEPENDENCIES] mysql is now an optional dependency. #355 (thanks to clkao)
-- [REFACTORING] separated tests for dialects
-- [REFACTORING] reduced number of sql queries used for adding an element to a N:M association. #449 (thanks to innofluence/janmeier)
-- [REFACTORING] dropped support for synchronous migrations. added third parameter which needs to get called once the migration has been finished. also this adds support for asynchronous actions in migrations.
-- [OTHERS] code was formatted to fit the latest code style guidelines (thanks to durango)
-- [OTHERS] Explicitly target ./docs folder for generate-docs script. #444 (thanks to carsondarling)
-- [BUG] fixed wrong version in sequelize binary
-- [BUG] local options have higher priority than global options (thanks to guersam)
-- [BUG] fixed where clause when passing an empty array (thanks to kbackowski)
-- [BUG] fixed updateAttributes for models/tables without primary key (thanks to durango)
-- [BUG] fixed the location of the foreign key when using belongsTo (thanks to ricardograca)
-- [BUG] don't return timestamps if only specific attributes have been seleceted (thanks to ricardograca)
-- [BUG] fixed removeColumn for sqlite
-- [FEATURE] added association prefetching /eager loading for find and findAll. #465
-- [FEATURE] it's now possible to use callbacks of async functions inside migrations (thanks to mphilpot)
-- [FEATURE] improved comfort of sequelize.query. just pass an sql string to it and wait for the result
-- [FEATURE] Migrations now understand NODE_ENV (thanks to gavri)
-- [FEATURE] Performance improvements (thanks to Mick-Hansen and janmeier from innofluence)
-- [FEATURE] Model.find and Model.findAll can now take a String with an ID. (thanks to ghernandez345)
-- [FEATURE] Compatibility for JSON-like strings in Postgres (thanks to aslakhellesoy)
-- [FEATURE] honor maxConcurrentQueries option (thanks to dchester)
-- [FEATURE] added support for stored procedures (inspired by wuyuntao)
-- [FEATURE] added possibility to use pg lib's native api (thanks to denysonique)
-- [FEATURE] added possibility to define the attributes of received associations (thanks to joshm)
-- [FEATURE] added findOrCreate, which returns a the already existing instance or creates one (thanks to eveiga)
-- [FEATURE] minConnections option for MySQL pooling (thanks to dominiklessel)
-- [FEATURE] added BIGINT data type which is treated like a string (thanks to adamsch1)
-- [FEATURE] https://github.com/sdepold/sequelize/pull/345
-- [FEATURE] allow definition of a models table name (thanks to slamkajs)
-- [FEATURE] allow usage of enums. #440 (thanks to KevinMartin)
-- [FEATURE] allows updateAttributes to target specific fields only (thanks to Pasvaz)
-- [FEATURE] timestamps are now stored as UTC. #461 (thanks to innofluence/janmeier)
-- [FEATURE] results of raw queries are parsed with dottie. #468 (thanks to kozze89)
-- [FEATURE] support for array serialization. pg only. #443 (thanks to clkao)
-- [FEATURE] add increment and decrement methods on dao. #408 (thanks to janmeier/innofluence)
-- [FEATURE] unified the result of describeTable
-- [FEATURE] add support for decimals (thanks to alexyoung)
-
-# v1.5.0 #
-- [REFACTORING] use underscore functions for Utils.isHash (thanks to Mick-Hansen/innofluence)
-- [REFACTORING] removed the 'failure' event and replaced it with 'error'
-- [BUG] fixed booleans for sqlite (thanks to vlmonk)
-- [BUG] obsolete reference attribute for many-to-many associations are removed correctly
-- [BUG] associations can be cleared via passing null to the set method
-- [BUG] "fixed" quota handling (thanks to dgf)
-- [BUG] fixed destroy in postgresql (thanks to robraux)
-- [FEATURE] added possibility to set protocol and to remove port from postgresql connection uri (thanks to danielschwartz)
-- [FEATURE] added possibility to not use a junction table for many-to-many associations on the same table (thanks to janmeier/innofluence)
-- [FEATURE] results of the `import` method is now cached (thanks to janmeier/innofluence)
-- [FEATURE] added possibility to check if a specific object or a whole bunch of objects is currently associated with another object (thanks to janmeier/innofluence)
-- [FEATURE] added possibility to globally disable adding of NULL values to sql queries (thanks to janmeier/innofluence)
-- [FEATURE] Model.create can now also be used to specify values for mass assignment (thanks to janmeier/innofluence)
-- [FEATURE] QueryChainer will now provide the results of the added emitters in the order the emitters have been added (thanks to LaurentZuijdwijk and me ;))
-- [FEATURE] QueryChainer can now be initialized with serial items
-- [FEATURE] node 0.8 compatibility
-- [FEATURE] added options to hasMany getters (thanks to janmeier/innofluence)
-- [FEATURE] pooling option is now correctly passed to postgres (thanks to megshark)
-
-# v1.4.1 #
-- [DEPRECATION] Added deprecation warning for node < v0.6.
-- [FEATURE] added selective saving of instances (thanks to kioopi)
-- [FEATURE] added command to binary for creating a migration skeleton with current timestamp
-- [FEATURE] added `complete` function for each finder method (thanks to sstoiana)
-- [BUG] fixed quotation for sqlite statements (thanks to vlmonk)
-- [BUG] fixed timestamp parsing in migratios (thanks to grn)
-- [FEATURE] added consistent logging behaviour to postgres (thanks to reacuna)
-
-# v1.4.0 #
-- [BUG] fixed booleans in sqlite (thanks to alexstrat)
-- [BUG] fixed forced sync of many-to-many associations (thanks to SirUli)
-- [FEATURE] objects are now compatible to JSON.stringify. (thanks to grayt0r)
-- [FEATURE] When instantiating the sequelize object, you can now pass a function to logging. This allows you to customize the logging behavior. Default is now: console.log (thanks to kenperkins)
-- [BUG] The default logging is still console.log but is wrapped after initialization as it crashes node < 0.6.x.
-- [FEATURE] postgresql support. (thanks to swoodtke)
-- [FEATURE] connection-pooling for mysql. (thanks to megshark)
-- [FEATURE] added possibility to define NOW as default value for date data-types. Use Sequelize.NOW as defaultValue
-- [BUG] Fixed date handling in sqlite (thanks to iizukanao)
-
-# v1.3.7 #
-- [BUG] fixed issue where multiple belongsTo or hasOne associations to the same table overwrite each other
-- [BUG] fixed memory leaks (thanks to megshark)
-
-# v1.3.6 #
-- [BUG] don't update an existing updatedAt-attribute if timestamps option for a DAO is false
-
-# v1.3.5 #
-- [BUG] fixed missed DAO renaming in migrations (thanks to nov)
-
-# v1.3.4 #
-- [REFACTORING] renamed Model/ModelFactory/ModelFactoryManager to DAO/DAOFactory/DAOFactoryManager
-- [IMPROVEMENT] `npm test` will run the test suite (thanks to gabrielfalcao)
-- [IMPROVEMENT] documentation about setting up local development environment (thanks to gabrielfalcao)
-- [REFACTORING] removed updatedAt + createdAt from SequelizeMeta
-
-# v1.3.3 #
-- [BUG] fixed sql-event emitter in all possible locations (thanks to megshark)
-
-# v1.3.2 #
-- [FEATURE] sqlite is now emitting the 'sql'-event as well (thanks to megshark)
-
-# v1.3.1 #
-- [REFACTORING] renamed ModelManager to ModelFactoryManager
-- [IMPROVEMENT] decreased delay of CustomEventEmitter execution from 5ms to 1ms
-- [IMPROVEMENT] improved performance of association handling (many-to-many) (thanks to magshark)
-- [FEATURE] added possibility to specify name of the join table (thanks to magshark)
-- [FEATURE] mysql is emitting a 'sql'-event when executing a query
-- [BUG] correctly delete existing SequelizeMeta entry from database after undoing migration
-- [BUG] fix path of migration files in executable (thanks to bcg)
-
-# v1.3.0 #
-- [REFACTORING] Model#all is now a function and not a getter.
-- [REFACTORING] Renamed ModelDefinition to ModelFactory
-- [REFACTORING] Private method scoping; Attributes are still public
-- [REFACTORING] Use the new util module for node 0.6.2
-- [FEATURE] QueryChainer can now run serially
-- [FEATURE] Association definition is chainable: Person.hasOne(House).hasMany(Address)
-- [FEATURE] Validations (Thanks to [hiddentao](https://github.com/hiddentao))
-- [FEATURE] jQuery-like event listeners: .success(callback) and .error(callback)
-- [FEATURE] aliasing for select queries: Model.find({ where: 'id = 1', attributes: ['id', ['name', 'username']] }) ==> will return the user's name as username
-- [FEATURE] cross-database support. currently supported: mysql, sqlite
-- [FEATURE] migrations
-- [TEST] removed all expresso tests and converted them to jasmine
-
-# v1.2.1 #
-- [REFACTORING] renamed the global options for sync, query and define on sequelize; before: options.queryOptions; now: options.query
-- [FEATURE] allow definition of charset via global define option in sequelize or via charset option in sequelize.define
-- [FEATURE] allow definition of mysql engine via global define option in sequelize or via engine option in sequelize.define; default is InnoDB now
-- [FEATURE] find and findAll will now search in a list of values via: Model.findAll({where: { id: [1,2,3] }}); will return all models with id 1, 2 and 3
-- [TEST] force latin1 charset for travis
-
-# v1.2.0 #
-- [FEATURE] min/max function for models, which return the min/max value in a column
-- [FEATURE] getModel for modelManager for getting a model without storing it in a variable; use it via sequelize.modelManager.getModel('User')
-- [TEST] test suite refactoring for jasmine
-
-# v1.1.4 #
-- [BUG] tables with identical prefix (e.g. wp_) can now be used in many-to-many associations
-
-# v1.1.3 #
-- [BUG] scoped options in model => a model can now have the attribute options
-- [FEATURE] added drop method for sequelize, that drops all currently registered tables
-
-# v1.1.2 #
-- [BUG] prevent malfunction after being idle
-
-# v1.1.1 #
-- [BUG] fixed memory leaks
-- [FEATURE] added query queueing (adjustable via maxConcurrentQueries in config; default: 50)
-
-# v1.1.0 #
-- [BUG] defaultValue 0 is now working
-- [REMOVED] mysql-pool usage (will give it a new try later)
-- [CHORE] updated node-mysql to 0.9.4
-
-# v1.0.2 #
-- [BUG] Fixed where clause generation for models with explicit primary keys (allanca)
-- [BUG] Set insertId for non-default auto increment fields (allanca)
-
-# v1.0.1 #
-- [FEATURE] Added Model.count(callback), which returns the number of elements saved in the database
-- [BUG] Fixed self associations
-
-# v1.0.0 #
-- complete rewrite
-- added new emitter syntax
-- sql injection protection
-- select now supports hash usage of where
-- select now supports array usage of where
-- added a lot of options to find/findAll
-- Wrapped queries correctly using `foo`
-- using expresso 0.7.2
-- moved config for test database into seperated config file
-- Added method for adding and deleting single associations
-
-# v0.4.3 #
-- renamed loadAssociatedData to fetchAssociations
-- renamed Model#associatedData to fetchedAssociations
-- added fetchAssociations to finder methods
-- store data found by finder method in the associatedData hash + grep them from there if reload is not forced
-- added option to sequelize constructor for disabling the pluralization of tablenames: disableTableNameModification
-- allow array as value for chainQueries => Sequelize.chainQueries([save: [a,b,c]], callback)
-- remove the usage of an array => Sequelize.chainQueries({save: a}, {destroy: b}, callback)
-
-# v0.4.2 #
-- fixed bugs from 0.4.1
-- added the model instance method loadAssociatedData which adds the hash Model#associatedData to an instance which contains all associated data
-
-# v0.4.1 #
-- THIS UPDATE CHANGES TABLE STRUCTURES MASSIVELY!
-- MAKE SURE TO DROP YOUR CURRENT TABLES AND LET THEM CREATE AGAIN!
-
-- names of many-to-many-association-tables are chosen from passed association names
-- foreign keys are chosen from passed association name
-- added many-to-many association on the same model
-- added hasManyAndBelongsTo
-- added hasOneAndBelongsTo
-- nodejs-mysql-native 0.4.2
-
-# v0.4.0 #
-- added error handling when defining invalid database credentials
-- Sequelize#sync, Sequelize#drop, model#sync, model#drop returns errors via callback
-- code is now located under lib/sequelize to use it with nDistro
-- added possibility to use non default mysql database (host/port)
-- added error handling when defining invalid database port/host
-- schema definitions can now contain default values and null allowance
-- database credentials can now also contain an empty / no password
-
-# v0.3.0 #
-- added possibility to define class and instance methods for models
-- added import method for loading model definition from a file
-
-# v0.2.6 #
-- refactored Sequelize to fit CommonJS module conventions
-
-# v0.2.5 #
-- added BOOLEAN type
-- added FLOAT type
-- fixed DATE type issue
-- fixed npm package
-
-# v0.2.4 #
-- fixed bug when using cross associated tables (many to many associations)
-
-# v0.2.3 #
-- added latest mysql connection library
- - fixed id handling on save
- - fixed text handling (varchar > 255; text)
-- using the inflection library for naming tables more convenient
-- Sequelize.TEXT is now using MySQL datatype TEXT instead of varchar(4000)
-
-# v0.2.2 #
-- released project as npm package
-
-# v0.2.1 #
-- fixed date bug
-
-# v0.2.0 #
-- added methods for setting associations
-- added method for chaining an arbitraty amount of queries
-
-# v0.1.0 #
-- first stable version
-- implemented all basic functions
-- associations are working
-
18 docs/api.js
View
@@ -1,18 +0,0 @@
-YUI.add("yuidoc-meta", function(Y) {
- Y.YUIDoc = { meta: {
- "classes": [
- "QueryInterface",
- "Sequelize"
- ],
- "modules": [
- "Sequelize"
- ],
- "allModules": [
- {
- "displayName": "Sequelize",
- "name": "Sequelize",
- "description": "The entry point."
- }
- ]
-} };
-});
BIN  docs/assets/css/external-small.png
View
Deleted file not rendered
BIN  docs/assets/css/logo.png
View
Deleted file not rendered
782 docs/assets/css/main.css
View
@@ -1,782 +0,0 @@
-/*
-Font sizes for all selectors other than the body are given in percentages,
-with 100% equal to 13px. To calculate a font size percentage, multiply the
-desired size in pixels by 7.6923076923.
-
-Here's a quick lookup table:
-
-10px - 76.923%
-11px - 84.615%
-12px - 92.308%
-13px - 100%
-14px - 107.692%
-15px - 115.385%
-16px - 123.077%
-17px - 130.769%
-18px - 138.462%
-19px - 146.154%
-20px - 153.846%
-*/
-
-html {
- background: #fff;
- color: #333;
- overflow-y: scroll;
-}
-
-body {
- font: 13px/1.4 'Lucida Grande', 'Lucida Sans Unicode', 'DejaVu Sans', 'Bitstream Vera Sans', 'Helvetica', 'Arial', sans-serif;
- margin: 0;
- padding: 0;
-}
-
-/* -- Links ----------------------------------------------------------------- */
-a {
- color: #356de4;
- text-decoration: none;
-}
-
-.hidden {
- display: none;
-}
-
-a:hover { text-decoration: underline; }
-
-/* "Jump to Table of Contents" link is shown to assistive tools, but hidden from
- sight until it's focused. */
-.jump {
- position: absolute;
- padding: 3px 6px;
- left: -99999px;
- top: 0;
-}
-
-.jump:focus { left: 40%; }
-
-/* -- Paragraphs ------------------------------------------------------------ */
-p { margin: 1.3em 0; }
-dd p, td p { margin-bottom: 0; }
-dd p:first-child, td p:first-child { margin-top: 0; }
-
-/* -- Headings -------------------------------------------------------------- */
-h1, h2, h3, h4, h5, h6 {
- color: #D98527;/*was #f80*/
- font-family: 'Trebuchet MS', sans-serif;
- font-weight: bold;
- line-height: 1.1;
- margin: 1.1em 0 0.5em;
-}
-
-h1 {
- font-size: 184.6%;
- color: #30418C;
- margin: 0.75em 0 0.5em;
-}
-
-h2 {
- font-size: 153.846%;
- color: #E48A2B;
-}
-
-h3 { font-size: 138.462%; }
-
-h4 {
- border-bottom: 1px solid #DBDFEA;
- color: #E48A2B;
- font-size: 115.385%;
- font-weight: normal;
- padding-bottom: 2px;
-}
-
-h5, h6 { font-size: 107.692%; }
-
-/* -- Code and examples ----------------------------------------------------- */
-code, kbd, pre, samp {
- font-family: Menlo, Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
- font-size: 92.308%;
- line-height: 1.35;
-}
-
-p code, p kbd, p samp {
- background: #FCFBFA;
- border: 1px solid #EFEEED;
- padding: 0 3px;
-}
-
-a code, a kbd, a samp,
-pre code, pre kbd, pre samp,
-table code, table kbd, table samp,
-.intro code, .intro kbd, .intro samp,
-.toc code, .toc kbd, .toc samp {
- background: none;
- border: none;
- padding: 0;
-}
-
-pre.code, pre.terminal, pre.cmd {
- overflow-x: auto;
- *overflow-x: scroll;
- padding: 0.3em 0.6em;
-}
-
-pre.code {
- background: #FCFBFA;
- border: 1px solid #EFEEED;
- border-left-width: 5px;
-}
-
-pre.terminal, pre.cmd {
- background: #F0EFFC;
- border: 1px solid #D0CBFB;
- border-left: 5px solid #D0CBFB;
-}
-
-/* Don't reduce the font size of <code>/<kbd>/<samp> elements inside <pre>
- blocks. */
-pre code, pre kbd, pre samp { font-size: 100%; }
-
-/* Used to denote text that shouldn't be selectable, such as line numbers or
- shell prompts. Guess which browser this doesn't work in. */
-.noselect {
- -moz-user-select: -moz-none;
- -khtml-user-select: none;
- -webkit-user-select: none;
- -o-user-select: none;
- user-select: none;
-}
-
-/* -- Lists ----------------------------------------------------------------- */
-dd { margin: 0.2em 0 0.7em 1em; }
-dl { margin: 1em 0; }
-dt { font-weight: bold; }
-
-/* -- Tables ---------------------------------------------------------------- */
-caption, th { text-align: left; }
-
-table {
- border-collapse: collapse;
- width: 100%;
-}
-
-td, th {
- border: 1px solid #fff;
- padding: 5px 12px;
- vertical-align: top;
-}
-
-td { background: #E6E9F5; }
-td dl { margin: 0; }
-td dl dl { margin: 1em 0; }
-td pre:first-child { margin-top: 0; }
-
-th {
- background: #D2D7E6;/*#97A0BF*/
- border-bottom: none;
- border-top: none;
- color: #000;/*#FFF1D5*/
- font-family: 'Trebuchet MS', sans-serif;
- font-weight: bold;
- line-height: 1.3;
- white-space: nowrap;
-}
-
-
-/* -- Layout and Content ---------------------------------------------------- */
-#doc {
- margin: auto;
- min-width: 1024px;
-}
-
-.content { padding: 0 20px 0 25px; }
-
-.sidebar {
- padding: 0 15px 0 10px;
-}
-#bd {
- padding: 7px 0 130px;
- position: relative;
- width: 99%;
-}
-
-/* -- Table of Contents ----------------------------------------------------- */
-
-/* The #toc id refers to the single global table of contents, while the .toc
- class refers to generic TOC lists that could be used throughout the page. */
-
-.toc code, .toc kbd, .toc samp { font-size: 100%; }
-.toc li { font-weight: bold; }
-.toc li li { font-weight: normal; }
-
-/* -- Intro and Example Boxes ----------------------------------------------- */
-/*
-.intro, .example { margin-bottom: 2em; }
-.example {
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- -moz-box-shadow: 0 0 5px #bfbfbf;
- -webkit-box-shadow: 0 0 5px #bfbfbf;
- box-shadow: 0 0 5px #bfbfbf;
- padding: 1em;
-}
-.intro {
- background: none repeat scroll 0 0 #F0F1F8; border: 1px solid #D4D8EB; padding: 0 1em;
-}
-*/
-
-/* -- Other Styles ---------------------------------------------------------- */
-
-/* These are probably YUI-specific, and should be moved out of Selleck's default
- theme. */
-
-.button {
- border: 1px solid #dadada;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- color: #444;
- display: inline-block;
- font-family: Helvetica, Arial, sans-serif;
- font-size: 92.308%;
- font-weight: bold;
- padding: 4px 13px 3px;
- -moz-text-shadow: 1px 1px 0 #fff;
- -webkit-text-shadow: 1px 1px 0 #fff;
- text-shadow: 1px 1px 0 #fff;
- white-space: nowrap;
-
- background: #EFEFEF; /* old browsers */
- background: -moz-linear-gradient(top, #f5f5f5 0%, #efefef 50%, #e5e5e5 51%, #dfdfdf 100%); /* firefox */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(50%,#efefef), color-stop(51%,#e5e5e5), color-stop(100%,#dfdfdf)); /* webkit */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#dfdfdf',GradientType=0 ); /* ie */
-}
-
-.button:hover {
- border-color: #466899;
- color: #fff;
- text-decoration: none;
- -moz-text-shadow: 1px 1px 0 #222;
- -webkit-text-shadow: 1px 1px 0 #222;
- text-shadow: 1px 1px 0 #222;
-
- background: #6396D8; /* old browsers */
- background: -moz-linear-gradient(top, #6396D8 0%, #5A83BC 50%, #547AB7 51%, #466899 100%); /* firefox */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6396D8), color-stop(50%,#5A83BC), color-stop(51%,#547AB7), color-stop(100%,#466899)); /* webkit */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6396D8', endColorstr='#466899',GradientType=0 ); /* ie */
-}
-
-.newwindow { text-align: center; }
-
-.header .version em {
- display: block;
- text-align: right;
-}
-
-
-#classdocs .item {
- border-bottom: 1px solid #466899;
- margin: 1em 0;
- padding: 1.5em;
-}
-
-#classdocs .item .params p,
- #classdocs .item .returns p,{
- display: inline;
-}
-
-#classdocs .item em code, #classdocs .item em.comment {
- color: green;
-}
-
-#classdocs .item em.comment a {
- color: green;
- text-decoration: underline;
-}
-
-#classdocs .foundat {
- font-size: 11px;
- font-style: normal;
-}
-
-.attrs .emits {
- margin-left: 2em;
- padding: .5em;
- border-left: 1px dashed #ccc;
-}
-
-abbr {
- border-bottom: 1px dashed #ccc;
- font-size: 80%;
- cursor: help;
-}
-
-.prettyprint li.L0,
-.prettyprint li.L1,
-.prettyprint li.L2,
-.prettyprint li.L3,
-.prettyprint li.L5,
-.prettyprint li.L6,
-.prettyprint li.L7,
-.prettyprint li.L8 {
- list-style: decimal;
-}
-
-ul li p {
- margin-top: 0;
-}
-
-.method .name {
- font-size: 110%;
-}
-
-.apidocs .methods .extends .method,
-.apidocs .properties .extends .property,
-.apidocs .attrs .extends .attr,
-.apidocs .events .extends .event {
- font-weight: bold;
-}
-
-.apidocs .methods .extends .inherited,
-.apidocs .properties .extends .inherited,
-.apidocs .attrs .extends .inherited,
-.apidocs .events .extends .inherited {
- font-weight: normal;
-}
-
-#hd {
- background: whiteSmoke;
- background: -moz-linear-gradient(top,#DCDBD9 0,#F6F5F3 100%);
- background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#DCDBD9),color-stop(100%,#F6F5F3));
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dcdbd9',endColorstr='#F6F5F3',GradientType=0);
- border-bottom: 1px solid #DFDFDF;
- padding: 0 15px 1px 20px;
- margin-bottom: 15px;
-}
-
-#hd img {
- margin-right: 10px;
- vertical-align: middle;
-}
-
-
-/* -- API Docs CSS ---------------------------------------------------------- */
-
-/*
-This file is organized so that more generic styles are nearer the top, and more
-specific styles are nearer the bottom of the file. This allows us to take full
-advantage of the cascade to avoid redundant style rules. Please respect this
-convention when making changes.
-*/
-
-/* -- Generic TabView styles ------------------------------------------------ */
-
-/*
-These styles apply to all API doc tabviews. To change styles only for a
-specific tabview, see the other sections below.
-*/
-
-.yui3-js-enabled .apidocs .tabview {
- visibility: hidden; /* Hide until the TabView finishes rendering. */
- _visibility: visible;
-}
-
-.apidocs .tabview.yui3-tabview-content { visibility: visible; }
-.apidocs .tabview .yui3-tabview-panel { background: #fff; }
-
-/* -- Generic Content Styles ------------------------------------------------ */
-
-/* Headings */
-h2, h3, h4, h5, h6 {
- border: none;
- color: #30418C;
- font-weight: bold;
- text-decoration: none;
-}
-
-.link-docs {
- float: right;
- font-size: 15px;
- margin: 4px 4px 6px;
- padding: 6px 30px 5px;
-}
-
-.apidocs { zoom: 1; }
-
-/* Generic box styles. */
-.apidocs .box {
- border: 1px solid;
- border-radius: 3px;
- margin: 1em 0;
- padding: 0 1em;
-}
-
-/* A flag is a compact, capsule-like indicator of some kind. It's used to
- indicate private and protected items, item return types, etc. in an
- attractive and unobtrusive way. */
-.apidocs .flag {
- background: #bababa;
- border-radius: 3px;
- color: #fff;
- font-size: 11px;
- margin: 0 0.5em;
- padding: 2px 4px 1px;
-}
-
-/* Class/module metadata such as "Uses", "Extends", "Defined in", etc. */
-.apidocs .meta {
- background: #f9f9f9;
- border-color: #efefef;
- color: #555;
- font-size: 11px;
- padding: 3px 6px;
-}
-
-.apidocs .meta p { margin: 0; }
-
-/* Deprecation warning. */
-.apidocs .box.deprecated,
-.apidocs .flag.deprecated {
- background: #fdac9f;
- border: 1px solid #fd7775;
-}
-
-.apidocs .box.deprecated p { margin: 0.5em 0; }
-.apidocs .flag.deprecated { color: #333; }
-
-/* Module/Class intro description. */
-.apidocs .intro {
- background: #f0f1f8;
- border-color: #d4d8eb;
-}
-
-/* Loading spinners. */
-#bd.loading .apidocs,
-#api-list.loading .yui3-tabview-panel {
- background: #fff url(../img/spinner.gif) no-repeat center 70px;
- min-height: 150px;
-}
-
-#bd.loading .apidocs .content,
-#api-list.loading .yui3-tabview-panel .apis {
- display: none;
-}
-
-.apidocs .no-visible-items { color: #666; }
-
-/* Generic inline list. */
-.apidocs ul.inline {
- display: inline;
- list-style: none;
- margin: 0;
- padding: 0;
-}
-
-.apidocs ul.inline li { display: inline; }
-
-/* Comma-separated list. */
-.apidocs ul.commas li:after { content: ','; }
-.apidocs ul.commas li:last-child:after { content: ''; }
-
-/* Keyboard shortcuts. */
-kbd .cmd { font-family: Monaco, Helvetica; }
-
-/* -- Generic Access Level styles ------------------------------------------- */
-.apidocs .item.protected,
-.apidocs .item.private,
-.apidocs .index-item.protected,
-.apidocs .index-item.deprecated,
-.apidocs .index-item.private {
- display: none;
-}
-
-.show-deprecated .item.deprecated,
-.show-deprecated .index-item.deprecated,
-.show-protected .item.protected,
-.show-protected .index-item.protected,
-.show-private .item.private,
-.show-private .index-item.private {
- display: block;
-}
-
-.hide-inherited .item.inherited,
-.hide-inherited .index-item.inherited {
- display: none;
-}
-
-/* -- Generic Item Index styles --------------------------------------------- */
-.apidocs .index { margin: 1.5em 0 3em; }
-
-.apidocs .index h3 {
- border-bottom: 1px solid #efefef;
- color: #333;
- font-size: 13px;
- margin: 2em 0 0.6em;
- padding-bottom: 2px;
-}
-
-.apidocs .index .no-visible-items { margin-top: 2em; }
-
-.apidocs .index-list {
- border-color: #efefef;
- font-size: 12px;
- list-style: none;
- margin: 0;
- padding: 0;
- -moz-column-count: 4;
- -moz-column-gap: 10px;
- -moz-column-width: 170px;
- -ms-column-count: 4;
- -ms-column-gap: 10px;
- -ms-column-width: 170px;
- -o-column-count: 4;
- -o-column-gap: 10px;
- -o-column-width: 170px;
- -webkit-column-count: 4;
- -webkit-column-gap: 10px;
- -webkit-column-width: 170px;
- column-count: 4;
- column-gap: 10px;
- column-width: 170px;
-}
-
-.apidocs .no-columns .index-list {
- -moz-column-count: 1;
- -ms-column-count: 1;
- -o-column-count: 1;
- -webkit-column-count: 1;
- column-count: 1;
-}
-
-.apidocs .index-item { white-space: nowrap; }
-
-.apidocs .index-item .flag {
- background: none;
- border: none;
- color: #afafaf;
- display: inline;
- margin: 0 0 0 0.2em;
- padding: 0;
-}
-
-/* -- Generic API item styles ----------------------------------------------- */
-.apidocs .args {
- display: inline;
- margin: 0 0.5em;
-}
-
-.apidocs .flag.chainable { background: #46ca3b; }
-.apidocs .flag.protected { background: #9b86fc; }
-.apidocs .flag.private { background: #fd6b1b; }
-.apidocs .flag.async { background: #356de4; }
-.apidocs .flag.required { background: #e60923; }
-
-.apidocs .item {
- border-bottom: 1px solid #efefef;
- margin: 1.5em 0 2em;
- padding-bottom: 2em;
-}
-
-.apidocs .item h4,
-.apidocs .item h5,
-.apidocs .item h6 {
- color: #333;
- font-family: inherit;
- font-size: 100%;
-}
-
-.apidocs .item .description p,
-.apidocs .item pre.code {
- margin: 1em 0 0;
-}
-
-.apidocs .item .meta {
- background: none;
- border: none;
- padding: 0;
-}
-
-.apidocs .item .name {
- display: inline;
- font-size: 14px;
-}
-
-.apidocs .item .type,
-.apidocs .item .type a,
-.apidocs .returns-inline {
- color: #555;
-}
-
-.apidocs .item .type,
-.apidocs .returns-inline {
- font-size: 11px;
- margin: 0 0 0 0;
-}
-
-.apidocs .item .type a { border-bottom: 1px dotted #afafaf; }
-.apidocs .item .type a:hover { border: none; }
-
-/* -- Item Parameter List --------------------------------------------------- */
-.apidocs .params-list {
- list-style: square;
- margin: 1em 0 0 2em;
- padding: 0;
-}
-
-.apidocs .param { margin-bottom: 1em; }
-
-.apidocs .param .type,
-.apidocs .param .type a {
- color: #666;
-}
-
-.apidocs .param .type {
- margin: 0 0 0 0.5em;
- *margin-left: 0.5em;
-}
-
-.apidocs .param-name { font-weight: bold; }
-
-/* -- Item "Emits" block ---------------------------------------------------- */
-.apidocs .item .emits {
- background: #f9f9f9;
- border-color: #eaeaea;
-}
-
-/* -- Item "Returns" block -------------------------------------------------- */
-.apidocs .item .returns .type,
-.apidocs .item .returns .type a {
- font-size: 100%;
- margin: 0;
-}
-
-/* -- Class Constructor block ----------------------------------------------- */
-.apidocs .constructor .item {
- border: none;
- padding-bottom: 0;
-}
-
-/* -- File Source View ------------------------------------------------------ */
-.apidocs .file pre.code,
-#doc .apidocs .file pre.prettyprint {
- background: inherit;
- border: none;
- overflow: visible;
- padding: 0;
-}
-
-.apidocs .L0,
-.apidocs .L1,
-.apidocs .L2,
-.apidocs .L3,
-.apidocs .L4,
-.apidocs .L5,
-.apidocs .L6,
-.apidocs .L7,
-.apidocs .L8,
-.apidocs .L9 {
- background: inherit;
-}
-
-/* -- Submodule List -------------------------------------------------------- */
-.apidocs .module-submodule-description {
- font-size: 12px;
- margin: 0.3em 0 1em;
-}
-
-.apidocs .module-submodule-description p:first-child { margin-top: 0; }
-
-/* -- Sidebar TabView ------------------------------------------------------- */
-#api-tabview { margin-top: 0.6em; }
-
-#api-tabview-filter,
-#api-tabview-panel {
- border: 1px solid #dfdfdf;
-}
-
-#api-tabview-filter {
- border-bottom: none;
- border-top: none;
- padding: 0.6em 10px 0 10px;
-}
-
-#api-tabview-panel { border-top: none; }
-#api-filter { width: 97%; }
-
-/* -- Content TabView ------------------------------------------------------- */
-#classdocs .yui3-tabview-panel { border: none; }
-
-/* -- Source File Contents -------------------------------------------------- */
-.prettyprint li.L0,
-.prettyprint li.L1,
-.prettyprint li.L2,
-.prettyprint li.L3,
-.prettyprint li.L5,
-.prettyprint li.L6,
-.prettyprint li.L7,
-.prettyprint li.L8 {
- list-style: decimal;
-}
-
-/* -- API options ----------------------------------------------------------- */
-#api-options {
- font-size: 11px;
- margin-top: 2.2em;
- position: absolute;
- right: 1.5em;
-}
-
-/*#api-options label { margin-right: 0.6em; }*/
-
-/* -- API list -------------------------------------------------------------- */
-#api-list {
- margin-top: 1.5em;
- *zoom: 1;
-}
-
-.apis {
- font-size: 12px;
- line-height: 1.4;
- list-style: none;
- margin: 0;
- padding: 0.5em 0 0.5em 0.4em;
-}
-
-.apis a {
- border: 1px solid transparent;
- display: block;
- margin: 0 0 0 -4px;
- padding: 1px 4px 0;
- text-decoration: none;
- _border: none;
- _display: inline;
-}
-
-.apis a:hover,
-.apis a:focus {
- background: #E8EDFC;
- background: -moz-linear-gradient(top, #e8edfc 0%, #becef7 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#E8EDFC), color-stop(100%,#BECEF7));
- border-color: #AAC0FA;
- border-radius: 3px;
- color: #333;
- outline: none;
-}
-
-.api-list-item a:hover,
-.api-list-item a:focus {
- font-weight: bold;
- text-shadow: 1px 1px 1px #fff;
-}
-
-.apis .message { color: #888; }
-.apis .result a { padding: 3px 5px 2px; }
-
-.apis .result .type {
- right: 4px;
- top: 7px;
-}
-
-.api-list-item .yui3-highlight {
- font-weight: bold;
-}
-
BIN  docs/assets/favicon.png
View
Deleted file not rendered
BIN  docs/assets/img/spinner.gif
View
Deleted file not rendered
10 docs/assets/index.html
View
@@ -1,10 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Redirector</title>
- <meta http-equiv="refresh" content="0;url=../">
- </head>
- <body>
- <a href="../">Click here to redirect</a>
- </body>
-</html>
52 docs/assets/js/api-filter.js
View
@@ -1,52 +0,0 @@
-YUI.add('api-filter', function (Y) {
-
-Y.APIFilter = Y.Base.create('apiFilter', Y.Base, [Y.AutoCompleteBase], {
- // -- Initializer ----------------------------------------------------------
- initializer: function () {
- this._bindUIACBase();
- this._syncUIACBase();
- },
- getDisplayName: function(name) {
-
- Y.each(Y.YUIDoc.meta.allModules, function(i) {
- if (i.name === name && i.displayName) {
- name = i.displayName;
- }
- });
-
- return name;
- }
-
-}, {
- // -- Attributes -----------------------------------------------------------
- ATTRS: {
- resultHighlighter: {
- value: 'phraseMatch'
- },
-
- // May be set to "classes" or "modules".
- queryType: {
- value: 'classes'
- },
-
- source: {
- valueFn: function() {
- var self = this;
- return function(q) {
- var data = Y.YUIDoc.meta[self.get('queryType')],
- out = [];
- Y.each(data, function(v) {
- if (v.toLowerCase().indexOf(q.toLowerCase()) > -1) {
- out.push(v);
- }
- });
- return out;
- };
- }
- }
- }
-});
-
-}, '3.4.0', {requires: [
- 'autocomplete-base', 'autocomplete-highlighters', 'autocomplete-sources'
-]});
251 docs/assets/js/api-list.js
View
@@ -1,251 +0,0 @@
-YUI.add('api-list', function (Y) {
-
-var Lang = Y.Lang,
- YArray = Y.Array,
-
- APIList = Y.namespace('APIList'),
-
- classesNode = Y.one('#api-classes'),
- inputNode = Y.one('#api-filter'),
- modulesNode = Y.one('#api-modules'),
- tabviewNode = Y.one('#api-tabview'),
-
- tabs = APIList.tabs = {},
-
- filter = APIList.filter = new Y.APIFilter({
- inputNode : inputNode,
- maxResults: 1000,
-
- on: {
- results: onFilterResults
- }
- }),
-
- search = APIList.search = new Y.APISearch({
- inputNode : inputNode,
- maxResults: 100,
-
- on: {
- clear : onSearchClear,
- results: onSearchResults
- }
- }),
-
- tabview = APIList.tabview = new Y.TabView({
- srcNode : tabviewNode,
- panelNode: '#api-tabview-panel',
- render : true,
-
- on: {
- selectionChange: onTabSelectionChange
- }
- }),
-
- focusManager = APIList.focusManager = tabviewNode.plug(Y.Plugin.NodeFocusManager, {
- circular : true,
- descendants: '#api-filter, .yui3-tab-panel-selected .api-list-item a, .yui3-tab-panel-selected .result a',
- keys : {next: 'down:40', previous: 'down:38'}
- }).focusManager,
-
- LIST_ITEM_TEMPLATE =
- '<li class="api-list-item {typeSingular}">' +
- '<a href="{rootPath}{typePlural}/{name}.html">{displayName}</a>' +
- '</li>';
-
-// -- Init ---------------------------------------------------------------------
-
-// Duckpunch FocusManager's key event handling to prevent it from handling key
-// events when a modifier is pressed.
-Y.before(function (e, activeDescendant) {
- if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) {
- return new Y.Do.Prevent();
- }
-}, focusManager, '_focusPrevious', focusManager);
-
-Y.before(function (e, activeDescendant) {
- if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) {
- return new Y.Do.Prevent();
- }
-}, focusManager, '_focusNext', focusManager);
-
-// Create a mapping of tabs in the tabview so we can refer to them easily later.
-tabview.each(function (tab, index) {
- var name = tab.get('label').toLowerCase();
-
- tabs[name] = {
- index: index,
- name : name,
- tab : tab
- };
-});
-
-// Switch tabs on Ctrl/Cmd-Left/Right arrows.
-tabviewNode.on('key', onTabSwitchKey, 'down:37,39');
-
-// Focus the filter input when the `/` key is pressed.
-Y.one(Y.config.doc).on('key', onSearchKey, 'down:83');
-
-// Keep the Focus Manager up to date.
-inputNode.on('focus', function () {
- focusManager.set('activeDescendant', inputNode);
-});
-
-// Update all tabview links to resolved URLs.
-tabview.get('panelNode').all('a').each(function (link) {
- link.setAttribute('href', link.get('href'));
-});
-
-// -- Private Functions --------------------------------------------------------
-function getFilterResultNode() {
- return filter.get('queryType') === 'classes' ? classesNode : modulesNode;
-}
-
-// -- Event Handlers -----------------------------------------------------------
-function onFilterResults(e) {
- var frag = Y.one(Y.config.doc.createDocumentFragment()),
- resultNode = getFilterResultNode(),
- typePlural = filter.get('queryType'),
- typeSingular = typePlural === 'classes' ? 'class' : 'module';
-
- if (e.results.length) {
- YArray.each(e.results, function (result) {
- frag.append(Lang.sub(LIST_ITEM_TEMPLATE, {
- rootPath : APIList.rootPath,
- displayName : filter.getDisplayName(result.highlighted),
- name : result.text,
- typePlural : typePlural,
- typeSingular: typeSingular
- }));
- });
- } else {
- frag.append(
- '<li class="message">' +
- 'No ' + typePlural + ' found.' +
- '</li>'
- );
- }
-
- resultNode.empty(true);
- resultNode.append(frag);
-
- focusManager.refresh();
-}
-
-function onSearchClear(e) {
-
- focusManager.refresh();
-}
-
-function onSearchKey(e) {
- var target = e.target;
-
- if (target.test('input,select,textarea')
- || target.get('isContentEditable')) {
- return;
- }
-
- e.preventDefault();
-
- inputNode.focus();
- focusManager.refresh();
-}
-
-function onSearchResults(e) {
- var frag = Y.one(Y.config.doc.createDocumentFragment());
-
- if (e.results.length) {
- YArray.each(e.results, function (result) {
- frag.append(result.display);
- });
- } else {
- frag.append(
- '<li class="message">' +
- 'No results found. Maybe you\'ll have better luck with a ' +
- 'different query?' +
- '</li>'
- );
- }
-
-
- focusManager.refresh();
-}
-
-function onTabSelectionChange(e) {
- var tab = e.newVal,
- name = tab.get('label').toLowerCase();
-
- tabs.selected = {
- index: tab.get('index'),
- name : name,
- tab : tab
- };
-
- switch (name) {
- case 'classes': // fallthru
- case 'modules':
- filter.setAttrs({
- minQueryLength: 0,
- queryType : name
- });
-
- search.set('minQueryLength', -1);
-
- // Only send a request if this isn't the initially-selected tab.
- if (e.prevVal) {
- filter.sendRequest(filter.get('value'));
- }
- break;
-
- case 'everything':
- filter.set('minQueryLength', -1);
- search.set('minQueryLength', 1);
-
- if (search.get('value')) {
- search.sendRequest(search.get('value'));
- } else {
- inputNode.focus();
- }
- break;
-
- default:
- // WTF? We shouldn't be here!
- filter.set('minQueryLength', -1);
- search.set('minQueryLength', -1);
- }
-
- if (focusManager) {
- setTimeout(function () {
- focusManager.refresh();
- }, 1);
- }
-}
-
-function onTabSwitchKey(e) {
- var currentTabIndex = tabs.selected.index;
-
- if (!(e.ctrlKey || e.metaKey)) {
- return;
- }
-
- e.preventDefault();
-
- switch (e.keyCode) {
- case 37: // left arrow
- if (currentTabIndex > 0) {
- tabview.selectChild(currentTabIndex - 1);
- inputNode.focus();
- }
- break;
-
- case 39: // right arrow
- if (currentTabIndex < (Y.Object.size(tabs) - 2)) {
- tabview.selectChild(currentTabIndex + 1);
- inputNode.focus();
- }
- break;
- }
-}
-
-}, '3.4.0', {requires: [
- 'api-filter', 'api-search', 'event-key', 'node-focusmanager', 'tabview'
-]});
98 docs/assets/js/api-search.js
View
@@ -1,98 +0,0 @@
-YUI.add('api-search', function (Y) {
-
-var Lang = Y.Lang,
- Node = Y.Node,
- YArray = Y.Array;
-
-Y.APISearch = Y.Base.create('apiSearch', Y.Base, [Y.AutoCompleteBase], {
- // -- Public Properties ----------------------------------------------------
- RESULT_TEMPLATE:
- '<li class="result {resultType}">' +
- '<a href="{url}">' +
- '<h3 class="title">{name}</h3>' +
- '<span class="type">{resultType}</span>' +
- '<div class="description">{description}</div>' +
- '<span class="className">{class}</span>' +
- '</a>' +
- '</li>',
-
- // -- Initializer ----------------------------------------------------------
- initializer: function () {
- this._bindUIACBase();
- this._syncUIACBase();
- },
-
- // -- Protected Methods ----------------------------------------------------
- _apiResultFilter: function (query, results) {
- // Filter components out of the results.
- return YArray.filter(results, function (result) {
- return result.raw.resultType === 'component' ? false : result;
- });
- },
-
- _apiResultFormatter: function (query, results) {
- return YArray.map(results, function (result) {
- var raw = Y.merge(result.raw), // create a copy
- desc = raw.description || '';
-
- // Convert description to text and truncate it if necessary.
- desc = Node.create('<div>' + desc + '</div>').get('text');
-
- if (desc.length > 65) {
- desc = Y.Escape.html(desc.substr(0, 65)) + ' &hellip;';
- } else {
- desc = Y.Escape.html(desc);
- }
-
- raw['class'] || (raw['class'] = '');
- raw.description = desc;
-
- // Use the highlighted result name.
- raw.name = result.highlighted;
-
- return Lang.sub(this.RESULT_TEMPLATE, raw);
- }, this);
- },
-
- _apiTextLocator: function (result) {
- return result.displayName || result.name;
- }
-}, {
- // -- Attributes -----------------------------------------------------------
- ATTRS: {
- resultFormatter: {
- valueFn: function () {
- return this._apiResultFormatter;
- }
- },
-
- resultFilters: {
- valueFn: function () {
- return this._apiResultFilter;
- }
- },
-
- resultHighlighter: {
- value: 'phraseMatch'
- },
-
- resultListLocator: {
- value: 'data.results'
- },
-
- resultTextLocator: {
- valueFn: function () {
- return this._apiTextLocator;
- }
- },
-
- source: {
- value: '/api/v1/search?q={query}&count={maxResults}'
- }
- }
-});
-
-}, '3.4.0', {requires: [
- 'autocomplete-base', 'autocomplete-highlighters', 'autocomplete-sources',
- 'escape'
-]});
370 docs/assets/js/apidocs.js
View
@@ -1,370 +0,0 @@
-YUI().use(
- 'yuidoc-meta',
- 'api-list', 'history-hash', 'node-screen', 'node-style', 'pjax',
-function (Y) {
-
-var win = Y.config.win,
- localStorage = win.localStorage,
-
- bdNode = Y.one('#bd'),
-
- pjax,
- defaultRoute,
-
- classTabView,
- selectedTab;
-
-// Kill pjax functionality unless serving over HTTP.
-if (!Y.getLocation().protocol.match(/^https?\:/)) {
- Y.Router.html5 = false;
-}
-
-// Create the default route with middleware which enables syntax highlighting
-// on the loaded content.
-defaultRoute = Y.Pjax.defaultRoute.concat(function (req, res, next) {
- prettyPrint();
- bdNode.removeClass('loading');
-
- next();
-});
-
-pjax = new Y.Pjax({
- container : '#docs-main',
- contentSelector: '#docs-main > .content',
- linkSelector : '#bd a',
- titleSelector : '#xhr-title',
-
- navigateOnHash: true,
- root : '/',
- routes : [
- // -- / ----------------------------------------------------------------
- {
- path : '/(index.html)?',
- callbacks: defaultRoute
- },
-
- // -- /classes/* -------------------------------------------------------
- {
- path : '/classes/:class.html*',
- callbacks: [defaultRoute, 'handleClasses']
- },
-
- // -- /files/* ---------------------------------------------------------
- {
- path : '/files/*file',
- callbacks: [defaultRoute, 'handleFiles']
- },
-
- // -- /modules/* -------------------------------------------------------
- {
- path : '/modules/:module.html*',
- callbacks: defaultRoute
- }
- ]
-});
-
-// -- Utility Functions --------------------------------------------------------
-
-pjax.checkVisibility = function (tab) {
- tab || (tab = selectedTab);
-
- if (!tab) { return; }
-
- var panelNode = tab.get('panelNode'),
- visibleItems;
-
- // If no items are visible in the tab panel due to the current visibility
- // settings, display a message to that effect.
- visibleItems = panelNode.all('.item,.index-item').some(function (itemNode) {
- if (itemNode.getComputedStyle('display') !== 'none') {
- return true;
- }
- });
-
- panelNode.all('.no-visible-items').remove();
-
- if (!visibleItems) {
- if (Y.one('#index .index-item')) {
- panelNode.append(
- '<div class="no-visible-items">' +
- '<p>' +
- 'Some items are not shown due to the current visibility ' +
- 'settings. Use the checkboxes at the upper right of this ' +
- 'page to change the visibility settings.' +
- '</p>' +
- '</div>'
- );
- } else {
- panelNode.append(
- '<div class="no-visible-items">' +
- '<p>' +
- 'This class doesn\'t provide any methods, properties, ' +
- 'attributes, or events.' +
- '</p>' +
- '</div>'
- );
- }
- }
-
- // Hide index sections without any visible items.
- Y.all('.index-section').each(function (section) {
- var items = 0,
- visibleItems = 0;
-
- section.all('.index-item').each(function (itemNode) {
- items += 1;
-
- if (itemNode.getComputedStyle('display') !== 'none') {
- visibleItems += 1;
- }
- });
-
- section.toggleClass('hidden', !visibleItems);
- section.toggleClass('no-columns', visibleItems < 4);
- });
-};
-
-pjax.initClassTabView = function () {
- if (!Y.all('#classdocs .api-class-tab').size()) {
- return;
- }
-
- if (classTabView) {
- classTabView.destroy();
- selectedTab = null;
- }
-
- classTabView = new Y.TabView({
- srcNode: '#classdocs',
-
- on: {
- selectionChange: pjax.onTabSelectionChange
- }
- });
-
- pjax.updateTabState();
- classTabView.render();
-};
-
-pjax.initLineNumbers = function () {
- var hash = win.location.hash.substring(1),
- container = pjax.get('container'),
- hasLines, node;
-
- // Add ids for each line number in the file source view.
- container.all('.linenums>li').each(function (lineNode, index) {
- lineNode.set('id', 'l' + (index + 1));
- lineNode.addClass('file-line');
- hasLines = true;
- });
-
- // Scroll to the desired line.
- if (hasLines && /^l\d+$/.test(hash)) {
- if ((node = container.getById(hash))) {
- win.scroll(0, node.getY());
- }
- }
-};
-
-pjax.initRoot = function () {
- var terminators = /^(?:classes|files|modules)$/,
- parts = pjax._getPathRoot().split('/'),
- root = [],
- i, len, part;
-
- for (i = 0, len = parts.length; i < len; i += 1) {
- part = parts[i];
-
- if (part.match(terminators)) {
- // Makes sure the path will end with a "/".
- root.push('');
- break;
- }
-
- root.push(part);
- }
-
- pjax.set('root', root.join('/'));
-};
-
-pjax.updateTabState = function (src) {
- var hash = win.location.hash.substring(1),
- defaultTab, node, tab, tabPanel;
-
- function scrollToNode() {
- if (node.hasClass('protected')) {
- Y.one('#api-show-protected').set('checked', true);
- pjax.updateVisibility();
- }
-
- if (node.hasClass('private')) {
- Y.one('#api-show-private').set('checked', true);
- pjax.updateVisibility();
- }
-
- setTimeout(function () {
- // For some reason, unless we re-get the node instance here,
- // getY() always returns 0.
- var node = Y.one('#classdocs').getById(hash);
- win.scrollTo(0, node.getY() - 70);
- }, 1);
- }
-
- if (!classTabView) {
- return;
- }
-
- if (src === 'hashchange' && !hash) {
- defaultTab = 'index';
- } else {
- if (localStorage) {
- defaultTab = localStorage.getItem('tab_' + pjax.getPath()) ||
- 'index';
- } else {
- defaultTab = 'index';
- }
- }
-
- if (hash && (node = Y.one('#classdocs').getById(hash))) {
- if ((tabPanel = node.ancestor('.api-class-tabpanel', true))) {
- if ((tab = Y.one('#classdocs .api-class-tab.' + tabPanel.get('id')))) {
- if (classTabView.get('rendered')) {
- Y.Widget.getByNode(tab).set('selected', 1);
- } else {
- tab.addClass('yui3-tab-selected');
- }
- }
- }
-
- // Scroll to the desired element if this is a hash URL.
- if (node) {
- if (classTabView.get('rendered')) {
- scrollToNode();
- } else {
- classTabView.once('renderedChange', scrollToNode);
- }
- }
- } else {
- tab = Y.one('#classdocs .api-class-tab.' + defaultTab);
-
- // When the `defaultTab` node isn't found, `localStorage` is stale.
- if (!tab && defaultTab !== 'index') {
- tab = Y.one('#classdocs .api-class-tab.index');
- }
-
- if (classTabView.get('rendered')) {
- Y.Widget.getByNode(tab).set('selected', 1);
- } else {
- tab.addClass('yui3-tab-selected');
- }
- }
-};
-
-pjax.updateVisibility = function () {
- var container = pjax.get('container');
-
- container.toggleClass('hide-inherited',
- !Y.one('#api-show-inherited').get('checked'));
-
- container.toggleClass('show-deprecated',
- Y.one('#api-show-deprecated').get('checked'));
-
- container.toggleClass('show-protected',
- Y.one('#api-show-protected').get('checked'));
-
- container.toggleClass('show-private',
- Y.one('#api-show-private').get('checked'));
-
- pjax.checkVisibility();
-};
-
-// -- Route Handlers -----------------------------------------------------------
-
-pjax.handleClasses = function (req, res, next) {
- var status = res.ioResponse.status;
-
- // Handles success and local filesystem XHRs.
- if (!status || (status >= 200 && status < 300)) {
- pjax.initClassTabView();
- }
-
- next();
-};
-
-pjax.handleFiles = function (req, res, next) {
- var status = res.ioResponse.status;
-
- // Handles success and local filesystem XHRs.
- if (!status || (status >= 200 && status < 300)) {
- pjax.initLineNumbers();
- }
-
- next();
-};
-
-// -- Event Handlers -----------------------------------------------------------
-
-pjax.onNavigate = function (e) {
- var hash = e.hash,
- originTarget = e.originEvent && e.originEvent.target,
- tab;
-
- if (hash) {
- tab = originTarget && originTarget.ancestor('.yui3-tab', true);
-
- if (hash === win.location.hash) {
- pjax.updateTabState('hashchange');
- } else if (!tab) {
- win.location.hash = hash;
- }
-
- e.preventDefault();
- return;
- }
-
- // Only scroll to the top of the page when the URL doesn't have a hash.
- this.set('scrollToTop', !e.url.match(/#.+$/));
-
- bdNode.addClass('loading');
-};
-
-pjax.onOptionClick = function (e) {
- pjax.updateVisibility();
-};
-
-pjax.onTabSelectionChange = function (e) {
- var tab = e.newVal,
- tabId = tab.get('contentBox').getAttribute('href').substring(1);
-
- selectedTab = tab;
-
- // If switching from a previous tab (i.e., this is not the default tab),
- // replace the history entry with a hash URL that will cause this tab to
- // be selected if the user navigates away and then returns using the back
- // or forward buttons.
- if (e.prevVal && localStorage) {
- localStorage.setItem('tab_' + pjax.getPath(), tabId);
- }
-
- pjax.checkVisibility(tab);
-};
-
-// -- Init ---------------------------------------------------------------------
-
-pjax.on('navigate', pjax.onNavigate);
-
-pjax.initRoot();
-pjax.upgrade();
-pjax.initClassTabView();
-pjax.initLineNumbers();
-pjax.updateVisibility();
-
-Y.APIList.rootPath = pjax.get('root');
-
-Y.one('#api-options').delegate('click', pjax.onOptionClick, 'input');
-
-Y.on('hashchange', function (e) {
- pjax.updateTabState('hashchange');
-}, win);
-
-});
17 docs/assets/js/yui-prettify.js
View
@@ -1,17 +0,0 @@
-YUI().use('node', function(Y) {
- var code = Y.all('.prettyprint.linenums');
- if (code.size()) {
- code.each(function(c) {
- var lis = c.all('ol li'),
- l = 1;
- lis.each(function(n) {
- n.prepend('<a name="LINENUM_' + l + '"></a>');
- l++;
- });
- });
- var h = location.hash;
- location.hash = '';
- h = h.replace('LINE_', 'LINENUM_');
- location.hash = h;
- }
-});
130 docs/assets/vendor/prettify/CHANGES.html
View
@@ -1,130 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Change Log</title>
- </head>
- <body bgcolor="white">
- <a style="float:right" href="README.html">README</a>
-
- <h1>Known Issues</h1>
- <ul>
- <li>Perl formatting is really crappy. Partly because the author is lazy and
- partly because Perl is
- <a href="http://www.perlmonks.org/?node_id=663393">hard</a> to parse.
- <li>On some browsers, <code>&lt;code&gt;</code> elements with newlines in the text
- which use CSS to specify <code>white-space:pre</code> will have the newlines
- improperly stripped if the element is not attached to the document at the time
- the stripping is done. Also, on IE 6, all newlines will be stripped from
- <code>&lt;code&gt;</code> elements because of the way IE6 produces
- <code>innerHTML</code>. Workaround: use <code>&lt;pre&gt;</code> for code with
- newlines.
- </ul>
-
- <h1>Change Log</h1>
- <h2>29 March 2007</h2>
- <ul>
- <li>Added <a href="tests/prettify_test.html#PHP">tests</a> for PHP support
- to address
- <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=3"
- >issue 3</a>.
- <li>Fixed
- <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=6"
- >bug</a>: <code>prettyPrintOne</code> was not halting. This was not
- reachable through the normal entry point.
- <li>Fixed
- <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=4"
- >bug</a>: recursing into a script block or PHP tag that was not properly
- closed would not silently drop the content.
- (<a href="tests/prettify_test.html#issue4">test</a>)
- <li>Fixed
- <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=8"
- >bug</a>: was eating tabs
- (<a href="tests/prettify_test.html#issue8">test</a>)
- <li>Fixed entity handling so that the caveat
- <blockquote>
- <p>Caveats: please properly escape less-thans. <tt>x&amp;lt;y</tt>
- instead of <tt>x&lt;y</tt>, and use <tt>&quot;</tt> instead of
- <tt>&amp;quot;</tt> for string delimiters.</p>
- </blockquote>
- is no longer applicable.
- <li>Added noisefree's C#
- <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=4"
- >patch</a>
- <li>Added a <a href="http://google-code-prettify.googlecode.com/files/prettify-small.zip">distribution</a> that has comments and
- whitespace removed to reduce download size from 45.5kB to 12.8kB.
- </ul>
- <h2>4 Jul 2008</h2>
- <ul>
- <li>Added <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=17">language specific formatters</a> that are triggered by the presence
- of a <code>lang-&lt;language-file-extension&gt;</code></li>
- <li>Fixed <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=29">bug</a>: python handling of <code>'''string'''</code>
- <li>Fixed bug: <code>/</code> in regex <code>[charsets] should not end regex</code>
- </ul>
- <h2>5 Jul 2008</h2>
- <ul>