Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
1f9c5afc
Commit
1f9c5afc
authored
Jul 06, 2015
by
Akira Sudoh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IE11 fix for Dojo example, fixes #1349.
parent
80c34776
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
examples/dojo/index.html
examples/dojo/index.html
+1
-1
examples/dojo/js/todo/widgets/TodoEnter.js
examples/dojo/js/todo/widgets/TodoEnter.js
+26
-0
examples/dojo/js/todo/widgets/Todos.js
examples/dojo/js/todo/widgets/Todos.js
+2
-1
No files found.
examples/dojo/index.html
View file @
1f9c5afc
...
...
@@ -33,7 +33,7 @@
<
header
id
=
"
header
"
>
<
h1
>
todos
<
/h1
>
<
form
id
=
"
todo-form
"
data
-
dojo
-
attach
-
event
=
"
submit: addTodo
"
>
<
input
id
=
"
new-todo
"
placeholder
=
"
What needs to be done?
"
data
-
dojo
-
type
=
"
dojox/mvc/Element
"
data
-
dojo
-
props
=
"
_setDisabledAttr: 'domNode', value: at(this, 'newTodo'), disabled: at(this, 'saving')
"
autofocus
>
<
input
id
=
"
new-todo
"
placeholder
=
"
What needs to be done?
"
data
-
dojo
-
type
=
"
dojox/mvc/Element
"
data
-
dojo
-
mixins
=
"
todo/widgets/TodoEnter
"
data
-
dojo
-
props
=
"
_setDisabledAttr: 'domNode', value: at(this, 'newTodo'), disabled: at(this, 'saving')
"
autofocus
>
<
/form
>
<
/header
>
<
section
id
=
"
main
"
data
-
dojo
-
type
=
"
dijit/_WidgetBase
"
data
-
dojo
-
props
=
"
_setHiddenAttr: '', hidden: at(this.get('todos'), 'length').transform(this.emptyConverter)
"
>
...
...
examples/dojo/js/todo/widgets/TodoEnter.js
0 → 100644
View file @
1f9c5afc
define
([
'
dojo/_base/declare
'
,
'
dojo/_base/lang
'
,
'
dijit/_WidgetBase
'
],
function
(
declare
,
lang
,
_WidgetBase
)
{
// To use Dojo's super call method, inherited()
/*jshint strict:false*/
var
ENTER_KEY
=
13
;
/**
* Widget that emits `change` event when the element it is applied to gets an keydown event of enter key.
* Primary for IE which does not fire `change` event on `<input>` upon parent form's submission.
* @class TodoEnter
*/
return
declare
(
_WidgetBase
,
{
postCreate
:
function
()
{
this
.
inherited
(
arguments
);
this
.
on
(
'
keydown
'
,
lang
.
hitch
(
this
,
function
(
event
)
{
if
(
event
.
keyCode
===
ENTER_KEY
)
{
this
.
emit
(
'
change
'
);
}
}));
}
});
});
examples/dojo/js/todo/widgets/Todos.js
View file @
1f9c5afc
...
...
@@ -17,7 +17,8 @@ define([
'
../store/TodoLocalStorage
'
,
'
dojox/mvc/Element
'
,
'
dojox/mvc/WidgetList
'
,
'
./CSSToggleWidget
'
'
./CSSToggleWidget
'
,
'
./TodoEnter
'
],
function
(
declare
,
array
,
lang
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment