Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cloud-quote
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
cloud-quote
Commits
4f62489e
Commit
4f62489e
authored
Apr 18, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor - autonomize
parent
c9aeaf90
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
12565 additions
and
181 deletions
+12565
-181
gadgets/about.html
gadgets/about.html
+0
-1
gadgets/header.html
gadgets/header.html
+7
-33
gadgets/index_wrapper.html
gadgets/index_wrapper.html
+3
-7
gadgets/legal_wrapper.html
gadgets/legal_wrapper.html
+0
-3
gadgets/translate.html
gadgets/translate.html
+110
-115
js/controller.js
js/controller.js
+16
-16
js/libs/jqm/jqm.js
js/libs/jqm/jqm.js
+11486
-4
js/plugins/renderjs/_renderjs.js
js/plugins/renderjs/_renderjs.js
+4
-0
js/plugins/renderjs/renderjs.js
js/plugins/renderjs/renderjs.js
+939
-1
p/index.html
p/index.html
+0
-1
No files found.
gadgets/about.html
View file @
4f62489e
...
...
@@ -14,7 +14,6 @@
@media
all
and
(
min-width
:
60em
)
{
#about_info
.about_element_wrapper
{
max-width
:
70%
;}
}
</style>
</head>
<body>
...
...
gadgets/header.html
View file @
4f62489e
...
...
@@ -24,43 +24,17 @@
<script
type=
"text/javascript"
>
//
<!
[
CDATA
[
(
function
()
{
var
gadget
=
RenderJs
.
getSelfGadget
(),
recursive_gadgets
=
gadget
.
dom
.
find
(
"
[data-gadget]
"
).
not
(
"
.main-interactor
"
),
len
=
recursive_gadgets
.
length
;
/* initialize translation */
var
gadget
=
RenderJs
.
getSelfGadget
();
recursive_gadgets
.
each
(
function
(
i
)
{
var
passJSON
=
gadget
[
$
(
this
).
attr
(
'
id
'
)],
string
,
new_string
,
current_id
=
$
(
this
).
attr
(
'
id
'
),
new_id
=
current_id
+
"
__
"
+
gadget
.
dom
.
attr
(
'
id
'
);
// pass on JSON if present BEFORE modifying gadget-id
if
(
passJSON
!==
undefined
)
{
$
(
this
).
attr
(
'
data-gadget-property
'
,
'
{"self":
'
+
JSON
.
stringify
(
passJSON
)
+
'
}
'
);
RenderJs
.
bindReady
(
function
()
{
// trigger create
if
(
gadget
.
isEnhanced
()
===
undefined
||
gadget
.
isEnhanced
()
===
false
)
{
gadget
.
dom
.
trigger
(
"
create
"
);
}
// dynamic gadget-id
$
(
this
).
attr
(
'
id
'
,
new_id
);
// update interactions
string
=
gadget
.
dom
.
find
(
"
.main-interactor
"
).
attr
(
"
data-gadget-connection
"
);
new_string
=
string
.
replace
(
current_id
,
new_id
);
gadget
.
dom
.
find
(
"
.main-interactor
"
).
attr
(
"
data-gadget-connection
"
,
new_string
);
});
// modify gadget
if
(
gadget
.
self
!==
undefined
)
{
for
(
key
in
gadget
.
self
)
{
if
(
gadget
.
self
.
hasOwnProperty
(
key
))
{
gadget
.
dom
.
find
(
key
).
attr
(
gadget
.
self
[
key
][
0
],
gadget
.
self
[
key
][
1
]);
}
}
}
$
(
document
).
ready
(
function
()
{
// trigger enhancement
$
(
this
).
trigger
(
"
render_enhance
"
,
{
gadget
:
gadget
.
dom
});
});
$
(
document
).
ready
(
function
()
{
});
})();
//]]>
</script>
...
...
gadgets/index_wrapper.html
View file @
4f62489e
...
...
@@ -4,13 +4,9 @@
<head>
</head>
<body>
<div
id=
"
index_
configure"
data-gadget=
"../gadgets/configure.html"
></div>
<div
id=
"
index_
social"
data-gadget=
"../gadgets/social.html"
></div>
<div
id=
"
index_
nav"
data-gadget=
"../gadgets/navigation.html"
></div>
<div
id=
"configure"
data-gadget=
"../gadgets/configure.html"
></div>
<div
id=
"social"
data-gadget=
"../gadgets/social.html"
></div>
<div
id=
"nav"
data-gadget=
"../gadgets/navigation.html"
></div>
<p
class=
"mini t"
data-i18n=
"gen.disclaimer"
></p>
<!-- interactions -->
<div
data-gadget=
""
class=
"main-interactor"
data-gadget-connection=
"[]"
>
</body>
</html>
\ No newline at end of file
gadgets/legal_wrapper.html
View file @
4f62489e
...
...
@@ -13,8 +13,5 @@
<div
id=
"legal_info"
data-gadget=
"../gadgets/legal.html"
></div>
<div
id=
"legal_social"
data-gadget=
"../gadgets/social.html"
></div>
<div
id=
"legal_nav"
data-gadget=
"../gadgets/navigation.html"
></div>
<!-- interactions -->
<div
data-gadget=
""
class=
"main-interactor"
data-gadget-connection=
"[]"
>
</body>
</html>
\ No newline at end of file
gadgets/translate.html
View file @
4f62489e
This diff is collapsed.
Click to expand it.
js/controller.js
View file @
4f62489e
...
...
@@ -178,22 +178,22 @@ define([], function () {
// enhancing gadgets when everyone else is done
.
on
(
'
render_enhance
'
,
function
(
e
,
data
)
{
var
timer
;
data
.
gadget
.
trigger
(
"
create
"
);
// controlgroups inside popups
// this is a JQM controlgroup problem. Controlgroups include other widgets,
// so they are enhanced last after everything else has been enhanced.
// when inserting items dynamically and calling create, all widgets get
// enhanced, except for controlgroups which somestimes do, sometimes don't
// work. This is to make sure they work
// TODO: Find a better way
if
(
data
.
pops
)
{
timer
=
window
.
setTimeout
(
function
()
{
$
(
'
fieldset:jqmData(role="controlgroup")
'
).
parent
().
trigger
(
"
create
"
);
window
.
clearTimeout
(
timer
);
},
1000
);
}
//
var timer;
// //
data.gadget.trigger("create");
//
// controlgroups inside popups
//
// this is a JQM controlgroup problem. Controlgroups include other widgets,
//
// so they are enhanced last after everything else has been enhanced.
//
// when inserting items dynamically and calling create, all widgets get
//
// enhanced, except for controlgroups which somestimes do, sometimes don't
//
// work. This is to make sure they work
//
// TODO: Find a better way
//
if (data.pops) {
//
timer = window.setTimeout(function () {
//
$('fieldset:jqmData(role="controlgroup")').parent().trigger("create");
//
window.clearTimeout(timer);
//
},1000);
//
}
//
// when first gadget is ready, remove the splash scren
$
(
window
).
trigger
(
'
initLoaded
'
);
});
...
...
js/libs/jqm/jqm.js
View file @
4f62489e
This diff is collapsed.
Click to expand it.
js/plugins/renderjs/_renderjs.js
View file @
4f62489e
...
...
@@ -691,6 +691,10 @@ var RenderJs = (function () {
};
}()),
Properties
:
{
foo
:
"
bar
"
},
InteractionGadget
:
(
function
()
{
/*
* Basic gadget interaction gadget implementation.
...
...
js/plugins/renderjs/renderjs.js
View file @
4f62489e
This diff is collapsed.
Click to expand it.
p/index.html
View file @
4f62489e
...
...
@@ -15,7 +15,6 @@
<div
id=
"index_header"
data-gadget=
"../gadgets/header.html"
data-gadget-property=
'{"self": {"h1": ["data-i18n", "pages.titles.main"]}, "translator": {"a.setIcon": ["href", "#popup_index_lang"], "div.all_popups": ["id","popup_index_lang"]}}'
></div>
<div
data-role=
"content"
>
<div
id=
"index_wrapper"
data-gadget=
"../gadgets/index_wrapper.html"
></div>
<div
data-gadget=
""
class=
"main-interactor"
data-gadget-connection=
"[{"source": "index_header.translate", "destination": "index_wrapper.translate"}]"
></div>
</div>
</div>
</body>
...
...
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