Strip whitespace from ALL the things.
This commit is contained in:
parent
f6dd8b0a4d
commit
716d7a737b
171 changed files with 807 additions and 807 deletions
306
static/js/app.js
306
static/js/app.js
File diff suppressed because it is too large
Load diff
|
@ -59,13 +59,13 @@ function PlansCtrl($scope, $location, UserService, PlanService, $routeParams) {
|
|||
|
||||
$scope.signedIn = function() {
|
||||
$('#signinModal').modal('hide');
|
||||
PlanService.handleNotedPlan();
|
||||
PlanService.handleNotedPlan();
|
||||
};
|
||||
|
||||
|
||||
$scope.buyNow = function(plan) {
|
||||
PlanService.notePlan(plan);
|
||||
if ($scope.user && !$scope.user.anonymous) {
|
||||
PlanService.handleNotedPlan();
|
||||
PlanService.handleNotedPlan();
|
||||
} else {
|
||||
$('#signinModal').modal({});
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ function PlansCtrl($scope, $location, UserService, PlanService, $routeParams) {
|
|||
|
||||
if ($scope && $routeParams['trial-plan']) {
|
||||
$scope.buyNow($routeParams['trial-plan']);
|
||||
}
|
||||
}
|
||||
}, /* include the personal plan */ true);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ function TutorialCtrl($scope, AngularTour, AngularTourSignals, UserService, Conf
|
|||
'steps': [
|
||||
{
|
||||
'title': 'Welcome to the ' + Config.REGISTRY_TITLE_SHORT + ' tutorial!',
|
||||
'templateUrl': '/static/tutorial/welcome.html'
|
||||
'templateUrl': '/static/tutorial/welcome.html'
|
||||
},
|
||||
{
|
||||
'title': 'Sign in to get started',
|
||||
|
@ -235,7 +235,7 @@ function RepoListCtrl($scope, $sanitize, Restangular, UserService, ApiService) {
|
|||
$scope.namespace = null;
|
||||
$scope.page = 1;
|
||||
$scope.publicPageCount = null;
|
||||
|
||||
|
||||
// Monitor changes in the user.
|
||||
UserService.updateUserIn($scope, function() {
|
||||
loadMyRepos($scope.namespace);
|
||||
|
@ -269,7 +269,7 @@ function RepoListCtrl($scope, $sanitize, Restangular, UserService, ApiService) {
|
|||
}
|
||||
|
||||
var options = {'public': false, 'sort': true, 'namespace': namespace};
|
||||
|
||||
|
||||
$scope.user_repositories = ApiService.listReposAsResource().withOptions(options).get(function(resp) {
|
||||
return resp.repositories;
|
||||
});
|
||||
|
@ -318,7 +318,7 @@ function LandingCtrl($scope, UserService, ApiService, Features, Config) {
|
|||
if (namespace == $scope.user.username) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if ($scope.user.organizations) {
|
||||
for (var i = 0; i < $scope.user.organizations.length; ++i) {
|
||||
var org = $scope.user.organizations[i];
|
||||
|
@ -483,7 +483,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
|
||||
$scope.currentPullCommand = $scope.pullCommands[0];
|
||||
};
|
||||
|
||||
|
||||
$scope.showNewBuildDialog = function() {
|
||||
$scope.buildDialogShowCounter++;
|
||||
};
|
||||
|
@ -655,7 +655,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
|
||||
$scope.setImage = function(imageId, opt_updateURL) {
|
||||
if (!$scope.images) { return; }
|
||||
|
||||
|
||||
var image = null;
|
||||
for (var i = 0; i < $scope.images.length; ++i) {
|
||||
var currentImage = $scope.images[i];
|
||||
|
@ -691,7 +691,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
// We must find a good default.
|
||||
for (tagName in repo.tags) {
|
||||
if (!proposedTag || tagName == 'latest') {
|
||||
proposedTag = repo.tags[tagName];
|
||||
proposedTag = repo.tags[tagName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
|
||||
if ($scope.tree) {
|
||||
$scope.tree.setTag(proposedTag.name);
|
||||
}
|
||||
}
|
||||
|
||||
if (opt_updateURL) {
|
||||
$location.search('image', null);
|
||||
|
@ -871,7 +871,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
};
|
||||
|
||||
var listImages = function() {
|
||||
var params = {'repository': namespace + '/' + name};
|
||||
var params = {'repository': namespace + '/' + name};
|
||||
$scope.imageHistory = ApiService.listRepositoryImagesAsResource(params).get(function(resp) {
|
||||
$scope.images = resp.images;
|
||||
$scope.specificImages = [];
|
||||
|
@ -971,7 +971,7 @@ function BuildPackageCtrl($scope, Restangular, ApiService, DataFileService, $rou
|
|||
return dockerfilePath;
|
||||
};
|
||||
|
||||
var processBuildPack = function(uint8array) {
|
||||
var processBuildPack = function(uint8array) {
|
||||
var archiveread = function(files) {
|
||||
var getpath = function(file) {
|
||||
return file.path;
|
||||
|
@ -1056,7 +1056,7 @@ function BuildPackageCtrl($scope, Restangular, ApiService, DataFileService, $rou
|
|||
$scope.accessDenied = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$rootScope.title = 'Repository Build Pack - ' + resp['display_name'];
|
||||
$scope.repobuild = resp;
|
||||
$scope.repo = {
|
||||
|
@ -1115,7 +1115,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
|
|||
$('#confirmRestartBuildModal').modal('hide');
|
||||
|
||||
var subdirectory = '';
|
||||
if (build['job_config']) {
|
||||
if (build['job_config']) {
|
||||
subdirectory = build['job_config']['build_subdir'] || '';
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1159,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
|
|||
|
||||
$scope.processANSI = function(message, container) {
|
||||
var filter = container.logs._filter = (container.logs._filter || ansi2html.create());
|
||||
|
||||
|
||||
// Note: order is important here.
|
||||
var setup = filter.getSetupHtml();
|
||||
var stream = filter.addInputToStream(message);
|
||||
|
@ -1194,7 +1194,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
|
|||
if ($scope.pollChannel) {
|
||||
$scope.pollChannel.stop();
|
||||
}
|
||||
|
||||
|
||||
// Create a new channel for polling the build status and logs.
|
||||
var conductStatusAndLogRequest = function(callback) {
|
||||
getBuildStatusAndLogs(build, callback);
|
||||
|
@ -1230,7 +1230,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
|
|||
return endIndex;
|
||||
};
|
||||
|
||||
var getBuildStatusAndLogs = function(build, callback) {
|
||||
var getBuildStatusAndLogs = function(build, callback) {
|
||||
var params = {
|
||||
'repository': namespace + '/' + name,
|
||||
'build_uuid': build.id
|
||||
|
@ -1238,7 +1238,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
|
|||
|
||||
ApiService.getRepoBuildStatus(null, params, true).then(function(resp) {
|
||||
if (build != $scope.currentBuild) { callback(false); return; }
|
||||
|
||||
|
||||
// Note: We use extend here rather than replacing as Angular is depending on the
|
||||
// root build object to remain the same object.
|
||||
var matchingBuilds = $.grep($scope.builds, function(elem) {
|
||||
|
@ -1258,9 +1258,9 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
|
|||
'start': $scope.logStartIndex
|
||||
};
|
||||
|
||||
ApiService.getRepoBuildLogsAsResource(params, true).withOptions(options).get(function(resp) {
|
||||
ApiService.getRepoBuildLogsAsResource(params, true).withOptions(options).get(function(resp) {
|
||||
if (build != $scope.currentBuild) { callback(false); return; }
|
||||
|
||||
|
||||
// Process the logs we've received.
|
||||
$scope.logStartIndex = processLogs(resp['logs'], resp['start'], resp['total']);
|
||||
|
||||
|
@ -1323,7 +1323,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
|
|||
fetchRepository();
|
||||
}
|
||||
|
||||
function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerService, $routeParams,
|
||||
function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerService, $routeParams,
|
||||
$rootScope, $location, UserService, Config, Features, ExternalNotificationData) {
|
||||
|
||||
var namespace = $routeParams.namespace;
|
||||
|
@ -1335,7 +1335,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
|
|||
$scope.permissions = {'team': [], 'user': [], 'loading': 2};
|
||||
$scope.logsShown = 0;
|
||||
$scope.deleting = false;
|
||||
|
||||
|
||||
$scope.permissionCache = {};
|
||||
$scope.showTriggerSetupCounter = 0;
|
||||
|
||||
|
@ -1436,7 +1436,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
|
|||
var permission = $scope.permissions[kind][entityName];
|
||||
var currentRole = permission.role;
|
||||
permission.role = role;
|
||||
|
||||
|
||||
var permissionPut = Restangular.one(getRestUrl('repository', namespace, name, 'permissions', kind, entityName));
|
||||
permissionPut.customPUT(permission).then(function() {}, function(resp) {
|
||||
$scope.permissions[kind][entityName] = {'role': currentRole};
|
||||
|
@ -1534,7 +1534,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
|
|||
$scope.deleting = true;
|
||||
ApiService.deleteRepository(null, params).then(function() {
|
||||
$scope.repo = null;
|
||||
|
||||
|
||||
setTimeout(function() {
|
||||
document.location = '/repository/';
|
||||
}, 1000);
|
||||
|
@ -1545,7 +1545,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
|
|||
};
|
||||
|
||||
$scope.showNewNotificationCounter = 0;
|
||||
|
||||
|
||||
$scope.showNewNotificationDialog = function() {
|
||||
$scope.showNewNotificationCounter++;
|
||||
};
|
||||
|
@ -1629,7 +1629,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
|
|||
};
|
||||
|
||||
$scope.showManualBuildDialog = 0;
|
||||
|
||||
|
||||
$scope.startTrigger = function(trigger, opt_custom) {
|
||||
var parameters = TriggerService.getRunParameters(trigger.service);
|
||||
if (parameters.length && !opt_custom) {
|
||||
|
@ -1767,7 +1767,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
|
|||
$scope.invoicesShown = 0;
|
||||
|
||||
$scope.USER_PATTERN = USER_PATTERN;
|
||||
|
||||
|
||||
$scope.loadAuthedApps = function() {
|
||||
if ($scope.authorizedApps) { return; }
|
||||
|
||||
|
@ -1810,7 +1810,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
|
|||
$scope.orgPlans = plans;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$scope.convertStep = 1;
|
||||
};
|
||||
|
||||
|
@ -1858,7 +1858,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
|
|||
}, function(result) {
|
||||
$scope.updatingUser = false;
|
||||
UIService.showFormError('#changeUsernameForm', result);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.changeEmail = function() {
|
||||
|
@ -1903,7 +1903,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
|
|||
UserService.load();
|
||||
}, function(result) {
|
||||
$scope.updatingUser = false;
|
||||
UIService.showFormError('#changePasswordForm', result);
|
||||
UIService.showFormError('#changePasswordForm', result);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1920,7 +1920,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
|
|||
};
|
||||
}
|
||||
|
||||
function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService) {
|
||||
function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService) {
|
||||
var namespace = $routeParams.namespace;
|
||||
var name = $routeParams.name;
|
||||
var imageid = $routeParams.image;
|
||||
|
@ -1944,7 +1944,7 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, I
|
|||
if (index < 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
return filepath.substr(0, index).split('/');
|
||||
};
|
||||
|
||||
|
@ -1967,10 +1967,10 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, I
|
|||
$scope.search['$'] = filter;
|
||||
document.getElementById('change-filter').value = filter;
|
||||
};
|
||||
|
||||
|
||||
$scope.initializeTree = function() {
|
||||
if ($scope.tree) { return; }
|
||||
|
||||
|
||||
$scope.tree = new ImageFileChangeTree($scope.image, $scope.combinedChanges);
|
||||
$timeout(function() {
|
||||
$scope.tree.draw('changes-tree-container');
|
||||
|
@ -1990,7 +1990,7 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, I
|
|||
var fetchImage = function() {
|
||||
var params = {
|
||||
'repository': namespace + '/' + name,
|
||||
'image_id': imageid
|
||||
'image_id': imageid
|
||||
};
|
||||
|
||||
$scope.image = ApiService.getImageAsResource(params).get(function(image) {
|
||||
|
@ -2015,14 +2015,14 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, I
|
|||
var fetchChanges = function() {
|
||||
var params = {
|
||||
'repository': namespace + '/' + name,
|
||||
'image_id': imageid
|
||||
'image_id': imageid
|
||||
};
|
||||
|
||||
ApiService.getImageChanges(null, params).then(function(changes) {
|
||||
var combinedChanges = [];
|
||||
var addCombinedChanges = function(c, kind) {
|
||||
for (var i = 0; i < c.length; ++i) {
|
||||
combinedChanges.push({
|
||||
combinedChanges.push({
|
||||
'kind': kind,
|
||||
'file': c[i]
|
||||
});
|
||||
|
@ -2066,7 +2066,7 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, ApiService
|
|||
$scope.$watch('repo.namespace', function(namespace) {
|
||||
// Note: Can initially be undefined.
|
||||
if (!namespace) { return; }
|
||||
|
||||
|
||||
var isUserNamespace = (namespace == $scope.user.username);
|
||||
|
||||
$scope.planRequired = null;
|
||||
|
@ -2103,7 +2103,7 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, ApiService
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
|
@ -2176,7 +2176,7 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, ApiService
|
|||
var isUserNamespace = $scope.isUserNamespace;
|
||||
ApiService.getPrivateAllowed(isUserNamespace ? null : $scope.repo.namespace).then(function(resp) {
|
||||
$scope.checkingPlan = false;
|
||||
|
||||
|
||||
if (resp['privateAllowed']) {
|
||||
$scope.planRequired = null;
|
||||
return;
|
||||
|
@ -2218,8 +2218,8 @@ function OrgViewCtrl($rootScope, $scope, ApiService, $routeParams) {
|
|||
{ 'id': 'creator', 'title': 'Creator', 'kind': 'success' },
|
||||
{ 'id': 'admin', 'title': 'Admin', 'kind': 'primary' }
|
||||
];
|
||||
|
||||
$scope.setRole = function(role, teamname) {
|
||||
|
||||
$scope.setRole = function(role, teamname) {
|
||||
var previousRole = $scope.organization.teams[teamname].role;
|
||||
$scope.organization.teams[teamname].role = role;
|
||||
|
||||
|
@ -2231,7 +2231,7 @@ function OrgViewCtrl($rootScope, $scope, ApiService, $routeParams) {
|
|||
var data = $scope.organization.teams[teamname];
|
||||
|
||||
ApiService.updateOrganizationTeam(data, params).then(function(resp) {
|
||||
}, function(resp) {
|
||||
}, function(resp) {
|
||||
$scope.organization.teams[teamname].role = previousRole;
|
||||
$scope.roleError = resp.data || '';
|
||||
$('#cannotChangeTeamModal').modal({});
|
||||
|
@ -2306,7 +2306,7 @@ function OrgAdminCtrl($rootScope, $scope, $timeout, Restangular, $routeParams, U
|
|||
PlanService.getPlans(function(plans) {
|
||||
$scope.plans = plans;
|
||||
$scope.plan_map = {};
|
||||
|
||||
|
||||
for (var i = 0; i < plans.length; ++i) {
|
||||
$scope.plan_map[plans[i].stripeId] = plans[i];
|
||||
}
|
||||
|
@ -2321,7 +2321,7 @@ function OrgAdminCtrl($rootScope, $scope, $timeout, Restangular, $routeParams, U
|
|||
$scope.invoicesShown = 0;
|
||||
$scope.applicationsShown = 0;
|
||||
$scope.changingOrganization = false;
|
||||
|
||||
|
||||
$scope.loadLogs = function() {
|
||||
$scope.logsShown++;
|
||||
};
|
||||
|
@ -2444,7 +2444,7 @@ function TeamViewCtrl($rootScope, $scope, $timeout, Features, Restangular, ApiSe
|
|||
|
||||
$scope.addNewMember = function(member) {
|
||||
if (!member || $scope.memberMap[member.name]) { return; }
|
||||
|
||||
|
||||
var params = {
|
||||
'orgname': orgname,
|
||||
'teamname': teamname,
|
||||
|
@ -2539,7 +2539,7 @@ function TeamViewCtrl($rootScope, $scope, $timeout, Features, Restangular, ApiSe
|
|||
$scope.membersResource = ApiService.getOrganizationTeamMembersAsResource(params).get(function(resp) {
|
||||
$scope.members = resp.members;
|
||||
$scope.canEditMembers = resp.can_edit;
|
||||
|
||||
|
||||
$('.info-icon').popover({
|
||||
'trigger': 'hover',
|
||||
'html': true
|
||||
|
@ -2687,7 +2687,7 @@ function OrgMemberLogsCtrl($scope, $routeParams, $rootScope, $timeout, Restangul
|
|||
});
|
||||
|
||||
return resp.member;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// Load the org info and the member info.
|
||||
|
@ -2783,7 +2783,7 @@ function ManageApplicationCtrl($scope, $routeParams, $rootScope, $location, $tim
|
|||
' under organization ' + $scope.orgname;
|
||||
|
||||
return resp;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
|
||||
}
|
||||
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
||||
fToBind = this,
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
||||
fToBind = this,
|
||||
fNOP = function () {},
|
||||
fBound = function () {
|
||||
return fToBind.apply(this instanceof fNOP && oThis
|
||||
|
@ -156,7 +156,7 @@ ImageHistoryTree.prototype.updateDimensions_ = function() {
|
|||
document.getElementById(container).style.maxHeight = (viewportHeight - boundingBox.top - 150) + 'px';
|
||||
|
||||
this.setupOverscroll_();
|
||||
|
||||
|
||||
// Update the tree.
|
||||
var rootSvg = this.rootSvg_;
|
||||
var tree = this.tree_;
|
||||
|
@ -188,7 +188,7 @@ ImageHistoryTree.prototype.draw = function(container) {
|
|||
|
||||
// Save the container.
|
||||
this.container_ = container;
|
||||
|
||||
|
||||
if (!$('#' + container)[0]) {
|
||||
this.container_ = null;
|
||||
return;
|
||||
|
@ -237,7 +237,7 @@ ImageHistoryTree.prototype.draw = function(container) {
|
|||
if (d.image.command && d.image.command.length) {
|
||||
html += '<span class="command info-line"><i class="fa fa-terminal"></i>' + formatCommand(d.image) + '</span>';
|
||||
}
|
||||
html += '<span class="created info-line"><i class="fa fa-calendar"></i>' + formatTime(d.image.created) + '</span>';
|
||||
html += '<span class="created info-line"><i class="fa fa-calendar"></i>' + formatTime(d.image.created) + '</span>';
|
||||
|
||||
var tags = d.tags || [];
|
||||
html += '<span class="tooltip-tags tags">';
|
||||
|
@ -438,7 +438,7 @@ ImageHistoryTree.prototype.buildRoot_ = function() {
|
|||
var ancestors = this.getAncestors_(image);
|
||||
var immediateParent = ancestors[ancestors.length - 1];
|
||||
var parent = imageByDockerId[immediateParent];
|
||||
if (parent) {
|
||||
if (parent) {
|
||||
// Add a reference to the parent. This makes walking the tree later easier.
|
||||
imageNode.parent = parent;
|
||||
parent.children.push(imageNode);
|
||||
|
@ -612,12 +612,12 @@ ImageHistoryTree.prototype.setTag_ = function(tagName) {
|
|||
}
|
||||
|
||||
var imageByDockerId = this.imageByDockerId_;
|
||||
|
||||
|
||||
// Save the current tag.
|
||||
var previousTagName = this.currentTag_;
|
||||
this.currentTag_ = tagName;
|
||||
this.currentImage_ = null;
|
||||
|
||||
|
||||
// Update the path.
|
||||
var tagImage = this.findImage_(function(image) {
|
||||
return image.tags.indexOf(tagName || '(no tag specified)') >= 0;
|
||||
|
@ -716,7 +716,7 @@ ImageHistoryTree.prototype.update_ = function(source) {
|
|||
.attr("r", 1e-6)
|
||||
.style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; })
|
||||
.on("click", function(d) { that.toggle_(d); that.update_(d); });
|
||||
|
||||
|
||||
// Create the group that will contain the node name and its tags.
|
||||
var g = nodeEnter.append("svg:g").style("fill-opacity", 1e-6);
|
||||
|
||||
|
@ -756,7 +756,7 @@ ImageHistoryTree.prototype.update_ = function(source) {
|
|||
.attr("y", 12)
|
||||
.attr("width", 110)
|
||||
.attr("height", DEPTH_HEIGHT - 20);
|
||||
|
||||
|
||||
// Add the tags container.
|
||||
fo.append('xhtml:div')
|
||||
.attr("class", "tags")
|
||||
|
@ -949,7 +949,7 @@ function FileTreeBase() {
|
|||
* Counter for creating unique IDs.
|
||||
*/
|
||||
this.idCounter_ = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Map from file path to associated tree node.
|
||||
*/
|
||||
|
@ -1017,7 +1017,7 @@ FileTreeBase.prototype.updateDimensions_ = function() {
|
|||
|
||||
this.barWidth_ = dimensions.bw;
|
||||
this.barHeight_ = dimensions.bh;
|
||||
|
||||
|
||||
return dimensions;
|
||||
};
|
||||
|
||||
|
@ -1044,11 +1044,11 @@ FileTreeBase.prototype.dispose = function() {
|
|||
* Draws the tree.
|
||||
*/
|
||||
FileTreeBase.prototype.draw = function(container) {
|
||||
this.container_ = container;
|
||||
|
||||
this.container_ = container;
|
||||
|
||||
var dimensions = this.calculateDimensions_(container);
|
||||
if (!dimensions) { return; }
|
||||
|
||||
|
||||
var w = dimensions.w;
|
||||
var h = dimensions.h;
|
||||
var m = dimensions.m;
|
||||
|
@ -1169,7 +1169,7 @@ FileTreeBase.prototype.getContainerHeight_ = function() {
|
|||
if (!dimensions) { return; }
|
||||
|
||||
var barHeight = this.barHeight_;
|
||||
var height = (this.getVisibleCount_(this.root_) * (barHeight + 2));
|
||||
var height = (this.getVisibleCount_(this.root_) * (barHeight + 2));
|
||||
return height + dimensions.m[0] + dimensions.m[2];
|
||||
};
|
||||
|
||||
|
@ -1206,16 +1206,16 @@ FileTreeBase.prototype.update_ = function(source) {
|
|||
|
||||
// Compute the flattened node list.
|
||||
var nodes = tree.nodes(this.root_);
|
||||
|
||||
|
||||
// Compute the "layout".
|
||||
nodes.forEach(function(n, i) {
|
||||
n.x = i * barHeight;
|
||||
});
|
||||
|
||||
|
||||
// Update the nodes...
|
||||
var node = vis.selectAll("g.node")
|
||||
.data(nodes, function(d) { return d.id || (d.id = that.idCounter_++); });
|
||||
|
||||
|
||||
var nodeEnter = node.enter().append("svg:g")
|
||||
.attr("class", function(d) {
|
||||
return "node " + (d.kind ? d.kind : 'folder');
|
||||
|
@ -1241,7 +1241,7 @@ FileTreeBase.prototype.update_ = function(source) {
|
|||
that.toggle_(d);
|
||||
that.update_(source);
|
||||
});
|
||||
|
||||
|
||||
nodeEnter.append("svg:text")
|
||||
.attr("dy", 3.5)
|
||||
.attr("dx", 5.5 + 18)
|
||||
|
@ -1261,7 +1261,7 @@ FileTreeBase.prototype.update_ = function(source) {
|
|||
.duration(duration)
|
||||
.attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; })
|
||||
.style("opacity", 1);
|
||||
|
||||
|
||||
node.transition()
|
||||
.duration(duration)
|
||||
// TODO: reenable for full animation
|
||||
|
@ -1281,7 +1281,7 @@ FileTreeBase.prototype.update_ = function(source) {
|
|||
node.select('.fo')
|
||||
.attr("x", function(d) { return d.kind ? barWidth - 18 : 0; })
|
||||
.attr("y", -10)
|
||||
|
||||
|
||||
node.select('.node-icon')
|
||||
.html(function(d) {
|
||||
if (!d.kind) {
|
||||
|
@ -1291,7 +1291,7 @@ FileTreeBase.prototype.update_ = function(source) {
|
|||
|
||||
return that.determineIcon(d);
|
||||
});
|
||||
|
||||
|
||||
// Transition exiting nodes to the parent's new position.
|
||||
node.exit().transition()
|
||||
.duration(duration)
|
||||
|
@ -1299,11 +1299,11 @@ FileTreeBase.prototype.update_ = function(source) {
|
|||
// .attr("transform", function(d) { return "translate(" + source.y + "," + source.x + ")"; })
|
||||
.style("opacity", 1e-6)
|
||||
.remove();
|
||||
|
||||
|
||||
// Update the links...
|
||||
var link = vis.selectAll("path.link")
|
||||
.data(tree.links(nodes), function(d) { return d.target.id; });
|
||||
|
||||
|
||||
// Enter any new links at the parent's previous position.
|
||||
link.enter().insert("svg:path", "g")
|
||||
.attr("class", "link")
|
||||
|
@ -1314,7 +1314,7 @@ FileTreeBase.prototype.update_ = function(source) {
|
|||
.transition()
|
||||
.duration(duration)
|
||||
.attr("d", diagonal);
|
||||
|
||||
|
||||
// Transition links to their new position.
|
||||
link.transition()
|
||||
.duration(duration)
|
||||
|
@ -1323,7 +1323,7 @@ FileTreeBase.prototype.update_ = function(source) {
|
|||
var t = d.target;
|
||||
return diagonal({source: s, target: t});
|
||||
});
|
||||
|
||||
|
||||
// Transition exiting nodes to the parent's new position.
|
||||
link.exit().transition()
|
||||
.duration(duration)
|
||||
|
@ -1332,7 +1332,7 @@ FileTreeBase.prototype.update_ = function(source) {
|
|||
return diagonal({source: o, target: o});
|
||||
})
|
||||
.remove();
|
||||
|
||||
|
||||
// Stash the old positions for transition.
|
||||
nodes.forEach(function(d) {
|
||||
d.x0 = d.x;
|
||||
|
@ -1363,11 +1363,11 @@ function ImageFileChangeTree(image, changes) {
|
|||
* The parent image.
|
||||
*/
|
||||
this.image_ = image;
|
||||
|
||||
|
||||
/**
|
||||
* The changes being drawn.
|
||||
*/
|
||||
this.changes_ = changes;
|
||||
this.changes_ = changes;
|
||||
}
|
||||
|
||||
$.extend(ImageFileChangeTree.prototype, FileTreeBase.prototype);
|
||||
|
@ -1393,7 +1393,7 @@ ImageFileChangeTree.prototype.determineIcon = function(d) {
|
|||
'removed': 'minus-square',
|
||||
'changed': 'pencil-square'
|
||||
};
|
||||
|
||||
|
||||
return '<i class="change-icon fa fa-' + icon[d.kind] + '"></i>';
|
||||
};
|
||||
|
||||
|
@ -1526,7 +1526,7 @@ UsageChart.prototype.drawInternal_ = function() {
|
|||
// Update the text.
|
||||
this.text_.text(this.count_ + ' / ' + this.total_);
|
||||
}
|
||||
|
||||
|
||||
this.drawn_ = true;
|
||||
};
|
||||
|
||||
|
@ -1610,7 +1610,7 @@ LogUsageChart.prototype.buildData_ = function(logs) {
|
|||
}
|
||||
|
||||
this.entries_ = map;
|
||||
|
||||
|
||||
// Build the data itself. We create a single entry for each possible kind of data, and then add (x, y) pairs
|
||||
// for the number of times that kind of event occurred on a particular day.
|
||||
var dataArray = [];
|
||||
|
@ -1626,7 +1626,7 @@ LogUsageChart.prototype.buildData_ = function(logs) {
|
|||
dataMap[key] = found;
|
||||
dataArray.push(found);
|
||||
}
|
||||
|
||||
|
||||
found.values.push({
|
||||
'x': entry.adjusted,
|
||||
'y': entry.count
|
||||
|
@ -1666,7 +1666,7 @@ LogUsageChart.prototype.buildData_ = function(logs) {
|
|||
return a['x'].getDate() - b['x'].getDate();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return this.data_ = dataArray;
|
||||
};
|
||||
|
||||
|
@ -1750,7 +1750,7 @@ LogUsageChart.prototype.handleStateChange_ = function(e) {
|
|||
allowed[this.data_[i].kind] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(this).trigger({
|
||||
'type': 'filteringChanged',
|
||||
'allowed': allowed
|
||||
|
@ -1802,7 +1802,7 @@ LogUsageChart.prototype.draw = function(container, logData, startDate, endDate)
|
|||
}
|
||||
|
||||
chart.xDomain(domain);
|
||||
|
||||
|
||||
// Finish setting up the chart.
|
||||
chart.xAxis
|
||||
.tickFormat(d3.time.format("%m/%d"));
|
||||
|
@ -1822,4 +1822,4 @@ LogUsageChart.prototype.draw = function(container, logData, startDate, endDate)
|
|||
chart.dispatch.on('stateChange', function(e) { that.handleStateChange_(e); });
|
||||
return that.chart_ = chart;
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
angular.module("angular-tour", [])
|
||||
.provider('AngularTour', function() {
|
||||
this.$get = ['$document', '$rootScope', '$compile', '$location', function($document, $rootScope, $compile, $location) {
|
||||
this.$get = ['$document', '$rootScope', '$compile', '$location', function($document, $rootScope, $compile, $location) {
|
||||
$rootScope.angular_tour_current = null;
|
||||
|
||||
function _start(tour, opt_stepIndex, opt_existingScope) {
|
||||
function _start(tour, opt_stepIndex, opt_existingScope) {
|
||||
tour.initialStep = opt_stepIndex || tour.initialStep || 0;
|
||||
tour.tourScope = opt_existingScope || null;
|
||||
$rootScope.angular_tour_current = tour;
|
||||
|
@ -128,7 +128,7 @@ angular.module("angular-tour", [])
|
|||
speed: 400,
|
||||
color: '#333',
|
||||
animate: true,
|
||||
easing: 'linear',
|
||||
easing: 'linear',
|
||||
exitEvent: 'mouseenter',
|
||||
exitEventAppliesToElement: true,
|
||||
paddingX: 1,
|
||||
|
@ -214,9 +214,9 @@ angular.module("angular-tour", [])
|
|||
// to transition it to an overlay tour.
|
||||
if ($scope.inline) {
|
||||
var counter = 0;
|
||||
var unbind = $rootScope.$watch(function() {
|
||||
return $location.path();
|
||||
}, function(location) {
|
||||
var unbind = $rootScope.$watch(function() {
|
||||
return $location.path();
|
||||
}, function(location) {
|
||||
// Since this callback fires for the first page display, we only unbind it
|
||||
// after the second call.
|
||||
if (counter == 1) {
|
||||
|
@ -249,7 +249,7 @@ angular.module("angular-tour", [])
|
|||
return $location.path() == tourScope._replaceData(locationPath);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// Signal: When an element is found in the page's DOM.
|
||||
signals.elementAvaliable = function(elementPath) {
|
||||
return function(tourScope) {
|
||||
|
|
|
@ -387,7 +387,7 @@ if (!Array.prototype.some) {
|
|||
|
||||
/*
|
||||
* Extract data from an input.
|
||||
*
|
||||
*
|
||||
* @param data The data, in Uint8Array form.
|
||||
*/
|
||||
function Untar(data) {
|
||||
|
@ -403,7 +403,7 @@ if (!Array.prototype.some) {
|
|||
'files': []
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
window.Untar = Untar;
|
||||
|
||||
})();
|
||||
|
||||
})();
|
||||
|
|
Reference in a new issue