Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
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
Hamza
erp5-Boxiang
Commits
ed662e5c
Commit
ed662e5c
authored
Aug 12, 2014
by
Sven Franck
Committed by
Sebastien Robin
Aug 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test for tabs before initiating tabs gadget (wip)
parent
9d87fd5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
54 deletions
+74
-54
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_html.xml
...PathTemplateItem/web_page_module/rjs_gadget_erp5_html.xml
+7
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
...i/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
+66
-45
bt5/erp5_web_renderjs_ui/bt/revision
bt5/erp5_web_renderjs_ui/bt/revision
+1
-1
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_html.xml
View file @
ed662e5c
...
...
@@ -153,11 +153,10 @@
\n
<article></article>
\n
\n
<section
data-gadget-url=
"gadget_jio.html"
\n
data-gadget-scope=
"jio_gadget"
\n
data-gadget-sandbox=
"public"
></section>
\n
<aside>
\n
</aside>
\n
<section
data-gadget-url=
"gadget_jio.html"
\n
data-gadget-scope=
"jio_gadget"
\n
data-gadget-sandbox=
"public"
></section>
\n
<!-- <aside></aside> -->
\n
</body>
\n
</html>
...
...
@@ -282,7 +281,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romai
n
</string>
</value>
<value>
<string>
sve
n
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -296,7 +295,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
936.4
7410.50555.22340
</string>
</value>
<value>
<string>
936.4
9302.26306.5341
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -314,7 +313,7 @@
</tuple>
<state>
<tuple>
<float>
1407
397647.36
</float>
<float>
1407
832402.03
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
View file @
ed662e5c
...
...
@@ -101,8 +101,8 @@
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
/*global rJS, RSVP, jQuery, URI, console */\n
/*jslint nomen: true */\n
/*global rJS, RSVP, jQuery, URI, console
, $
*/\n
/*jslint
indent: 2, maxlen: 80,
nomen: true */\n
(function (rJS, RSVP, URI) {\n
"use strict";\n
\n
...
...
@@ -126,41 +126,41 @@
});\n
});\n
}\n
function renderFrontpage(gadget, options) {\n
\n
function renderFrontpage(gadget, options) {\n
return gadget.props.breadcrumb_gadget.render({title: "ERP5"})\n
.push(function () {\n
return gadget.declareGadget(gadget.props.frontpage_gadget, {\n
scope: "frontpage_gadget"\n
.push(function () {\n
return gadget.declareGadget(gadget.props.frontpage_gadget, {\n
scope: "frontpage_gadget"\n
});\n
})\n
})\n
.push(function (sub_gadget) {\n
.push(function (sub_gadget) {\n
return RSVP.all([\n
sub_gadget.render(),\n
sub_gadget.getElement()\n
]);\n
});\n
});\n
}\n
\n
function renderLoginForm(gadget, options) {\n
\n
return gadget.props.breadcrumb_gadget.render({title: "Login"})\n
.push(function () {\n
return gadget.declareGadget("gadget_erp5_pt_loginform.html", {\n
scope: "login_gadget"\n
.push(function () {\n
return gadget.declareGadget("gadget_erp5_pt_loginform.html", {\n
scope: "login_gadget"\n
});\n
})\n
})\n
.push(function (sub_gadget) {\n
.push(function (sub_gadget) {\n
return RSVP.all([\n
sub_gadget.render(),\n
sub_gadget.getElement()\n
]);\n
});\n
});\n
}\n
\n
function renderJioDocument(gadget, options) {\n
var sub_options,\n
breadcrumb_options = {};\n
\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (jio_gadget) {\n
var jio_key = options.jio_key,\n
...
...
@@ -173,9 +173,13 @@
return jio_gadget.get({"_id": jio_key}, {"_view": view});\n
})\n
.push(function (result) {\n
breadcrumb_options.title = result.data.title || result.data.reference || options.jio_key;\n
var uri;\n
\n
breadcrumb_options.title = result.data.title ||\n
result.data.reference || options.jio_key;\n
breadcrumb_options.parent_link = result.data._links.parent;\n
var uri = new URI(\n
\n
uri = new URI(\n
result.data._embedded._view._links.form_definition.href\n
);\n
// if ((uri.scheme() === "urn") &&\n
...
...
@@ -194,43 +198,55 @@
]);\n
})\n
.push(function (result) {\n
var content_list = [];\n
\n
sub_options = options.form_gadget || {};\n
sub_options.erp5_document = result[0].data;\n
sub_options.form_definition = result[1].data;\n
sub_options.view = options.view;\n
sub_options.action_view = gadget.props.action_view;\n
\n
return gadget.declareGadget("gadget_erp5_pt_" + sub_options.form_definition.pt + ".html", {\n
scope: "form_gadget"\n
});\n
return RSVP.all([\n
gadget.declareGadget("gadget_erp5_pt_" + sub_options.form_definition.pt + ".html", {\n
scope: "form_gadget"\n
}),\n
gadget.declareGadget("gadget_erp5_tab_list.html", {\n
scope: "erp5_tab"\n
})\n
]);\n
})\n
.push(function (gadget_list) {\n
var form_gadget = gadget_list[0],\n
tab_gadget = gadget_list[1],\n
new_content_action = sub_options.erp5_document._links.action_object_new_content_action,\n
plus_queue,\n
new_element;\n
\n
.push(function (form_gadget) {\n
\n
var new_content_action = sub_options.erp5_document._links.action_object_new_content_action,\n
plus_queue;\n
if (new_content_action === undefined) {\n
var
new_element = gadget.__element.querySelector(".ui-icon-plus");\n
new_element.href = "";\n
if (!new_element.classList.contains("ui-disabled")) {\n
new_element.classList.add("ui-disabled");\n
}\n
new_element = gadget.__element.querySelector(".ui-icon-plus");\n
new_element.href = "";\n
if (!new_element.classList.contains("ui-disabled")) {\n
new_element.classList.add("ui-disabled");\n
}\n
} else {\n
// XXX copied from whoWantToDisplayThisPage\n
plus_queue = gadget.aq_pleasePublishMyState({jio_key: gadget.props.jio_key, view: new_content_action.name})\n
.push(function (hash) {\n
var
new_element = gadget.__element.querySelector(".ui-icon-plus");\n
new_element = gadget.__element.querySelector(".ui-icon-plus");\n
new_element.href = hash;\n
new_element.classList.remove("ui-disabled");\n
});\n
}\n
\n
return RSVP.all([\n
tab_gadget.render(sub_options),\n
tab_gadget.getElement(),\n
form_gadget.render(sub_options),\n
form_gadget.getElement(),\n
gadget.props.breadcrumb_gadget.render(breadcrumb_options),\n
plus_queue\n
]);\n
})\n
})
;
\n
}\n
\n
\n
...
...
@@ -345,7 +361,6 @@
queue;\n
\n
if (options.jio_key === undefined) {\n
\n
var new_element = gadget.__element.querySelector(".ui-icon-plus");\n
new_element.href = "";\n
if (!new_element.classList.contains("ui-disabled")) {\n
...
...
@@ -374,20 +389,26 @@
\n
$.mobile.loading(\'show\');\n
return queue\n
.push(function (all_response) {\n
var page_element = all_response[1],\n
element = document.querySelector("article");\n
// XXX JQuery mobile\n
// // $.mobile.loading(\'hide\');\n
.push(function (response_list) {\n
var element = document.querySelector("article"),\n
fragment = document.createDocumentFragment(),\n
i,\n
len,\n
item;\n
\n
// add all HTML nodes to fragment\n
for (i = 0, len = response_list.length; i < len; i += 1) {\n
item = response_list[i] || {};\n
if (item.nodeType && item.nodeType == 1) {\n
fragment.appendChild(item);\n
}\n
}\n
\n
// Append in the DOM at the end to reduce flickering and reduce DOM\n
// modifications\n
// Clear the previous rendering\n
// Clear first to DOM, append after to reduce flickering/manip\n
while (element.firstChild) {\n
element.removeChild(element.firstChild);\n
}\n
element.appendChild(
page_ele
ment);\n
element.appendChild(
frag
ment);\n
\n
$.mobile.loading(\'hide\');\n
return $(element).trigger("create");\n
...
...
@@ -528,7 +549,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romai
n
</string>
</value>
<value>
<string>
sve
n
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -542,7 +563,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
936.
48944.48108.750
</string>
</value>
<value>
<string>
936.
54931.34982.25019
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -560,7 +581,7 @@
</tuple>
<state>
<tuple>
<float>
1407
492633.6
</float>
<float>
1407
849144.68
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/bt/revision
View file @
ed662e5c
50
\ No newline at end of file
51
\ 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