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