Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
4c7e68d3
Commit
4c7e68d3
authored
May 14, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend API and add testing for it.
parent
9e95412f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
11 deletions
+50
-11
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
+13
-6
bt5/erp5_jquery_plugin_renderjs/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/renderjs/renderjs_test.js.xml
...s/erp5_jquery/jquery/plugin/renderjs/renderjs_test.js.xml
+36
-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 @
4c7e68d3
...
...
@@ -12,7 +12,7 @@
</item>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts3
6997821.03
</string>
</value>
<value>
<string>
ts3
7002880.65
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
@@ -520,13 +520,20 @@ var GadgetIndex = {\n
},\n
\n
registerGadget: function(gadget) {\n
/* Register gadget */\n
/*\n
* Register gadget\n
*/\n
this.gadget_list.push(gadget);\n
},\n
\n
unregisterGadget: function(gadget) {\n
/* Unregister gadget */\n
// XXX:\n
/*\n
* Unregister gadget\n
*/\n
index = jQuery.inArray(gadget, this.gadget_list);\n
if (index!=-1) {\n
this.gadget_list.splice(index, 1);\n
} \n
},\n
\n
getGadgetById: function (gadget_id){\n
...
...
@@ -718,7 +725,7 @@ var RenderJs = {\n
is_gadget_list_loaded = GadgetIndex.isGadgetListLoaded();\n
if (is_gadget_list_loaded){\n
if (!is_ready) {\n
console.log("trigger");\n
//
console.log("trigger");\n
GadgetIndex.getRootGadget().getDom().trigger("ready");\n
}\n
is_ready = true;\n
...
...
@@ -762,7 +769,7 @@ var RenderJs = {\n
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
25
230
</int>
</value>
<value>
<int>
25
373
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_jquery_plugin_renderjs/PathTemplateItem/portal_skins/erp5_jquery/jquery/plugin/renderjs/renderjs_test.js.xml
View file @
4c7e68d3
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts3
3622213.73
</string>
</value>
<value>
<string>
ts3
7003035.66
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
@@ -20,7 +20,9 @@
</item>
<item>
<key>
<string>
data
</string>
</key>
<value>
<string>
function setupRenderJSTest(){\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
function setupRenderJSTest(){\n
/*\n
* Main RenderJS test entry point\n
*/\n
...
...
@@ -32,15 +34,45 @@
deepEqual(data, Cache.get(cache_id));\n
});\n
\n
\n
module("TabularGadget");\n
test(\'addNewTabGadget\', function(){\n
TabbularGadget.addNewTabGadget("Person_view", "qunit-fixture", "FormUpdater.update");\n
equal($("#qunit-fixture").children(".gadget").length, 1);\n
equal(GadgetIndex.getGadgetList().length, 1);\n
\n
});\n
\n
module("GadgetIndex");\n
test(\'GadgetIndex\', function(){\n
// re-init GadgetIndex\n
$.each(GadgetIndex.getGadgetList(), function () {\n
GadgetIndex.unregisterGadget(this);\n
});\n
\n
$("#qunit-fixture").append(\'<div gadget="" id="new">
XXXXXXXXXXXX
</div>
\');\n
RenderJs.bootstrap($("#qunit-fixture"));\n
GadgetIndex.getRootGadget().getDom().one("ready", function (){\n
RenderJs.update($("#qunit-fixture"));\n
});\n
equal(GadgetIndex.getGadgetList().length, 2);\n
equal(true, GadgetIndex.isGadgetListLoaded());\n
equal($("#qunit-fixture").attr("id"), GadgetIndex.getRootGadget().getDom().attr("id"));\n
equal(GadgetIndex.getGadgetById("qunit-fixture"), GadgetIndex.getRootGadget());\n
\n
// unregister gadget\n
GadgetIndex.unregisterGadget(GadgetIndex.getGadgetById("qunit-fixture"));\n
equal(GadgetIndex.getGadgetList().length, 1);\n
equal(GadgetIndex.getGadgetById("new"), GadgetIndex.getRootGadget());\n
\n
\n
});\n
\n
};\n
\n
</string>
</value>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
...
...
@@ -48,7 +80,7 @@
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
54
5
</int>
</value>
<value>
<int>
175
5
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_jquery_plugin_renderjs/bt/revision
View file @
4c7e68d3
12
\ No newline at end of file
13
\ 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