Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Gabriel Monnerat
renderjs
Commits
bf10906b
Commit
bf10906b
authored
Feb 13, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jqm_4 examples updated
parent
7325bdca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
examples/jqm_4/jqm-gadget-recursive.html
examples/jqm_4/jqm-gadget-recursive.html
+4
-3
examples/jqm_4/jqm-gadget.html
examples/jqm_4/jqm-gadget.html
+3
-3
examples/jqm_4/js/jqm-gadget.js
examples/jqm_4/js/jqm-gadget.js
+4
-2
No files found.
examples/jqm_4/jqm-gadget-recursive.html
View file @
bf10906b
...
...
@@ -7,14 +7,15 @@
<body>
<p>
HELLO recursive
</p>
<input
type=
"button"
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-->
<button
type=
"button"
onclick=
"RenderJs.GadgetIndex.getGadgetById('g1').gadget_call1()"
value=
"click me"
id=
"clickediclick"
icon=
"gear"
iconpos=
"left"
data-inline=
"true"
/>
<script
type=
"text/javascript"
language=
"javascript"
>
//
<!
[
CDATA
[
$
(
document
).
ready
(
function
()
{
var
g
adget
=
RenderJs
.
GadgetIndex
.
getGadgetById
(
"
g2
"
);
var
g
2
=
RenderJs
.
GadgetIndex
.
getGadgetById
(
"
g2
"
);
console
.
log
(
"
attaching gadget_call2
"
);
g
adget
.
gadget_call2
=
function
(){
gadget_call2
();};
g
2
.
gadget_call2
=
function
(){
gadget_call2
();};
});
//]]>
</script>
...
...
examples/jqm_4/jqm-gadget.html
View file @
bf10906b
...
...
@@ -96,9 +96,9 @@
//
<!
[
CDATA
[
$
(
document
).
ready
(
function
()
{
console
.
log
(
"
attaching gadget_call1 and 3
"
);
gadget
1
=
RenderJs
.
GadgetIndex
.
getGadgetById
(
"
g1
"
);
g
adget
1
.
gadget_call3
=
function
(
e
){
gadget_call3
(
"
test parameter
"
)};
g
adget
1
.
gadget_call1
=
function
(
e
){
gadget_call1
()};
var
g
1
=
RenderJs
.
GadgetIndex
.
getGadgetById
(
"
g1
"
);
g1
.
gadget_call3
=
function
(
e
){
gadget_call3
(
"
test parameter
"
)};
g1
.
gadget_call1
=
function
(
e
){
gadget_call1
()};
});
//]]>
</script>
...
...
examples/jqm_4/js/jqm-gadget.js
View file @
bf10906b
...
...
@@ -4,9 +4,11 @@ var gadget_call1 = function() {
var
gadget_call3
=
function
(
p
)
{
console
.
log
(
"
gadget_call3 registered, parem =
"
+
p
);
}
// trigger does not work!
// trigger
/*
$(document).on('click','#clickediclick',function() {
console.log("click trigger");
var g = RenderJs.GadgetIndex.getGadgetById('g1')
g.gadget_call1();
});
\ No newline at end of file
});
*/
\ No newline at end of file
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