[DE mobile] Fixed display context menu. Fixed display about view.

This commit is contained in:
Alexander Yuzhin 2016-12-21 19:16:25 +03:00
parent a465f3d109
commit 307e3630dd
11 changed files with 86 additions and 40 deletions

View file

@ -33,5 +33,6 @@
.logo {
background: url('../../../../common/mobile/resources/img/about/onlyoffice.svg') no-repeat center;
margin-top: 20px;
}
}

View file

@ -8,6 +8,7 @@
background-color: @contextMenuBg;
width: auto;
border-radius: 8px;
z-index: 12500;
.popover-angle {
&:after {

View file

@ -3,6 +3,7 @@
.document-menu {
width: auto;
line-height: 1 !important;
z-index: 12500;
.popover-inner {
overflow: hidden;

View file

@ -43,13 +43,17 @@
define([
'core',
'jquery',
'underscore',
'backbone',
'documenteditor/mobile/app/view/DocumentHolder'
], function (core) {
], function (core, $, _, Backbone) {
'use strict';
DE.Controllers.DocumentHolder = Backbone.Controller.extend(_.extend((function() {
// private
var _stack,
_view,
_isEdit = false;
return {
@ -68,10 +72,12 @@ define([
},
setApi: function(api) {
this.api = api;
var me = this;
this.api.asc_registerCallback('asc_onShowPopMenu', _.bind(this.onApiShowPopMenu, this));
this.api.asc_registerCallback('asc_onHidePopMenu', _.bind(this.onApiHidePopMenu, this));
me.api = api;
me.api.asc_registerCallback('asc_onShowPopMenu', _.bind(me.onApiShowPopMenu, me));
me.api.asc_registerCallback('asc_onHidePopMenu', _.bind(me.onApiHidePopMenu, me));
},
setMode: function (mode) {
@ -82,7 +88,7 @@ define([
onLaunch: function() {
var me = this;
me.view = me.createView('DocumentHolder').render();
_view = me.createView('DocumentHolder').render();
$$(window).on('resize', _.bind(me.onEditorResize, me));
},
@ -101,11 +107,11 @@ define([
} else if ('delete' == eventName) {
me.api.asc_Remove();
} else if ('edit' == eventName) {
me.view.hideMenu();
_view.hideMenu();
DE.getController('EditContainer').showModal();
} else if ('addlink' == eventName) {
me.view.hideMenu();
_view.hideMenu();
DE.getController('AddContainer').showModal();
DE.getController('AddOther').getView('AddOther').showLink();
@ -118,7 +124,7 @@ define([
});
}
me.view.hideMenu();
_view.hideMenu();
},
// API Handlers
@ -128,17 +134,21 @@ define([
},
onApiShowPopMenu: function(posX, posY) {
if ($('.popover.settings').length > 0) {
return;
}
var me = this,
items;
_stack = me.api.getSelectedElements();
items = me._initMenu(_stack);
me.view.showMenu(items, posX, posY);
_view.showMenu(items, posX, posY);
},
onApiHidePopMenu: function() {
this.view.hideMenu();
_view && _view.hideMenu();
},
// Internal

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -57,7 +57,7 @@
<div class="item-title">Display</div>
<div class="item-after">
<div class="item-input">
<input class="field right" type="text" placeholder="Display">
<input class="field right" type="text">
</div>
</div>
</div>
@ -69,7 +69,7 @@
<div class="item-title">Screen Tip</div>
<div class="item-after">
<div class="item-input">
<input class="field right" type="text" placeholder="Screen Tip">
<input class="field right" type="text">
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long