Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
c018020b
Commit
c018020b
authored
Jun 12, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: make sure related item is presented before set link
parent
77bb7043
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.xml
...eb_page_module/rjs_gadget_erp5_relationstringfield_js.xml
+15
-5
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.xml
View file @
c018020b
...
@@ -266,9 +266,16 @@ promiseEventListener */\n
...
@@ -266,9 +266,16 @@ promiseEventListener */\n
function
setRelationJump(my_gadget,
my_initial_call,
my_selected_value)
{\n
function
setRelationJump(my_gadget,
my_initial_call,
my_selected_value)
{\n
var
props =
my_gadget.property_dict,\n
var
props =
my_gadget.property_dict,\n
field_json =
props.field_json,\n
field_json =
props.field_json,\n
target_url =
my_selected_value
||
field_json.relation_item_relative_url[0]
,\n
target_url =
false
,\n
is_init =
my_initial_call
===
true;\n
is_init =
my_initial_call
===
true;\n
\n
\n
if
(my_selected_value)
{\n
target_url =
my_selected_value;\n
}
else
{\n
if
(field_json.relation_item_relative_url)
{\n
target_url =
field_json.relation_item_relative_url[0];\n
}\n
}\n
if
(target_url
&&
field_json.allow_jump)
{\n
if
(target_url
&&
field_json.allow_jump)
{\n
return
new
RSVP.Queue()\n
return
new
RSVP.Queue()\n
.push(function
()
{\n
.push(function
()
{\n
...
@@ -428,8 +435,11 @@ promiseEventListener */\n
...
@@ -428,8 +435,11 @@ promiseEventListener */\n
var
field_gadget =
this,\n
var
field_gadget =
this,\n
input =
field_gadget.element.querySelector(\'input\'),\n
input =
field_gadget.element.querySelector(\'input\'),\n
field_json =
options.field_json
||
{},\n
field_json =
options.field_json
||
{},\n
value
=
field_json.value
||
field_json.default
;\n
value;\n
\n
\n
if
(field_json.relation_item_relative_url)
{\n
value =
field_json.value
||
field_json.default;\n
}\n
//
expose
field_json
and
keep
last
value
to
prevent
trigger
on
no-change\n
//
expose
field_json
and
keep
last
value
to
prevent
trigger
on
no-change\n
field_gadget.property_dict.field_json =
field_json;\n
field_gadget.property_dict.field_json =
field_json;\n
field_gadget.property_dict.last_value =
value
||
"";\n
field_gadget.property_dict.last_value =
value
||
"";\n
...
@@ -448,7 +458,7 @@ promiseEventListener */\n
...
@@ -448,7 +458,7 @@ promiseEventListener */\n
//
input.setAttribute(\'disabled\',
\'disabled\');\n
//
input.setAttribute(\'disabled\',
\'disabled\');\n
}\n
}\n
\n
\n
if
(
value
)
{\n
if
(
field_json.relation_item_relative_url
)
{\n
return
setRelationJump(field_gadget,
true);\n
return
setRelationJump(field_gadget,
true);\n
}\n
}\n
})\n
})\n
...
@@ -750,7 +760,7 @@ promiseEventListener */\n
...
@@ -750,7 +760,7 @@ promiseEventListener */\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
943.
18921.17173.42154
</string>
</value>
<value>
<string>
943.
42133.40166.22033
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -768,7 +778,7 @@ promiseEventListener */\n
...
@@ -768,7 +778,7 @@ promiseEventListener */\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
143
3215555.91
</float>
<float>
143
4088187.82
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
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