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
bda83e7c
Commit
bda83e7c
authored
May 14, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use require.js to script loading.
parent
eb1dfb50
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
33 deletions
+151
-33
poc/erp5_gadget_interaction/SkinTemplateItem/portal_skins/erp5_gadget_interaction/interactions.xml
...tem/portal_skins/erp5_gadget_interaction/interactions.xml
+15
-23
poc/erp5_gadget_interaction/SkinTemplateItem/portal_skins/erp5_gadget_interaction/main.js.xml
...lateItem/portal_skins/erp5_gadget_interaction/main.js.xml
+48
-0
poc/erp5_gadget_interaction/SkinTemplateItem/portal_skins/erp5_gadget_interaction/require.js.xml
...eItem/portal_skins/erp5_gadget_interaction/require.js.xml
+77
-0
poc/erp5_gadget_interaction/SkinTemplateItem/portal_skins/erp5_gadget_interaction/test_gadgets/B.xml
...m/portal_skins/erp5_gadget_interaction/test_gadgets/B.xml
+10
-9
poc/erp5_gadget_interaction/bt/revision
poc/erp5_gadget_interaction/bt/revision
+1
-1
No files found.
poc/erp5_gadget_interaction/SkinTemplateItem/portal_skins/erp5_gadget_interaction/interactions.xml
View file @
bda83e7c
...
...
@@ -34,35 +34,27 @@
</item>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<unicode>
\074!DOCTYPE html\076\n
\074html\076\n
<value>
<unicode
encoding=
"cdata"
>
<![CDATA[
<!DOCTYPE html>
\n
<html>
\n
\n
\074head\076\n
\074script src="jquery/core/jquery.js"\076\074/script\076\n
\074script src="jquery/plugin/renderjs/renderjs.js"\076\074/script\076\n
<head>
\n
<script
data-main=
"main"
src=
"require.js"
></script>
\n
\n
\074/head\076
\n
</head>
\n
\n
\074body\076
\n
<body>
\n
\n
\074h1\076test\074/h1\076
\n
<h1>
test
</h1>
\n
\n
\074div id="content" gadget="test_gadgets/A"\076\074/div\076\n
<div
id=
"content"
\n
gadget=
"test_gadgets/A"
></div>
\n
\n
\074script type="text/javascript" language="javascript"\076\n
//\074![CDATA[\n
$(document).ready(function() {\n
RenderJs.bootstrap($("#content"));\n
GadgetIndex.getRootGadget().getDom().one("ready", function (){\n
RenderJs.update($("#content"));\n
});\n
});\n
//]]\076\n
\074/script\076\n
\n
\n
\074/body\076\n
\074/html\076
</unicode>
</value>
</body>
\n
</html>
]]>
</unicode>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
...
...
poc/erp5_gadget_interaction/SkinTemplateItem/portal_skins/erp5_gadget_interaction/main.js.xml
0 → 100644
View file @
bda83e7c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts36991431.45
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
main.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/javascript
</string>
</value>
</item>
<item>
<key>
<string>
data
</string>
</key>
<value>
<string>
require(["jquery/core/jquery.js", "jquery/plugin/renderjs/renderjs.js"], function(util) {\n
\n
$(document).ready(function() {\n
RenderJs.bootstrap($("#content"));\n
GadgetIndex.getRootGadget().getDom().one("ready", function (){\n
RenderJs.update($("#content"));\n
});\n
});\n
});
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
303
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
poc/erp5_gadget_interaction/SkinTemplateItem/portal_skins/erp5_gadget_interaction/require.js.xml
0 → 100644
View file @
bda83e7c
This diff is collapsed.
Click to expand it.
poc/erp5_gadget_interaction/SkinTemplateItem/portal_skins/erp5_gadget_interaction/test_gadgets/B.xml
View file @
bda83e7c
...
...
@@ -44,15 +44,16 @@
\n
\074script type="text/javascript" language="javascript"\076\n
//\074![CDATA[\n
$(document).ready(function() {\n
gadget = GadgetIndex.getGadgetById("B");\n
gadget.jsCall1 = function (){alert("B.jscall1");};\n
gadget.jsCall2 = function (){alert("B.jscall2");};\n
gadget.myOwnHtmlEvent1 = function (){\n
$("#hide").toggle();\n
alert("B.myOwnHtmlEvent1");\n
};\n
});\n
$(document).ready(function() {\n
gadget = GadgetIndex.getGadgetById("B");\n
gadget.jsCall1 = function (){alert("B.jscall1");};\n
gadget.jsCall2 = function (){alert("B.jscall2");};\n
gadget.myOwnHtmlEvent1 = function (){\n
$("#hide").toggle();\n
alert("B.myOwnHtmlEvent1");\n
};\n
});\n
\n
//]]\076\n
\074/script\076
</unicode>
</value>
</item>
...
...
poc/erp5_gadget_interaction/bt/revision
View file @
bda83e7c
4
\ No newline at end of file
5
\ 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