[Browse] Some progress

Still doesn't work.
This commit is contained in:
Sarah Hale
2015-07-01 14:32:49 -07:00
parent 9ad1c25d53
commit e9989ae00d
6 changed files with 95 additions and 75 deletions

View File

@@ -36,7 +36,7 @@
{
"key": "MenuArrowController",
"implementation": "MenuArrowController",
"depends": [ "$scope" ]
"depends": [ "$scope", "$route", "objectService" ]
}
],
"controls": [

View File

@@ -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>

View File

@@ -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
};