• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript dot-messages-service.DotMessageService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中@services/dot-messages-service.DotMessageService的典型用法代码示例。如果您正苦于以下问题:TypeScript DotMessageService类的具体用法?TypeScript DotMessageService怎么用?TypeScript DotMessageService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了DotMessageService类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: constructor

 constructor(
     private dotMenuService: DotMenuService,
     private ngZone: NgZone,
     private dotGlobalMessageService: DotGlobalMessageService,
     private dotMessageService: DotMessageService,
     private dotPageStateService: DotPageStateService
 ) {
     dotMessageService
         .getMessages(['dot.common.message.saved', 'dot.common.message.saving'])
         .subscribe();
 }
开发者ID:dotCMS,项目名称:core-web,代码行数:11,代码来源:dot-edit-layout-advanced.component.ts


示例2: getNavItems

    private getNavItems(
        dotRenderedPage: DotRenderedPage,
        enterpriselicense: boolean
    ): DotEditPageNavItem[] {
        const result = [
            {
                needsEntepriseLicense: false,
                disabled: false,
                icon: 'description',
                label: this.dotMessageService.get('editpage.toolbar.nav.content'),
                link: 'content'
            },
            this.getTemplateNavItem(dotRenderedPage, enterpriselicense),
            {
                needsEntepriseLicense: false,
                disabled: false,
                icon: 'add',
                label: this.dotMessageService.get('editpage.toolbar.nav.properties'),
                action: (inode) => {
                    this.dotContentletEditorService.edit({
                        data: {
                            inode: inode
                        }
                    });
                }
            }
        ];

        return result;
    }
开发者ID:dotCMS,项目名称:core-web,代码行数:30,代码来源:dot-edit-page-nav.component.ts


示例3: addContainerToolbar

    /**
     * Add custom HTML buttons to the containers div
     *
     * @param Document doc
     * @memberof DotEditContentToolbarHtmlService
     */
    addContainerToolbar(doc: Document): void {
        this.dotMessageService
            .getMessages([
                'editpage.content.container.action.add',
                'editpage.content.container.menu.content',
                'editpage.content.container.menu.widget',
                'editpage.content.container.menu.form',
                'dot.common.license.enterprise.only.error'
            ])
            .pipe(
                switchMap(this.dotLicenseService.isEnterprise.bind(this.dotLicenseService)),
                take(1)
            )
            .subscribe((isEnterpriseLicense: boolean) => {
                const containers = Array.from(
                    doc.querySelectorAll('div[data-dot-object="container"]')
                );
                containers.forEach((container: HTMLElement) => {
                    const containerToolbar = document.createElement('div');
                    containerToolbar.classList.add('dotedit-container__toolbar');

                    if (!container.dataset.dotCanAdd.length) {
                        container.classList.add('disabled');
                    }

                    containerToolbar.innerHTML = this.getContainerToolbarHtml(
                        container,
                        isEnterpriseLicense
                    );
                    container.parentNode.insertBefore(containerToolbar, container);
                });
            });
    }
开发者ID:dotCMS,项目名称:core-web,代码行数:39,代码来源:dot-edit-content-toolbar-html.service.ts


示例4: error

 /**
  * Display text messages with error configuration.
  * @param string message
  */
 error(message?: string): void {
     // TODO: Define the behaior of error messages.
     this.dotEventsService.notify('dot-global-message', {
         value: message ? message : this.dotMessageService.get('dot.common.message.error'),
         life: 3000
     });
 }
开发者ID:dotCMS,项目名称:core-web,代码行数:11,代码来源:dot-global-message.service.ts


示例5: getContainerToolbarHtml

    private getContainerToolbarHtml(container: HTMLElement, isEnterpriseLicense: boolean): string {
        return this.getDotEditPopupMenuHtml({
            button: {
                label: `${this.dotMessageService.get('editpage.content.container.action.add')}`,
                class: 'dotedit-container__add'
            },
            items: container.dataset.dotCanAdd
                .split(',')
                .filter((item: string) => item.length)
                .map((item: string) => {
                    item = item.toLowerCase();
                    const isDisabledFormAdd = item === 'form' && !isEnterpriseLicense;

                    return {
                        label: this.dotMessageService.get(
                            `editpage.content.container.menu.${item}`
                        ),
                        dataset: {
                            action: 'add',
                            add: item,
                            identifier: container.dataset.dotIdentifier,
                            uuid: container.dataset.dotUuid
                        },
                        disabled: isDisabledFormAdd,
                        tooltip: isDisabledFormAdd
                            ? this.dotMessageService.get('dot.common.license.enterprise.only.error')
                            : ''
                    };
                })
        });
    }
