How to use the @deja-js/component/popup.DejaPopupButton function in @deja-js/component

To help you get started, we’ve selected a few @deja-js/component examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DSI-HUG / dejajs-components / projects / deja-js / component / tiles / tile-group-style-editor-config.ts View on Github external
constructor() {
        super();

        this.toolbarType = 'window';
        this.title = 'Modifier l\'apparence du groupe'; // TODO Lang
        this.actions = [
            new DejaPopupButton('confirm', 'Ok', 'done'), // TODO Lang
            new DejaPopupButton('cancel', 'Cancel', 'cancel'), // TODO Lang
        ];
        this.fullscreen = false;
        this.hasBackdrop = true;
        this.disableClose = true;
        this.contentComponentRef = TileGroupStyleEditorComponent;
    }
}
github DSI-HUG / dejajs-components / projects / deja-js / component / tiles / tile-group-style-editor-config.ts View on Github external
constructor() {
        super();

        this.toolbarType = 'window';
        this.title = 'Modifier l\'apparence du groupe'; // TODO Lang
        this.actions = [
            new DejaPopupButton('confirm', 'Ok', 'done'), // TODO Lang
            new DejaPopupButton('cancel', 'Cancel', 'cancel'), // TODO Lang
        ];
        this.fullscreen = false;
        this.hasBackdrop = true;
        this.disableClose = true;
        this.contentComponentRef = TileGroupStyleEditorComponent;
    }
}
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
public askConfirmationCustom() {

        const config = new DejaPopupConfig();
        config.data = { test: 'abcde' };
        config.toolbarIconName = 'accessibility';
        config.toolbarColor = 'accent';
        config.title = 'Dialog custom';

        config.actions = [
            new DejaPopupButton('confirm', 'Confirm', 'done'),
            new DejaPopupButton('undo', 'Undo', 'undo'),
            new DejaPopupButton('cancel', 'Cancel', 'cancel'),
        ];

        this.dejaPopupService.openCustom(
            DejaPopupCustomDemoComponent,
            config,
        )
            .subscribe((response: DejaPopupReponse) => {
                this.showResponse(response);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
public askConfirmation2() {

        const config = new DejaPopupConfig();

        config.width = '530px';
        const pos: DialogPosition = { bottom: '50px', right: '50px' };
        config.position = pos;
        config.disableClose = true;
        config.toolbarColor = 'danger';

        const title = 'System failure!';

        const body = '<p>You don\'t want to <b>Cancel</b> the operation.<br> Or you don\'t? </p>';

        const butYes = new DejaPopupButton('yes', 'Yes', 'check');
        const butNo = new DejaPopupButton('no', 'No', 'not_interested');
        const butCancel = new DejaPopupButton('cancel', 'Cancel', 'cancel');

        const actions = [butYes, butNo, butCancel];

        this.dejaPopupService
            .openInline(title, body, actions, config)
            .subscribe((response: DejaPopupReponse) =&gt; {
                this.showResponse(response);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
public showPopUpPdf() {
        const config = new DejaPopupConfig();
        config.title = `Pdf ${DejaPopupConfig.dialogCount}`;
        config.url = this.dummyPdfUrl;
        config.padding = false;
        config.toolbarIconName = 'photo_camera';
        config.toolbarColor = 'accent';

        config.toolbarActions = [
            new DejaPopupButton('account', 'User', 'account_circle', false),
            new DejaPopupButton('view', 'Show', 'visibility', false),
        ];

        config.ensureDimension();

        this.dejaPopupService.openPopUp(config).pipe(
            filter((resp: DejaPopupReponse) => !!resp))
            .subscribe((response: DejaPopupReponse) => {
                this.showResponse(response);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
public askConfirmation1() {
        const butSave = new DejaPopupButton('save', 'Save', 'save');
        const butCancel = new DejaPopupButton('cancel', 'Cancel', 'cancel');
        this.dejaPopupService
            .openInline(
            'Inscription à la formation',
            'Etes-vous sure de vouloir faire cela ?',
            [butSave, butCancel])
            .subscribe((response: DejaPopupReponse) => {
                this.showResponse(response);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
public askConfirmation1() {
        const butSave = new DejaPopupButton('save', 'Save', 'save');
        const butCancel = new DejaPopupButton('cancel', 'Cancel', 'cancel');
        this.dejaPopupService
            .openInline(
            'Inscription à la formation',
            'Etes-vous sure de vouloir faire cela ?',
            [butSave, butCancel])
            .subscribe((response: DejaPopupReponse) => {
                this.showResponse(response);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
public askConfirmation2() {

        const config = new DejaPopupConfig();

        config.width = '530px';
        const pos: DialogPosition = { bottom: '50px', right: '50px' };
        config.position = pos;
        config.disableClose = true;
        config.toolbarColor = 'danger';

        const title = 'System failure!';

        const body = '<p>You don\'t want to <b>Cancel</b> the operation.<br> Or you don\'t? </p>';

        const butYes = new DejaPopupButton('yes', 'Yes', 'check');
        const butNo = new DejaPopupButton('no', 'No', 'not_interested');
        const butCancel = new DejaPopupButton('cancel', 'Cancel', 'cancel');

        const actions = [butYes, butNo, butCancel];

        this.dejaPopupService
            .openInline(title, body, actions, config)
            .subscribe((response: DejaPopupReponse) =&gt; {
                this.showResponse(response);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
public askConfirmationCustom() {

        const config = new DejaPopupConfig();
        config.data = { test: 'abcde' };
        config.toolbarIconName = 'accessibility';
        config.toolbarColor = 'accent';
        config.title = 'Dialog custom';

        config.actions = [
            new DejaPopupButton('confirm', 'Confirm', 'done'),
            new DejaPopupButton('undo', 'Undo', 'undo'),
            new DejaPopupButton('cancel', 'Cancel', 'cancel'),
        ];

        this.dejaPopupService.openCustom(
            DejaPopupCustomDemoComponent,
            config,
        )
            .subscribe((response: DejaPopupReponse) => {
                this.showResponse(response);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
const config = new DejaPopupConfig();

        config.width = '530px';
        const pos: DialogPosition = { bottom: '50px', right: '50px' };
        config.position = pos;
        config.disableClose = true;
        config.toolbarColor = 'danger';

        const title = 'System failure!';

        const body = '<p>You don\'t want to <b>Cancel</b> the operation.<br> Or you don\'t? </p>';

        const butYes = new DejaPopupButton('yes', 'Yes', 'check');
        const butNo = new DejaPopupButton('no', 'No', 'not_interested');
        const butCancel = new DejaPopupButton('cancel', 'Cancel', 'cancel');

        const actions = [butYes, butNo, butCancel];

        this.dejaPopupService
            .openInline(title, body, actions, config)
            .subscribe((response: DejaPopupReponse) =&gt; {
                this.showResponse(response);
            });
    }