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
e376f134
Commit
e376f134
authored
Sep 11, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_but: display results
parent
38df79e3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
18 deletions
+31
-18
bt5/erp5_web_but/PathTemplateItem/web_page_module/world_cup_2018_launcher_html.html
...ateItem/web_page_module/world_cup_2018_launcher_html.html
+4
-4
bt5/erp5_web_but/PathTemplateItem/web_page_module/world_cup_2018_launcher_html.xml
...lateItem/web_page_module/world_cup_2018_launcher_html.xml
+2
-2
bt5/erp5_web_but/PathTemplateItem/web_page_module/world_cup_2018_launcher_js.js
...emplateItem/web_page_module/world_cup_2018_launcher_js.js
+20
-7
bt5/erp5_web_but/PathTemplateItem/web_page_module/world_cup_2018_launcher_js.xml
...mplateItem/web_page_module/world_cup_2018_launcher_js.xml
+2
-2
bt5/erp5_web_but/PathTemplateItem/web_site_module/world_cup_2018.xml
...b_but/PathTemplateItem/web_site_module/world_cup_2018.xml
+3
-3
No files found.
bt5/erp5_web_but/PathTemplateItem/web_page_module/world_cup_2018_launcher_html.html
View file @
e376f134
...
...
@@ -17,7 +17,7 @@
<script
id=
"result_template"
type=
"text/x-handlebars-template"
>
<
table
>
<
caption
>
Result
(
{{
match_count
}}
matches
)
<
/caption
>
<
caption
>
Result
(
<
a
href
=
"
https://www.rugbyworldcup.com/2023/matches
"
>
{{
match_count
}}
matches
<
/a>
)
</
caption
>
<
thead
>
<
tr
>
<
th
>
Score
<
/th
>
...
...
@@ -45,8 +45,8 @@
{{
/
if
}}
<
/li>{{/
each
}}
<
/ul
>
<
button
type
=
"
button
"
data
-
wc2018
=
"
renderExport
"
>
Share
!<
/button
>
<
!--
button
type
=
"
button
"
data
-
wc2018
=
"
renderImport
"
>
Import
<
/button--
>
<
!--
button
type
=
"
button
"
data
-
wc2018
=
"
renderResult
"
>
Result
<
/button--
>
<
button
type
=
"
button
"
data
-
wc2018
=
"
renderImport
"
>
Import
<
/button
>
<
button
type
=
"
button
"
data
-
wc2018
=
"
renderResult
"
>
Result
<
/button
>
</script>
<script
id=
"share_template"
type=
"text/x-handlebars-template"
>
...
...
@@ -60,7 +60,7 @@
<
textarea
required
name
=
"
password_text
"
id
=
"
password_text
"
>
{{
password_text
}}
<
/textarea
>
<
input
type
=
"
submit
"
value
=
"
Import
"
><
/input
>
<
/form>
nutnu
t
<
/form
>
<
form
data
-
wc2018
=
"
submitNewCode
"
>
<
label
for
=
"
player
"
>
Player
<
/label
>
<
input
required
name
=
"
player
"
id
=
"
player
"
><
/input
>
...
...
bt5/erp5_web_but/PathTemplateItem/web_page_module/world_cup_2018_launcher_html.xml
View file @
e376f134
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
101
0.58506.47731.21435
</string>
</value>
<value>
<string>
101
1.3955.57992.12117
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
169
3772860.24
</float>
<float>
169
4433862.91
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_but/PathTemplateItem/web_page_module/world_cup_2018_launcher_js.js
View file @
e376f134
/*globals window, document, RSVP, rJS, jIO, Handlebars, LZString*/
/*jslint indent: 2, maxlen: 80*/
/*jslint nomen: true*/
/*globals window, document, RSVP, rJS, jIO, Handlebars, LZString, console*/
/*jslint indent: 2, maxlen: 100, nomen: true*/
(
function
(
window
,
document
,
RSVP
,
rJS
,
jIO
,
Handlebars
,
LZString
)
{
"
use strict
"
;
...
...
@@ -57,6 +56,7 @@
if
(
tmp
.
eventPhaseId
.
type
!==
'
Pool
'
)
{
continue
;
}
result_list
.
push
({
id
:
'
match_
'
+
(
i
+
1
),
value
:
{},
...
...
@@ -240,9 +240,10 @@
},
remote_sub_storage
:
{
type
:
'
world_cup_data
'
,
document_id
:
'
./world_cup_2018_data.json
'
,
document_id
XX
:
'
./world_cup_2018_data.json
'
,
document_idXXX
:
'
https://raw.githubusercontent.com/lsv/
'
+
'
fifa-worldcup-2018/master/data.json
'
,
document_id
:
'
https://corsproxy.io/?https%3A%2F%2Fapi.wr-rims-prod.pulselive.com%2Frugby%2Fv3%2Fevent%2F1893%2Fschedule%3Flanguage%3Den
'
,
attachment_id
:
'
enclosure
'
,
sub_storage
:
{
type
:
'
http
'
...
...
@@ -480,8 +481,7 @@
score
,
home_result
,
away_result
,
home_bet
,
away_bet
,
bet
,
key_count
=
0
,
decoded
;
for
(
key
in
code_dict
)
{
...
...
@@ -502,6 +502,8 @@
return
gadget
.
renderImport
();
}
console
.
log
(
'
code_dict
'
,
code_dict
);
// Check match result
for
(
i
=
0
;
i
<
match_list
.
length
;
i
+=
1
)
{
home_result
=
match_list
[
i
].
value
.
home_result
;
...
...
@@ -509,6 +511,17 @@
for
(
key
in
code_dict
)
{
if
(
code_dict
.
hasOwnProperty
(
key
))
{
// console.log(match_list[i]);
bet
=
code_dict
[
key
].
result_list
[
i
];
if
(
// draw
((
bet
===
0
)
&&
(
home_result
===
away_result
))
||
((
bet
===
1
)
&&
(
home_result
>
away_result
))
||
((
bet
===
2
)
&&
(
home_result
<
away_result
))
)
{
code_dict
[
key
].
score
+=
1
;
}
/*
home_bet = code_dict[key].result_list[2 * (parseInt(match_list[i].id.slice(6), 10) - 1)];
away_bet = code_dict[key].result_list[2 * (parseInt(match_list[i].id.slice(6), 10) - 1) + 1];
if ((home_result === home_bet) &&
...
...
@@ -531,7 +544,7 @@
score = 1;
}
code_dict
[
key
].
score
+=
score
;
code_dict[key].score += score;
*/
/*
if (i === 0) {
player_list.push({
...
...
bt5/erp5_web_but/PathTemplateItem/web_page_module/world_cup_2018_launcher_js.xml
View file @
e376f134
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
101
0.58492.51761.29798
</string>
</value>
<value>
<string>
101
1.3975.53334.5341
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
169
3771993.21
</float>
<float>
169
4433153.59
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_but/PathTemplateItem/web_site_module/world_cup_2018.xml
View file @
e376f134
...
...
@@ -205,7 +205,7 @@
</item>
<item>
<key>
<string>
configuration_content_security_policy
</string>
</key>
<value>
<string>
default-src \'none\'; img-src \'self\'; media-src \'self\'; connect-src \'self\' raw.githubusercontent.com; script-src \'self\' \'unsafe-eval\'; style-src \'self\';
</string>
</value>
<value>
<string>
default-src \'none\'; img-src \'self\'; media-src \'self\'; connect-src \'self\'
corsproxy.io
raw.githubusercontent.com; script-src \'self\' \'unsafe-eval\'; style-src \'self\';
</string>
</value>
</item>
<item>
<key>
<string>
configuration_x_frame_options
</string>
</key>
...
...
@@ -428,7 +428,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
101
0.49822.40856.18739
</string>
</value>
<value>
<string>
101
1.3951.5357.1211
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -448,7 +448,7 @@
</tuple>
<state>
<tuple>
<float>
169
3252020.78
</float>
<float>
169
4433215.39
</float>
<string>
UTC
</string>
</tuple>
</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