Custom Query (18300 matches)


Show under each result:

Results (151 - 153 of 18300)

Ticket Resolution Summary Owner Reporter
#10900 fixed Tree: can't set path attribute to the root of the tree bill yveskurz

It's not possible to set the path of a dijit.Tree to the root of the tree.

For example: path = [ myStore.getRoot() ];

myTree.attr ('path', path);

This will fail because:

  1. myTree._setPathAttr() will remove the root item from path.(path now empty)
  2. myTree._setPathAttr() expands the root node and adds a callback to advance.
    1. advance() will be called back.
    2. advance() shifts the next item from path -> item = undefined
    3. since item is not a string it will try to get the identity from the model->store.
    4. this fails because item is undefined.

I think the problem is in 2) and can be solved by only adding a callback if path still contains elements. e.g instead of

this._expandNode(node).addCallback(dojo.hitch(this, advance));

possible (untested) solution:

var deferred = this._expandNode(node);
if (path.length) {
  deferred.addCallback(dojo.hitch(this, advance));
#10901 fixed i18nUtil.flattenLayerFileBundles regular expression not general enough Rawld Gill yveskurz

In "util/trunk/buildscripts/jslib/i18nUtil.js" function "flattenLayerFileBundles()" is a regular expression which should match all calls to dojo.requireLocalization(). This regular expression can be improved by allowing whitespace characters between function name its arguments and the semicolon.

Current regular expression:

var requireStatements = fileContents.match(/dojo\.requireLocalization\(.*\)\;/g);

More flexible expression:

var requireStatements = fileContents.match(/dojo\.requireLocalization\s*\(.*\)\s*\;/g);

This allows recognizing statements like: dojo.requireLocalization (...) ;

#11230 fixed Dojo fails to detect successfully loaded resources (chrome-extension) yveskurz

I'm writing a Chrome Web App which is using an embedded version of Dojo. This currently does not work as dojo.js fails to load with the following error:

Uncaught Error: Could not load 'dojo._base.lang'; last tried './_base/lang.js'

The cause for this is that xhr returns status code 0 on a successfully loaded resources with the consequence that dojo._isDocumentOk() (hostenv_browser.js) returns false.

The problem can be easily fixed by adding "chrome-extension:" to the list of stange behaving protocols.

I have no idea if that is the correct fix but changing the function as follows allows me to use Dojo in my Chrome Web App.

d._isDocumentOk = function(http){
   var stat = http.status || 0,
       lp = location.protocol;
       return (stat >= 200 && stat < 300) || 	// Boolean
	  stat == 304 ||                        // allow any 2XX 
          stat == 1223 || 			//  cache
          (!stat && (lp == "file:" || lp == "chrome:" || lp == "app:" || lp == "chrome-extension:"));
Note: See TracQuery for help on using queries.