Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: ibolmo/mootools-1-vs-2
base: 2.y.x
...
head fork: ibolmo/mootools-1-vs-2
compare: 2.y.x-installed
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Jul 21, 2011
@ibolmo None of the other examples benefited from the install method. Request…
….js was skipped, since that's part of Core and Core will *not* use install.
ab4113e
Showing with 8 additions and 5 deletions.
  1. +8 −5 Database.js
View
13 Database.js
@@ -21,6 +21,9 @@ provides: Database
define(‘Database’, [‘Class’, ‘Options’, ‘Events’, ‘Chain’, ‘Function’, ‘Object’, ‘Array’], function(Class, Options, Events, Chain, Function, Object, Array){
+ Function.install();
+ Array.install();
+
var errorTypes = {
1: 'unknown',
2: 'nonTransient',
@@ -74,7 +77,7 @@ define(‘Database’, [‘Class’, ‘Options’, ‘Events’, ‘Chain’,
var range = {};
this.each(function(v, k){
range[k] = v;
- }, this, IDBKeyRange.bound(start, end, false, false), Function.bind(fn, bind, range));
+ }, this, IDBKeyRange.bound(start, end, false, false), fn.bind(bind, range));
return this;
},
@@ -104,10 +107,10 @@ define(‘Database’, [‘Class’, ‘Options’, ‘Events’, ‘Chain’,
return object = revived;
};
- Array.forEach([
+ [
{ type: 'IDBObjectStore', methods: IDBMethods },
{ type: 'IDBIndex', methods: Object.subset(IDBMethods, ['retrieve', 'each', 'getRange', 'getKeys', 'getValues']) }
- ], function(object){
+ ].each(function(object){
var global = window[object.type];
global.extend = Object.extend;
//new Type(object.type, global);
@@ -208,12 +211,12 @@ define(‘Database’, [‘Class’, ‘Options’, ‘Events’, ‘Chain’,
setVersion: function(version, fn) {
this.previousVersion = this.db.version;
- this.db.setVersion(version || this.db.version).onsuccess = Function.bind(fn || function(){}, this);
+ this.db.setVersion(version || this.db.version).onsuccess = (fn || function(){}).bind(this);
return this;
},
create: function(name, options){
- return(!Array.contains(this.db.objectStoreNames, name)) ? this.db.createObjectStore(name, options || {}) : this.getObject(name);
+ return(!this.db.objectStoreNames.contains(name)) ? this.db.createObjectStore(name, options || {}) : this.getObject(name);
},
getObject: function(name){

No commit comments for this range

Something went wrong with that request. Please try again.