Improve arguments reading in timeline

This commit is contained in:
Gaël Métais
2015-03-08 23:13:09 +01:00
parent 3e0e31a5fe
commit 121a8b11b8
13 changed files with 313 additions and 27 deletions
+9
View File
@@ -187,6 +187,15 @@ timelineCtrl.controller('TimelineCtrl', ['$scope', '$rootScope', '$routeParams',
node.showDetails = !isOpen;
};
$scope.isStringOfObject = function(str) {
return typeof str === 'string' && str[0] === '{' && str[str.length - 1] === '}';
};
$scope.isPureString = function(str) {
return typeof str === 'string' && str[0] !== '{' && str !== '(function)' && str !== '[Object]' && str !== '[Array]' && str !== 'true' && str !== 'false' && str !== 'undefined' && str !== 'unknown';
};
$scope.backToDashboard = function() {
$location.path('/result/' + $scope.runId);
};
+11 -2
View File
@@ -43,6 +43,17 @@ offendersDirectives.directive('domElementButton', function() {
};
});
offendersDirectives.directive('jqueryContextButton', function() {
return {
restrict: 'E',
scope: {
context: '='
},
templateUrl: 'views/jqueryContextButton.html',
replace: true
};
});
offendersDirectives.filter('shortenUrl', function() {
return function(url, maxLength) {
if (!maxLength) {
@@ -104,8 +115,6 @@ offendersDirectives.directive('offenderButton', function() {
restrict: 'C',
link: function(scope, element, attrs) {
console.log('initializing touchstart');
element.bind('touchstart mouseenter', function(e) {
element.addClass('mouseOver');
e.preventDefault();