[Mobile] Grid List/Gestures
Context menu only shown with contextmenu click on desktops (non-mobile devices). Also edited items list in a folder's representation to show the icon on the left side, with text centered horizontally (only mobile).
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
{
|
||||
"key": "menu",
|
||||
"implementation": "gestures/ContextMenuGesture.js",
|
||||
"depends": [ "$compile", "$document", "$window", "$rootScope" ]
|
||||
"depends": [ "$compile", "$document", "$window", "$rootScope", "queryService" ]
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
|
||||
@@ -50,7 +50,7 @@ define(
|
||||
* @param {DomainObject} domainObject the object on which actions
|
||||
* in the context menu will be performed
|
||||
*/
|
||||
function ContextMenuGesture($compile, $document, $window, $rootScope, element, domainObject) {
|
||||
function ContextMenuGesture($compile, $document, $window, $rootScope, queryService, element, domainObject) {
|
||||
function showMenu(event) {
|
||||
var winDim = [$window.innerWidth, $window.innerHeight],
|
||||
eventCoors = [event.pageX, event.pageY],
|
||||
@@ -102,8 +102,11 @@ define(
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
// When context menu event occurs, show object actions instead
|
||||
element.on('contextmenu', showMenu);
|
||||
// Iff the user is not on a mobile device, then when
|
||||
// the context menu event occurs, show object actions instead
|
||||
if (!queryService.isMobile(navigator.userAgent)) {
|
||||
element.on('contextmenu', showMenu);
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user