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
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
alecs_myu
erp5
Commits
ecd90514
Commit
ecd90514
authored
Jul 02, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: use css for checkbox when it's not editable
parent
61b7c392
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
24 deletions
+16
-24
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_checkboxfield_html.xml
...em/web_page_module/rjs_gadget_erp5_checkboxfield_html.xml
+6
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_checkboxfield_js.xml
...Item/web_page_module/rjs_gadget_erp5_checkboxfield_js.xml
+10
-17
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_checkboxfield_html.xml
View file @
ecd90514
...
...
@@ -110,12 +110,11 @@
<head>
\n
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
\n
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
\n
<title>
ERP5
Stringf
ield
</title>
\n
<title>
ERP5
CheckBoxF
ield
</title>
\n
\n
<!-- renderjs -->
\n
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
\n
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
\n
<script
src=
"gadget_global.js"
type=
"text/javascript"
></script>
\n
<!-- custom script -->
\n
<script
src=
"gadget_erp5_field_checkbox.js"
type=
"text/javascript"
></script>
\n
\n
...
...
@@ -123,7 +122,7 @@
\n
</head>
\n
<body>
\n
<input
type=
"checkbox"
class=
"
checkboxradio
"
/>
\n
<input
type=
"checkbox"
class=
"
ui-btn
"
/>
\n
</body>
\n
</html>
...
...
@@ -248,7 +247,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
xiaowu
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -262,7 +261,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
0.56153.13336.11758
</string>
</value>
<value>
<string>
94
4.6819.59898.35293
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -280,8 +279,8 @@
</tuple>
<state>
<tuple>
<float>
14
23479292.73
</float>
<string>
UTC
</string>
<float>
14
35814886.24
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_checkboxfield_js.xml
View file @
ecd90514
...
...
@@ -99,9 +99,9 @@
</item>
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
/*global window, rJS, RSVP
, loopEventListener
*/\n
<value>
<string>
/*global window, rJS, RSVP */\n
/*jslint indent: 2, maxerr: 3 */\n
(function (window, rJS
, loopEventListener
) {\n
(function (window, rJS) {\n
"use strict";\n
\n
rJS(window)\n
...
...
@@ -115,10 +115,12 @@
.declareMethod(\'render\', function (options) {\n
var input = this.element.querySelector(\'input\'),\n
field_json = options.field_json || {};\n
input.editable = field_json.editable;\n
input.checked = field_json.value || field_json.default;\n
input.setAttribute(\'name\', field_json.key);\n
input.setAttribute(\'title\', field_json.title);\n
if (field_json.editable === 0) {\n
input.setAttribute("class", "ui-btn ui-state-readonly");\n
}\n
})\n
\n
.declareMethod(\'getContent\', function () {\n
...
...
@@ -126,17 +128,8 @@
result = {};\n
result[input.getAttribute(\'name\')] = (input.checked ? 1 : 0);\n
return result;\n
})\n
.declareService(function () {\n
var gadget = this,\n
input = gadget.element.querySelector(\'input\');\n
if (input.editable === 0) {\n
return loopEventListener(input, "click", false, function () {\n
return;\n
});\n
}\n
});\n
}(window, rJS
, loopEventListener
));
</string>
</value>
}(window, rJS));
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
@@ -257,7 +250,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
xiaowu
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -271,7 +264,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
0.57489.27228.3474
7
</string>
</value>
<value>
<string>
94
4.6824.36715.5522
7
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -289,8 +282,8 @@
</tuple>
<state>
<tuple>
<float>
14
23558237.8
</float>
<string>
UTC
</string>
<float>
14
35815104.42
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</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