Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
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
officejs
Commits
ca5fcc74
Commit
ca5fcc74
authored
Feb 21, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use proper name for .js library.
parent
4a8de7e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
UNGProject/poc/shopping/_/js/renderjs/renderjs.js
UNGProject/poc/shopping/_/js/renderjs/renderjs.js
+16
-17
UNGProject/poc/shopping/gadget-productdetail.html
UNGProject/poc/shopping/gadget-productdetail.html
+1
-1
No files found.
UNGProject/poc/shopping/_/js/renderjs/render.js
→
UNGProject/poc/shopping/_/js/renderjs/render
js
.js
View file @
ca5fcc74
var
ERP5
=
{
var
RenderJs
=
{
bootstrap
:
function
(
root
){
// load application gadget
ERP5
.
load
(
root
);
//
initial
load application gadget
RenderJs
.
load
(
root
);
},
load
:
function
(
root
)
{
// Load gadget layout by traversing DOM
gadget_list
=
root
.
find
(
"
[gadget]
"
);
// Load
siblings
gadget_list
.
each
(
function
(
i
,
v
){
ERP5
.
loadGadgetFromUrl
(
$
(
this
));});
// Load
chilren
gadget_list
.
each
(
function
(
i
,
v
){
RenderJs
.
loadGadgetFromUrl
(
$
(
this
));});
},
loadGadgetFromUrl
:
function
(
gadget
)
{
...
...
@@ -18,10 +19,10 @@ var ERP5={
//console.log(url);
$
.
ajax
({
url
:
url
,
success
:
function
(
data
)
{
ERP5
.
parse
(
data
);
RenderJs
.
parse
(
data
);
gadget
.
append
(
data
);
// a gadget may contain sub gadgets
ERP5
.
load
(
gadget
);
RenderJs
.
load
(
gadget
);
//console.log(url+ data);
gadget
.
find
(
"
a
"
).
each
(
function
(){
...
...
@@ -36,27 +37,25 @@ var ERP5={
},
// XXX: finish below
save
:
function
()
{
// XXX: Save gadget layoyut by traversing DOM and using some kind of storage
console
.
log
(
"
XXX: save
"
);
},
parse
:
function
(
data
){
// XXX: Parse an HTML document and get out .js and .css
// XXX: load .css
// XXX: load .jss (see requirejs)
//
$.ajax({url:"jquery-ui.js",
//
type: "script"});
//
$.ajax({url:"jquery-ui.js",
//
type: "script"});
},
save
:
function
()
{
// XXX: Save gadget layoyut by traversing DOM and using some kind of storage
console
.
log
(
"
XXX: save
"
);
},
}
// init all when DOM is ready
$
(
document
).
ready
(
function
()
{
ERP5
.
bootstrap
(
$
(
"
#application
"
));
RenderJs
.
bootstrap
(
$
(
"
#application
"
));
});
UNGProject/poc/shopping/gadget-productdetail.html
View file @
ca5fcc74
...
...
@@ -102,7 +102,7 @@
<script
src=
"_/js/functions.js"
></script>
<!-- Gadget library goes here -->
<script
src=
"_/js/renderjs/render.js"
></script>
<script
src=
"_/js/renderjs/render
js
.js"
></script>
<!-- Asynchronous google analytics; this is the official snippet.
...
...
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