开发者ID:dotCMS,项目名称:core-web,代码行数:31,代码来源:dot-edit-content-toolbar-html.service.ts


示例6: ngOnInit

 ngOnInit() {
     this.dotMessageService
         .getMessages([
             'editpage.toolbar.page.cant.edit',
             'editpage.toolbar.page.locked.by.user'
         ])
         .subscribe();
 }
开发者ID:dotCMS,项目名称:core-web,代码行数:8,代码来源:dot-edit-page-lock-info.component.ts


示例7:

                this.ngZone.run(() => {
                    if (event.detail.name === 'advanced-template-saved') {
                        this.dotGlobalMessageService.display(
                            this.dotMessageService.get('dot.common.message.saved')
                        );

                        this.dotPageStateService
                            .get(this.pageState.page.pageURI)
                            .subscribe(
                                (pageState: DotRenderedPageState) =>
                                    (this.pageState.dotRenderedPageState = pageState)
                            );
                    } else {
                        this.dotGlobalMessageService.loading(
                            this.dotMessageService.get('dot.common.message.saving')
                        );
                    }
                });
开发者ID:dotCMS,项目名称:core-web,代码行数:18,代码来源:dot-edit-layout-advanced.component.ts


示例8:

                .map((item: string) => {
                    item = item.toLowerCase();
                    const isDisabledFormAdd = item === 'form' && !isEnterpriseLicense;

                    return {
                        label: this.dotMessageService.get(
                            `editpage.content.container.menu.${item}`
                        ),
                        dataset: {
                            action: 'add',
                            add: item,
                            identifier: container.dataset.dotIdentifier,
                            uuid: container.dataset.dotUuid
                        },
                        disabled: isDisabledFormAdd,
                        tooltip: isDisabledFormAdd
                            ? this.dotMessageService.get('dot.common.license.enterprise.only.error')
                            : ''
                    };
                })
开发者ID:dotCMS,项目名称:core-web,代码行数:20,代码来源:dot-edit-content-toolbar-html.service.ts


示例9: ngAfterViewInit

 ngAfterViewInit(): void {
     this.dotMessageService
         .getMessages(['workflow.task.dialog.header'])
         .pipe(take(1))
         .subscribe(() => {
             this.dotWorkflowTaskDetailService.view({
                 header: this.dotMessageService.get('workflow.task.dialog.header'),
                 id: this.route.snapshot.params.asset
             });
         });
 }
开发者ID:dotCMS,项目名称:core-web,代码行数:11,代码来源:dot-workflow-task.component.ts


示例10: getContentButton

    getContentButton(contentletDataset: { [key: string]: any }): string {
        const identifier: string = contentletDataset.dotIdentifier;
        const inode: string = contentletDataset.dotInode;
        const canEdit: boolean = contentletDataset.dotCanEdit === 'true';
        const isForm: boolean = contentletDataset.dotBasetype === 'FORM';

        const dataset = {
            'dot-identifier': identifier,
            'dot-inode': inode
        };

        let editButtonClass = 'dotedit-contentlet__edit';
        editButtonClass += !canEdit || isForm ? ' dotedit-contentlet__disabled' : '';

        return `
            ${this.dotDOMHtmlUtilService.getButtomHTML(
                this.dotMessageService.get('editpage.content.contentlet.menu.drag'),
                'dotedit-contentlet__drag',
                {
                    ...dataset,
                    'dot-object': 'drag-content'
                }
            )}
            ${this.dotDOMHtmlUtilService.getButtomHTML(
                this.dotMessageService.get('editpage.content.contentlet.menu.edit'),
                editButtonClass,
                {
                    ...dataset,
                    'dot-object': 'edit-content'
                }
            )}
            ${this.dotDOMHtmlUtilService.getButtomHTML(
                this.dotMessageService.get('editpage.content.contentlet.menu.remove'),
                'dotedit-contentlet__remove',
                {
                    ...dataset,
                    'dot-object': 'remove-content'
                }
            )}
        `;
    }
开发者ID:dotCMS,项目名称:core-web,代码行数:41,代码来源:dot-edit-content-toolbar-html.service.ts



注:本文中的@services/dot-messages-service.DotMessageService类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap