[mobile] Fix display additional context menu items on phones
This commit is contained in:
parent
b87c1e0fcc
commit
c1451ba01b
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
.list-block {
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
|
||||
&:first-child {
|
||||
ul {
|
||||
|
|
@ -53,6 +54,11 @@
|
|||
.hairline-color(right, transparent);
|
||||
}
|
||||
}
|
||||
|
||||
html.phone & {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
&.list-button {
|
||||
color: @white;
|
||||
.hairline(right, @modalHairlineColor);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
}
|
||||
|
||||
.list-block {
|
||||
white-space: pre;
|
||||
|
||||
ul {
|
||||
height: 48px;
|
||||
}
|
||||
|
|
@ -17,5 +19,11 @@
|
|||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.item-link {
|
||||
html.phone & {
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -56,6 +56,7 @@ define([
|
|||
var _stack,
|
||||
_view,
|
||||
_fastCoAuthTips = [],
|
||||
_actionSheets = [],
|
||||
_isEdit = false;
|
||||
|
||||
return {
|
||||
|
|
@ -132,6 +133,22 @@ define([
|
|||
return true;
|
||||
}
|
||||
});
|
||||
} else if ('showActionSheet' == eventName && _actionSheets.length > 0) {
|
||||
_.delay(function () {
|
||||
_.each(_actionSheets, function (action) {
|
||||
action.text = action.caption
|
||||
action.onClick = function () {
|
||||
me.onContextMenuClick(null, action.event)
|
||||
}
|
||||
});
|
||||
|
||||
uiApp.actions([_actionSheets, [
|
||||
{
|
||||
text: me.sheetCancel,
|
||||
bold: true
|
||||
}
|
||||
]]);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
_view.hideMenu();
|
||||
|
|
@ -281,6 +298,8 @@ define([
|
|||
menuItems = [],
|
||||
canCopy = me.api.can_CopyCut();
|
||||
|
||||
_actionSheets = [];
|
||||
|
||||
if (canCopy) {
|
||||
menuItems.push({
|
||||
caption: me.menuCopy,
|
||||
|
|
@ -360,10 +379,6 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
if (Common.SharedSettings.get('phone') && menuItems.length > 3) {
|
||||
menuItems = menuItems.slice(0, 3);
|
||||
}
|
||||
|
||||
if (isLink) {
|
||||
menuItems.push({
|
||||
caption: me.menuOpenLink,
|
||||
|
|
@ -371,6 +386,16 @@ define([
|
|||
});
|
||||
}
|
||||
|
||||
if (Common.SharedSettings.get('phone') && menuItems.length > 3) {
|
||||
_actionSheets = menuItems.slice(3);
|
||||
|
||||
menuItems = menuItems.slice(0, 3);
|
||||
menuItems.push({
|
||||
caption: me.menuMore,
|
||||
event: 'showActionSheet'
|
||||
});
|
||||
}
|
||||
|
||||
return menuItems;
|
||||
},
|
||||
|
||||
|
|
@ -381,7 +406,9 @@ define([
|
|||
menuEdit: 'Edit',
|
||||
menuDelete: 'Delete',
|
||||
menuAddLink: 'Add Link',
|
||||
menuOpenLink: 'Open Link'
|
||||
menuOpenLink: 'Open Link',
|
||||
menuMore: 'More',
|
||||
sheetCancel: 'Cancel'
|
||||
}
|
||||
})(), DE.Controllers.DocumentHolder || {}))
|
||||
});
|
||||
|
|
@ -20,6 +20,8 @@
|
|||
"DE.Controllers.DocumentHolder.menuDelete": "Löschen",
|
||||
"DE.Controllers.DocumentHolder.menuEdit": "Bearbeiten",
|
||||
"DE.Controllers.DocumentHolder.menuOpenLink": "Link öffnen",
|
||||
"DE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"DE.Controllers.DocumentHolder.sheetCancel": "Abbrechen",
|
||||
"DE.Controllers.DocumentHolder.menuPaste": "Einfügen",
|
||||
"DE.Controllers.DocumentHolder.textGuest": "Gast",
|
||||
"DE.Controllers.EditContainer.textChart": "Diagramm",
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
"DE.Controllers.DocumentHolder.menuDelete": "Delete",
|
||||
"DE.Controllers.DocumentHolder.menuEdit": "Edit",
|
||||
"DE.Controllers.DocumentHolder.menuOpenLink": "Open Link",
|
||||
"DE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"DE.Controllers.DocumentHolder.sheetCancel": "Cancel",
|
||||
"DE.Controllers.DocumentHolder.menuPaste": "Paste",
|
||||
"DE.Controllers.DocumentHolder.textGuest": "Guest",
|
||||
"DE.Controllers.EditContainer.textChart": "Chart",
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
"DE.Controllers.DocumentHolder.menuDelete": "Delete",
|
||||
"DE.Controllers.DocumentHolder.menuEdit": "Edit",
|
||||
"DE.Controllers.DocumentHolder.menuOpenLink": "Open Link",
|
||||
"DE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"DE.Controllers.DocumentHolder.sheetCancel": "Cancel",
|
||||
"DE.Controllers.DocumentHolder.menuPaste": "Paste",
|
||||
"DE.Controllers.DocumentHolder.textGuest": "Guest",
|
||||
"DE.Controllers.EditContainer.textChart": "Chart",
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
"DE.Controllers.DocumentHolder.menuDelete": "Supprimer",
|
||||
"DE.Controllers.DocumentHolder.menuEdit": "Modifier",
|
||||
"DE.Controllers.DocumentHolder.menuOpenLink": "Ouvrir le lien",
|
||||
"DE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"DE.Controllers.DocumentHolder.sheetCancel": "Annuler",
|
||||
"DE.Controllers.DocumentHolder.menuPaste": "Coller",
|
||||
"DE.Controllers.DocumentHolder.textGuest": "Invité",
|
||||
"DE.Controllers.EditContainer.textChart": "Graphique",
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
"DE.Controllers.DocumentHolder.menuDelete": "Удалить",
|
||||
"DE.Controllers.DocumentHolder.menuEdit": "Редактировать",
|
||||
"DE.Controllers.DocumentHolder.menuOpenLink": "Перейти",
|
||||
"DE.Controllers.DocumentHolder.menuMore": "Еще",
|
||||
"DE.Controllers.DocumentHolder.sheetCancel": "Отмена",
|
||||
"DE.Controllers.DocumentHolder.menuPaste": "Вставить",
|
||||
"DE.Controllers.DocumentHolder.textGuest": "Гость",
|
||||
"DE.Controllers.EditContainer.textChart": "Диаграмма",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -54,6 +54,7 @@ define([
|
|||
// private
|
||||
var _stack,
|
||||
_view,
|
||||
_actionSheets = [],
|
||||
_isEdit = false,
|
||||
_isPopMenuHidden = false;
|
||||
|
||||
|
|
@ -125,6 +126,22 @@ define([
|
|||
return true;
|
||||
}
|
||||
});
|
||||
} else if ('showActionSheet' == eventName && _actionSheets.length > 0) {
|
||||
_.delay(function () {
|
||||
_.each(_actionSheets, function (action) {
|
||||
action.text = action.caption
|
||||
action.onClick = function () {
|
||||
me.onContextMenuClick(null, action.event)
|
||||
}
|
||||
});
|
||||
|
||||
uiApp.actions([_actionSheets, [
|
||||
{
|
||||
text: me.sheetCancel,
|
||||
bold: true
|
||||
}
|
||||
]]);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
_view.hideMenu();
|
||||
|
|
@ -184,6 +201,8 @@ define([
|
|||
menuItems = [],
|
||||
canCopy = me.api.can_CopyCut();
|
||||
|
||||
_actionSheets = [];
|
||||
|
||||
var isText = false,
|
||||
isTable = false,
|
||||
isImage = false,
|
||||
|
|
@ -270,10 +289,6 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
if (Common.SharedSettings.get('phone') && menuItems.length > 3) {
|
||||
menuItems = menuItems.slice(0, 3);
|
||||
}
|
||||
|
||||
if (isLink) {
|
||||
menuItems.push({
|
||||
caption: me.menuOpenLink,
|
||||
|
|
@ -281,6 +296,16 @@ define([
|
|||
});
|
||||
}
|
||||
|
||||
if (Common.SharedSettings.get('phone') && menuItems.length > 3) {
|
||||
_actionSheets = menuItems.slice(3);
|
||||
|
||||
menuItems = menuItems.slice(0, 3);
|
||||
menuItems.push({
|
||||
caption: me.menuMore,
|
||||
event: 'showActionSheet'
|
||||
});
|
||||
}
|
||||
|
||||
return menuItems;
|
||||
},
|
||||
|
||||
|
|
@ -290,7 +315,9 @@ define([
|
|||
menuEdit: 'Edit',
|
||||
menuDelete: 'Delete',
|
||||
menuAddLink: 'Add Link',
|
||||
menuOpenLink: 'Open Link'
|
||||
menuOpenLink: 'Open Link',
|
||||
menuMore: 'More',
|
||||
sheetCancel: 'Cancel'
|
||||
}
|
||||
})(), PE.Controllers.DocumentHolder || {}))
|
||||
});
|
||||
|
|
@ -30,6 +30,8 @@
|
|||
"PE.Controllers.DocumentHolder.menuEdit": "Bearbeiten",
|
||||
"PE.Controllers.DocumentHolder.menuOpenLink": "Link öffnen",
|
||||
"PE.Controllers.DocumentHolder.menuPaste": "Einfügen",
|
||||
"PE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"PE.Controllers.DocumentHolder.sheetCancel": "Abbrechen",
|
||||
"PE.Controllers.EditContainer.textChart": "Diagramm",
|
||||
"PE.Controllers.EditContainer.textHyperlink": "Hyperlink",
|
||||
"PE.Controllers.EditContainer.textImage": "Bild",
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
"PE.Controllers.DocumentHolder.menuEdit": "Edit",
|
||||
"PE.Controllers.DocumentHolder.menuOpenLink": "Open Link",
|
||||
"PE.Controllers.DocumentHolder.menuPaste": "Paste",
|
||||
"PE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"PE.Controllers.DocumentHolder.sheetCancel": "Cancel",
|
||||
"PE.Controllers.EditContainer.textChart": "Chart",
|
||||
"PE.Controllers.EditContainer.textHyperlink": "Hyperlink",
|
||||
"PE.Controllers.EditContainer.textImage": "Image",
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
"PE.Controllers.DocumentHolder.menuEdit": "Modifier",
|
||||
"PE.Controllers.DocumentHolder.menuOpenLink": "Ouvrir le lien",
|
||||
"PE.Controllers.DocumentHolder.menuPaste": "Coller",
|
||||
"PE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"PE.Controllers.DocumentHolder.sheetCancel": "Annuler",
|
||||
"PE.Controllers.EditContainer.textChart": "Graphique",
|
||||
"PE.Controllers.EditContainer.textHyperlink": "Lien hypertexte",
|
||||
"PE.Controllers.EditContainer.textImage": "Image",
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
"PE.Controllers.DocumentHolder.menuEdit": "Редактировать",
|
||||
"PE.Controllers.DocumentHolder.menuOpenLink": "Перейти по ссылке",
|
||||
"PE.Controllers.DocumentHolder.menuPaste": "Вставить",
|
||||
"PE.Controllers.DocumentHolder.menuMore": "Еще",
|
||||
"PE.Controllers.DocumentHolder.sheetCancel": "Отмена",
|
||||
"PE.Controllers.EditContainer.textChart": "Диаграмма",
|
||||
"PE.Controllers.EditContainer.textHyperlink": "Гиперссылка",
|
||||
"PE.Controllers.EditContainer.textImage": "Изображение",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -51,7 +51,8 @@ define([
|
|||
|
||||
SSE.Controllers.DocumentHolder = Backbone.Controller.extend(_.extend((function() {
|
||||
// private
|
||||
var _isEdit = false;
|
||||
var _actionSheets = [],
|
||||
_isEdit = false;
|
||||
|
||||
function openLink(url) {
|
||||
var newDocumentPage = window.open(url, '_blank');
|
||||
|
|
@ -151,6 +152,24 @@ define([
|
|||
break;
|
||||
}
|
||||
|
||||
if ('showActionSheet' == event && _actionSheets.length > 0) {
|
||||
_.delay(function () {
|
||||
_.each(_actionSheets, function (action) {
|
||||
action.text = action.caption
|
||||
action.onClick = function () {
|
||||
me.onContextMenuClick(null, action.event)
|
||||
}
|
||||
});
|
||||
|
||||
uiApp.actions([_actionSheets, [
|
||||
{
|
||||
text: me.sheetCancel,
|
||||
bold: true
|
||||
}
|
||||
]]);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
me.view.hideMenu();
|
||||
},
|
||||
|
||||
|
|
@ -184,6 +203,8 @@ define([
|
|||
_initMenu: function (cellinfo) {
|
||||
var me = this;
|
||||
|
||||
_actionSheets = [];
|
||||
|
||||
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu;
|
||||
var iscelllocked = cellinfo.asc_getLocked(),
|
||||
seltype = cellinfo.asc_getFlags().asc_getSelectionType();
|
||||
|
|
@ -300,7 +321,13 @@ define([
|
|||
}
|
||||
|
||||
if (Common.SharedSettings.get('phone') && menuItems.length > 3) {
|
||||
_actionSheets = menuItems.slice(3);
|
||||
|
||||
menuItems = menuItems.slice(0, 3);
|
||||
menuItems.push({
|
||||
caption: me.menuMore,
|
||||
event: 'showActionSheet'
|
||||
});
|
||||
}
|
||||
|
||||
return menuItems;
|
||||
|
|
@ -320,7 +347,9 @@ define([
|
|||
menuShow: 'Show',
|
||||
menuHide: 'Hide',
|
||||
menuEdit: 'Edit',
|
||||
menuCell: 'Cell'
|
||||
menuCell: 'Cell',
|
||||
menuMore: 'More',
|
||||
sheetCancel: 'Cancel'
|
||||
}
|
||||
})(), SSE.Controllers.DocumentHolder || {}))
|
||||
});
|
||||
|
|
@ -31,6 +31,8 @@
|
|||
"SSE.Controllers.DocumentHolder.menuUnwrap": "Umbruch aufheben",
|
||||
"SSE.Controllers.DocumentHolder.menuWrap": "Umbrechen",
|
||||
"SSE.Controllers.DocumentHolder.warnMergeLostData": "Vorgang kann die Daten in den markierten Zellen zerstören.<br>Fortsenzen? ",
|
||||
"SSE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"SSE.Controllers.DocumentHolder.sheetCancel": "Abbrechen",
|
||||
"SSE.Controllers.EditContainer.textSettings": "Settings",
|
||||
"SSE.Controllers.EditContainer.textCell": "Cell",
|
||||
"SSE.Controllers.EditContainer.textTable": "Table",
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
"SSE.Controllers.DocumentHolder.menuUnwrap": "Unwrap",
|
||||
"SSE.Controllers.DocumentHolder.menuWrap": "Wrap",
|
||||
"SSE.Controllers.DocumentHolder.warnMergeLostData": "Operation can destroy data in the selected cells.<br>Continue?",
|
||||
"SSE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"SSE.Controllers.DocumentHolder.sheetCancel": "Cancel",
|
||||
"SSE.Controllers.EditContainer.textSettings": "Settings",
|
||||
"SSE.Controllers.EditContainer.textCell": "Cell",
|
||||
"SSE.Controllers.EditContainer.textTable": "Table",
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
"SSE.Controllers.DocumentHolder.menuUnwrap": "Annuler le renvoi",
|
||||
"SSE.Controllers.DocumentHolder.menuWrap": "Renvoi à la ligne",
|
||||
"SSE.Controllers.DocumentHolder.warnMergeLostData": "Cette opération détruira les données des cellules sélectionnées. <br>Сontinuer ?",
|
||||
"SSE.Controllers.DocumentHolder.menuMore": "More",
|
||||
"SSE.Controllers.DocumentHolder.sheetCancel": "Annuler",
|
||||
"SSE.Controllers.EditContainer.textSettings": "Settings",
|
||||
"SSE.Controllers.EditContainer.textCell": "Cell",
|
||||
"SSE.Controllers.EditContainer.textTable": "Table",
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
"SSE.Controllers.DocumentHolder.menuUnwrap": "Убрать перенос",
|
||||
"SSE.Controllers.DocumentHolder.menuWrap": "Перенос текста",
|
||||
"SSE.Controllers.DocumentHolder.warnMergeLostData": "Операция может уничтожить данные в выделенных ячейках.<br>Продолжить?",
|
||||
"SSE.Controllers.DocumentHolder.menuMore": "Еще",
|
||||
"SSE.Controllers.DocumentHolder.sheetCancel": "Отмена",
|
||||
"SSE.Controllers.EditContainer.textSettings": "Настройки",
|
||||
"SSE.Controllers.EditContainer.textCell": "Ячейка",
|
||||
"SSE.Controllers.EditContainer.textTable": "Таблица",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue