git-object-browser 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -181,6 +181,26 @@ function GitCtrl($scope, $location, $routeParams, $rootScope, $resource, $http)
181
181
  return keys;
182
182
  };
183
183
 
184
+ var splitPath = function() {
185
+ var pathTokens = $scope.path.split('/');
186
+ var token;
187
+ var fullpath = ""
188
+ for (var i = 0; i < pathTokens.length; i++) {
189
+ token = {}
190
+ token.label = pathTokens[i];
191
+ if (pathTokens.length == i + 1) {
192
+ fullpath += token.label;
193
+ token.last = true;
194
+ } else {
195
+ fullpath += token.label + '/';
196
+ token.last = false;
197
+ }
198
+ token.path = fullpath;
199
+ pathTokens[i] = token;
200
+ }
201
+ return pathTokens;
202
+ };
203
+
184
204
  var resourceLoaded = function(json) {
185
205
  $scope.workingdir = json.workingdir;
186
206
  $scope.root = json.root;
@@ -190,6 +210,8 @@ function GitCtrl($scope, $location, $routeParams, $rootScope, $resource, $http)
190
210
  } else {
191
211
  $scope.path = ".git/" + json.path;
192
212
  }
213
+ $scope.pathTokens = splitPath();
214
+
193
215
  $scope.object = json.object;
194
216
  $scope.keys = indexEntryKeys($scope.object.version);
195
217
  var template;
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1><i data-entry-icon="'directory'"></i> {{path}} <small>Directory</small></h1>
2
+ <h1><i data-entry-icon="'directory'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Directory</small></h1>
3
5
 
4
6
  <table class="table table-striped table-condensed">
5
7
  <thead>
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1><i data-entry-icon="'file'"></i> {{path}} <small>File</small></h1>
2
+ <h1><i data-entry-icon="'file'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>File</small></h1>
3
5
 
4
6
  <pre>{{object.content}}</pre>
5
7
 
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1><i data-entry-icon="'index'"></i> {{path}} <small>Index</small></h1>
2
+ <h1><i data-entry-icon="'index'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Index</small></h1>
3
5
 
4
6
  <table class="table">
5
7
  <tr>
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1><i data-entry-icon="'index'"></i> {{path}} <small>Index Entry</small></h1>
2
+ <h1><i data-entry-icon="'index'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Index Entry</small></h1>
3
5
 
4
6
  <table class="table">
5
7
  <tr>
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1><i data-entry-icon="'ref'"></i> {{path}} <small>References</small></h1>
2
+ <h1><i data-entry-icon="'ref'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>References</small></h1>
3
5
 
4
6
  <table class="table table-striped">
5
7
  <thead>
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1 style="font-size:1.8em;"><i data-entry-icon="'object'"></i> {{path}} <small>Object</small></h1>
2
+ <h1 style="font-size:1.8em;"><i data-entry-icon="'object'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Object</small></h1>
3
5
 
4
6
  <div class="tabbable">
5
7
  <ul class="nav nav-tabs">
@@ -1,4 +1,6 @@
1
- <h1><i class="icon-folder-open"></i> {{path}} <small>Directory</small></h1>
1
+ <h1><i class="icon-folder-open"></i>
2
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
3
+ <small>Directory</small></h1>
2
4
 
3
5
  <p><i class="icon-folder-open"></i> <a href="#{{basedir}}/.git/objects/pack">pack</a></p>
4
6
 
@@ -1,5 +1,7 @@
1
1
  <article data-ng-controller="PackFileCtrl">
2
- <h1 style="font-size:1.8em"><i data-entry-icon="'blob'"></i> {{path}} <small>Pack file</small></h1>
2
+ <h1 style="font-size:1.8em"><i data-entry-icon="'blob'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Pack file</small></h1>
3
5
 
4
6
  <table class="table">
5
7
  <tr>
@@ -1,5 +1,7 @@
1
1
  <article data-ng-controller="PackIndexCtrl" data-scroll-bottom="scrollBottom()">
2
- <h1 style="font-size:1.8em;"><i data-entry-icon="'index'"></i> {{path}} <small>Pack Index</small></h1>
2
+ <h1 style="font-size:1.8em;"><i data-entry-icon="'index'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Pack Index</small></h1>
3
5
 
4
6
  <table class="table table-striped">
5
7
  <thead>
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1 style="font-size:1.8em;"><i data-entry-icon="'object'"></i> {{path}} <small>Packed Object</small></h1>
2
+ <h1 style="font-size:1.8em;"><i data-entry-icon="'object'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Packed Object</small></h1>
3
5
 
4
6
  <div class="tabbable">
5
7
  <ul class="nav nav-tabs">
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1><i data-entry-icon="'ref'"></i> {{path}} <small>Packed References</small></h1>
2
+ <h1><i data-entry-icon="'ref'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Packed References</small></h1>
3
5
 
4
6
  <div class="tabbable">
5
7
  <ul class="nav nav-tabs">
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1><i data-entry-icon="'ref'"></i> {{path}} <small>Reference</small></h1>
2
+ <h1><i data-entry-icon="'ref'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Reference</small></h1>
3
5
 
4
6
  <div class="tabbable">
5
7
  <ul class="nav nav-tabs">
@@ -1,5 +1,7 @@
1
1
  <article>
2
- <h1><i data-entry-icon="'reflog'"></i> {{path}} <small>Reflog</small></h1>
2
+ <h1><i data-entry-icon="'reflog'"></i>
3
+ <span data-ng-repeat="token in pathTokens"><a href="#{{basedir}}/{{token.path}}" style="color:black">{{token.label}}</a><span data-ng-hide="token.last">/</span></span>
4
+ <small>Reflog</small></h1>
3
5
 
4
6
  <div class="tabbable">
5
7
  <ul class="nav nav-tabs">
@@ -1,3 +1,3 @@
1
1
  module GitObjectBrowser
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-object-browser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-29 00:00:00.000000000 Z
12
+ date: 2013-10-19 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Browse git raw objects.
15
15
  email:
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  version: '0'
202
202
  segments:
203
203
  - 0
204
- hash: -1762485448778216421
204
+ hash: -4076750535478296157
205
205
  requirements: []
206
206
  rubyforge_project:
207
207
  rubygems_version: 1.8.24