Permalink
Browse files

Cleanup of stale TODOs and other odds and ends

  • Loading branch information...
1 parent b5e9fc4 commit 8314959b22d6a65229032def3a927ee3a2017071 Kenneth G. Franqueiro committed Mar 6, 2012
Showing with 21 additions and 22 deletions.
  1. +2 −4 Editor.js
  2. +5 −5 GridFromHtml.js
  3. +6 −3 GridWithColumnSetsFromHtml.js
  4. +2 −2 README.md
  5. +0 −1 demos/todo/index.html
  6. +0 −1 extensions/DijitRegistry.js
  7. +1 −1 extensions/DnD.js
  8. +4 −4 test/OnDemand.html
  9. +1 −1 test/common_cases.html
View
@@ -146,10 +146,9 @@ function createEditor(column){
tabIndex: isNaN(column.tabIndex) ? -1 : column.tabIndex
}, args));
- if(has("ie") < 9){
- // IE<9 doesn't fire change events for all the right things,
+ if(has("ie") < 9 || (has("ie") && has("quirks"))){
+ // IE<9 / quirks doesn't fire change events for all the right things,
// and it doesn't bubble.
- // TODO: test IE9 quirks
if(editor == "radio" || editor == "checkbox"){
// listen for clicks since IE doesn't fire change events properly for checks/radios
on(cmp, "click", function(evt){ handleChange(evt); });
@@ -265,7 +264,6 @@ return function(column, editor, editOn){
// accept arguments as parameters to Editor function, or from column def,
// but normalize to column def.
- // (TODO: maybe should only accept from column def to begin with...)
column.editor = editor = editor || column.editor;
column.editOn = editOn = editOn || column.editOn;
View
@@ -1,7 +1,8 @@
define(["./OnDemandGrid", "dojo/_base/declare", "put-selector/put"],
function(OnDemandGrid, declare, put){
- // This module supports parsing grid structure information from an HTML table.
- // This module does NOT support ColumnSets; see GridWithColumnSetsFromHtml
+ // summary:
+ // This module supports parsing grid structure information from an HTML table.
+ // This module does NOT support ColumnSets; see GridWithColumnSetsFromHtml
// name of data attribute to check for column properties
var bagName = "data-dgrid-column";
@@ -25,9 +26,8 @@ function(OnDemandGrid, declare, put){
}
}
if(tr){
- // FIXME: this assumes that applicable TRs were ONLY found under one
- // grouping element! Maybe should limit to thead like dojox grid?
- // (Especially if we ever want to support tbody>tr>td -> renderArray)
+ // NOTE: this assumes that applicable TRs were ONLY found under one
+ // grouping element (e.g. thead)
domNode.removeChild(tr.parentNode);
}
@@ -1,6 +1,9 @@
-define(["./GridFromHtml", "./ColumnSet", "dojo/_base/declare"], function(GridFromHtml, ColumnSet, declare){
- //Possible TODO: make more resilient for cases of bad markup?
- //(e.g. cases where rowspans/colspans don't always break even / add up)
+define(["./GridFromHtml", "./ColumnSet", "dojo/_base/declare"],
+function(GridFromHtml, ColumnSet, declare){
+ // summary:
+ // This module augments GridFromHtml with additional support for interpreting
+ // ColumnSets from colgroups in table markup.
+
function getColumnSetsFromDom(domNode){
// summary:
// Generates ColumnSets from DOM.
View
@@ -626,8 +626,8 @@ The DnD plugin can be used to add row drag'n'drop functionality.
### Requirements
-The DnD extension assumes usage of the OnDemandList or OnDemandGrid module;
-thus, it expects a store to be in use.
+The DnD extension assumes usage of a store-backed component, most commonly an
+OnDemandGrid instance.
The store should be order-aware, supporting the `options.before` parameter
on `add()` and `put()` calls to properly respond to DnD operations.
View
@@ -164,7 +164,6 @@
label: "TODOs",
sortable: false,
formatter: function(item){
- //TODO: something's up with IE6 (first check doesn't check)
return "<div" + (item.completed ? ' class="completed"' : "") +
">" + item.summary + "</div>";
}
@@ -35,7 +35,6 @@ function(declare, registry){
getChildren: function(){
// provide hollow implementation for logic which assumes its existence
// (e.g. dijit/form/_FormMixin)
- // TODO: maybe it's desirable (but expensive) to call findWidgets here?
return [];
}
});
View
@@ -1,6 +1,6 @@
define(["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/Deferred", "dojo/dnd/Source", "dojo/dnd/Manager", "put-selector/put", "xstyle/css!dojo/resources/dnd.css"],
function(declare, lang, Deferred, DnDSource, DnDManager, put){
- // TODOC: store requirements
+ // Requirements:
// * requires a store (sounds obvious, but not all Lists/Grids have stores...)
// * must support options.before in put calls
// (if undefined, put at end)
View
@@ -62,28 +62,28 @@
// Create error store
errorStore = new Memory();
errorStore.query = function() {
- throw new Error("Some Error");
+ throw new Error("Error on sync query");
};
// Create error store with PUT
putErrorStore = new Memory({ data: lang.clone(testTypesStore.data) });
putErrorStore.put = function() {
- throw new Error("PUT ERROR");
+ throw new Error("Error on sync put");
};
// Create error store that has its deferred rejected
defErrorStore = new Memory();
defErrorStore.query = function() {
var def = new Deferred();
- setTimeout(function() { def.reject("Homie don't play that"); }, 200);
+ setTimeout(function() { def.reject("Error on async query"); }, 200);
return def.promise;
};
// Create error store that returns a promise on put, which it rejects
defPutErrorStore = new Memory({ data: lang.clone(testTypesStore.data) });
defPutErrorStore.put = function() {
var def = new Deferred();
- setTimeout(function() { def.reject("Watch where you put things!"); }, 200);
+ setTimeout(function() { def.reject("Error on async put"); }, 200);
return def.promise;
};
View
@@ -66,7 +66,7 @@
<script type="text/javascript">
require(["dojo/on", "dgrid/List", "dgrid/OnDemandGrid", "dgrid/Tree", "dgrid/Editor", "dgrid/Selection", "dgrid/Keyboard", "dgrid/test/data/base", "dojo/_base/declare", "dojo/_base/array", "dojo/domReady!"],
function(on, List, Grid, Tree, Editor, Selection, Keyboard, testStore, declare, arrayUtil){
- console.log("loaded in " + (new Date().getTime() - start) + testStore);
+ console.log("loaded in " + (new Date().getTime() - start));
var columns = { // you can declare columns as an object hash (key translates to field)
col1: Editor({label: 'Column 1 column 1 column 1'}, "text", "dblclick"),
col2: {label: 'Column 2', sortable: false},

0 comments on commit 8314959

Please sign in to comment.