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
4e6db9db
Commit
4e6db9db
authored
Feb 21, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganise.
parent
4826e374
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
172 additions
and
0 deletions
+172
-0
UNGProject/poc/gadget/erp5-spa.js
UNGProject/poc/gadget/erp5-spa.js
+0
-0
UNGProject/poc/gadget/erp5-spa.js~
UNGProject/poc/gadget/erp5-spa.js~
+59
-0
UNGProject/poc/gadget/htmlparser.js
UNGProject/poc/gadget/htmlparser.js
+0
-0
UNGProject/poc/gadget/index.html
UNGProject/poc/gadget/index.html
+0
-0
UNGProject/poc/gadget/index.html~
UNGProject/poc/gadget/index.html~
+93
-0
UNGProject/poc/gadget/jquery-1.7.1.js
UNGProject/poc/gadget/jquery-1.7.1.js
+0
-0
UNGProject/poc/gadget/jquery-ui.js
UNGProject/poc/gadget/jquery-ui.js
+0
-0
UNGProject/poc/gadget/portal_gadgets/application/asOam
UNGProject/poc/gadget/portal_gadgets/application/asOam
+0
-0
UNGProject/poc/gadget/portal_gadgets/application/asOam~
UNGProject/poc/gadget/portal_gadgets/application/asOam~
+20
-0
UNGProject/poc/gadget/require.js
UNGProject/poc/gadget/require.js
+0
-0
No files found.
UNGProject/
gadget-poc
/erp5-spa.js
→
UNGProject/
poc/gadget
/erp5-spa.js
View file @
4e6db9db
File moved
UNGProject/poc/gadget/erp5-spa.js~
0 → 100644
View file @
4e6db9db
/*
ERP5 dynamic gadget loader
Issues:
- Browser allows load gadgets' file sonly from same origin (conisder use eval?)
-
*/
var ERP5={
load: function () {
// Load gadget layoyut by traversing DOM
application = $("#application")
gadget_list = application.find("[gadget]");
// load application gadget
ERP5.loadGadgetFromUrl(application);
// Load siblings
//gadget_list.each(function(i,v){ERP5.loadGadgetFromUrl($(this));});
},
save: function () {
// XXX: Save gadget layoyut by traversing DOM and using some kind of storage
console.log("save");
},
parse: function (data){
// XXX: Parse an HTML document and get out .js and .css
// $.ajax({url:"jquery-ui.js",
// type: "script"});
},
loadGadgetFromUrl: function(gadget) {
// Load gadget's SPECs from URL
url = gadget.attr("gadget")
$.ajax({url:url,
success: function (data) {
ERP5.parse (data);
gadget.append("<div>" + data + "</div>");
gadget.find("a").each(
function(){
$(this).click(
function(){
alert("disabled"); return false;})}
)
},
});
}
}
// init all when DOM is ready
$(document).ready(function() {
ERP5.load();
});
UNGProject/
gadget-poc
/htmlparser.js
→
UNGProject/
poc/gadget
/htmlparser.js
View file @
4e6db9db
File moved
UNGProject/
gadget-poc
/index.html
→
UNGProject/
poc/gadget
/index.html
View file @
4e6db9db
File moved
UNGProject/poc/gadget/index.html~
0 → 100644
View file @
4e6db9db
<html>
<head>
<title>
Gadget POC
</title>
<script
src=
"jquery-1.7.1.js"
type=
"text/javascript"
></script>
<script
src=
"erp5-spa.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
id=
"application"
gadget=
"portal_gadgets/application/asOam"
gadget:property=
"{}"
>
<div
id=
"navigation"
gadget=
"portal_gadgets/menu/asOam"
gadget:property=
"{}"
gadget:visible=
"true"
>
Navigation
</div>
<div
id=
"main"
gadget=
"portal_gadgets/mode/asOam"
gadget:property=
"{}"
gadget:visible=
"true"
>
<div
id=
"tab"
gadget:type=
"portal_gadgets/tab/asOam"
>
<div
id=
"pad1"
gadget:type=
"portal_gadgets/pad/asOam"
gadget:property=
"{}"
>
PAD1
<div
id=
"column1"
gadget:type=
"portal_gadgets/column/asOam"
gadget:property=
"{}"
>
<div
id=
"box1"
gadget:type=
"portal_gadgets/worklist/asOam"
gadget:property=
"{}"
gadget:movable=
"true"
>
Box1
</div>
<div
id=
"box2"
gadget:type=
"portal_gadgets/contact/asOam"
gadget:property=
"{}"
gadget:movable=
"true"
>
Box2
</div>
</div>
<div
id=
"column2"
gadget:type=
"portal_gadgets/column/asOam"
gadget:property=
"{}"
>
</div>
<div
id=
"column3"
gadget:type=
"portal_gadgets/proxy/asOam"
gadget:property=
"{"
proxy_url
"
:
"
web_page_module
/
default
/
asStrippedHTML
",
"
proxy_dom
"
:
"
#application
.
#main
.
#tab2
.
#column1
.
#map
"
}"
>
</div>
</div>
<div
id=
"pad2"
gadget:type=
"portal_gadgets/pad/asOam"
gadget:property=
"{}"
>
PAD2
<div
id=
"column1"
gadget:type=
"portal_gadgets/column/asOam"
gadget:property=
"{}"
>
</div>
</div>
</div>
</div>
<div
id=
"list"
gadget=
"portal_gadgets/mode/asOam"
gadget:property=
"{}"
>
<div
id=
"action"
gadget=
"portal_gadgets/action/asOam"
gadget:property=
"{}"
>
</div>
<div
id=
"list"
gadget=
"portal_gadgets/list/asOam"
gadget:property=
"{}"
>
</div>
<div
id=
"dialog"
gadget=
"portal_gadgets/dialog/asOam"
gadget:property=
"{}"
>
</div>
</div>
<div
id=
"view"
gadget=
"portal_gadgets/mode/asOam"
gadget:property=
"{}"
>
<div
id=
"action"
gadget=
"portal_gadgets/action/asOam"
gadget:property=
"{}"
>
</div>
<div
id=
"view"
gadget=
"portal_gadgets/view/asOam"
gadget:property=
"{}"
>
</div>
<div
id=
"dialog"
gadget=
"portal_gadgets/dialog/asOam"
gadget:property=
"{}"
>
</div>
</div>
</div>
</body>
</html>
UNGProject/
gadget-poc
/jquery-1.7.1.js
→
UNGProject/
poc/gadget
/jquery-1.7.1.js
View file @
4e6db9db
File moved
UNGProject/
gadget-poc
/jquery-ui.js
→
UNGProject/
poc/gadget
/jquery-ui.js
View file @
4e6db9db
File moved
UNGProject/
gadget-poc
/portal_gadgets/application/asOam
→
UNGProject/
poc/gadget
/portal_gadgets/application/asOam
View file @
4e6db9db
File moved
UNGProject/poc/gadget/portal_gadgets/application/asOam~
0 → 100644
View file @
4e6db9db
<html>
<head>
<title>
Gadget POC
</title>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"
type=
"text/javascript"
></script>
</head>
<script>
$
(
function
()
{
$
(
"
#datepicker
"
).
datepicker
();
});
</script>
<body>
<div
id=
"datepicker"
>
<p>
Simple
<a
href=
"http://www.apple.com/toto"
>
body
</a>
ggg
</p>
</div>
</body>
</html>
\ No newline at end of file
UNGProject/
gadget-poc
/require.js
→
UNGProject/
poc/gadget
/require.js
View file @
4e6db9db
File moved
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