Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
729cb937
Commit
729cb937
authored
Jan 09, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add title translation in listbox gadget
parent
2b842d3a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
21 deletions
+25
-21
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
...mplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
+25
-21
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
729cb937
...
@@ -119,7 +119,6 @@
...
@@ -119,7 +119,6 @@
// Init local properties\n
// Init local properties\n
.ready(function (g) {\n
.ready(function (g) {\n
g.props = {};\n
g.props = {};\n
\n
})\n
})\n
\n
\n
// Assign the element to a variable\n
// Assign the element to a variable\n
...
@@ -145,6 +144,7 @@
...
@@ -145,6 +144,7 @@
thead = gadget.props.element.querySelector(\'thead\'),\n
thead = gadget.props.element.querySelector(\'thead\'),\n
field_json = options.field_json,\n
field_json = options.field_json,\n
tr = document.createElement("tr"),\n
tr = document.createElement("tr"),\n
document_table = gadget.props.element.querySelector(\'.document_table\'),\n
th,\n
th,\n
i;\n
i;\n
\n
\n
...
@@ -159,6 +159,13 @@
...
@@ -159,6 +159,13 @@
tr.appendChild(th);\n
tr.appendChild(th);\n
}\n
}\n
thead.appendChild(tr);\n
thead.appendChild(tr);\n
return new RSVP.Queue()\n
.push(function () {\n
return gadget.translateHtml(document_table.innerHTML);\n
})\n
.push(function (my_translate_html) {\n
document_table.innerHTML = my_translate_html;\n
});\n
})\n
})\n
\n
\n
//////////////////////////////////////////////\n
//////////////////////////////////////////////\n
...
@@ -282,7 +289,7 @@
...
@@ -282,7 +289,7 @@
\n
\n
paging_prev.className = "ui-btn ui-icon-carat-l ui-btn-icon-left responsive ui-first-child";\n
paging_prev.className = "ui-btn ui-icon-carat-l ui-btn-icon-left responsive ui-first-child";\n
paging_prev.textContent = "Previous";\n
paging_prev.textContent = "Previous";\n
paging_prev.setAttribute("data-i18n", "
p
revious");\n
paging_prev.setAttribute("data-i18n", "
P
revious");\n
paging_prev.href = url_list[0];\n
paging_prev.href = url_list[0];\n
paging_info.className = "ui-btn ui-disabled";\n
paging_info.className = "ui-btn ui-disabled";\n
if ((begin_from === 0)
&&
(counter === 0)) {\n
if ((begin_from === 0)
&&
(counter === 0)) {\n
...
@@ -300,7 +307,7 @@
...
@@ -300,7 +307,7 @@
// paging_info.textContent = "Page " + ((begin_from + lines) / lines);\n
// paging_info.textContent = "Page " + ((begin_from + lines) / lines);\n
paging_next.className = "ui-btn ui-icon-carat-r ui-btn-icon-right responsive ui-last-child";\n
paging_next.className = "ui-btn ui-icon-carat-r ui-btn-icon-right responsive ui-last-child";\n
paging_next.textContent = "Next";\n
paging_next.textContent = "Next";\n
paging_next.setAttribute("data-i18n", "
n
ext");\n
paging_next.setAttribute("data-i18n", "
N
ext");\n
paging_next.href = url_list[1];\n
paging_next.href = url_list[1];\n
\n
\n
if (begin_from === 0) {\n
if (begin_from === 0) {\n
...
@@ -323,18 +330,15 @@
...
@@ -323,18 +330,15 @@
for (len = table.children.length; len > 0; len -= 1) {\n
for (len = table.children.length; len > 0; len -= 1) {\n
table.removeChild(table.lastChild);\n
table.removeChild(table.lastChild);\n
}\n
}\n
\n
// NOTE: for passing translations, temp must contain a table\n
// NOTE: for passing translations, temp must contain a table\n
temp_table.appendChild(fragment);\n
temp_table.appendChild(fragment);\n
temp.appendChild(temp_table);\n
temp.appendChild(temp_table);\n
\n
return gadget.translateHtml(temp.innerHTML);\n
return gadget.translateHtml(temp.innerHTML);\n
})\n
})\n
.push(function (my_translated_html) {\n
.push(function (my_translated_html) {\n
var new_body,\n
var new_body,\n
new_foot,\n
new_foot,\n
temp = document.createElement("div");\n
temp = document.createElement("div");\n
\n
temp.innerHTML = my_translated_html;\n
temp.innerHTML = my_translated_html;\n
new_body = temp.querySelector("tbody");\n
new_body = temp.querySelector("tbody");\n
new_foot = temp.querySelector("tfoot");\n
new_foot = temp.querySelector("tfoot");\n
...
@@ -467,7 +471,7 @@
...
@@ -467,7 +471,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
super_sven
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -481,7 +485,7 @@
...
@@ -481,7 +485,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
940.
2151.12481.15257
</string>
</value>
<value>
<string>
940.
11535.19754.41932
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -499,8 +503,8 @@
...
@@ -499,8 +503,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1420
243220.12
</float>
<float>
1420
800963.59
</float>
<string>
GMT
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
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