Starting modal for module info.

This commit is contained in:
Ben Vanik 2013-12-24 14:09:19 -08:00
parent e8d45d80e7
commit 8a8ee5dadc
8 changed files with 146 additions and 4 deletions

View File

@ -140,6 +140,17 @@ body {
order: 1;
flex: 0 0 auto;
padding: 5px;
display: flex;
flex-flow: row nowrap;
}
.debugger-fnlist-header-left {
order: 1;
flex: 1 1 auto;
padding-right: 5px;
}
.debugger-fnlist-header-right {
order: 2;
flex: 0 0 auto;
}
.debugger-fnlist-body {
order: 2;
@ -305,3 +316,19 @@ body {
flex: 1 1 auto;
padding: 5px;
}
.debugger-module-info {
display: block;
pointer-events: none;
}
.debugger-module-info.fade .modal-dialog {
-webkit-transition: none;
-webkit-transform: translate(0,0);
}
.debugger-module-info div {
pointer-events: auto;
}
.debugger-module-info .modal-body {
max-height: 80vh;
overflow-y: auto;
}

View File

@ -20,7 +20,7 @@
<div class="debugger-body">
<div class="debugger-fnlist">
<div class="debugger-fnlist-header">
<div class="btn-group btn-group-xs full-width">
<div class="debugger-fnlist-header-left btn-group btn-group-xs full-width">
<button type="button" class="btn btn-default dropdown-toggle full-width" data-toggle="dropdown">
{{selectedModule.name}} <span class="caret"></span>
</button>
@ -28,6 +28,11 @@
<li ng-repeat="module in moduleList"><a href="" ng-click="selectModule(module)">{{module.name}}</a></li>
</ul>
</div>
<div class="debugger-fnlist-header-right btn-group btn-group-xs">
<button type="button" class="btn btn-default" ng-click="showModuleInfo(selectedModule)">
Info
</button>
</div>
</div>
<div class="debugger-fnlist-body">
<div class="debugger-fnlist-list">

View File

@ -10,13 +10,14 @@
'use strict';
var module = angular.module('xe.ui.code', [
'ui.bootstrap',
'xe.log',
'xe.session'
]);
module.controller('CodeTabController', function(
$rootScope, $scope, app, log) {
$rootScope, $scope, $modal, app, log) {
$scope.moduleList = [];
$scope.selectedModule = null;
$scope.functionList = [];
@ -61,6 +62,22 @@ module.controller('CodeTabController', function(
});
};
$scope.showModuleInfo = function(module) {
var modalInstance = $modal.open({
templateUrl: 'assets/ui/code/module-info.html',
controller: 'ModuleInfoController',
windowClass: 'debugger-module-info'
// resolve: {
// items: function () {
// return $scope.items;
// }
// }
});
modalInstance.result.then(function() {
}, function () {
});
};
$scope.showLocation = function() {
//
};

View File

@ -0,0 +1,67 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
Lots of info<br/>
</div>
</div>
</div>

View File

@ -0,0 +1,24 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
'use strict';
var module = angular.module('xe.ui.code.moduleInfo', [
'ui.bootstrap',
'xe.log',
'xe.session'
]);
module.controller('ModuleInfoController', function(
$rootScope, $scope, $modal, log) {
$scope.close = function() {
$scope.$close(null);
};
});

View File

@ -34,6 +34,7 @@
<script src="assets/ui/console/console.js"></script>
<script src="assets/ui/code/code-tab.js"></script>
<script src="assets/ui/code/function-view.js"></script>
<script src="assets/ui/code/module-info.js"></script>
<script src="debugger.js"></script>
</body>

View File

@ -20,6 +20,7 @@ var module = angular.module('app', [
'xe.session',
'xe.ui.code',
'xe.ui.code.functionView',
'xe.ui.code.moduleInfo',
'xe.ui.console',
'xe.ui.navbar'
]);

View File

@ -245,8 +245,8 @@ json_t* Processor::OnDebugRequest(
json_array_append_new(list, module_json);
}
return list;
/*} else if (xestrcmpa(command, "get_module") == 0) {
return json_null();*/
} else if (xestrcmpa(command, "get_module") == 0) {
return json_null();
} else if (xestrcmpa(command, "get_function_list") == 0) {
json_t* module_name_json = json_object_get(request, "module");
if (!module_name_json || !json_is_string(module_name_json)) {