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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
5629d051
Commit
5629d051
authored
Mar 05, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: fix cancellation issue
parent
b55a94a7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
273 additions
and
271 deletions
+273
-271
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_datetimefield_js.js
...eItem/web_page_module/rjs_gadget_erp5_datetimefield_js.js
+8
-15
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_datetimefield_js.xml
...Item/web_page_module/rjs_gadget_erp5_datetimefield_js.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
+98
-101
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
+165
-153
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_datetimefield_js.js
View file @
5629d051
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
[
31
,
28
,
31
,
30
,
31
,
30
,
31
,
31
,
30
,
31
,
30
,
31
],
[
31
,
28
,
31
,
30
,
31
,
30
,
31
,
31
,
30
,
31
,
30
,
31
],
[
31
,
29
,
31
,
30
,
31
,
30
,
31
,
31
,
30
,
31
,
30
,
31
]
[
31
,
29
,
31
,
30
,
31
,
30
,
31
,
31
,
30
,
31
,
30
,
31
]
],
//leapyear
],
//leapyear
queue
=
new
RSVP
.
Queue
()
,
queue
,
promise_list
,
promise_list
,
input_state
=
{
input_state
=
{
name
:
gadget
.
state
.
key
,
name
:
gadget
.
state
.
key
,
...
@@ -122,10 +122,7 @@
...
@@ -122,10 +122,7 @@
gadget
.
declareGadget
(
'
gadget_html5_element.html
'
,
{
scope
:
'
P
'
})
gadget
.
declareGadget
(
'
gadget_html5_element.html
'
,
{
scope
:
'
P
'
})
];
];
}
}
queue
queue
=
new
RSVP
.
Queue
(
RSVP
.
all
(
promise_list
))
.
push
(
function
()
{
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
// Clear first to DOM, append after to reduce flickering/manip
// Clear first to DOM, append after to reduce flickering/manip
while
(
element
.
firstChild
)
{
while
(
element
.
firstChild
)
{
...
@@ -148,10 +145,7 @@
...
@@ -148,10 +145,7 @@
}
else
{
}
else
{
promise_list
=
[
gadget
.
getDeclaredGadget
(
'
P
'
)];
promise_list
=
[
gadget
.
getDeclaredGadget
(
'
P
'
)];
}
}
queue
queue
=
new
RSVP
.
Queue
(
RSVP
.
all
(
promise_list
));
.
push
(
function
()
{
return
RSVP
.
all
(
promise_list
);
});
}
}
// Calculate sub gadget states
// Calculate sub gadget states
...
@@ -268,9 +262,11 @@
...
@@ -268,9 +262,11 @@
}
}
}
else
{
}
else
{
//get timezone difference between server and local browser
//get timezone difference between server and local browser
offset_time_zone
=
timezone
+
(
state_date
.
getTimezoneOffset
()
/
60
);
offset_time_zone
=
timezone
+
(
state_date
.
getTimezoneOffset
()
/
60
);
//adjust hour in order to get correct date time string
//adjust hour in order to get correct date time string
state_date
.
setUTCHours
(
state_date
.
getUTCHours
()
+
offset_time_zone
);
state_date
.
setUTCHours
(
state_date
.
getUTCHours
()
+
offset_time_zone
);
text_content
=
state_date
.
toLocaleDateString
(
language
);
text_content
=
state_date
.
toLocaleDateString
(
language
);
if
(
!
gadget
.
state
.
date_only
)
{
if
(
!
gadget
.
state
.
date_only
)
{
text_content
+=
"
"
+
locale_formatted_state_date
;
text_content
+=
"
"
+
locale_formatted_state_date
;
...
@@ -298,10 +294,7 @@
...
@@ -298,10 +294,7 @@
if
(
gadget
.
state
.
timezone_style
)
{
if
(
gadget
.
state
.
timezone_style
)
{
promise_list
.
push
(
gadget
.
getDeclaredGadget
(
'
SELECT
'
));
promise_list
.
push
(
gadget
.
getDeclaredGadget
(
'
SELECT
'
));
}
}
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
(
RSVP
.
all
(
promise_list
))
.
push
(
function
()
{
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
var
i
;
var
i
;
promise_list
=
[];
promise_list
=
[];
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_datetimefield_js.xml
View file @
5629d051
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
0.55051.50282.19404
</string>
</value>
<value>
<string>
98
2.20840.63890.24627
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
77775957.85
</float>
<float>
15
83399782.26
</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 @
5629d051
...
@@ -248,8 +248,7 @@
...
@@ -248,8 +248,7 @@
return
RSVP
.
Queue
()
return
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
var
plane
=
gadget
.
element
.
querySelector
(
"
a
"
),
var
plane
=
gadget
.
element
.
querySelector
(
"
a
"
),
ul
=
gadget
.
element
.
querySelector
(
"
.search_ul
"
),
ul
=
gadget
.
element
.
querySelector
(
"
.search_ul
"
);
translation_promise
;
plane
.
href
=
''
;
plane
.
href
=
''
;
// uid is known
// uid is known
...
@@ -315,12 +314,9 @@
...
@@ -315,12 +314,9 @@
return
RSVP
.
delay
(
200
);
return
RSVP
.
delay
(
200
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
translation_promise
=
gadget
.
getTranslationList
([
return
RSVP
.
all
([
'
Create New
'
,
'
Explore the Search Result List
'
]);
return
gadget
.
jio_allDocs
({
gadget
.
jio_allDocs
({
query
:
Query
.
objectToSearchText
(
new
ComplexQuery
({
query
:
Query
.
objectToSearchText
(
new
ComplexQuery
({
operator
:
"
AND
"
,
operator
:
"
AND
"
,
query_list
:
[
query_list
:
[
...
@@ -336,11 +332,14 @@
...
@@ -336,11 +332,14 @@
limit
:
[
0
,
10
],
limit
:
[
0
,
10
],
select_list
:
[
gadget
.
state
.
catalog_index
,
"
uid
"
],
select_list
:
[
gadget
.
state
.
catalog_index
,
"
uid
"
],
sort_on
:
JSON
.
parse
(
gadget
.
state
.
sort_list_json
)
sort_on
:
JSON
.
parse
(
gadget
.
state
.
sort_list_json
)
})
}),
.
push
(
function
(
result
)
{
return
new
RSVP
.
Queue
()
gadget
.
getTranslationList
([
.
push
(
function
()
{
'
Create New
'
,
return
RSVP
.
all
([
result
,
translation_promise
]);
'
Explore the Search Result List
'
])
]);
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
var
i
,
var
i
,
...
@@ -407,7 +406,6 @@
...
@@ -407,7 +406,6 @@
ul
.
removeChild
(
ul
.
firstChild
);
ul
.
removeChild
(
ul
.
firstChild
);
}
}
ul
.
appendChild
(
fragment_element
);
ul
.
appendChild
(
fragment_element
);
});
},
function
(
error
)
{
},
function
(
error
)
{
if
(
error
instanceof
Error
&&
if
(
error
instanceof
Error
&&
error
.
hash
&&
error
.
hash
&&
...
@@ -424,7 +422,6 @@
...
@@ -424,7 +422,6 @@
throw
error
;
throw
error
;
});
});
});
});
});
})
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_relation_input_js.xml
View file @
5629d051
...
@@ -154,11 +154,13 @@
...
@@ -154,11 +154,13 @@
</record>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<list>
<dictionary>
<dictionary>
<item>
<item>
...
@@ -202,16 +204,20 @@
...
@@ -202,16 +204,20 @@
</item>
</item>
</dictionary>
</dictionary>
</list>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<list>
<dictionary>
<dictionary>
<item>
<item>
...
@@ -234,7 +240,7 @@
...
@@ -234,7 +240,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
978.15497.3144.35652
</string>
</value>
<value>
<string>
982.20937.32183.16281
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +258,7 @@
...
@@ -252,7 +258,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1567695948.47
</float>
<float>
1583405380.32
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
@@ -261,16 +267,20 @@
...
@@ -261,16 +267,20 @@
</item>
</item>
</dictionary>
</dictionary>
</list>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<list>
<dictionary>
<dictionary>
<item>
<item>
...
@@ -320,7 +330,9 @@
...
@@ -320,7 +330,9 @@
</item>
</item>
</dictionary>
</dictionary>
</list>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
</ZopeData>
</ZopeData>
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