diff --git a/scm-webapp/src/main/webapp/resources/css/style.css b/scm-webapp/src/main/webapp/resources/css/style.css index cdde092b66..b5e0e20445 100644 --- a/scm-webapp/src/main/webapp/resources/css/style.css +++ b/scm-webapp/src/main/webapp/resources/css/style.css @@ -130,4 +130,17 @@ a.scm-link:hover { .cs-mod-txt { margin: 0 3px; +} + +.changeset-tags { + margin-bottom: 5px; +} + +.cs-tag, .cs-branch { + border: 1px solid gray; + border-radius: 4px; +} + +.cs-tag a, .cs-branch a { + padding: 5px; } \ No newline at end of file diff --git a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.changesetviewergrid.js b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.changesetviewergrid.js index f9763e77c0..d17d86f4b0 100644 --- a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.changesetviewergrid.js +++ b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.changesetviewergrid.js @@ -34,20 +34,26 @@ Sonia.repository.ChangesetViewerGrid = Ext.extend(Ext.grid.GridPanel, { repository: null, + mailTemplate: '<{0}>', + changesetMetadataTemplate: '
{0}
\
{1}
\
{2}
', + modificationsTemplate: '
\ Added{0}\ Modified{1}\ Deleted{2}\
', - idsTemplate: '
Commit: {0}
\ -
Tree: {0}
\ -
Parent: {1}
', - tagsAndBranchesTemplate: '
{0}
\ -
{1}
', + + idsTemplate: new Ext.XTemplate('
Commit: {id}
\ +
Tree: {id}
\ +
Parent: {parent}
\ +
Parent: {parent2}
'), + + tagsAndBranchesTemplate: new Ext.XTemplate('
{.}
\ +
{.}
'), emptyText: 'No commits available', @@ -71,7 +77,7 @@ Sonia.repository.ChangesetViewerGrid = Ext.extend(Ext.grid.GridPanel, { dataIndex: 'modifications', renderer: this.renderModifications, scope: this, - width: 100 + width: 120 },{ id: 'ids', dataIndex: 'id', @@ -126,15 +132,15 @@ Sonia.repository.ChangesetViewerGrid = Ext.extend(Ext.grid.GridPanel, { this.openRepositoryBrowser(revision); } else { - el = e.getTarget('.cs-diff-link'); + el = e.getTarget('.cs-diff-link'); - if ( el ){ + if ( el ){ revision = this.getRevision(el); if (debug){ console.debug('load diff for ' + revision); } - this.openDiffViewer(revision); + this.openDiffViewer(revision); } } }, @@ -184,9 +190,10 @@ Sonia.repository.ChangesetViewerGrid = Ext.extend(Ext.grid.GridPanel, { }, renderTagsAndBranches: function(value, p, record){ - var tags = this.getLabeledValue("Tags", record.data.tags); - var branches = this.getLabeledValue("Branches", record.data.branches); - return String.format(this.tagsAndBranchesTemplate, tags, branches); + return this.tagsAndBranchesTemplate.apply({ + tags: record.get('tags'), + branches: record.get('branches') + }); }, getLabeledValue: function(label, array){ @@ -198,12 +205,20 @@ Sonia.repository.ChangesetViewerGrid = Ext.extend(Ext.grid.GridPanel, { }, renderIds: function(value, p, record){ - var parent = ''; + var parent = null; + var parent2 = null; var parents = record.get('parents'); if ( parents ){ parent = parents[0]; + if ( parents.length >= 1 ){ + parent2 = parents[1]; + } } - return String.format(this.idsTemplate, value, parent); + return this.idsTemplate.apply({ + id: value, + parent: parent, + parent2: parent2 + }); }, renderModifications: function(value){