diff --git a/data/AndOrReadStore.js b/data/AndOrReadStore.js index a8471eeb98..e3c26ac685 100755 --- a/data/AndOrReadStore.js +++ b/data/AndOrReadStore.js @@ -1,9 +1,10 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dojo/data/ItemFileReadStore", "dojo/data/util/filter", "dojo/_base/array", "dojo/_base/json"], function(declare, lang, ItemFileReadStore, filterUtil, array, json) { - // module: - // dojox/data/AndOrReadStore - // summary: - // TODOC + +// module: +// dojox/data/AndOrReadStore +// summary: +// TODOC return declare("dojox.data.AndOrReadStore", [ItemFileReadStore], { // summary: diff --git a/data/AndOrWriteStore.js b/data/AndOrWriteStore.js index c9815feb9d..1ebe02c8f3 100755 --- a/data/AndOrWriteStore.js +++ b/data/AndOrWriteStore.js @@ -1,9 +1,10 @@ define(["dojo/_base/declare", "dojo/data/ItemFileWriteStore", "./AndOrReadStore"], - function(declare, ItemFileWriteStore, AndOrReadStore) { - // module: - // dojox/data/AndOrWriteStore - // summary: - // TODOC + function(declare, ItemFileWriteStore, AndOrReadStore){ + +// module: +// dojox/data/AndOrWriteStore +// summary: +// TODOC return declare("dojox.data.AndOrWriteStore", [ItemFileWriteStore, AndOrReadStore], {}); diff --git a/data/AppStore.js b/data/AppStore.js index d122b773b8..6cfea18956 100644 --- a/data/AppStore.js +++ b/data/AppStore.js @@ -157,7 +157,7 @@ dojo.declare("dojox.data.AppStore", /* attribute-name-string */ attribute, /* value? */ defaultValue){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() var values = this.getValues(item, attribute); return (values.length > 0)?values[0]:defaultValue; //Object || int || Boolean }, @@ -407,9 +407,9 @@ dojo.declare("dojox.data.AppStore", }, getIdentityAttributes: function(/* item */ item){ - // summary: - // See dojo.data.api.Identity.getIdentityAttributes() - return ["id"]; + // summary: + // See dojo.data.api.Identity.getIdentityAttributes() + return ["id"]; }, fetchItemByIdentity: function(keywordArgs){ diff --git a/data/AtomReadStore.js b/data/AtomReadStore.js index decfdff42d..0873482888 100644 --- a/data/AtomReadStore.js +++ b/data/AtomReadStore.js @@ -122,7 +122,7 @@ dojo.declare("dojox.data.AtomReadStore", null, { getAttributes: function(/* item */ item){ // summary: // Return an array of attribute names - // description: + // description: // 'item' must be have been created by the AtomReadStore instance. // tag names of child elements and XML attribute names of attributes // specified to the element are returned along with special attribute @@ -186,7 +186,7 @@ dojo.declare("dojox.data.AtomReadStore", null, { // Check whether the object is an item (XML element) // item: // An object to check - // returns: + // returns: // True if the object is an XML element, otherwise false if(something && something.element && something.store && something.store === this){ return true; //boolean @@ -415,8 +415,8 @@ dojo.declare("dojox.data.AtomReadStore", null, { }, close: function(/*dojo.data.api.Request || keywordArgs || null */ request){ - // summary: - // See dojo.data.api.Read.close() + // summary: + // See dojo.data.api.Read.close() }, /* internal API */ diff --git a/data/CdfStore.js b/data/CdfStore.js index 78a69eeefb..0eb3f6eb17 100755 --- a/data/CdfStore.js +++ b/data/CdfStore.js @@ -171,7 +171,7 @@ dojo.declare("dojox.data.CdfStore", null, { getLabelAttributes: function(/* jsx3.xml.Entity */ item){ // summary: // returns an array of what properties of the item that were used - // to generate its label + // to generate its label // See dojo.data.api.Read.getLabelAttributes() if(this.label !== ""){ @@ -407,8 +407,8 @@ dojo.declare("dojox.data.CdfStore", null, { }, close: function(/*dojo.data.api.Request || keywordArgs || null */ request){ - // summary: - // See dojo.data.api.Read.close() + // summary: + // See dojo.data.api.Read.close() }, /* dojo.data.api.Write */ diff --git a/data/ClientFilter.js b/data/ClientFilter.js index fc11c0c802..5a984df651 100644 --- a/data/ClientFilter.js +++ b/data/ClientFilter.js @@ -66,9 +66,9 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/array", "dojo/_base // request: // This object follows the same meaning as the keywordArgs passed to a dojo.data.api.Read.fetch. // description: - // This will attempt to update the provide result based on previous notification, adding new items - // from onNew calls, removing deleted items, and updating modified items, and properly removing - // and adding items as required by the query and sort parameters. This function will return: + // This will attempt to update the provide result based on previous notification, adding new items + // from onNew calls, removing deleted items, and updating modified items, and properly removing + // and adding items as required by the query and sort parameters. This function will return: // 0: Indicates it could not successfully update the result set // 1: Indicates it could successfully handle all the notifications, but no changes were made to the result set // 2: Indicates it successfully handled all the notifications and result set has been updated. @@ -177,7 +177,7 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/array", "dojo/_base fetchCache.push(args); } defResult= args._loading = this._doQuery(args); - + defResult.addErrback(function(){ fetchCache.splice(array.indexOf(fetchCache, args), 1); }); diff --git a/data/CouchDBRestStore.js b/data/CouchDBRestStore.js index 912b051f19..9f42d431e2 100644 --- a/data/CouchDBRestStore.js +++ b/data/CouchDBRestStore.js @@ -27,7 +27,7 @@ dojo.declare("dojox.data.CouchDBRestStore", }, fetch: function(args){ // summary: - // This only differs from JsonRestStore in that it, will put the query string the query part of the URL and it handles start and count + // This only differs from JsonRestStore in that it, will put the query string the query part of the URL and it handles start and count args.query = args.query || '_all_docs?'; if(args.start){ args.query = (args.query ? (args.query + '&') : '') + 'skip=' + args.start; diff --git a/data/CssClassStore.js b/data/CssClassStore.js index 836f642878..fb98e8cc19 100755 --- a/data/CssClassStore.js +++ b/data/CssClassStore.js @@ -133,8 +133,8 @@ return declare("dojox.data.CssClassStore", CssRuleStore, { }, getIdentityAttributes: function(/* item */ item){ - // summary: - // See dojo.data.api.Identity.getIdentityAttributes() + // summary: + // See dojo.data.api.Identity.getIdentityAttributes() this._assertIsItem(item); return [this._idAttribute]; }, diff --git a/data/CssRuleStore.js b/data/CssRuleStore.js index 50139bab95..f0d39ac7bd 100755 --- a/data/CssRuleStore.js +++ b/data/CssRuleStore.js @@ -13,8 +13,8 @@ return declare("dojox.data.CssRuleStore", null, { // style: The actual DOM CSSStyleDeclaration object. // cssText: The cssText string provided on the rule object. // styleSheet: The originating DOM Stylesheet object. - // parentStyleSheet: The parent stylesheet to the sheet this rule originates from. - // parentStyleSheetHref: The href of the parent stylesheet. + // parentStyleSheet: The parent stylesheet to the sheet this rule originates from. + // parentStyleSheetHref: The href of the parent stylesheet. // AND every style attribute denoted as style.*, such as style.textAlign or style.backgroundColor _storeRef: '_S', @@ -408,7 +408,7 @@ return declare("dojox.data.CssRuleStore", null, { _assertIsItem: function(/* item */ item){ // summary: - // This function tests whether the item passed in is indeed an item in the store. + // This function tests whether the item passed in is indeed an item in the store. // item: // The item to test for being contained by the store. if(!this.isItem(item)){ diff --git a/data/CsvStore.js b/data/CsvStore.js index 0668ea352d..c80956ddb7 100644 --- a/data/CsvStore.js +++ b/data/CsvStore.js @@ -31,8 +31,8 @@ var CsvStore = declare("dojox.data.CsvStore", null, { this._attributes = []; // e.g. ["Title", "Year", "Producer"] this._attributeIndexes = {}; // e.g. {Title: 0, Year: 1, Producer: 2} - this._dataArray = []; // e.g. [[],[],[]] - this._arrayOfAllItems = []; // e.g. [{_csvId:0,_csvStore:store},...] + this._dataArray = []; // e.g. [[],[],[]] + this._arrayOfAllItems = []; // e.g. [{_csvId:0,_csvStore:store},...] this._loadFinished = false; if(keywordParameters.url){ this.url = keywordParameters.url; @@ -44,7 +44,7 @@ var CsvStore = declare("dojox.data.CsvStore", null, { this.label = undefined; } this._storeProp = "_csvStore"; // Property name for the store reference on every item. - this._idProp = "_csvId"; // Property name for the Item Id on every item. + this._idProp = "_csvId"; // Property name for the Item Id on every item. this._features = { 'dojo.data.api.Read': true, 'dojo.data.api.Identity': true @@ -91,7 +91,7 @@ var CsvStore = declare("dojox.data.CsvStore", null, { _assertIsItem: function(/* item */ item){ // summary: - // This function tests whether the item passed in is indeed an item in the store. + // This function tests whether the item passed in is indeed an item in the store. // item: // The item to test for being contained by the store. if(!this.isItem(item)){ @@ -118,9 +118,9 @@ var CsvStore = declare("dojox.data.CsvStore", null, { /* attribute || attribute-name-string */ attribute, /* value? */ defaultValue){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() // Note that for the CsvStore, an empty string value is the same as no value, - // so the defaultValue would be returned instead of an empty string. + // so the defaultValue would be returned instead of an empty string. this._assertIsItem(item); var itemValue = defaultValue; if(typeof attribute === "string"){ @@ -139,8 +139,8 @@ var CsvStore = declare("dojox.data.CsvStore", null, { /* attribute || attribute-name-string */ attribute){ // summary: // See dojo.data.api.Read.getValues() - // CSV syntax does not support multi-valued attributes, so this is just a - // wrapper function for getValue(). + // CSV syntax does not support multi-valued attributes, so this is just a + // wrapper function for getValue(). var value = this.getValue(item, attribute); return (value ? [value] : []); //Array }, @@ -164,9 +164,9 @@ var CsvStore = declare("dojox.data.CsvStore", null, { /* attribute-name-string */ attribute){ // summary: // See dojo.data.api.Read.hasAttribute() - // The hasAttribute test is true if attribute has an index number within the item's array length - // AND if the item has a value for that attribute. Note that for the CsvStore, an - // empty string value is the same as no value. + // The hasAttribute test is true if attribute has an index number within the item's array length + // AND if the item has a value for that attribute. Note that for the CsvStore, an + // empty string value is the same as no value. this._assertIsItem(item); if(typeof attribute === "string"){ var attributeIndex = this._attributeIndexes[attribute]; @@ -412,8 +412,8 @@ var CsvStore = declare("dojox.data.CsvStore", null, { }, close: function(/*dojo.data.api.Request || keywordArgs || null */ request){ - // summary: - // See dojo.data.api.Read.close() + // summary: + // See dojo.data.api.Read.close() }, @@ -467,7 +467,7 @@ var CsvStore = declare("dojox.data.CsvStore", null, { listOfFields[j] = ""; //Special case empty string field. }else if((firstChar == '"') && ((lastChar != '"') || - ((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')))){ + ((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')))){ if(j+1 === listOfFields.length){ // alert("The last field in record " + i + " is corrupted:\n" + field); return; //null @@ -686,7 +686,7 @@ var CsvStore = declare("dojox.data.CsvStore", null, { // See dojo.data.api.Identity.getIdentifierAttributes() // tags: // public - + // Identity isn't a public attribute in the item, it's the row position index. // So, return null. if(this.identifier){ diff --git a/data/FileStore.js b/data/FileStore.js index 65d58da823..4f1c782d8b 100755 --- a/data/FileStore.js +++ b/data/FileStore.js @@ -91,7 +91,7 @@ return declare("dojox.data.FileStore", null, { _assertIsItem: function(/* item */ item){ // summary: - // This function tests whether the item passed in is indeed an item in the store. + // This function tests whether the item passed in is indeed an item in the store. // item: // The item to test for being contained by the store. if(!this.isItem(item)){ @@ -113,7 +113,7 @@ return declare("dojox.data.FileStore", null, { getFeatures: function(){ // summary: - // See dojo.data.api.Read.getFeatures() + // See dojo.data.api.Read.getFeatures() return { 'dojo.data.api.Read': true, 'dojo.data.api.Identity':true }; @@ -121,7 +121,7 @@ return declare("dojox.data.FileStore", null, { getValue: function(item, attribute, defaultValue){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() var values = this.getValues(item, attribute); if(values && values.length > 0){ return values[0]; @@ -131,13 +131,13 @@ return declare("dojox.data.FileStore", null, { getAttributes: function(item){ // summary: - // See dojo.data.api.Read.getAttributes() + // See dojo.data.api.Read.getAttributes() return this._attributes; }, hasAttribute: function(item, attribute){ // summary: - // See dojo.data.api.Read.hasAttribute() + // See dojo.data.api.Read.hasAttribute() this._assertIsItem(item); this._assertIsAttribute(attribute); return (attribute in item); @@ -151,24 +151,24 @@ return declare("dojox.data.FileStore", null, { getIdentityAttributes: function(item){ // summary: - // See dojo.data.api.Read.getLabelAttributes() + // See dojo.data.api.Read.getLabelAttributes() return [this._identifier]; }, isItemLoaded: function(item){ - // summary: - // See dojo.data.api.Read.isItemLoaded() - var loaded = this.isItem(item); - if(loaded && typeof item._loaded == "boolean" && !item._loaded){ - loaded = false; - } - return loaded; + // summary: + // See dojo.data.api.Read.isItemLoaded() + var loaded = this.isItem(item); + if(loaded && typeof item._loaded == "boolean" && !item._loaded){ + loaded = false; + } + return loaded; }, loadItem: function(keywordArgs){ // summary: - // See dojo.data.api.Read.loadItem() + // See dojo.data.api.Read.loadItem() var item = keywordArgs.item; var self = this; var scope = keywordArgs.scope || kernel.global; @@ -210,19 +210,19 @@ return declare("dojox.data.FileStore", null, { getLabel: function(item){ // summary: - // See dojo.data.api.Read.getLabel() + // See dojo.data.api.Read.getLabel() return this.getValue(item,this.label); }, getLabelAttributes: function(item){ // summary: - // See dojo.data.api.Read.getLabelAttributes() + // See dojo.data.api.Read.getLabelAttributes() return [this.label]; }, containsValue: function(item, attribute, value){ // summary: - // See dojo.data.api.Read.containsValue() + // See dojo.data.api.Read.containsValue() var values = this.getValues(item,attribute); for(var i = 0; i < values.length; i++){ if(values[i] == value){ @@ -234,7 +234,7 @@ return declare("dojox.data.FileStore", null, { getValues: function(item, attribute){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() this._assertIsItem(item); this._assertIsAttribute(attribute); @@ -249,7 +249,7 @@ return declare("dojox.data.FileStore", null, { isItem: function(item){ // summary: - // See dojo.data.api.Read.isItem() + // See dojo.data.api.Read.isItem() if(item && item[this._storeRef] === this){ return true; } @@ -258,7 +258,7 @@ return declare("dojox.data.FileStore", null, { close: function(request){ // summary: - // See dojo.data.api.Read.close() + // See dojo.data.api.Read.close() }, fetch: function(request){ @@ -320,7 +320,7 @@ return declare("dojox.data.FileStore", null, { fetchItemByIdentity: function(keywordArgs){ // summary: - // See dojo.data.api.Read.loadItem() + // See dojo.data.api.Read.loadItem() var path = keywordArgs.identity; var self = this; var scope = keywordArgs.scope || kernel.global; @@ -358,46 +358,46 @@ return declare("dojox.data.FileStore", null, { }, _processResult: function(data, request){ - var scope = request.scope || kernel.global; - try{ - //If the data contains a path separator, set ours - if(data.pathSeparator){ - this.pathSeparator = data.pathSeparator; - } - //Invoke the onBegin handler, if any, to return the - //size of the dataset as indicated by the service. - if(request.onBegin){ - request.onBegin.call(scope, data.total, request); - } - //Now process all the returned items thro - var items = this._processItemArray(data.items); - if(request.onItem){ + var scope = request.scope || kernel.global; + try{ + //If the data contains a path separator, set ours + if(data.pathSeparator){ + this.pathSeparator = data.pathSeparator; + } + //Invoke the onBegin handler, if any, to return the + //size of the dataset as indicated by the service. + if(request.onBegin){ + request.onBegin.call(scope, data.total, request); + } + //Now process all the returned items thro + var items = this._processItemArray(data.items); + if(request.onItem){ var i; for(i = 0; i < items.length; i++){ request.onItem.call(scope, items[i], request); } items = null; - } - if(request.onComplete){ - request.onComplete.call(scope, items, request); - } - }catch (e){ - if(request.onError){ - request.onError.call(scope, e, request); - }else{ - console.log(e); - } - } + } + if(request.onComplete){ + request.onComplete.call(scope, items, request); + } + }catch (e){ + if(request.onError){ + request.onError.call(scope, e, request); + }else{ + console.log(e); + } + } }, _processItemArray: function(itemArray){ - // summary: - // Internal function for processing an array of items for return. - var i; - for(i = 0; i < itemArray.length; i++){ - this._processItem(itemArray[i]); - } - return itemArray; + // summary: + // Internal function for processing an array of items for return. + var i; + for(i = 0; i < itemArray.length; i++){ + this._processItem(itemArray[i]); + } + return itemArray; }, _processItem: function(item){ diff --git a/data/FlickrStore.js b/data/FlickrStore.js index 65ba38ea26..f8a1fb69c2 100644 --- a/data/FlickrStore.js +++ b/data/FlickrStore.js @@ -29,7 +29,7 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { _assertIsItem: function(/* item */ item){ // summary: - // This function tests whether the item passed in is indeed an item in the store. + // This function tests whether the item passed in is indeed an item in the store. // item: // The item to test for being contained by the store. if(!this.isItem(item)){ @@ -49,7 +49,7 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { getFeatures: function(){ // summary: - // See dojo.data.api.Read.getFeatures() + // See dojo.data.api.Read.getFeatures() return { 'dojo.data.api.Read': true }; @@ -57,7 +57,7 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { getValue: function(item, attribute, defaultValue){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() var values = this.getValues(item, attribute); if(values && values.length > 0){ return values[0]; @@ -67,7 +67,7 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { getAttributes: function(item){ // summary: - // See dojo.data.api.Read.getAttributes() + // See dojo.data.api.Read.getAttributes() return [ "title", "description", "author", "datePublished", "dateTaken", "imageUrl", "imageUrlSmall", "imageUrlMedium", "tags", "link" @@ -76,7 +76,7 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { hasAttribute: function(item, attribute){ // summary: - // See dojo.data.api.Read.hasAttributes() + // See dojo.data.api.Read.hasAttributes() var v = this.getValue(item,attribute); if(v || v === "" || v === false){ return true; @@ -85,31 +85,31 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { }, isItemLoaded: function(item){ - // summary: - // See dojo.data.api.Read.isItemLoaded() - return this.isItem(item); + // summary: + // See dojo.data.api.Read.isItemLoaded() + return this.isItem(item); }, loadItem: function(keywordArgs){ // summary: - // See dojo.data.api.Read.loadItem() + // See dojo.data.api.Read.loadItem() }, getLabel: function(item){ // summary: - // See dojo.data.api.Read.getLabel() + // See dojo.data.api.Read.getLabel() return this.getValue(item,this.label); }, getLabelAttributes: function(item){ // summary: - // See dojo.data.api.Read.getLabelAttributes() + // See dojo.data.api.Read.getLabelAttributes() return [this.label]; }, containsValue: function(item, attribute, value){ // summary: - // See dojo.data.api.Read.containsValue() + // See dojo.data.api.Read.containsValue() var values = this.getValues(item,attribute); for(var i = 0; i < values.length; i++){ if(values[i] === value){ @@ -121,7 +121,7 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { getValues: function(item, attribute){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() this._assertIsItem(item); this._assertIsAttribute(attribute); @@ -155,7 +155,7 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { isItem: function(item){ // summary: - // See dojo.data.api.Read.isItem() + // See dojo.data.api.Read.isItem() if(item && item[this._storeRef] === this){ return true; } @@ -164,7 +164,7 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { close: function(request){ // summary: - // See dojo.data.api.Read.close() + // See dojo.data.api.Read.close() }, _fetchItems: function(request, fetchHandler, errorHandler){ @@ -225,16 +225,16 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { }, _processFlickrData: function(data){ - var items = []; - if(data.items){ - items = data.items; - //Add on the store ref so that isItem can work. - for(var i = 0; i < data.items.length; i++){ - var item = data.items[i]; - item[this._storeRef] = this; - } - } - return items; + var items = []; + if(data.items){ + items = data.items; + //Add on the store ref so that isItem can work. + for(var i = 0; i < data.items.length; i++){ + var item = data.items[i]; + item[this._storeRef] = this; + } + } + return items; }, _unescapeHtml: function(/*String*/ str){ @@ -250,7 +250,7 @@ var FlickrStore = declare("dojox.data.FlickrStore", null, { //TODO: // Check to see if theres already compatible escape() in // dojo.string or dojo.html - return str.replace(/&/gm, "&"). + return str.replace(/&/gm, "&"). replace(/</gm, "<"). replace(/>/gm, ">"). replace(/"/gm, "\""). diff --git a/data/GoogleFeedStore.js b/data/GoogleFeedStore.js index e4a9e9dcc9..5825c67197 100644 --- a/data/GoogleFeedStore.js +++ b/data/GoogleFeedStore.js @@ -7,20 +7,20 @@ var Search = GoogleSearchStore.Search; return declare("dojox.data.GoogleFeedStore", Search,{ // summary: - // A data store for retrieving RSS and Atom feeds from Google. The - // feeds can come from any source, which is specified in the "url" - // parameter of the query passed to the "fetch" function. - // The following attributes are supported on each item: - //
    - //
  • title - The feed entry title.
  • - //
  • link - The URL for the HTML version of the feed entry.
  • - //
  • content - The full content of the blog post, in HTML format
  • - //
  • summary - A snippet of information about the feed entry, in plain text
  • - //
  • published - The string date on which the entry was published. - // You can parse the date with new Date(store.getValue(item, "published")
  • - //
  • categories - An array of string tags for the entry
  • - //
- // The query accepts one parameter: url - The URL of the feed to retrieve + // A data store for retrieving RSS and Atom feeds from Google. The + // feeds can come from any source, which is specified in the "url" + // parameter of the query passed to the "fetch" function. + // The following attributes are supported on each item: + //
    + //
  • title - The feed entry title.
  • + //
  • link - The URL for the HTML version of the feed entry.
  • + //
  • content - The full content of the blog post, in HTML format
  • + //
  • summary - A snippet of information about the feed entry, in plain text
  • + //
  • published - The string date on which the entry was published. + // You can parse the date with new Date(store.getValue(item, "published")
  • + //
  • categories - An array of string tags for the entry
  • + //
+ // The query accepts one parameter: url - The URL of the feed to retrieve _type: "", _googleUrl: "http://ajax.googleapis.com/ajax/services/feed/load", _attributes: ["title", "link", "author", "published", diff --git a/data/GoogleSearchStore.js b/data/GoogleSearchStore.js index 62a9f2e6e5..9e5c0de835 100644 --- a/data/GoogleSearchStore.js +++ b/data/GoogleSearchStore.js @@ -153,9 +153,9 @@ var SearchStore = declare("dojox.data.GoogleSearchStore",null,{ }, isItemLoaded: function(item){ - // summary: - // See dojo.data.api.Read.isItemLoaded() - return this.isItem(item); + // summary: + // See dojo.data.api.Read.isItemLoaded() + return this.isItem(item); }, loadItem: function(keywordArgs){ @@ -596,7 +596,7 @@ var NewsSearchStore = declare("dojox.data.GoogleNewsSearchStore", SearchStore,{ }); var BookSearchStore = declare("dojox.data.GoogleBookSearchStore", SearchStore,{ - // summary: + // summary: // A data store for retrieving search results from Google. // The following attributes are supported on each item: //
    diff --git a/data/HtmlStore.js b/data/HtmlStore.js index c80783c1c0..6a005d0422 100644 --- a/data/HtmlStore.js +++ b/data/HtmlStore.js @@ -101,7 +101,7 @@ var HtmlStore = declare("dojox.data.HtmlStore", null, { urlPreventCache: false, // fetchOnCreate: [public] boolean - // Flag to denote if it should try to load from a data id (nested in the page) + // Flag to denote if it should try to load from a data id (nested in the page) // The moment the store is created, instead of waiting for first // fetch call. fetchOnCreate: false, @@ -135,7 +135,7 @@ var HtmlStore = declare("dojox.data.HtmlStore", null, { // summary: // Function to load the attribute names from the table header so that the // attributes (cells in a row), can have a reasonable name. - // For list items, returns single implicit heading, ["name"] + // For list items, returns single implicit heading, ["name"] this._headings = []; if(this._rootNode.tHead){ array.forEach(this._rootNode.tHead.rows[0].cells, lang.hitch(this, function(th){ @@ -168,7 +168,7 @@ var HtmlStore = declare("dojox.data.HtmlStore", null, { _assertIsItem: function(/* item */ item){ // summary: - // This function tests whether the item passed in is indeed an item in the store. + // This function tests whether the item passed in is indeed an item in the store. // item: // The item to test for being contained by the store. if(!this.isItem(item)){ @@ -178,7 +178,7 @@ var HtmlStore = declare("dojox.data.HtmlStore", null, { _assertIsAttribute: function(/* String */ attribute){ // summary: - // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. + // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. // attribute: // The attribute to test for being contained by the store. // returns: @@ -198,7 +198,7 @@ var HtmlStore = declare("dojox.data.HtmlStore", null, { /* attribute-name-string */ attribute, /* value? */ defaultValue){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() var values = this.getValues(item, attribute); return (values.length > 0)?values[0]:defaultValue; //Object || int || Boolean }, @@ -461,18 +461,18 @@ var HtmlStore = declare("dojox.data.HtmlStore", null, { // See dojo.data.api.Identity.getIdentity() this._assertIsItem(item); if(this.hasAttribute(item, "name")){ - return this.getValue(item,"name"); + return this.getValue(item,"name"); }else{ return item._ident; } }, getIdentityAttributes: function(/* item */ item){ - // summary: - // See dojo.data.api.Identity.getIdentityAttributes() - - //Identity isn't taken from a public attribute. - return null; + // summary: + // See dojo.data.api.Identity.getIdentityAttributes() + + //Identity isn't taken from a public attribute. + return null; }, fetchItemByIdentity: function(keywordArgs){ diff --git a/data/HtmlTableStore.js b/data/HtmlTableStore.js index 8bb6246725..c614c49428 100644 --- a/data/HtmlTableStore.js +++ b/data/HtmlTableStore.js @@ -88,7 +88,7 @@ var HtmlTableStore = declare("dojox.data.HtmlTableStore", null, { _assertIsItem: function(/* item */ item){ // summary: - // This function tests whether the item passed in is indeed an item in the store. + // This function tests whether the item passed in is indeed an item in the store. // item: // The item to test for being contained by the store. if(!this.isItem(item)){ @@ -98,7 +98,7 @@ var HtmlTableStore = declare("dojox.data.HtmlTableStore", null, { _assertIsAttribute: function(/* String */ attribute){ // summary: - // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. + // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. // attribute: // The attribute to test for being contained by the store. // returns: @@ -118,7 +118,7 @@ var HtmlTableStore = declare("dojox.data.HtmlTableStore", null, { /* attribute-name-string */ attribute, /* value? */ defaultValue){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() var values = this.getValues(item, attribute); return (values.length > 0)?values[0]:defaultValue; //Object || int || Boolean }, @@ -384,11 +384,11 @@ var HtmlTableStore = declare("dojox.data.HtmlTableStore", null, { }, getIdentityAttributes: function(/* item */ item){ - // summary: - // See dojo.data.api.Identity.getIdentityAttributes() - - //Identity isn't taken from a public attribute. - return null; + // summary: + // See dojo.data.api.Identity.getIdentityAttributes() + + //Identity isn't taken from a public attribute. + return null; }, fetchItemByIdentity: function(keywordArgs){ diff --git a/data/ItemExplorer.js b/data/ItemExplorer.js index 0809dd18cf..47470e6239 100644 --- a/data/ItemExplorer.js +++ b/data/ItemExplorer.js @@ -229,9 +229,9 @@ dojo.declare("dojox.data.ItemExplorer", dijit.Tree, { }, _createEditDialog: function(){ this._editDialog = new dijit.Dialog({ - title: "Edit Property", - execute: dojo.hitch(this, "_updateItem"), - preload: true + title: "Edit Property", + execute: dojo.hitch(this, "_updateItem"), + preload: true }); this._editDialog.placeAt(dojo.body()); this._editDialog.startup(); @@ -270,7 +270,7 @@ dojo.declare("dojox.data.ItemExplorer", dijit.Tree, { dojo.attr(labelVal, "innerHTML", "Value (JSON):") pane.appendChild(labelVal); - // container for value fields + // container for value fields var valueDiv = dojo.doc.createElement("div"); dojo.addClass(valueDiv, "value"); diff --git a/data/JsonRestStore.js b/data/JsonRestStore.js index c712d9196b..30ac1f8b6f 100644 --- a/data/JsonRestStore.js +++ b/data/JsonRestStore.js @@ -9,28 +9,28 @@ var JsonRestStore = declare("dojox.data.JsonRestStore", ServiceStore, // JsonRestStore is a Dojo Data store interface to JSON HTTP/REST web // storage services that support read and write through GET, PUT, POST, and DELETE. // options: - // Keyword arguments + // Keyword arguments // // The *schema* parameter // This is a schema object for this store. This should be JSON Schema format. // // The *service* parameter - // This is the service object that is used to retrieve lazy data and save results - // The function should be directly callable with a single parameter of an object id to be loaded - // The function should also have the following methods: - // - put(id,value) - puts the value at the given id - // - post(id,value) - posts (appends) the value at the given id - // - delete(id) - deletes the value corresponding to the given id + // This is the service object that is used to retrieve lazy data and save results + // The function should be directly callable with a single parameter of an object id to be loaded + // The function should also have the following methods: + // - put(id,value) - puts the value at the given id + // - post(id,value) - posts (appends) the value at the given id + // - delete(id) - deletes the value corresponding to the given id // Note that it is critical that the service parses responses as JSON. // If you are using dojox.rpc.Service, the easiest way to make sure this - // happens is to make the responses have a content type of - // application/json. If you are creating your own service, make sure you + // happens is to make the responses have a content type of + // application/json. If you are creating your own service, make sure you // use handleAs: "json" with your XHR requests. // // The *target* parameter - // This is the target URL for this Service store. This may be used in place - // of a service parameter to connect directly to RESTful URL without - // using a dojox.rpc.Service object. + // This is the target URL for this Service store. This may be used in place + // of a service parameter to connect directly to RESTful URL without + // using a dojox.rpc.Service object. // // The *idAttribute* parameter // Defaults to 'id'. The name of the attribute that holds an objects id. @@ -45,31 +45,31 @@ var JsonRestStore = declare("dojox.data.JsonRestStore", ServiceStore, // callbacks are unnecessary // description: // The JsonRestStore will cause all saved modifications to be sent to the server using Rest commands (PUT, POST, or DELETE). - // When using a Rest store on a public network, it is important to implement proper security measures to + // When using a Rest store on a public network, it is important to implement proper security measures to // control access to resources. // On the server side implementing a REST interface means providing GET, PUT, POST, and DELETE handlers. // GET - Retrieve an object or array/result set, this can be by id (like /table/1) or with a - // query (like /table/?name=foo). + // query (like /table/?name=foo). // PUT - This should modify a object, the URL will correspond to the id (like /table/1), and the body will - // provide the modified object + // provide the modified object // POST - This should create a new object. The URL will correspond to the target store (like /table/) - // and the body should be the properties of the new object. The server's response should include a - // Location header that indicates the id of the newly created object. This id will be used for subsequent - // PUT and DELETE requests. JsonRestStore also includes a Content-Location header that indicates + // and the body should be the properties of the new object. The server's response should include a + // Location header that indicates the id of the newly created object. This id will be used for subsequent + // PUT and DELETE requests. JsonRestStore also includes a Content-Location header that indicates // the temporary randomly generated id used by client, and this location is used for subsequent - // PUT/DELETEs if no Location header is provided by the server or if a modification is sent prior - // to receiving a response from the server. - // DELETE - This should delete an object by id. - // These articles include more detailed information on using the JsonRestStore: + // PUT/DELETEs if no Location header is provided by the server or if a modification is sent prior + // to receiving a response from the server. + // DELETE - This should delete an object by id. + // These articles include more detailed information on using the JsonRestStore: // http://www.sitepen.com/blog/2008/06/13/restful-json-dojo-data/ // http://blog.medryx.org/2008/07/24/jsonreststore-overview/ // example: - // A JsonRestStore takes a REST service or a URL and uses it the remote communication for a - // read/write dojo.data implementation. A JsonRestStore can be created with a simple URL like: - // | new JsonRestStore({target:"/MyData/"}); + // A JsonRestStore takes a REST service or a URL and uses it the remote communication for a + // read/write dojo.data implementation. A JsonRestStore can be created with a simple URL like: + // | new JsonRestStore({target:"/MyData/"}); // example: - // To use a JsonRestStore with a service, you should create a - // service with a REST transport. This can be configured with an SMD: + // To use a JsonRestStore with a service, you should create a + // service with a REST transport. This can be configured with an SMD: // | { // | services: { // | jsonRestStore: { @@ -83,14 +83,14 @@ var JsonRestStore = declare("dojox.data.JsonRestStore", ServiceStore, // | } // | } // | } - // The SMD can then be used to create service, and the service can be passed to a JsonRestStore. For example: + // The SMD can then be used to create service, and the service can be passed to a JsonRestStore. For example: // | var myServices = new dojox.rpc.Service(dojo.moduleUrl("dojox.rpc.tests.resources", "test.smd")); // | var jsonStore = new dojox.data.JsonRestStore({service:myServices.jsonRestStore}); // example: // The JsonRestStore also supports lazy loading. References can be made to objects that have not been loaded. // For example if a service returned: // | {"name":"Example","lazyLoadedObject":{"$ref":"obj2"}} - // And this object has accessed using the dojo.data API: + // And this object has accessed using the dojo.data API: // | var obj = jsonStore.getValue(myObject,"lazyLoadedObject"); // The object would automatically be requested from the server (with an object id of "obj2"). @@ -138,9 +138,9 @@ var JsonRestStore = declare("dojox.data.JsonRestStore", ServiceStore, referenceIntegrity: true, target:"", // summary: - // Allow no trailing slash on target paths. This is generally discouraged since - // it creates prevents simple scalar values from being used a relative URLs. - // Disabled by default. + // Allow no trailing slash on target paths. This is generally discouraged since + // it creates prevents simple scalar values from being used a relative URLs. + // Disabled by default. allowNoTrailingSlash: false, //Write API Support newItem: function(data, parentInfo){ @@ -241,7 +241,7 @@ var JsonRestStore = declare("dojox.data.JsonRestStore", ServiceStore, }, cancelChanging : function(object){ // summary: - // Removes an object from the list of dirty objects + // Removes an object from the list of dirty objects // This will prevent that object from being saved to the server on the next save // object: // The item to cancel changes on @@ -306,18 +306,18 @@ var JsonRestStore = declare("dojox.data.JsonRestStore", ServiceStore, // kwArgs: // global: // This will cause the save to commit the dirty data for all - // JsonRestStores as a single transaction. + // JsonRestStores as a single transaction. // revertOnError: // This will cause the changes to be reverted if there is an // error on the save. By default a revert is executed unless // a value of false is provide for this parameter. // incrementalUpdates: // For items that have been updated, if this is enabled, the server will be sent a POST request - // with a JSON object containing the changed properties. By default this is - // not enabled, and a PUT is used to deliver an update, and will include a full - // serialization of all the properties of the item/object. + // with a JSON object containing the changed properties. By default this is + // not enabled, and a PUT is used to deliver an update, and will include a full + // serialization of all the properties of the item/object. // If this is true, the POST request body will consist of a JSON object with - // only the changed properties. The incrementalUpdates parameter may also + // only the changed properties. The incrementalUpdates parameter may also // be a function, in which case it will be called with the updated and previous objects // and an object update representation can be returned. // alwaysPostNewItems: @@ -345,7 +345,7 @@ var JsonRestStore = declare("dojox.data.JsonRestStore", ServiceStore, // kwArgs: // global: // This will cause the revert to undo all the changes for all - // JsonRestStores in a single operation. + // JsonRestStores in a single operation. rpcJsonRest.revert(kwArgs && kwArgs.global && this.service); }, @@ -404,7 +404,7 @@ var JsonRestStore = declare("dojox.data.JsonRestStore", ServiceStore, getConstructor: function(){ // summary: - // Gets the constructor for objects from this store + // Gets the constructor for objects from this store return this._constructor; }, getIdentity: function(item){ @@ -432,11 +432,11 @@ var JsonRestStore = declare("dojox.data.JsonRestStore", ServiceStore, onSet: function(){}, onNew: function(){}, - onDelete: function(){}, + onDelete: function(){}, getFeatures: function(){ // summary: - // return the store feature set + // return the store feature set var features = this.inherited(arguments); features["dojo.data.api.Write"] = true; features["dojo.data.api.Notification"] = true; @@ -463,7 +463,7 @@ JsonRestStore.getStore = function(options, Class){ // See the JsonRestStore constructor // Class: // Constructor to use (for creating stores from JsonRestStore subclasses). - // This is optional and defaults to JsonRestStore. + // This is optional and defaults to JsonRestStore. if(typeof options.target == 'string'){ options.target = options.target.match(/\/$/) || options.allowNoTrailingSlash ? options.target : (options.target + '/'); diff --git a/data/KeyValueStore.js b/data/KeyValueStore.js index a08fc4b15e..a898f788eb 100644 --- a/data/KeyValueStore.js +++ b/data/KeyValueStore.js @@ -49,7 +49,7 @@ var KeyValueStore = declare("dojox.data.KeyValueStore", null, { _assertIsItem: function(/* item */ item){ // summary: - // This function tests whether the item passed in is indeed an item in the store. + // This function tests whether the item passed in is indeed an item in the store. // item: // The item to test for being contained by the store. if(!this.isItem(item)){ @@ -59,7 +59,7 @@ var KeyValueStore = declare("dojox.data.KeyValueStore", null, { _assertIsAttribute: function(/* item */ item, /* String */ attribute){ // summary: - // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. + // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. // attribute: // The attribute to test for being contained by the store. if(!lang.isString(attribute)){ @@ -93,8 +93,8 @@ var KeyValueStore = declare("dojox.data.KeyValueStore", null, { /* attribute-name-string */ attribute){ // summary: // See dojo.data.api.Read.getValues() - // Key/Value syntax does not support multi-valued attributes, so this is just a - // wrapper function for getValue(). + // Key/Value syntax does not support multi-valued attributes, so this is just a + // wrapper function for getValue(). var value = this.getValue(item, attribute); return (value ? [value] : []); //Array }, diff --git a/data/OpenSearchStore.js b/data/OpenSearchStore.js index fcfe453c21..b67cf87d2d 100644 --- a/data/OpenSearchStore.js +++ b/data/OpenSearchStore.js @@ -57,7 +57,7 @@ var OpenSearchStore = declare("dojox.data.OpenSearchStore", null, { _assertIsItem: function(/* item */ item){ // summary: - // This function tests whether the item passed in is indeed an item in the store. + // This function tests whether the item passed in is indeed an item in the store. // item: // The item to test for being contained by the store. if(!this.isItem(item)){ @@ -77,7 +77,7 @@ var OpenSearchStore = declare("dojox.data.OpenSearchStore", null, { getFeatures: function(){ // summary: - // See dojo.data.api.Read.getFeatures() + // See dojo.data.api.Read.getFeatures() return { 'dojo.data.api.Read': true }; @@ -85,7 +85,7 @@ var OpenSearchStore = declare("dojox.data.OpenSearchStore", null, { getValue: function(item, attribute, defaultValue){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() var values = this.getValues(item, attribute); if(values){ return values[0]; @@ -95,13 +95,13 @@ var OpenSearchStore = declare("dojox.data.OpenSearchStore", null, { getAttributes: function(item){ // summary: - // See dojo.data.api.Read.getAttributes() + // See dojo.data.api.Read.getAttributes() return ["content"]; }, hasAttribute: function(item, attribute){ // summary: - // See dojo.data.api.Read.hasAttributes() + // See dojo.data.api.Read.hasAttributes() if(this.getValue(item,attribute)){ return true; } @@ -109,31 +109,31 @@ var OpenSearchStore = declare("dojox.data.OpenSearchStore", null, { }, isItemLoaded: function(item){ - // summary: - // See dojo.data.api.Read.isItemLoaded() - return this.isItem(item); + // summary: + // See dojo.data.api.Read.isItemLoaded() + return this.isItem(item); }, loadItem: function(keywordArgs){ // summary: - // See dojo.data.api.Read.loadItem() + // See dojo.data.api.Read.loadItem() }, getLabel: function(item){ // summary: - // See dojo.data.api.Read.getLabel() + // See dojo.data.api.Read.getLabel() return undefined; }, getLabelAttributes: function(item){ // summary: - // See dojo.data.api.Read.getLabelAttributes() + // See dojo.data.api.Read.getLabelAttributes() return null; }, containsValue: function(item, attribute, value){ // summary: - // See dojo.data.api.Read.containsValue() + // See dojo.data.api.Read.containsValue() var values = this.getValues(item,attribute); for(var i = 0; i < values.length; i++){ if(values[i] === value){ @@ -145,7 +145,7 @@ var OpenSearchStore = declare("dojox.data.OpenSearchStore", null, { getValues: function(item, attribute){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() this._assertIsItem(item); this._assertIsAttribute(attribute); @@ -158,7 +158,7 @@ var OpenSearchStore = declare("dojox.data.OpenSearchStore", null, { isItem: function(item){ // summary: - // See dojo.data.api.Read.isItem() + // See dojo.data.api.Read.isItem() if(item && item[this._storeRef] === this){ return true; } @@ -167,7 +167,7 @@ var OpenSearchStore = declare("dojox.data.OpenSearchStore", null, { close: function(request){ // summary: - // See dojo.data.api.Read.close() + // See dojo.data.api.Read.close() }, process: function(data){ diff --git a/data/OpmlStore.js b/data/OpmlStore.js index 841435ddce..8c6e8a1652 100644 --- a/data/OpmlStore.js +++ b/data/OpmlStore.js @@ -3,14 +3,12 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/xhr", "dojo/data/ut function(declare, lang, xhr, simpleFetch, filterUtil, kernel) { var OpmlStore = declare("dojox.data.OpmlStore", null, { - /* summary: - * The OpmlStore implements the dojo.data.api.Read API. - */ - - /* examples: - * var opmlStore = new dojo.data.OpmlStore({url:"geography.xml"}); - * var opmlStore = new dojo.data.OpmlStore({url:"http://example.com/geography.xml"}); - */ + // summary: + // The OpmlStore implements the dojo.data.api.Read API. + // examples: + // | var opmlStore = new dojo.data.OpmlStore({url:"geography.xml"}); + // | var opmlStore = new dojo.data.OpmlStore({url:"http://example.com/geography.xml"}); + constructor: function(/* Object */ keywordParameters){ // summary: // constructor @@ -57,7 +55,7 @@ var OpmlStore = declare("dojox.data.OpmlStore", null, { _assertIsAttribute: function(/* item || String */ attribute){ // summary: - // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. + // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. // attribute: // The attribute to test for being contained by the store. if(!lang.isString(attribute)){ @@ -157,7 +155,7 @@ var OpmlStore = declare("dojox.data.OpmlStore", null, { /* attribute || attribute-name-string */ attribute, /* value? */ defaultValue){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() this._assertIsItem(item); this._assertIsAttribute(attribute); if(attribute == 'children'){ @@ -271,8 +269,8 @@ var OpmlStore = declare("dojox.data.OpmlStore", null, { isItemLoaded: function(/* anything */ something){ // summary: - // See dojo.data.api.Read.isItemLoaded() - // OpmlStore loads every item, so if it's an item, then it's loaded. + // See dojo.data.api.Read.isItemLoaded(). + // OpmlStore loads every item, so if it's an item, then it's loaded. return this.isItem(something); //Boolean }, @@ -404,7 +402,7 @@ var OpmlStore = declare("dojox.data.OpmlStore", null, { // summary: // See dojo.data.api.Identity.getIdentity() if(this.isItem(item)){ - //No ther way to do this other than O(n) without + //No other way to do this other than O(n) without //complete rework of how the tree stores nodes. for(var i in this._identityMap){ if(this._identityMap[i] === item){ @@ -487,12 +485,12 @@ var OpmlStore = declare("dojox.data.OpmlStore", null, { }, getIdentityAttributes: function(/* item */ item){ - // summary: - // See dojo.data.api.Identity.getIdentifierAttributes() - - //Identity isn't a public attribute in the item, it's the node count. - //So, return null. - return null; + // summary: + // See dojo.data.api.Identity.getIdentifierAttributes() + + //Identity isn't a public attribute in the item, it's the node count. + //So, return null. + return null; }, _handleQueuedFetches: function(){ @@ -516,8 +514,8 @@ var OpmlStore = declare("dojox.data.OpmlStore", null, { }, close: function(/*dojo.data.api.Request || keywordArgs || null */ request){ - // summary: - // See dojo.data.api.Read.close() + // summary: + // See dojo.data.api.Read.close() } }); //Mix in the simple fetch implementation to this class. diff --git a/data/PersevereStore.js b/data/PersevereStore.js index 6545720756..ea4654310c 100644 --- a/data/PersevereStore.js +++ b/data/PersevereStore.js @@ -4,24 +4,24 @@ define(["dojo", "dojox", "require", "dojox/data/JsonQueryRestStore", "dojox/rpc/ dojox.json.ref.serializeFunctions = true; // Persevere supports persisted functions -declare("dojox.data.PersevereStore",dojox.data.JsonQueryRestStore,{ +dojo.declare("dojox.data.PersevereStore", dojox.data.JsonQueryRestStore,{ useFullIdInQueries: true, // in JSONQuerys use the full id jsonQueryPagination: false // use the Range headers instead }); -dojox.data.PersevereStore.getStores = function(/*String?*/path,/*Boolean?*/sync){ +dojox.data.PersevereStore.getStores = function(/*String?*/ path,/*Boolean?*/ sync){ // summary: // Creates Dojo data stores for all the table/classes on a Persevere server // path: - // URL of the Persevere server's root, this normally just "/" - // which is the default value if the target is not provided + // URL of the Persevere server's root, this normally just "/" + // which is the default value if the target is not provided // sync: - // Indicates that the operation should happen synchronously. - // return: - // A map/object of datastores will be returned if it is performed asynchronously, - // otherwise it will return a Deferred object that will provide the map/object. - // The name of each property is a the name of a store, - // and the value is the actual data store object. + // Indicates that the operation should happen synchronously. + // returns: + // A map/object of datastores will be returned if it is performed asynchronously, + // otherwise it will return a Deferred object that will provide the map/object. + // The name of each property is a the name of a store, + // and the value is the actual data store object. path = (path && (path.match(/\/$/) ? path : (path + '/'))) || '/'; if(path.match(/^\w*:\/\//)){ // if it is cross-domain, we will use window.name for communication @@ -32,7 +32,7 @@ dojox.data.PersevereStore.getStores = function(/*String?*/path,/*Boolean?*/sync) dojo.xhr = function(method,args){ (args.headers = args.headers || {})['Server-Methods'] = "false"; return plainXhr.apply(dojo,arguments); - } + }; var rootService= dojox.rpc.Rest(path,true); dojox.rpc._sync = sync; var dfd = rootService("Class/");//dojo.xhrGet({url: target, sync:!callback, handleAs:'json'}); diff --git a/data/PicasaStore.js b/data/PicasaStore.js index 1e233777ad..8d5ed8ccd5 100644 --- a/data/PicasaStore.js +++ b/data/PicasaStore.js @@ -42,7 +42,7 @@ var PicasaStore = declare("dojox.data.PicasaStore", null, { _assertIsItem: function(/* item */ item){ // summary: - // This function tests whether the item passed in is indeed an item in the store. + // This function tests whether the item passed in is indeed an item in the store. // item: // The item to test for being contained by the store. if(!this.isItem(item)){ @@ -62,7 +62,7 @@ var PicasaStore = declare("dojox.data.PicasaStore", null, { getFeatures: function(){ // summary: - // See dojo.data.api.Read.getFeatures() + // See dojo.data.api.Read.getFeatures() return { 'dojo.data.api.Read': true }; @@ -70,7 +70,7 @@ var PicasaStore = declare("dojox.data.PicasaStore", null, { getValue: function(item, attribute, defaultValue){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() var values = this.getValues(item, attribute); if(values && values.length > 0){ return values[0]; @@ -80,16 +80,16 @@ var PicasaStore = declare("dojox.data.PicasaStore", null, { getAttributes: function(item){ // summary: - // See dojo.data.api.Read.getAttributes() - return ["id", "published", "updated", "category", "title$type", "title", - "summary$type", "summary", "rights$type", "rights", "link", "author", - "gphoto$id", "gphoto$name", "location", "imageUrlSmall", "imageUrlMedium", - "imageUrl", "datePublished", "dateTaken","description"]; + // See dojo.data.api.Read.getAttributes() + return ["id", "published", "updated", "category", "title$type", "title", + "summary$type", "summary", "rights$type", "rights", "link", "author", + "gphoto$id", "gphoto$name", "location", "imageUrlSmall", "imageUrlMedium", + "imageUrl", "datePublished", "dateTaken","description"]; }, hasAttribute: function(item, attribute){ // summary: - // See dojo.data.api.Read.hasAttributes() + // See dojo.data.api.Read.hasAttributes() if(this.getValue(item,attribute)){ return true; } @@ -97,31 +97,31 @@ var PicasaStore = declare("dojox.data.PicasaStore", null, { }, isItemLoaded: function(item){ - // summary: - // See dojo.data.api.Read.isItemLoaded() - return this.isItem(item); + // summary: + // See dojo.data.api.Read.isItemLoaded() + return this.isItem(item); }, loadItem: function(keywordArgs){ // summary: - // See dojo.data.api.Read.loadItem() + // See dojo.data.api.Read.loadItem() }, getLabel: function(item){ // summary: - // See dojo.data.api.Read.getLabel() + // See dojo.data.api.Read.getLabel() return this.getValue(item,this.label); }, getLabelAttributes: function(item){ // summary: - // See dojo.data.api.Read.getLabelAttributes() + // See dojo.data.api.Read.getLabelAttributes() return [this.label]; }, containsValue: function(item, attribute, value){ // summary: - // See dojo.data.api.Read.containsValue() + // See dojo.data.api.Read.containsValue() var values = this.getValues(item,attribute); for(var i = 0; i < values.length; i++){ if(values[i] === value){ @@ -133,7 +133,7 @@ var PicasaStore = declare("dojox.data.PicasaStore", null, { getValues: function(item, attribute){ // summary: - // See dojo.data.api.Read.getValue() + // See dojo.data.api.Read.getValue() this._assertIsItem(item); this._assertIsAttribute(attribute); @@ -165,7 +165,7 @@ var PicasaStore = declare("dojox.data.PicasaStore", null, { isItem: function(item){ // summary: - // See dojo.data.api.Read.isItem() + // See dojo.data.api.Read.isItem() if(item && item[this._storeRef] === this){ return true; } @@ -174,7 +174,7 @@ var PicasaStore = declare("dojox.data.PicasaStore", null, { close: function(request){ // summary: - // See dojo.data.api.Read.close() + // See dojo.data.api.Read.close() }, _fetchItems: function(request, fetchHandler, errorHandler){ @@ -257,7 +257,7 @@ var PicasaStore = declare("dojox.data.PicasaStore", null, { // description: // Utility function to un-escape XML special characters in an HTML string. // str: String - // The string to un-escape + // The string to un-escape // returns: // HTML String converted back to the normal text (unescaped) characters (<,>,&, ", etc,). diff --git a/data/QueryReadStore.js b/data/QueryReadStore.js index f93a286322..c0df2bc6f5 100644 --- a/data/QueryReadStore.js +++ b/data/QueryReadStore.js @@ -63,9 +63,9 @@ dojo.declare("dojox.data.QueryReadStore", // This will contain the items we have loaded from the server. // The contents of this array is optimized to satisfy all read-api requirements // and for using lesser storage, so the keys and their content need some explaination: - // this._items[0].i - the item itself + // this._items[0].i - the item itself // this._items[0].r - a reference to the store, so we can identify the item - // securly. We set this reference right after receiving the item from the + // securely. We set this reference right after receiving the item from the // server. _items:[], @@ -334,8 +334,8 @@ dojo.declare("dojox.data.QueryReadStore", _fetchItems: function(request, fetchHandler, errorHandler){ // summary: - // The request contains the data as defined in the Read-API. - // Additionally there is following keyword "serverQuery". + // The request contains the data as defined in the Read-API. + // Additionally there is following keyword "serverQuery". // // The *serverQuery* parameter, optional. // This parameter contains the data that will be sent to the server. @@ -350,7 +350,7 @@ dojo.declare("dojox.data.QueryReadStore", // does it, it compares if the query has changed // - request.query is required by the Read-API // - // I.e. the following examples might be sent via GET: + // I.e. the following examples might be sent via GET: // fetch({query:{name:"abc"}, queryOptions:{ignoreCase:true}}) // the URL will become: /url.php?name=abc // diff --git a/data/RailsStore.js b/data/RailsStore.js index 45ca8e5324..c3b99d21f2 100644 --- a/data/RailsStore.js +++ b/data/RailsStore.js @@ -1,7 +1,7 @@ define(["dojo", "dojox", "dojox/data/JsonRestStore"], function(dojo, dojox) { // Contains code donated by Travis Tilley under CLA -declare("dojox.data.RailsStore", dojox.data.JsonRestStore, { +dojo.declare("dojox.data.RailsStore", dojox.data.JsonRestStore, { constructor: function(){ // summary: // RailsStore is a data store for interacting with RESTful Rails controllers diff --git a/data/ServiceStore.js b/data/ServiceStore.js index 25b51919fb..17f53df241 100644 --- a/data/ServiceStore.js +++ b/data/ServiceStore.js @@ -23,17 +23,17 @@ return declare("dojox.data.ServiceStore", constructor: function(options){ // summary: // ServiceStore constructor, instantiate a new ServiceStore - // A ServiceStore can be configured from a JSON Schema. Queries are just - // passed through to the underlying services + // A ServiceStore can be configured from a JSON Schema. Queries are just + // passed through to the underlying services // options: - // Keyword arguments + // Keyword arguments // // The *schema* parameter // This is a schema object for this store. This should be JSON Schema format. // // The *service* parameter - // This is the service object that is used to retrieve lazy data and save results - // The function should be directly callable with a single parameter of an object id to be loaded + // This is the service object that is used to retrieve lazy data and save results + // The function should be directly callable with a single parameter of an object id to be loaded // // The *idAttribute* parameter // Defaults to 'id'. The name of the attribute that holds an objects id. @@ -43,15 +43,15 @@ return declare("dojox.data.ServiceStore", // will generate an id for it and add it to the index. // // The *estimateCountFactor* parameter - // This parameter is used by the ServiceStore to estimate the total count. When + // This parameter is used by the ServiceStore to estimate the total count. When // paging is indicated in a fetch and the response includes the full number of items - // requested by the fetch's count parameter, then the total count will be estimated + // requested by the fetch's count parameter, then the total count will be estimated // to be estimateCountFactor multiplied by the provided count. If this is 1, then it is assumed that the server // does not support paging, and the response is the full set of items, where the - // total count is equal to the numer of items returned. If the server does support + // total count is equal to the numer of items returned. If the server does support // paging, an estimateCountFactor of 2 is a good value for estimating the total count // It is also possible to override _processResults if the server can provide an exact - // total count. + // total count. // // The *syncMode* parameter // Setting this to true will set the store to using synchronous calls by default. @@ -60,7 +60,7 @@ return declare("dojox.data.ServiceStore", // // description: // ServiceStore can do client side caching and result set updating if - // dojox.data.ClientFilter is loaded. Do this add: + // dojox.data.ClientFilter is loaded. Do this add: // | dojo.require("dojox.data.ClientFilter") // prior to loading the ServiceStore (ClientFilter must be loaded before ServiceStore). // To utilize client side filtering with a subclass, you can break queries into @@ -68,9 +68,9 @@ return declare("dojox.data.ServiceStore", // clientFilter property in fetch calls. For example you could override fetch: // | fetch: function(args){ // | // do the sorting and paging on the client side - // | args.clientFilter = {start:args.start, count: args.count, sort: args.sort}; - // | // args.query will be passed to the service object for the server side handling - // | return this.inherited(arguments); + // | args.clientFilter = {start:args.start, count: args.count, sort: args.sort}; + // | // args.query will be passed to the service object for the server side handling + // | return this.inherited(arguments); // | } // When extending this class, if you would like to create lazy objects, you can follow // the example from dojox.data.tests.stores.ServiceStore: @@ -174,7 +174,7 @@ return declare("dojox.data.ServiceStore", // item: Object // we have no way of determining if it belongs, we just have object returned from - // service queries + // service queries return (typeof item == 'object') && item && !(item instanceof Date); }, @@ -187,16 +187,16 @@ return declare("dojox.data.ServiceStore", loadItem: function(args){ // summary: - // Loads an item and calls the callback handler. Note, that this will call the callback - // handler even if the item is loaded. Consequently, you can use loadItem to ensure - // that an item is loaded is situations when the item may or may not be loaded yet. - // If you access a value directly through property access, you can use this to load - // a lazy value as well (doesn't need to be an item). + // Loads an item and calls the callback handler. Note, that this will call the callback + // handler even if the item is loaded. Consequently, you can use loadItem to ensure + // that an item is loaded is situations when the item may or may not be loaded yet. + // If you access a value directly through property access, you can use this to load + // a lazy value as well (doesn't need to be an item). // example: // | store.loadItem({ // | item: item, // this item may or may not be loaded // | onItem: function(item){ - // | // do something with the item + // | // do something with the item // | } // | }); @@ -263,7 +263,7 @@ return declare("dojox.data.ServiceStore", // args: // The *queryOptions.cache* parameter // If true, indicates that the query result should be cached for future use. This is only available - // if dojox.data.ClientFilter has been loaded before the ServiceStore + // if dojox.data.ClientFilter has been loaded before the ServiceStore // // The *syncMode* parameter // Indicates that the call should be fetch synchronously if possible (this is not always possible) @@ -316,7 +316,7 @@ return declare("dojox.data.ServiceStore", }, getFeatures: function(){ // summary: - // return the store feature set + // return the store feature set return { "dojo.data.api.Read": true, diff --git a/data/SnapLogicStore.js b/data/SnapLogicStore.js index 6830bf33df..934871ef3d 100644 --- a/data/SnapLogicStore.js +++ b/data/SnapLogicStore.js @@ -37,7 +37,7 @@ dojo.declare("dojox.data.SnapLogicStore", null, { } }, - _assertIsAttribute: function(/* attribute-name-string */ attribute){ + _assertIsAttribute: function(/*attribute-name-string*/ attribute){ // summary: // This function tests whether the item passed in is indeed a valid 'attribute' like type for the store. // attribute: @@ -88,9 +88,9 @@ dojo.declare("dojox.data.SnapLogicStore", null, { }, isItemLoaded: function(item){ - // summary: - // See dojo.data.api.Read.isItemLoaded() - return this.isItem(item); // Boolean + // summary: + // See dojo.data.api.Read.isItemLoaded() + return this.isItem(item); // Boolean }, loadItem: function(keywordArgs){ @@ -142,11 +142,11 @@ dojo.declare("dojox.data.SnapLogicStore", null, { // See dojo.data.api.Read.close() }, - _fetchHandler: function(/* Object */request){ + _fetchHandler: function(/*Object*/ request){ // summary: // Process data retrieved via fetch and send it back to requester. - // response: - // The data returend from the I/O transport. In the normal case, it will be an array of result rows + // request: + // The data returned from the I/O transport. In the normal case, it will be an array of result rows // from the pipeline. In the special case for record count optimization, response will be an array // with a single element containing the total pipeline result row count. See fetch() for details // on this optimization. @@ -163,8 +163,8 @@ dojo.declare("dojox.data.SnapLogicStore", null, { if(!response.length){ request.onError.call(scope, - new Error("dojox.data.SnapLogicStore: invalid response of length 0"), - request); + new Error("dojox.data.SnapLogicStore: invalid response of length 0"), + request); return; }else if(request.query != 'record count'){ //If this was not a record count request, the first element returned will contain @@ -204,12 +204,12 @@ dojo.declare("dojox.data.SnapLogicStore", null, { } }, - _partHandler: function(/* Object */request, /* String */part, /* Object */response){ + _partHandler: function(/*Object */ request, /* String */ part, /* Object*/ response){ // summary: // Handle the individual replies for both data and length requests. // request: // The request/handle object used with the original fetch() call. - // part: + // part: // A value indicating which request this handler call is for (this.Parts). // response: // Response received from the underlying IO transport. @@ -240,7 +240,7 @@ dojo.declare("dojox.data.SnapLogicStore", null, { } }, - fetch: function(/* Object */request){ + fetch: function(/*Object*/ request){ // summary: // See dojo.data.api.Read.close() // request: diff --git a/data/StoreExplorer.js b/data/StoreExplorer.js index 44d4563023..d4733f54db 100644 --- a/data/StoreExplorer.js +++ b/data/StoreExplorer.js @@ -4,7 +4,7 @@ dojo.require("dojox.data.ItemExplorer"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); -declare("dojox.data.StoreExplorer", dijit.layout.BorderContainer, { +dojo.declare("dojox.data.StoreExplorer", dijit.layout.BorderContainer, { constructor: function(options){ dojo.mixin(this, options); }, @@ -173,8 +173,8 @@ declare("dojox.data.StoreExplorer", dijit.layout.BorderContainer, { var retValue = defaultOnComplete.apply(this, arguments); } - grid.setStore(store); - this.queryOptions = {cache:true}; + grid.setStore(store); + this.queryOptions = {cache:true}; this.tree.setStore(store); }, createNew: function(){ diff --git a/data/XmlItem.js b/data/XmlItem.js index 18cd2c4954..f2ba60fcdd 100644 --- a/data/XmlItem.js +++ b/data/XmlItem.js @@ -26,7 +26,7 @@ return declare("dojox.data.XmlItem", null, { toString: function(){ // summary: // Return a value of the first text child of the element - // returns: + // returns: // a value of the first text child of the element var str = ""; if(this.element){ diff --git a/data/XmlStore.js b/data/XmlStore.js index ca29b6477e..4427bbef50 100644 --- a/data/XmlStore.js +++ b/data/XmlStore.js @@ -21,12 +21,12 @@ var XmlStore = declare("dojox.data.XmlStore", null, { // client side fetchItemBIdentity, as it will use an XPath-like // structure if keyAttribute was not specified. Recommended to always // set this, though, for consistent identity behavior. - // attributeMap: An anonymous object contains properties for attribute mapping, + // attributeMap: An anonymous object contains properties for attribute mapping, // {"tag_name.item_attribute_name": "@xml_attribute_name", ...} // sendQuery: A boolean indicate to add a query string to the service URL. // Default is false. // urlPreventCache: Parameter to indicate whether or not URL calls should apply - // the preventCache option to the xhr request. + // the preventCache option to the xhr request. if(args){ this.url = args.url; this.rootItem = (args.rootItem || args.rootitem || this.rootItem); @@ -98,7 +98,7 @@ var XmlStore = declare("dojox.data.XmlStore", null, { // An XML element that holds the attribute // attribute: // A tag name of a child element, An XML attribute name or one of - // special names + // special names // defaultValue: // A default value // returns: @@ -216,7 +216,7 @@ var XmlStore = declare("dojox.data.XmlStore", null, { getAttributes: function(/* item */ item){ // summary: // Return an array of attribute names - // description: + // description: // 'item' must be an instance of a dojox.data.XmlItem from the store instance. // tag names of child elements and XML attribute names of attributes // specified to the element are returned along with special attribute @@ -316,7 +316,7 @@ var XmlStore = declare("dojox.data.XmlStore", null, { // Check whether the object is an item (XML element) // item: // An object to check - // returns: + // returns: // True if the object is an XML element, otherwise false if(something && something.element && something.store && something.store === this){ return true; //boolean @@ -590,7 +590,7 @@ var XmlStore = declare("dojox.data.XmlStore", null, { }, _flattenNodes: function(nodes){ - // Summary: + // summary: // Function used to flatten a hierarchy of XML nodes into a single list for // querying over. Used when deep = true; var flattened = []; @@ -608,8 +608,8 @@ var XmlStore = declare("dojox.data.XmlStore", null, { }, close: function(/*dojo.data.api.Request || keywordArgs || null */ request){ - // summary: - // See dojo.data.api.Read.close() + // summary: + // See dojo.data.api.Read.close() }, /* dojo.data.api.Write */ @@ -622,7 +622,7 @@ var XmlStore = declare("dojox.data.XmlStore", null, { // the new element. // Other attributes in 'keywordArgs' are set to the new element, // including "text()", but excluding "childNodes". - // keywordArgs: + // keywordArgs: // An object containing initial attributes // returns: // An XML element @@ -814,9 +814,9 @@ var XmlStore = declare("dojox.data.XmlStore", null, { // notify: // A non-API optional argument, used to indicate if notification API should be called // or not. - // returns: // False for "tagName", otherwise true + if(attribute === "tagName"){ return false; //boolean } @@ -926,10 +926,10 @@ var XmlStore = declare("dojox.data.XmlStore", null, { save: function(/* object */ keywordArgs){ // summary: // Save new and/or modified items (XML elements) - // description: + // description: // 'url' is used to save XML documents for new, modified and/or // deleted XML elements. - // keywordArgs: + // keywordArgs: // An object for callbacks if(!keywordArgs){ keywordArgs = {}; @@ -1068,14 +1068,14 @@ var XmlStore = declare("dojox.data.XmlStore", null, { _getDeleteUrl: function(item){ // summary: // Generate a URL for delete - // description: + // description: // This default implementation returns 'url' with 'keyAttribute' // as a query string. // Sub-classes may override this method for the custom URL based on // changes (new, deleted, or modified). - // item: + // item: // An item to delete - // returns: + // returns: // A delete URL var url = this.url; if(item && this.keyAttribute !== ""){ @@ -1092,7 +1092,7 @@ var XmlStore = declare("dojox.data.XmlStore", null, { _getPostContent: function(item){ // summary: // Generate a content to post - // description: + // description: // This default implementation generates an XML document for one // (the first only) new or modified element. // Sub-classes may override this method for the custom post content @@ -1107,7 +1107,7 @@ var XmlStore = declare("dojox.data.XmlStore", null, { _getPutContent: function(item){ // summary: // Generate a content to put - // description: + // description: // This default implementation generates an XML document for one // (the first only) new or modified element. // Sub-classes may override this method for the custom put content diff --git a/data/demos/stores/filestore_funcs.php b/data/demos/stores/filestore_funcs.php index ff61139740..259dc2c799 100755 --- a/data/demos/stores/filestore_funcs.php +++ b/data/demos/stores/filestore_funcs.php @@ -65,8 +65,8 @@ function patternToRegExp(/*String*/$pattern){ * @param $showHiddenFiles boolean to indicate to return hidden files as part of the list. */ function getAllfiles($dir, $rootDir, $recurse, $dirsOnly, $expand, $showHiddenFiles) { - // summary: - // A function to obtain all the files in a particular directory (file or dir) + // summary: + // A function to obtain all the files in a particular directory (file or dir) $files = array(); $dirHandle = opendir($rootDir."/".$dir); if ($dirHandle) { @@ -118,8 +118,8 @@ function getAllfiles($dir, $rootDir, $recurse, $dirsOnly, $expand, $showHiddenFi * $file["children"] - Children files of a directory. Empty if a standard file. */ function generateFileObj($file, $dir, $rootDir, $expand, $showHiddenFiles) { - // summary: - // Function to generate an object representation of a disk file. + // summary: + // Function to generate an object representation of a disk file. $path = $file; if ($dir != "." && $dir != "./") { $path = $dir."/".$file; diff --git a/data/demos/widgets/PicasaViewList.js b/data/demos/widgets/PicasaViewList.js index 67205a5201..9102b05faf 100644 --- a/data/demos/widgets/PicasaViewList.js +++ b/data/demos/widgets/PicasaViewList.js @@ -26,8 +26,8 @@ dojo.declare("dojox.data.demos.widgets.PicasaViewList", [dijit._Widget, dijit._T }, addView: function(viewData){ - var newView = new dojox.data.demos.widgets.PicasaView(viewData); - this.fViewWidgets.push(newView); - this.list.appendChild(newView.domNode); + var newView = new dojox.data.demos.widgets.PicasaView(viewData); + this.fViewWidgets.push(newView); + this.list.appendChild(newView.domNode); } }); diff --git a/data/dom.js b/data/dom.js index 5190babee1..6eb3515625 100644 --- a/data/dom.js +++ b/data/dom.js @@ -65,7 +65,7 @@ dataDom.replaceChildren = function(/*Element*/node, /*Node || array*/ newChildre // description: // Removes all children of node and appends newChild. All the existing // children will be destroyed. - // node: + // node: // The node to modify the children on // newChildren: // The children to add to the node. It can either be a single Node or an diff --git a/data/restListener.js b/data/restListener.js index 02af85b771..e606f43101 100644 --- a/data/restListener.js +++ b/data/restListener.js @@ -2,12 +2,12 @@ dojo.provide("dojox.data.restListener"); dojox.data.restListener = function(message){ // summary: - // this function can be used to receive REST notifications, from Comet or from another frame + // this function can be used to receive REST notifications, from Comet or from another frame // description: // Example: // | dojo.connect(window,"onMessage",null,function(event) { // | var data = dojo.fromJson(event.data); - // | dojox.restListener(data); + // | dojox.restListener(data); // | }); var channel = message.channel; var jr = dojox.rpc.JsonRest; @@ -37,12 +37,12 @@ dojox.data.restListener = function(message){ store.onNew(result); // call onNew for the store; break; case 'ondelete': - store.onDelete(target); - break; - // put is handled by JsonReferencing - //TODO: we may want to bring the JsonReferencing capability into here... - // that is really tricky though because JsonReferencing handles sub object, - // it would be expensive to do full object graph searches from here + store.onDelete(target); + break; + // put is handled by JsonReferencing + //TODO: we may want to bring the JsonReferencing capability into here... + // that is really tricky though because JsonReferencing handles sub object, + // it would be expensive to do full object graph searches from here } } }; diff --git a/data/tests/stores/AndOrReadStore.js b/data/tests/stores/AndOrReadStore.js index cae0e08bae..30314aab24 100755 --- a/data/tests/stores/AndOrReadStore.js +++ b/data/tests/stores/AndOrReadStore.js @@ -24,7 +24,7 @@ dojo.declare("dojox.data.tests.Wrapper", null, { }, toString: function(){ - return "WRAPPER: [" + this._wrapped + "]"; + return "WRAPPER: [" + this._wrapped + "]"; } }); @@ -153,7 +153,7 @@ dojox.data.tests.stores.AndOrReadStore.getTestData = function(name){ { count: 10, value: false }, { count: 11, value: [false, false]}, { count: "12", value: [false, "true"]} - ] + ] } }; }else if (name === "countries_references"){ diff --git a/data/tests/stores/AtomReadStore.js b/data/tests/stores/AtomReadStore.js index bb1252bfae..609fa41840 100644 --- a/data/tests/stores/AtomReadStore.js +++ b/data/tests/stores/AtomReadStore.js @@ -12,8 +12,9 @@ dojox.data.tests.stores.AtomReadStore.getBlog2Store = function(){ }; */ dojox.data.tests.stores.AtomReadStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. + //console.log("In here."); //console.trace(); d.errback(errData); diff --git a/data/tests/stores/CssClassStore.js b/data/tests/stores/CssClassStore.js index 23bf1cbaa1..53a2a5ca8c 100755 --- a/data/tests/stores/CssClassStore.js +++ b/data/tests/stores/CssClassStore.js @@ -4,9 +4,9 @@ dojo.require("dojo.data.api.Read"); dojo.require("dojo.data.api.Identity"); dojox.data.tests.stores.CssClassStore.createStore = function(context){ - // summary: + // summary: // A simple helper function for getting the sample data used in each of the tests. - // description: + // description: // A simple helper function for getting the sample data used in each of the tests. var store = null; if(dojo.isBrowser){ @@ -50,7 +50,7 @@ dojox.data.tests.stores.CssClassStore.createStore = function(context){ }; dojox.data.tests.stores.CssClassStore.verifyItems = function(cssClassStore, items, attribute, compareArray){ - // summary: + // summary: // A helper function for validating that the items array is ordered // the same as the compareArray if(items.length != compareArray.length){ return false; } @@ -64,7 +64,7 @@ dojox.data.tests.stores.CssClassStore.verifyItems = function(cssClassStore, item }; dojox.data.tests.stores.CssClassStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. for (var i in errData) { console.log(errData[i]); diff --git a/data/tests/stores/CssRuleStore.js b/data/tests/stores/CssRuleStore.js index a9dab8e126..7d51e2be7a 100755 --- a/data/tests/stores/CssRuleStore.js +++ b/data/tests/stores/CssRuleStore.js @@ -4,9 +4,9 @@ dojo.require("dojo.data.api.Read"); dojo.require("dojo.data.api.Identity"); dojox.data.tests.stores.CssRuleStore.createStore = function(context){ - // summary: + // summary: // A simple helper function for getting the sample data used in each of the tests. - // description: + // description: // A simple helper function for getting the sample data used in each of the tests. var store = null; if(dojo.isBrowser){ @@ -50,7 +50,7 @@ dojox.data.tests.stores.CssRuleStore.createStore = function(context){ } ; dojox.data.tests.stores.CssRuleStore.verifyItems = function(cssRuleStore, items, attribute, compareArray){ - // summary: + // summary: // A helper function for validating that the items array is ordered // the same as the compareArray if(items.length != compareArray.length){ return false; } @@ -63,7 +63,7 @@ dojox.data.tests.stores.CssRuleStore.verifyItems = function(cssRuleStore, items, }; dojox.data.tests.stores.CssRuleStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. for (var i in errData) { console.log(errData[i]); diff --git a/data/tests/stores/CsvStore.js b/data/tests/stores/CsvStore.js index c8752e2188..0a2007c9fa 100644 --- a/data/tests/stores/CsvStore.js +++ b/data/tests/stores/CsvStore.js @@ -4,9 +4,9 @@ dojo.require("dojo.data.api.Read"); dojo.require("dojo.data.api.Identity"); dojox.data.tests.stores.CsvStore.getDatasource = function(filepath){ - // summary: + // summary: // A simple helper function for getting the sample data used in each of the tests. - // description: + // description: // A simple helper function for getting the sample data used in each of the tests. var dataSource = {}; @@ -109,7 +109,7 @@ dojox.data.tests.stores.CsvStore.getDatasource = function(filepath){ }; dojox.data.tests.stores.CsvStore.verifyItems = function(csvStore, items, attribute, compareArray){ - // summary: + // summary: // A helper function for validating that the items array is ordered // the same as the compareArray if(items.length != compareArray.length){ return false; } @@ -122,7 +122,7 @@ dojox.data.tests.stores.CsvStore.verifyItems = function(csvStore, items, attribu }; dojox.data.tests.stores.CsvStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. for (var i in errData) { console.log(errData[i]); diff --git a/data/tests/stores/FlickrRestStore.js b/data/tests/stores/FlickrRestStore.js index 12cb6a5a25..e79486f22d 100644 --- a/data/tests/stores/FlickrRestStore.js +++ b/data/tests/stores/FlickrRestStore.js @@ -4,10 +4,10 @@ dojo.require("dojo.data.api.Read"); dojox.data.tests.stores.FlickrRestStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. d.errback(errData); -} +}; doh.register("dojox.data.tests.stores.FlickrRestStore", [ diff --git a/data/tests/stores/FlickrStore.js b/data/tests/stores/FlickrStore.js index c3f5207992..9f1ff63c51 100644 --- a/data/tests/stores/FlickrStore.js +++ b/data/tests/stores/FlickrStore.js @@ -4,10 +4,10 @@ dojo.require("dojo.data.api.Read"); dojox.data.tests.stores.FlickrStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. d.errback(errData); -} +}; doh.register("dojox.data.tests.stores.FlickrStore", [ diff --git a/data/tests/stores/GoogleFeedStore.js b/data/tests/stores/GoogleFeedStore.js index 703f360bd4..e350fcbf0a 100644 --- a/data/tests/stores/GoogleFeedStore.js +++ b/data/tests/stores/GoogleFeedStore.js @@ -7,8 +7,9 @@ dojox.data.tests.stores.GoogleFeedStore.getStore = function(){ }; dojox.data.tests.stores.GoogleFeedStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. + //console.trace(); d.errback(errData); }; diff --git a/data/tests/stores/GoogleSearchStore.js b/data/tests/stores/GoogleSearchStore.js index a8c46b19e3..dc7f03c70b 100644 --- a/data/tests/stores/GoogleSearchStore.js +++ b/data/tests/stores/GoogleSearchStore.js @@ -7,8 +7,9 @@ dojox.data.tests.stores.GoogleSearchStore.getStore = function(){ }; dojox.data.tests.stores.GoogleSearchStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. + //console.trace(); d.errback(errData); }; diff --git a/data/tests/stores/JsonQueryRestStore.js b/data/tests/stores/JsonQueryRestStore.js index faee6fb48c..0d06c10a19 100644 --- a/data/tests/stores/JsonQueryRestStore.js +++ b/data/tests/stores/JsonQueryRestStore.js @@ -3,10 +3,10 @@ dojo.require("dojox.data.ClientFilter"); dojo.require("dojox.data.JsonQueryRestStore"); dojox.data.tests.stores.JsonQueryRestStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. d.errback(errData); -} +}; testService = function(query){ lastQuery = query; var deferred = new dojo.Deferred(); diff --git a/data/tests/stores/JsonRestStore.js b/data/tests/stores/JsonRestStore.js index 0791b428ae..25e4dca95d 100644 --- a/data/tests/stores/JsonRestStore.js +++ b/data/tests/stores/JsonRestStore.js @@ -6,10 +6,10 @@ dojo.require("dojox.json.schema"); dojo.require("dojo.data.api.Read"); dojox.data.tests.stores.JsonRestStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. d.errback(errData); -} +}; testServices = new dojox.rpc.Service(require.toUrl("dojox/rpc/tests/resources/test.smd")); testServices.jsonRestStore.servicePath = "/jsonRest.Store/"; // this makes the regex more challenging jsonStore = new dojox.data.JsonRestStore({service:testServices.jsonRestStore}); diff --git a/data/tests/stores/KeyValueStore.js b/data/tests/stores/KeyValueStore.js index b1121b6eb0..92f1e7e309 100644 --- a/data/tests/stores/KeyValueStore.js +++ b/data/tests/stores/KeyValueStore.js @@ -4,9 +4,9 @@ dojo.require("dojo.data.api.Read"); dojo.require("dojo.data.api.Identity"); dojox.data.tests.stores.KeyValueStore.getDatasource = function(type){ - // summary: + // summary: // A simple helper function for getting the sample data used in each of the tests. - // description: + // description: // A simple helper function for getting the sample data used in each of the tests. var dataSource = {}; @@ -29,10 +29,10 @@ dojox.data.tests.stores.KeyValueStore.getDatasource = function(type){ dataSource.data = keyData; } return dataSource; //Object -} +}; dojox.data.tests.stores.KeyValueStore.verifyItems = function(keyStore, items, attribute, compareArray){ - // summary: + // summary: // A helper function for validating that the items array is ordered // the same as the compareArray if(items.length != compareArray.length){ return false; } @@ -42,16 +42,16 @@ dojox.data.tests.stores.KeyValueStore.verifyItems = function(keyStore, items, at } } return true; //Boolean -} +}; dojox.data.tests.stores.KeyValueStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. for (i in errData) { console.log(errData[i]); } d.errback(errData); -} +}; doh.register("dojox.data.tests.stores.KeyValueStore", [ diff --git a/data/tests/stores/OpmlStore.js b/data/tests/stores/OpmlStore.js index 028e80532b..8bc3c2f98a 100644 --- a/data/tests/stores/OpmlStore.js +++ b/data/tests/stores/OpmlStore.js @@ -4,9 +4,9 @@ dojo.require("dojo.data.api.Read"); dojo.require("dojo.data.api.Identity"); dojox.data.tests.stores.OpmlStore.getDatasource = function(filepath){ - // summary: + // summary: // A simple helper function for getting the sample data used in each of the tests. - // description: + // description: // A simple helper function for getting the sample data used in each of the tests. var dataSource = {}; @@ -128,10 +128,10 @@ dojox.data.tests.stores.OpmlStore.getDatasource = function(filepath){ dataSource.data = opmlData; } return dataSource; //Object -} +}; dojox.data.tests.stores.OpmlStore.verifyItems = function(opmlStore, items, attribute, compareArray){ - // summary: + // summary: // A helper function for validating that the items array is ordered // the same as the compareArray if(items.length != compareArray.length){ return false; } @@ -141,13 +141,13 @@ dojox.data.tests.stores.OpmlStore.verifyItems = function(opmlStore, items, attri } } return true; //Boolean -} +}; dojox.data.tests.stores.OpmlStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. d.errback(errData); -} +}; doh.register("dojox.data.tests.stores.OpmlStore", [ diff --git a/data/tests/stores/PicasaStore.js b/data/tests/stores/PicasaStore.js index 71679b451b..94a278a3af 100755 --- a/data/tests/stores/PicasaStore.js +++ b/data/tests/stores/PicasaStore.js @@ -4,7 +4,7 @@ dojo.require("dojo.data.api.Read"); dojox.data.tests.stores.PicasaStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. d.errback(errData); }; diff --git a/data/tests/stores/QueryReadStore.js b/data/tests/stores/QueryReadStore.js index 3f9b3f0943..430a4f6441 100644 --- a/data/tests/stores/QueryReadStore.js +++ b/data/tests/stores/QueryReadStore.js @@ -16,7 +16,7 @@ tests.register("dojox.data.tests.stores.QueryReadStore", /* function testDocTests(t) { // summary: - // Run all the doc comments. + // Run all the doc comments. var doctest = new dojox.testing.DocTest(); doctest.run("dojox.data.QueryReadStore"); t.assertTrue(doctest.errors.length==0); diff --git a/data/tests/stores/ServiceStore.js b/data/tests/stores/ServiceStore.js index eb7766cc29..f6a812397d 100644 --- a/data/tests/stores/ServiceStore.js +++ b/data/tests/stores/ServiceStore.js @@ -5,10 +5,10 @@ dojo.require("dojox.rpc.Rest"); dojo.require("dojox.data.ServiceStore"); dojo.require("dojo.data.api.Read"); dojox.data.tests.stores.ServiceStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. d.errback(errData); -} +}; var testServices = new dojox.rpc.Service(require.toUrl("dojox/rpc/tests/resources/test.smd")); var jsonStore = new dojox.data.ServiceStore({service:testServices.jsonRestStore}); diff --git a/data/tests/stores/SnapLogicStore.js b/data/tests/stores/SnapLogicStore.js index 04c88dda8e..65c04c2e39 100644 --- a/data/tests/stores/SnapLogicStore.js +++ b/data/tests/stores/SnapLogicStore.js @@ -7,10 +7,10 @@ dojox.data.tests.stores.SnapLogicStore.pipelineSize = 14; dojox.data.tests.stores.SnapLogicStore.attributes = ["empno", "ename", "job", "hiredate", "sal", "comm", "deptno"]; dojox.data.tests.stores.SnapLogicStore.error = function(t, d, errData){ - // summary: + // summary: // The error callback function to be used for all of the tests. d.errback(errData); -} +}; doh.register("dojox.data.tests.stores.SnapLogicStore", [ diff --git a/data/tests/stores/filestore_funcs.php b/data/tests/stores/filestore_funcs.php index 5d4408b1b2..d21030b094 100755 --- a/data/tests/stores/filestore_funcs.php +++ b/data/tests/stores/filestore_funcs.php @@ -65,7 +65,7 @@ function patternToRegExp(/*String*/$pattern){ * @param $showHiddenFiles boolean to indicate to return hidden files as part of the list. */ function getAllfiles($dir, $rootDir, $recurse, $dirsOnly, $expand, $showHiddenFiles) { - // summary: + // summary: // A function to obtain all the files in a particular directory (file or dir) $files = array(); $dirHandle = opendir($rootDir."/".$dir); @@ -118,7 +118,7 @@ function getAllfiles($dir, $rootDir, $recurse, $dirsOnly, $expand, $showHiddenFi * $file["children"] - Children files of a directory. Empty if a standard file. */ function generateFileObj($file, $dir, $rootDir, $expand, $showHiddenFiles) { - // summary: + // summary: // Function to generate an object representation of a disk file. $path = $file; if ($dir != "." && $dir != "./") {