Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
erp5
Commits
69dcc9db
Commit
69dcc9db
authored
May 09, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
register gadgdet in javascript namespace.
parent
51408f04
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
5 deletions
+53
-5
bt5/erp5_jquery_plugin_renderjs/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/renderjs/renderjs.js.xml
..._skins/erp5_jquery/jquery/plugin/renderjs/renderjs.js.xml
+52
-4
bt5/erp5_jquery_plugin_renderjs/bt/revision
bt5/erp5_jquery_plugin_renderjs/bt/revision
+1
-1
No files found.
bt5/erp5_jquery_plugin_renderjs/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/renderjs/renderjs.js.xml
View file @
69dcc9db
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts3
4651695.5
8
</string>
</value>
<value>
<string>
ts3
6567155.
8
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
__name__
</string>
</key>
<key>
<string>
__name__
</string>
</key>
...
@@ -427,6 +427,48 @@ var FormUpdater = {\n
...
@@ -427,6 +427,48 @@ var FormUpdater = {\n
}\n
}\n
}\n
}\n
\n
\n
/*\n
* Javascript Gadget representation\n
*/\n
\n
function Gadget(id, dom){\n
this.id = id;\n
this.dom = dom;\n
};\n
\n
/*\n
* Generic gadget index placeholder\n
*/\n
var GadgetIndex = {\n
\n
gadget_list: [],\n
\n
registerGadget: function(gadget) {\n
/* Register gadget */\n
this.gadget_list.push(gadget);\n
},\n
\n
unregisterGadget: function(gadget) {\n
/* Unregister gadget */\n
// XXX:\n
},\n
\n
getGadgetById: function (gadget_id){\n
/*\n
* Get gadget javascript representation by its Id\n
*/\n
gadget = undefined;\n
$(GadgetIndex.gadget_list).each(\n
function (index, value){\n
if (value.id==gadget_id){\n
gadget = value;\n
};\n
})\n
return gadget;\n
}\n
\n
}\n
\n
/*\n
/*\n
* Generic Gadget library renderer\n
* Generic Gadget library renderer\n
*/\n
*/\n
...
@@ -457,11 +499,17 @@ var RenderJs = {\n
...
@@ -457,11 +499,17 @@ var RenderJs = {\n
loadGadgetFromUrl: function(gadget) {\n
loadGadgetFromUrl: function(gadget) {\n
/* Load gadget\'s SPECs from URL */\n
/* Load gadget\'s SPECs from URL */\n
url = gadget.attr("gadget");\n
url = gadget.attr("gadget");\n
\n
gadget_id = gadget.attr("id");\n
// XXX: based on URL and more ? generate gadget uid?\n
\n
\n
// XXX: How to know how long a form should be cached locally\n
// XXX: How to know how long a form should be cached locally\n
// i.e. what happens if it changes at server side ?\n
// i.e. what happens if it changes at server side ?\n
\n
// register gadgdet in javascript namespace\n
GadgetIndex.registerGadget(new Gadget(gadget_id, gadget));\n
if (url==undefined || url==""){\n
// gadget is an inline one so no need to load it from network\n
return;\n
}\n
\n
\n
// handle caching\n
// handle caching\n
gadget_property = gadget.attr("gadget:property");\n
gadget_property = gadget.attr("gadget:property");\n
...
@@ -553,7 +601,7 @@ var RenderJs = {\n
...
@@ -553,7 +601,7 @@ var RenderJs = {\n
</item>
</item>
<item>
<item>
<key>
<string>
size
</string>
</key>
<key>
<string>
size
</string>
</key>
<value>
<int>
19314
</int>
</value>
<value>
<int>
20277
</int>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_jquery_plugin_renderjs/bt/revision
View file @
69dcc9db
5
6
\ 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