mirror of
https://github.com/xenia-project/xenia.git
synced 2026-04-20 22:13:40 +00:00
Finishing off module info for now.
This commit is contained in:
parent
dcd9f8b6ff
commit
44cbe1bbcf
8 changed files with 326 additions and 7 deletions
|
|
@ -9,7 +9,9 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('xe.directives', []);
|
||||
var module = angular.module('xe.directives', [
|
||||
'ui.router'
|
||||
]);
|
||||
|
||||
|
||||
module.directive('uiEnter', function() {
|
||||
|
|
@ -49,3 +51,39 @@ module.directive('uiScrollDownOn', function() {
|
|||
};
|
||||
});
|
||||
|
||||
module.directive('xeCoderef', function($state) {
|
||||
return {
|
||||
priority: 1,
|
||||
link: function($scope, element, attrs) {
|
||||
var target = attrs.xeCoderef;
|
||||
var stateName = 'session.code.function';
|
||||
var stateParams = {
|
||||
function: target,
|
||||
a: null
|
||||
};
|
||||
element.attr('href', $state.href(stateName, stateParams));
|
||||
element.bind('click', function(e) {
|
||||
e.preventDefault();
|
||||
$state.go(stateName, stateParams);
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
module.directive('xeMemref', function($state) {
|
||||
return {
|
||||
priority: 1,
|
||||
link: function($scope, element, attrs) {
|
||||
var target = attrs.xeMemref;
|
||||
var stateName = 'session.memory';
|
||||
var stateParams = {
|
||||
a: target
|
||||
};
|
||||
element.attr('href', $state.href(stateName, stateParams));
|
||||
element.bind('click', function(e) {
|
||||
e.preventDefault();
|
||||
$state.go(stateName, stateParams);
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,6 +12,16 @@
|
|||
var module = angular.module('xe.filters', []);
|
||||
|
||||
|
||||
module.filter('hex16', function() {
|
||||
return function(number) {
|
||||
if (number !== null && number !== undefined) {
|
||||
var str = '' + number.toString(16).toUpperCase();
|
||||
while (str.length < 4) str = '0' + str;
|
||||
return str;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
module.filter('hex32', function() {
|
||||
return function(number) {
|
||||
if (number !== null && number !== undefined) {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ module.config(function($stateProvider, $urlRouterProvider) {
|
|||
});
|
||||
|
||||
$stateProvider.state('session.memory', {
|
||||
url: '/memory',
|
||||
url: '/memory?a',
|
||||
templateUrl: 'assets/ui/memory/memory-tab.html',
|
||||
controller: function($stateParams) {
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue