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
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
Hide 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 @@
...
@@ -110,12 +110,11 @@
<head>
\n
<head>
\n
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
\n
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
\n
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
\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
\n
<!-- renderjs -->
\n
<!-- renderjs -->
\n
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
\n
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
\n
<script
src=
"renderjs.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
<!-- custom script -->
\n
<script
src=
"gadget_erp5_field_checkbox.js"
type=
"text/javascript"
></script>
\n
<script
src=
"gadget_erp5_field_checkbox.js"
type=
"text/javascript"
></script>
\n
\n
\n
...
@@ -123,7 +122,7 @@
...
@@ -123,7 +122,7 @@
\n
\n
</head>
\n
</head>
\n
<body>
\n
<body>
\n
<input
type=
"checkbox"
class=
"
checkboxradio
"
/>
\n
<input
type=
"checkbox"
class=
"
ui-btn
"
/>
\n
</body>
\n
</body>
\n
</html>
</html>
...
@@ -248,7 +247,7 @@
...
@@ -248,7 +247,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
xiaowu
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -262,7 +261,7 @@
...
@@ -262,7 +261,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -280,8 +279,8 @@
...
@@ -280,8 +279,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14
23479292.73
</float>
<float>
14
35814886.24
</float>
<string>
UTC
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_checkboxfield_js.xml
View file @
ecd90514
...
@@ -99,9 +99,9 @@
...
@@ -99,9 +99,9 @@
</item>
</item>
<item>
<item>
<key>
<string>
text_content
</string>
</key>
<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
/*jslint indent: 2, maxerr: 3 */\n
(function (window, rJS
, loopEventListener
) {\n
(function (window, rJS) {\n
"use strict";\n
"use strict";\n
\n
\n
rJS(window)\n
rJS(window)\n
...
@@ -115,10 +115,12 @@
...
@@ -115,10 +115,12 @@
.declareMethod(\'render\', function (options) {\n
.declareMethod(\'render\', function (options) {\n
var input = this.element.querySelector(\'input\'),\n
var input = this.element.querySelector(\'input\'),\n
field_json = options.field_json || {};\n
field_json = options.field_json || {};\n
input.editable = field_json.editable;\n
input.checked = field_json.value || field_json.default;\n
input.checked = field_json.value || field_json.default;\n
input.setAttribute(\'name\', field_json.key);\n
input.setAttribute(\'name\', field_json.key);\n
input.setAttribute(\'title\', field_json.title);\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
\n
\n
.declareMethod(\'getContent\', function () {\n
.declareMethod(\'getContent\', function () {\n
...
@@ -126,17 +128,8 @@
...
@@ -126,17 +128,8 @@
result = {};\n
result = {};\n
result[input.getAttribute(\'name\')] = (input.checked ? 1 : 0);\n
result[input.getAttribute(\'name\')] = (input.checked ? 1 : 0);\n
return result;\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
});\n
}(window, rJS
, loopEventListener
));
</string>
</value>
}(window, rJS));
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
@@ -257,7 +250,7 @@
...
@@ -257,7 +250,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
xiaowu
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -271,7 +264,7 @@
...
@@ -271,7 +264,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -289,8 +282,8 @@
...
@@ -289,8 +282,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14
23558237.8
</float>
<float>
14
35815104.42
</float>
<string>
UTC
</string>
<string>
GMT+2
</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