fix: startinblox-feature-request#249
This commit is contained in:
parent
68587dc94e
commit
a5ede42a91
@ -1,34 +0,0 @@
|
|||||||
import {
|
|
||||||
widgetFactory,
|
|
||||||
Helpers
|
|
||||||
} from 'https://cdn.skypack.dev/@startinblox/core@0.16';
|
|
||||||
import SlimSelect from 'https://cdn.skypack.dev/slim-select@1.23';
|
|
||||||
|
|
||||||
const HublStatus = widgetFactory(
|
|
||||||
'hubl-status',
|
|
||||||
`<label>\${label}</label>
|
|
||||||
<select
|
|
||||||
data-holder
|
|
||||||
name="\${name}">
|
|
||||||
<option
|
|
||||||
value="Public"
|
|
||||||
\${value=="Public" ? 'selected' : ''} data-trans="hublStatus.public">Public</option>
|
|
||||||
<option
|
|
||||||
value="Private"
|
|
||||||
\${value=="Private" ? 'selected' : ''} data-trans="hublStatus.private">Privé</option>
|
|
||||||
</select>`,
|
|
||||||
'',
|
|
||||||
formWidget => {
|
|
||||||
let select = formWidget.querySelector('select');
|
|
||||||
if (!select) return;
|
|
||||||
const slimSelect = new SlimSelect({
|
|
||||||
select: select
|
|
||||||
});
|
|
||||||
Helpers.importCSS('https://dev.jspm.io/slim-select/dist/slimselect.min.css');
|
|
||||||
select.addEventListener('change', () => slimSelect.render());
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
export {
|
|
||||||
HublStatus
|
|
||||||
}
|
|
@ -31,7 +31,6 @@ html(lang="en")
|
|||||||
script(type="module" src="/components/sentry.js" defer)
|
script(type="module" src="/components/sentry.js" defer)
|
||||||
script(type="module" src="/components/hubl-auto-login.js" defer)
|
script(type="module" src="/components/hubl-auto-login.js" defer)
|
||||||
script(type="module" src="/components/hubl-search-users.js" defer)
|
script(type="module" src="/components/hubl-search-users.js" defer)
|
||||||
script(type="module" src="/components/hubl-status.js" defer)
|
|
||||||
script(type="module" src="/components/hubl-reactivity.js" defer)
|
script(type="module" src="/components/hubl-reactivity.js" defer)
|
||||||
script(src="index.js" defer)
|
script(src="index.js" defer)
|
||||||
|
|
||||||
|
@ -248,10 +248,7 @@
|
|||||||
"template-captain": {
|
"template-captain": {
|
||||||
"isLead": "Captain"
|
"isLead": "Captain"
|
||||||
},
|
},
|
||||||
"hublStatus": {
|
"hublStatus": "Public = Public, Private = Private",
|
||||||
"private": "Private",
|
|
||||||
"public": "Public"
|
|
||||||
},
|
|
||||||
"success": "Success!",
|
"success": "Success!",
|
||||||
"errors": {
|
"errors": {
|
||||||
"somethingGoesWrong": "Something goes wrong, try to",
|
"somethingGoesWrong": "Something goes wrong, try to",
|
||||||
|
@ -248,10 +248,7 @@
|
|||||||
"template-captain": {
|
"template-captain": {
|
||||||
"isLead": "Líder"
|
"isLead": "Líder"
|
||||||
},
|
},
|
||||||
"hublStatus": {
|
"hublStatus": "Público = Public, Privado = Private",
|
||||||
"private": "Privado",
|
|
||||||
"public": "Público"
|
|
||||||
},
|
|
||||||
"success": "¡Éxito!",
|
"success": "¡Éxito!",
|
||||||
"errors": {
|
"errors": {
|
||||||
"somethingGoesWrong": "Algo sale mal, intenta",
|
"somethingGoesWrong": "Algo sale mal, intenta",
|
||||||
|
@ -248,10 +248,7 @@
|
|||||||
"template-captain": {
|
"template-captain": {
|
||||||
"isLead": "Capitaine"
|
"isLead": "Capitaine"
|
||||||
},
|
},
|
||||||
"hublStatus": {
|
"hublStatus": "Public = Public, Privé = Private",
|
||||||
"private": "Privé",
|
|
||||||
"public": "Public"
|
|
||||||
},
|
|
||||||
"success": "Succès!",
|
"success": "Succès!",
|
||||||
"errors": {
|
"errors": {
|
||||||
"somethingGoesWrong": "Quelque chose ne va pas, essayez de",
|
"somethingGoesWrong": "Quelque chose ne va pas, essayez de",
|
||||||
|
@ -38,7 +38,8 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
|
|||||||
range-community='store://user.communities'
|
range-community='store://user.communities'
|
||||||
option-label-community="community.name"
|
option-label-community="community.name"
|
||||||
|
|
||||||
widget-status='hubl-status'
|
widget-status='solid-form-dropdown-autocompletion-label'
|
||||||
|
enum-status=""
|
||||||
widget-community='solid-form-dropdown-autocompletion-label'
|
widget-community='solid-form-dropdown-autocompletion-label'
|
||||||
widget-linebreak='solid-form-hidden'
|
widget-linebreak='solid-form-hidden'
|
||||||
|
|
||||||
@ -50,5 +51,5 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
|
|||||||
submit-button=''
|
submit-button=''
|
||||||
submit-widget="button"
|
submit-widget="button"
|
||||||
|
|
||||||
data-trans='label-status=circle.create.labelStatus;label-community=circle.create.labelCommunity;label-name=circle.create.labelName;label-description=circle.create.labelDescription;submit-button=circle.create.buttonSubmit;label-subtitle=circle.create.labelSubtitle;label-help=circle.create.descriptionHelp'
|
data-trans='enum-status=hublStatus;label-status=circle.create.labelStatus;label-community=circle.create.labelCommunity;label-name=circle.create.labelName;label-description=circle.create.labelDescription;submit-button=circle.create.buttonSubmit;label-subtitle=circle.create.labelSubtitle;label-help=circle.create.descriptionHelp'
|
||||||
)
|
)
|
||||||
|
@ -49,7 +49,8 @@ div.segment.full.padding-large.whitespace-normal
|
|||||||
class-owner='hidden'
|
class-owner='hidden'
|
||||||
class-help='segment full text-small margin-bottom-medium padding-left-small'
|
class-help='segment full text-small margin-bottom-medium padding-left-small'
|
||||||
|
|
||||||
widget-status='hubl-status'
|
widget-status='solid-form-dropdown-autocompletion-label'
|
||||||
|
enum-status=""
|
||||||
widget-description='solid-form-richtext-label'
|
widget-description='solid-form-richtext-label'
|
||||||
widget-help='solid-form-hidden-label'
|
widget-help='solid-form-hidden-label'
|
||||||
widget-community='solid-form-dropdown-autocompletion-label'
|
widget-community='solid-form-dropdown-autocompletion-label'
|
||||||
@ -64,7 +65,7 @@ div.segment.full.padding-large.whitespace-normal
|
|||||||
submit-widget="button"
|
submit-widget="button"
|
||||||
next=`${component.route}-information`
|
next=`${component.route}-information`
|
||||||
|
|
||||||
data-trans='label-status=circle.edit.labelStatus;label-community=circle.edit.labelCommunity;label-name=circle.edit.labelName;label-owner=circle.edit.labelOwner;label-description=circle.edit.labelDescription;submit-button=circle.edit.buttonSubmit;label-subtitle=circle.edit.labelSubtitle;label-help=circle.edit.descriptionHelp'
|
data-trans='enum-status=hublStatus;label-status=circle.edit.labelStatus;label-community=circle.edit.labelCommunity;label-name=circle.edit.labelName;label-owner=circle.edit.labelOwner;label-description=circle.edit.labelDescription;submit-button=circle.edit.buttonSubmit;label-subtitle=circle.edit.labelSubtitle;label-help=circle.edit.descriptionHelp'
|
||||||
)
|
)
|
||||||
|
|
||||||
h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.edit.subTitle')
|
h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.edit.subTitle')
|
||||||
|
Loading…
Reference in New Issue
Block a user