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
Levin Zimmermann
erp5
Commits
6712435f
Commit
6712435f
authored
Nov 07, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] RelationField: transmit document UID id known
parent
40a3804e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
18 deletions
+27
-18
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
...TemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.js
...age_module/rjs_gadget_erp5_multirelationstringfield_js.js
+3
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.xml
...ge_module/rjs_gadget_erp5_multirelationstringfield_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.html
.../web_page_module/rjs_gadget_erp5_relation_input_html.html
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.xml
...m/web_page_module/rjs_gadget_erp5_relation_input_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.js
...Item/web_page_module/rjs_gadget_erp5_relation_input_js.js
+9
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.xml
...tem/web_page_module/rjs_gadget_erp5_relation_input_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.js
...web_page_module/rjs_gadget_erp5_relationstringfield_js.js
+3
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.xml
...eb_page_module/rjs_gadget_erp5_relationstringfield_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
View file @
6712435f
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
CACHE MANIFEST\n
CACHE MANIFEST\n
# generated on
Wed, 03 Nov 2016 16
:00:00 GMT\n
# generated on
Mon, 07 Nov 2016 10
:00:00 GMT\n
# XXX + fonts\n
# XXX + fonts\n
# images/ajax-loader.gif\n
# images/ajax-loader.gif\n
CACHE:\n
CACHE:\n
...
@@ -366,7 +366,7 @@ NETWORK:\n
...
@@ -366,7 +366,7 @@ NETWORK:\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.
2249.38182.56985
</string>
</value>
<value>
<string>
955.
7684.22445.34560
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -384,7 +384,7 @@ NETWORK:\n
...
@@ -384,7 +384,7 @@ NETWORK:\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1478
191304.27
</float>
<float>
1478
515550.48
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.js
View file @
6712435f
...
@@ -206,6 +206,9 @@
...
@@ -206,6 +206,9 @@
if
(
input_result
.
value_portal_type
)
{
if
(
input_result
.
value_portal_type
)
{
result
[
gadget
.
state
.
relation_field_id
+
'
_
'
+
k
]
=
result
[
gadget
.
state
.
relation_field_id
+
'
_
'
+
k
]
=
"
_newContent_
"
+
input_result
.
value_portal_type
;
"
_newContent_
"
+
input_result
.
value_portal_type
;
}
else
if
(
input_result
.
value_uid
)
{
result
[
gadget
.
state
.
relation_field_id
+
'
_
'
+
k
]
=
input_result
.
value_uid
;
}
}
result
[
gadget
.
state
.
key
].
push
(
input_result
.
value_text
);
result
[
gadget
.
state
.
key
].
push
(
input_result
.
value_text
);
}
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multirelationstringfield_js.xml
View file @
6712435f
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.576
74.49472.38673
</string>
</value>
<value>
<string>
954.576
99.3960.12356
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
7584183.47
</float>
<float>
147
8513065.68
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.html
View file @
6712435f
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
{{
#
if
list
.
length
}}
{{
#
if
list
.
length
}}
<!--
li
class
=
"
ui-autocomplete ui-li ui-li-divider ui-bar-inherit ui-first-child
"
role
=
"
heading
"
>
Select
from
the
{{
list
.
length
}}
Search
Results
<
/li--
>
<!--
li
class
=
"
ui-autocomplete ui-li ui-li-divider ui-bar-inherit ui-first-child
"
role
=
"
heading
"
>
Select
from
the
{{
list
.
length
}}
Search
Results
<
/li--
>
{{
#
each
list
}}
{{
#
each
list
}}
<
li
class
=
"
ui-li-static ui-body-inherit ui-icon-mail-forward ui-btn-icon-right
"
data
-
relative
-
url
=
{{
id
}}
>
{{
value
}}
<
/li
>
<
li
class
=
"
ui-li-static ui-body-inherit ui-icon-mail-forward ui-btn-icon-right
"
data
-
relative
-
url
=
"
{{id}}
"
data
-
uid
=
"
{{uid}}
"
>
{{
value
}}
<
/li
>
{{
/
each
}}
{{
/
each
}}
{{
#
each
type
}}
{{
#
each
type
}}
<
li
class
=
"
ui-li-static ui-body-inherit ui-bar-inherit ui-icon-plus ui-btn-icon-right
"
data
-
create
-
object
=
"
{{this}}
"
name
=
"
{{this}}
"
>
Create
New
{{
this
}}:
{{..
/
value
}}
<
/li
>
<
li
class
=
"
ui-li-static ui-body-inherit ui-bar-inherit ui-icon-plus ui-btn-icon-right
"
data
-
create
-
object
=
"
{{this}}
"
name
=
"
{{this}}
"
>
Create
New
{{
this
}}:
{{..
/
value
}}
<
/li
>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_html.xml
View file @
6712435f
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.54399.20164.63317
</string>
</value>
<value>
<string>
95
5.7622.39581.2525
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
7475951.
1
</float>
<float>
147
8511768.9
1
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.js
View file @
6712435f
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
// uid is known
// uid is known
// User selected a document from a listbox
// User selected a document from a listbox
if
(
gadget
.
state
.
value_uid
)
{
if
(
(
gadget
.
state
.
value_uid
)
&&
(
!
gadget
.
state
.
value_text
)
)
{
plane
.
className
=
SEARCHING_CLASS_STR
;
plane
.
className
=
SEARCHING_CLASS_STR
;
return
gadget
.
jio_allDocs
({
return
gadget
.
jio_allDocs
({
"
query
"
:
Query
.
objectToSearchText
(
new
SimpleQuery
({
"
query
"
:
Query
.
objectToSearchText
(
new
SimpleQuery
({
...
@@ -155,8 +155,7 @@
...
@@ -155,8 +155,7 @@
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
return
gadget
.
changeState
({
return
gadget
.
changeState
({
value_text
:
result
.
data
.
rows
[
0
]
value_text
:
result
.
data
.
rows
[
0
]
.
value
[
gadget
.
state
.
catalog_index
],
.
value
[
gadget
.
state
.
catalog_index
]
value_uid
:
null
});
});
});
});
}
}
...
@@ -230,7 +229,7 @@
...
@@ -230,7 +229,7 @@
]
]
})),
})),
limit
:
[
0
,
10
],
limit
:
[
0
,
10
],
select_list
:
[
gadget
.
state
.
catalog_index
]
select_list
:
[
gadget
.
state
.
catalog_index
,
"
uid
"
]
});
});
})
})
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
...
@@ -245,7 +244,8 @@
...
@@ -245,7 +244,8 @@
for
(
i
=
0
;
i
<
result
.
data
.
rows
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
result
.
data
.
rows
.
length
;
i
+=
1
)
{
list
.
push
({
list
.
push
({
id
:
result
.
data
.
rows
[
i
].
id
,
id
:
result
.
data
.
rows
[
i
].
id
,
value
:
result
.
data
.
rows
[
i
].
value
[
gadget
.
state
.
catalog_index
]
value
:
result
.
data
.
rows
[
i
].
value
[
gadget
.
state
.
catalog_index
],
uid
:
result
.
data
.
rows
[
i
].
value
.
uid
});
});
}
}
plane
.
className
=
JUMP_UNKNOWN_CLASS_STR
;
plane
.
className
=
JUMP_UNKNOWN_CLASS_STR
;
...
@@ -268,7 +268,8 @@
...
@@ -268,7 +268,8 @@
result
=
{
result
=
{
value_relative_url
:
gadget
.
state
.
value_relative_url
,
value_relative_url
:
gadget
.
state
.
value_relative_url
,
value_text
:
gadget
.
state
.
value_text
,
value_text
:
gadget
.
state
.
value_text
,
value_portal_type
:
gadget
.
state
.
value_portal_type
value_portal_type
:
gadget
.
state
.
value_portal_type
,
value_uid
:
gadget
.
state
.
value_uid
};
};
}
}
return
result
;
return
result
;
...
@@ -310,6 +311,7 @@
...
@@ -310,6 +311,7 @@
// Check which 'li' element was clicked
// Check which 'li' element was clicked
var
li
=
event
.
target
,
var
li
=
event
.
target
,
data_relative_url
=
li
.
getAttribute
(
"
data-relative-url
"
),
data_relative_url
=
li
.
getAttribute
(
"
data-relative-url
"
),
data_uid
=
li
.
getAttribute
(
"
data-uid
"
),
data_portal_type
=
li
.
getAttribute
(
"
data-create-object
"
),
data_portal_type
=
li
.
getAttribute
(
"
data-create-object
"
),
data_explore
=
li
.
getAttribute
(
"
data-explore
"
);
data_explore
=
li
.
getAttribute
(
"
data-explore
"
);
...
@@ -323,6 +325,7 @@
...
@@ -323,6 +325,7 @@
if
(
data_relative_url
)
{
if
(
data_relative_url
)
{
new_state
.
value_text
=
li
.
textContent
;
new_state
.
value_text
=
li
.
textContent
;
new_state
.
value_relative_url
=
data_relative_url
;
new_state
.
value_relative_url
=
data_relative_url
;
new_state
.
value_uid
=
data_uid
;
return
gadget
.
changeState
(
new_state
);
return
gadget
.
changeState
(
new_state
);
}
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.xml
View file @
6712435f
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.57692.7289.25070
</string>
</value>
<value>
<string>
95
5.7686.33333.9745
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
7583820.22
</float>
<float>
147
8515602.79
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.js
View file @
6712435f
...
@@ -67,6 +67,9 @@
...
@@ -67,6 +67,9 @@
if
(
input_result
.
value_portal_type
)
{
if
(
input_result
.
value_portal_type
)
{
result
[
gadget
.
state
.
relation_field_id
]
=
result
[
gadget
.
state
.
relation_field_id
]
=
"
_newContent_
"
+
input_result
.
value_portal_type
;
"
_newContent_
"
+
input_result
.
value_portal_type
;
}
else
if
(
input_result
.
value_uid
)
{
result
[
gadget
.
state
.
relation_field_id
]
=
input_result
.
value_uid
;
}
}
result
[
gadget
.
state
.
key
]
=
input_result
.
value_text
;
result
[
gadget
.
state
.
key
]
=
input_result
.
value_text
;
}
else
{
}
else
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relationstringfield_js.xml
View file @
6712435f
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.57675.64427.52462
</string>
</value>
<value>
<string>
95
5.7640.34748.48025
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
7582815.99
</float>
<float>
147
8512986.68
</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