[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:
Shivam Dave
2015-07-23 16:47:57 -07:00
parent 7993e4c03f
commit a89f9eed42
4 changed files with 86 additions and 17 deletions

View File

@ -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 {
/**