Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
deedd4a3
Commit
deedd4a3
authored
Nov 24, 2021
by
François
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run eslint --fix
parent
ad099012
Pipeline
#1549
passed with stage
in 1 minute 29 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
members_admin.js
members/static/js/members_admin.js
+0
-0
members-space-home.js
members_space/static/js/members-space-home.js
+0
-0
members-space-my-shifts.js
members_space/static/js/members-space-my-shifts.js
+5
-4
members-space.js
members_space/static/js/members-space.js
+10
-6
No files found.
members/static/js/members_admin.js
View file @
deedd4a3
members_space/static/js/members-space-home.js
View file @
deedd4a3
members_space/static/js/members-space-my-shifts.js
View file @
deedd4a3
...
...
@@ -50,18 +50,19 @@ function prepare_server_data(data) {
for
(
history_item
of
data
)
{
if
(
history_item
.
is_amnesty
!==
undefined
)
{
let
shift_datetime
=
new
Date
(
history_item
.
date_begin
);
let
str_shift_datetime
=
`
${(
"0"
+
shift_datetime
.
getDate
()).
slice
(
-
2
)}
/
${(
"0"
+
(
shift_datetime
.
getMonth
()
+
1
)).
slice
(
-
2
)}
/
${
shift_datetime
.
getFullYear
()}
`
let
str_shift_datetime
=
`
${(
"0"
+
shift_datetime
.
getDate
()).
slice
(
-
2
)}
/
${(
"0"
+
(
shift_datetime
.
getMonth
()
+
1
)).
slice
(
-
2
)}
/
${
shift_datetime
.
getFullYear
()}
`
;
history_item
.
shift_name
=
`
${
history_item
.
shift_name
}
du
${
str_shift_datetime
}
`
history_item
.
shift_name
=
`
${
history_item
.
shift_name
}
du
${
str_shift_datetime
}
`
;
}
else
{
history_item
.
shift_name
=
(
history_item
.
shift_id
===
false
)
?
''
:
history_item
.
shift_id
[
1
];
if
(
history_item
.
name
===
"Services des comités"
)
{
let
shift_datetime
=
new
Date
(
history_item
.
date_begin
);
let
str_shift_datetime
=
`
${(
"0"
+
shift_datetime
.
getDate
()).
slice
(
-
2
)}
/
${(
"0"
+
(
shift_datetime
.
getMonth
()
+
1
)).
slice
(
-
2
)}
/
${
shift_datetime
.
getFullYear
()}
`
let
str_shift_datetime
=
`
${(
"0"
+
shift_datetime
.
getDate
()).
slice
(
-
2
)}
/
${(
"0"
+
(
shift_datetime
.
getMonth
()
+
1
)).
slice
(
-
2
)}
/
${
shift_datetime
.
getFullYear
()}
`
;
str_shift_datetime
=
str_shift_datetime
+
" "
+
shift_datetime
.
toLocaleTimeString
(
"fr-fr"
,
time_options
);
history_item
.
shift_name
=
`Services des comités
${
str_shift_datetime
}
`
history_item
.
shift_name
=
`Services des comités
${
str_shift_datetime
}
`
;
}
}
...
...
members_space/static/js/members-space.js
View file @
deedd4a3
...
...
@@ -252,7 +252,7 @@ $(document).ready(function() {
};
});
(
function
(
$
,
sr
)
{
(
function
(
$
,
sr
)
{
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var
debounce
=
function
(
func
,
threshold
,
execAsap
)
{
...
...
@@ -260,11 +260,12 @@ $(document).ready(function() {
return
function
debounced
()
{
var
obj
=
this
,
args
=
arguments
;
function
delayed
()
{
if
(
!
execAsap
)
func
.
apply
(
obj
,
args
);
timeout
=
null
;
}
;
}
if
(
timeout
)
clearTimeout
(
timeout
);
...
...
@@ -273,8 +274,11 @@ $(document).ready(function() {
timeout
=
setTimeout
(
delayed
,
threshold
||
100
);
};
}
}
;
// smartresize
jQuery
.
fn
[
sr
]
=
function
(
fn
){
return
fn
?
this
.
bind
(
'resize'
,
debounce
(
fn
))
:
this
.
trigger
(
sr
);
};
})(
jQuery
,
'smartresize'
);
\ No newline at end of file
jQuery
.
fn
[
sr
]
=
function
(
fn
)
{
return
fn
?
this
.
bind
(
'resize'
,
debounce
(
fn
))
:
this
.
trigger
(
sr
);
};
})(
jQuery
,
'smartresize'
);
\ 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