mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 11:26:44 +08:00
Merge pull request #2742 from ONLYOFFICE/fix/bugfix
[DE] Fix fill forms mode
This commit is contained in:
@ -275,7 +275,7 @@ define([
|
||||
},
|
||||
|
||||
changeViewFormMode: function(state) {
|
||||
if (this.view && (state !== this.view.btnViewFormRoles.isActive())) {
|
||||
if (this.view && this.view.btnViewFormRoles && (state !== this.view.btnViewFormRoles.isActive())) {
|
||||
this.view.btnViewFormRoles.toggle(state, true);
|
||||
this.onModeClick(state);
|
||||
}
|
||||
|
||||
@ -133,25 +133,26 @@ define([
|
||||
this.btnDateTime && this.btnDateTime.on('click', function (b, e) {
|
||||
me.fireEvent('forms:insert', ['datetime']);
|
||||
});
|
||||
this.btnViewFormRoles && this.btnViewFormRoles.on('click', function (b, e) {
|
||||
var item = b.menu.getChecked();
|
||||
if (item) {
|
||||
item = item.caption;
|
||||
} else if (me._state.roles && me._state.roles.length>0) {
|
||||
item = me._state.roles[0].asc_getSettings().asc_getName();
|
||||
}
|
||||
me.fireEvent('forms:mode', [b.pressed, item]);
|
||||
});
|
||||
this.btnViewFormRoles.menu.on('item:click', _.bind(function (menu, item) {
|
||||
if (!!item.checked) {
|
||||
me.btnViewFormRoles.toggle(true, true);
|
||||
me.fireEvent('forms:mode', [true, item.caption]);
|
||||
}
|
||||
}, me));
|
||||
this.btnViewFormRoles.menu.on('show:after', function (menu) {
|
||||
me.fillRolesMenu();
|
||||
});
|
||||
|
||||
if (this.btnViewFormRoles) {
|
||||
this.btnViewFormRoles.on('click', function (b, e) {
|
||||
var item = b.menu.getChecked();
|
||||
if (item) {
|
||||
item = item.caption;
|
||||
} else if (me._state.roles && me._state.roles.length>0) {
|
||||
item = me._state.roles[0].asc_getSettings().asc_getName();
|
||||
}
|
||||
me.fireEvent('forms:mode', [b.pressed, item]);
|
||||
});
|
||||
this.btnViewFormRoles.menu.on('item:click', _.bind(function (menu, item) {
|
||||
if (!!item.checked) {
|
||||
me.btnViewFormRoles.toggle(true, true);
|
||||
me.fireEvent('forms:mode', [true, item.caption]);
|
||||
}
|
||||
}, me));
|
||||
this.btnViewFormRoles.menu.on('show:after', function (menu) {
|
||||
me.fillRolesMenu();
|
||||
});
|
||||
}
|
||||
this.btnManager && this.btnManager.on('click', function (b, e) {
|
||||
me.fireEvent('forms:manager');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user