Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
renderjs
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
Ivan Tyagov
renderjs
Commits
7038f89a
Commit
7038f89a
authored
Feb 13, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jqm_4: fixed recursion
parent
bf10906b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
examples/jqm_4/jqm-gadget-recursive.html
examples/jqm_4/jqm-gadget-recursive.html
+4
-2
examples/jqm_4/js/jqm-gadget-recursive.js
examples/jqm_4/js/jqm-gadget-recursive.js
+11
-1
renderjs.js
renderjs.js
+5
-2
No files found.
examples/jqm_4/jqm-gadget-recursive.html
View file @
7038f89a
...
...
@@ -7,8 +7,10 @@
<body>
<p>
HELLO recursive
</p>
<!-- cannot trigger g1 with a regular document binding, because going and forth re-binds into too much recursion-->
<button
type=
"button"
onclick=
"RenderJs.GadgetIndex.getGadgetById('g1').gadget_call1()"
value=
"click me"
id=
"clickediclick"
icon=
"gear"
iconpos=
"left"
data-inline=
"true"
/>
<!-- cannot trigger g1 with a regular document binding, because going and forth re-binds into too much recursion
onclick="RenderJs.GadgetIndex.getGadgetById('g1').gadget_call1()"
-->
<button
type=
"button"
value=
"click me"
id=
"clickediclick"
icon=
"gear"
iconpos=
"left"
data-inline=
"true"
/>
<script
type=
"text/javascript"
language=
"javascript"
>
//
<!
[
CDATA
[
...
...
examples/jqm_4/js/jqm-gadget-recursive.js
View file @
7038f89a
...
...
@@ -4,3 +4,13 @@ var gadget_call2 = function() {
var
gadget_call4
=
function
()
{
console
.
log
(
"
gadget_call4 registered
"
);
}
console
.
log
(
"
hello
"
);
var
btns
=
$
(
'
#clickediclick
'
);
btns
.
filter
(
function
()
{
return
$
(
this
).
data
(
"
bound
"
)
!==
true
;
})
.
data
(
'
bound
'
,
true
)
.
on
(
'
click
'
,
function
()
{
console
.
log
(
"
clicked button
"
);
RenderJs
.
GadgetIndex
.
getGadgetById
(
'
g1
'
).
gadget_call1
();
});
renderjs.js
View file @
7038f89a
...
...
@@ -45,7 +45,10 @@ var RenderJs = (function () {
RenderJs
.
bindReady
(
function
()
{
// examine all Intaction Gadgets and bind accordingly
$
(
"
div[data-gadget-connection]
"
).
each
(
function
(
index
,
element
)
{
$
(
"
div[data-gadget-connection]
"
)
.
filter
(
function
()
{
return
$
(
this
).
data
(
"
bound
"
)
!==
true
;
})
.
data
(
'
bound
'
,
true
)
.
each
(
function
(
index
,
element
)
{
RenderJs
.
InteractionGadget
.
bind
(
$
(
element
));
});
});
...
...
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