Commit 973b3c70 authored by James Thomas's avatar James Thomas

Fixing use of HTML5 data attributes to work on all browsers.

parent f9ffdbe1
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,12 +6,12 @@ define(["dojo/_base/declare", ...@@ -6,12 +6,12 @@ define(["dojo/_base/declare",
// Parent classes // Parent classes
"dijit/_WidgetBase", "dijit/_TemplatedMixin", "dijit/_WidgetsInTemplateMixin", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dijit/_WidgetsInTemplateMixin",
// General application modules // General application modules
"dojo/_base/lang", "dojo/on", "dojo/dom-class", "dojox/mvc", "todo/model/TodoModel", "dojo/_base/lang", "dojo/_base/event", "dojo/on", "dojo/dom-class", "dojo/dom-attr", "dojox/mvc", "todo/model/TodoModel",
// Widget template // Widget template
"dojo/text!./app.html", "dojo/text!./app.html",
// Template Widgets // Template Widgets
"dijit/InlineEditBox", "todo/form/CheckBox", "dojox/mvc/Group", "dojox/mvc/Repeat", "dojox/mvc/Output"], "dijit/InlineEditBox", "todo/form/CheckBox", "dojox/mvc/Group", "dojox/mvc/Repeat", "dojox/mvc/Output"],
function(declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, lang, on, domClass, mvc, TodoModel, template) { function(declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, lang, _event, on, domClass, domAttr, mvc, TodoModel, template) {
return declare("todo.app", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], { return declare("todo.app", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
templateString: template, templateString: template,
...@@ -108,7 +108,7 @@ define(["dojo/_base/declare", ...@@ -108,7 +108,7 @@ define(["dojo/_base/declare",
this.addToModel(event.target.value, false); this.addToModel(event.target.value, false);
event.target.value = ""; event.target.value = "";
dojo.stopEvent(event); _event.stop(event);
}, },
/** /**
...@@ -117,7 +117,7 @@ define(["dojo/_base/declare", ...@@ -117,7 +117,7 @@ define(["dojo/_base/declare",
* model using the item identifier. * model using the item identifier.
**/ **/
onRemove: function (event) { onRemove: function (event) {
this.model.todos.remove(event.target.dataset.modelId); this.model.todos.remove(domAttr.get(event.target, "data-model-id"));
} }
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment