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
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
Iliya Manolov
erp5
Commits
434d958d
Commit
434d958d
authored
May 10, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix improper function usage.
parent
db585eae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
14 deletions
+23
-14
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
+22
-13
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 @
434d958d
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts3665
2259.54
</string>
</value>
<value>
<string>
ts3665
3640.49
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
__name__
</string>
</key>
<key>
<string>
__name__
</string>
</key>
...
@@ -196,13 +196,20 @@ var Form = {\n
...
@@ -196,13 +196,20 @@ var Form = {\n
}\n
}\n
},\n
},\n
\n
\n
addOptionTagList: function (index, value) {\n
addOptionTagList: function (select_dom, item_list, field_value) {\n
if(value[1]===field_value){\n
/*\n
select_dom.append(\'
<option
selected
value=
"\' + value[1] + \'"
>
\' + value[0] + \'
</option>
\');}\n
* Update select like dom element\n
else{\n
*/\n
select_dom.append(\'
<option
value=
"\' + value[1] + \'"
>
\' + value[0] + \'
</option>
\'); }\n
$.each(item_list, function (index, value){\n
if(value[1]===field_value) {\n
select_dom.append(\'
<option
selected
value=
"\' + value[1] + \'"
>
\' + value[0] + \'
</option>
\');\n
}\n
else {\n
select_dom.append(\'
<option
value=
"\' + value[1] + \'"
>
\' + value[0] + \'
</option>
\');\n
}\n
});\n
},\n
},\n
\n
\n
BaseInputField: function (field_id, field_dict) {\n
BaseInputField: function (field_id, field_dict) {\n
/* HTML based input field */\n
/* HTML based input field */\n
var dom, display_width;\n
var dom, display_width;\n
...
@@ -216,6 +223,7 @@ var Form = {\n
...
@@ -216,6 +223,7 @@ var Form = {\n
\n
\n
EditorField: function (field_id, field_dict) {\n
EditorField: function (field_id, field_dict) {\n
/* HTML based input field */\n
/* HTML based input field */\n
var dom;\n
dom = $("#" + Form.getFieldId(field_id));\n
dom = $("#" + Form.getFieldId(field_id));\n
Form.updateField(dom, field_dict);\n
Form.updateField(dom, field_dict);\n
return dom;\n
return dom;\n
...
@@ -223,19 +231,20 @@ var Form = {\n
...
@@ -223,19 +231,20 @@ var Form = {\n
\n
\n
ListField: function (field_id, field_dict) {\n
ListField: function (field_id, field_dict) {\n
/* Select field */\n
/* Select field */\n
//var field_value; // uncommenting makes a local variable and affects other parts of code!!!
\n
var field_value, select_dom;
\n
field_value = field_dict.value;\n
field_value = field_dict.value;\n
select_dom = $("select[name=" + Form.getFieldId(field_id) + "]");\n
select_dom = $("select[name=" + Form.getFieldId(field_id) + "]");\n
$.each(field_dict.items, Form.addOptionTagList
);\n
Form.addOptionTagList(select_dom, field_dict.items, field_value
);\n
return select_dom; \n
return select_dom; \n
},\n
},\n
\n
\n
ParallelListField: function (field_id, field_dict) {\n
ParallelListField: function (field_id, field_dict) {\n
/* mutiple select fields */\n
/* mutiple select fields */\n
var field_value, select_dom; \n
// XXX: we render only first value but it can be many how to get them ?\n
// XXX: we render only first value but it can be many how to get them ?\n
field_value = field_dict.value[0];\n
field_value = field_dict.value[0];\n
select_dom = $("select[name=subfield_field_" + field_id + "]");\n
select_dom = $("select[name=subfield_field_" + field_id + "]");\n
$.each(field_dict.items, Form.addOptionTagList
);\n
Form.addOptionTagList(select_dom, field_dict.items, field_value
);\n
return select_dom;\n
return select_dom;\n
},\n
},\n
\n
\n
...
@@ -272,7 +281,7 @@ var Form = {\n
...
@@ -272,7 +281,7 @@ var Form = {\n
\n
\n
DateTimeField: function (field_id, field_dict) {\n
DateTimeField: function (field_id, field_dict) {\n
/* DateTimeField field */\n
/* DateTimeField field */\n
var date;\n
var date
, dom
;\n
dom = $("[name=" + Form.getFieldId(field_id) + "]");\n
dom = $("[name=" + Form.getFieldId(field_id) + "]");\n
date = field_dict.value;\n
date = field_dict.value;\n
date = new Date(date);\n
date = new Date(date);\n
...
@@ -595,7 +604,7 @@ var RenderJs = {\n
...
@@ -595,7 +604,7 @@ var RenderJs = {\n
},\n
},\n
\n
\n
updateGadgetWithDataHandler: function (result) {\n
updateGadgetWithDataHandler: function (result) {\n
//
var data_handler;\n
var data_handler;\n
data_handler = this.yourCustomData.data_handler;\n
data_handler = this.yourCustomData.data_handler;\n
if (data_handler!==undefined){\n
if (data_handler!==undefined){\n
eval(data_handler+ "(result)");\n
eval(data_handler+ "(result)");\n
...
@@ -626,7 +635,7 @@ var RenderJs = {\n
...
@@ -626,7 +635,7 @@ var RenderJs = {\n
</item>
</item>
<item>
<item>
<key>
<string>
size
</string>
</key>
<key>
<string>
size
</string>
</key>
<value>
<int>
21
227
</int>
</value>
<value>
<int>
21
530
</int>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_jquery_plugin_renderjs/bt/revision
View file @
434d958d
7
8
\ No newline at end of file
\ 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