Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Orbit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Applications
Orbit
Commits
56425258
Commit
56425258
authored
6 years ago
by
Jean-Baptiste
Browse files
Options
Downloads
Patches
Plain Diff
update: remove HDAppUserInfo and HDAppAuthor
parent
34804b8d
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/dependencies.pug
+3
-3
3 additions, 3 deletions
src/dependencies.pug
src/page-members.pug
+1
-2
1 addition, 2 deletions
src/page-members.pug
src/page-project-profile.pug
+1
-2
1 addition, 2 deletions
src/page-project-profile.pug
src/scripts/hd-widgets.js
+1
-56
1 addition, 56 deletions
src/scripts/hd-widgets.js
with
6 additions
and
63 deletions
src/dependencies.pug
+
3
−
3
View file @
56425258
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
script(src="/lib/oidc-client.js")
script(src="/lib/oidc-client.js")
script(
script(
src="https://
cdn.happy-dev.fr/sib-oidc/sib-
oidc
.js
"
src="https://
unpkg.com/@startinblox/
oidc"
data-authority=`${sdn}/openid/`,
data-authority=`${sdn}/openid/`,
data-client_id=`${client_id}`,
data-client_id=`${client_id}`,
data-response_type='id_token token',
data-response_type='id_token token',
...
@@ -34,8 +34,8 @@ link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Open+Sans:3
...
@@ -34,8 +34,8 @@ link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Open+Sans:3
//- cdn
//- cdn
//- don't forget to change version in hd-widgets.js
//- don't forget to change version in hd-widgets.js
script(type="module" src="https://unpkg.com/@startinblox/core@0.
5.24
")
script(type="module" src="https://unpkg.com/@startinblox/core@0.
6
")
script(type="module" src="https://unpkg.com/@startinblox/router@
latest
")
script(type="module" src="https://unpkg.com/@startinblox/router@
0.6
")
script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.1")
script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.1")
script(type="module" src="/scripts/hd-widgets.js")
script(type="module" src="/scripts/hd-widgets.js")
This diff is collapsed.
Click to expand it.
src/page-members.pug
+
1
−
2
View file @
56425258
...
@@ -9,9 +9,8 @@ div.grid-layer
...
@@ -9,9 +9,8 @@ div.grid-layer
data-fields='header, infos',
data-fields='header, infos',
paginate-by='3',
paginate-by='3',
set-header='user.account.picture, user, pseudonym, bio, send',
set-header='user.account.picture, user
.first_name, user.last_name
, pseudonym, bio, send',
widget-user.account.picture='sib-display-img',
widget-user.account.picture='sib-display-img',
widget-user='hdapp-userinfo',
set-pseudonym='before-pseudo,user.username',
set-pseudonym='before-pseudo,user.username',
value-before-pseudo='@',
value-before-pseudo='@',
value-send='SEND A MESSAGE',
value-send='SEND A MESSAGE',
...
...
This diff is collapsed.
Click to expand it.
src/page-project-profile.pug
+
1
−
2
View file @
56425258
...
@@ -54,10 +54,9 @@
...
@@ -54,10 +54,9 @@
id-suffix='members',
id-suffix='members',
data-fields='teammate-img, teammate-profile, teammate-job',
data-fields='teammate-img, teammate-profile, teammate-job',
set-teammate-img='user.account.picture',
set-teammate-img='user.account.picture',
set-teammate-profile='user, user.groups',
set-teammate-profile='user
.first_name, user.last_name
, user.groups',
set-teammate-job='name',
set-teammate-job='name',
widget-user.account.picture='sib-display-img',
widget-user.account.picture='sib-display-img',
widget-user='hdapp-userinfo',
widget-user.groups='sib-display-lookuplist',
widget-user.groups='sib-display-lookuplist',
next='profile',
next='profile',
bind-resources,
bind-resources,
...
...
This diff is collapsed.
Click to expand it.
src/scripts/hd-widgets.js
+
1
−
56
View file @
56425258
import
{
Helpers
,
SIBWidget
,
SIBDisplayLookupList
,
store
}
from
'
https://unpkg.com/@startinblox/core@0.5
'
;
import
{
Helpers
,
SIBWidget
,
store
}
from
'
https://unpkg.com/@startinblox/core@0.6
'
;
class
HDAppUserInfo
extends
SIBDisplayLookupList
{
get
parentElement
()
{
return
'
div
'
;
}
getTemplate
(
value
,
index
)
{
var
firstname
,
lastname
,
email
;
if
(
typeof
value
==
'
object
'
)
if
(
Object
.
keys
(
value
).
length
>
1
)
{
firstname
=
value
.
first_name
;
lastname
=
value
.
last_name
;
email
=
value
.
email
;
}
else
{
store
.
get
(
value
).
then
(
resource
=>
{
this
.
value
.
push
(
resource
);
this
.
render
();
});
if
(
Array
.
isArray
(
this
.
value
))
this
.
value
.
splice
(
this
.
value
.
indexOf
(
value
),
1
);
else
this
.
value
=
[];
return
''
;
}
return
`<div>
${
firstname
}
${
lastname
}
</div>`
;
// + `<div id="${email}">${email}</div>`;
}
}
class
HDAppMail
extends
SIBWidget
{
class
HDAppMail
extends
SIBWidget
{
get
template
()
{
get
template
()
{
...
@@ -51,31 +23,6 @@ class HDAppMember extends SIBWidget {
...
@@ -51,31 +23,6 @@ class HDAppMember extends SIBWidget {
}
}
}
}
class
HDAppAuthor
extends
SIBDisplayLookupList
{
get
parentElement
()
{
return
'
div
'
;
}
getTemplate
(
value
,
index
)
{
var
firstname
,
lastname
;
if
(
typeof
value
==
'
object
'
)
if
(
Object
.
keys
(
value
).
length
>
1
)
{
firstname
=
value
.
user
.
first_name
;
lastname
=
value
.
user
.
last_name
;
}
else
{
store
.
get
(
value
).
then
(
resource
=>
{
this
.
value
.
push
(
resource
);
this
.
render
();
});
if
(
Array
.
isArray
(
this
.
value
))
this
.
value
.
splice
(
this
.
value
.
indexOf
(
value
),
1
);
else
this
.
value
=
[];
return
''
;
}
return
`
${
firstname
}
${
lastname
}
`
;
}
}
class
HDAppClosingDate
extends
SIBWidget
{
class
HDAppClosingDate
extends
SIBWidget
{
get
template
()
{
get
template
()
{
return
this
.
value
return
this
.
value
...
@@ -137,10 +84,8 @@ class HDAppFormText extends SIBWidget {
...
@@ -137,10 +84,8 @@ class HDAppFormText extends SIBWidget {
}
}
}
}
customElements
.
define
(
'
hdapp-userinfo
'
,
HDAppUserInfo
);
customElements
.
define
(
'
hdapp-mail
'
,
HDAppMail
);
customElements
.
define
(
'
hdapp-mail
'
,
HDAppMail
);
customElements
.
define
(
'
hdapp-member
'
,
HDAppMember
);
customElements
.
define
(
'
hdapp-member
'
,
HDAppMember
);
customElements
.
define
(
'
hdapp-author
'
,
HDAppAuthor
);
customElements
.
define
(
'
hdapp-closing-date
'
,
HDAppClosingDate
);
customElements
.
define
(
'
hdapp-closing-date
'
,
HDAppClosingDate
);
customElements
.
define
(
'
hdapp-available
'
,
HDAppAvailable
);
customElements
.
define
(
'
hdapp-available
'
,
HDAppAvailable
);
customElements
.
define
(
'
hdapp-hyperlink
'
,
HDAppHyperlink
);
customElements
.
define
(
'
hdapp-hyperlink
'
,
HDAppHyperlink
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment