[Browse] Some progress
Still doesn't work.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
{
|
||||
"key": "MenuArrowController",
|
||||
"implementation": "MenuArrowController",
|
||||
"depends": [ "$scope" ]
|
||||
"depends": [ "$scope", "$route", "objectService" ]
|
||||
}
|
||||
],
|
||||
"controls": [
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
<span ng-if="parameters.mode" class='action'>{{parameters.mode}}</span>
|
||||
<span class='type-name'>{{type.getName()}}</span>
|
||||
<span class='title-label'>{{model.name}}</span>
|
||||
<!--a id='actions-menu'
|
||||
class='ui-symbol context-available'
|
||||
ng-click='ObjectHeaderController.contextMenu()'>v</a-->
|
||||
<mct-representation key="'menu-arrow'"></mct-representation>
|
||||
</span>
|
||||
</div>
|
||||
@@ -22,12 +22,15 @@
|
||||
/*global define*/
|
||||
|
||||
/**
|
||||
* Module defining ObjectHeaderController. Created by shale on 06/30/2015.
|
||||
* Module defining MenuArrowController. Created by shale on 06/30/2015.
|
||||
*/
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
var ROOT_ID = "ROOT",
|
||||
DEFAULT_PATH = "mine";
|
||||
|
||||
/**
|
||||
* A left-click on the menu arrow should display a
|
||||
@@ -35,10 +38,10 @@ define(
|
||||
* menu.
|
||||
* @constructor
|
||||
*/
|
||||
function MenuArrowController($scope) {
|
||||
function MenuArrowController($scope, $route, domainObject) {
|
||||
|
||||
function showMenu(event) {
|
||||
console.log('contextMenu() called');
|
||||
console.log('showMenu() called');
|
||||
//console.log('editor? ', $scope.domainObject.hasCapability('editor'));
|
||||
/*
|
||||
if (true || $scope.domainObject.hasCapability('editor')) {
|
||||
@@ -46,9 +49,14 @@ define(
|
||||
}
|
||||
*/
|
||||
|
||||
$scope.domainObject.getCapability('action').perform({key: 'contextMenu', event: event});
|
||||
//console.log('domainObject ', domainObject);
|
||||
//console.log('$scope.domainObject ', $scope.domainObject);
|
||||
console.log('event ', event);
|
||||
|
||||
//$scope.domainObject.getCapability('action').perform({key: 'contextMenu', event: event});
|
||||
domainObject.getCapability('action').perform({key: 'contextMenu', event: event});
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
showMenu: showMenu
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user