Commit 2d8f0831 authored by Pascal Hartig's avatar Pascal Hartig

Address Dojo memory leak

Also updates code style for the affected file only.

Fixes #1086
Closes #1087
parent d2bfd1d8
define([ define([
"dojo/_base/declare", 'dojo/_base/declare',
"dijit/_TemplatedMixin", 'dijit/_TemplatedMixin',
"dijit/_WidgetsInTemplateMixin", 'dijit/_WidgetsInTemplateMixin',
"dojox/mvc/WidgetList", 'dojox/mvc/WidgetList',
"dojox/mvc/_InlineTemplateMixin", 'dojox/mvc/_InlineTemplateMixin',
"todo/CssToggleWidget", 'todo/CssToggleWidget',
"todo/ctrl/_HashCompletedMixin" 'todo/ctrl/_HashCompletedMixin'
], function(declare, _TemplatedMixin, _WidgetsInTemplateMixin, WidgetList, _InlineTemplateMixin, CssToggleWidget, _HashCompletedMixin){ ], function(declare, _TemplatedMixin, _WidgetsInTemplateMixin, WidgetList, _InlineTemplateMixin, CssToggleWidget, _HashCompletedMixin){
return declare([WidgetList, _InlineTemplateMixin], { return declare([WidgetList, _InlineTemplateMixin], {
childClz: declare([CssToggleWidget, _TemplatedMixin, _WidgetsInTemplateMixin, _HashCompletedMixin], { childClz: declare([CssToggleWidget, _TemplatedMixin, _WidgetsInTemplateMixin, _HashCompletedMixin], {
_setCompletedAttr: {type: "classExists", className: "completed"}, _setCompletedAttr: { type: 'classExists', className: 'completed' },
_setHiddenAttr: {type: "classExists", className: "hidden"}, _setHiddenAttr: { type: 'classExists', className: 'hidden' },
onRemoveClick: function(){ onRemoveClick: function () {
this.parent.listCtrl.removeItem(this.uniqueId); this.parent.listCtrl.removeItem(this.uniqueId);
this.destroyRecursive();
}, },
onEditBoxChange: function(){ onEditBoxChange: function () {
if(!this.editBox.value){ if (!this.editBox.value) {
this.parent.listCtrl.removeItem(this.uniqueId); this.parent.listCtrl.removeItem(this.uniqueId);
} }
} }
......
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