From 5d327ccd5317fe52b65c1d2f0201a63413c4a53a Mon Sep 17 00:00:00 2001 From: takezoe Date: Sat, 13 Jul 2013 23:07:36 +0900 Subject: [PATCH] (refs #2)Implementing comparing settings. --- src/main/twirl/pulls/compare.scala.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/twirl/pulls/compare.scala.html b/src/main/twirl/pulls/compare.scala.html index 8ea107a92..9ae11a4fb 100644 --- a/src/main/twirl/pulls/compare.scala.html +++ b/src/main/twirl/pulls/compare.scala.html @@ -17,14 +17,14 @@ @origin/@repository.name: @helper.html.dropdown(originId) { @originRepository.branchList.map { branch => -
  • @helper.html.checkicon(branch == originId) @branch
  • +
  • @helper.html.checkicon(branch == originId) @branch
  • } } ... @repository.owner/@repository.name: @helper.html.dropdown(forkedId) { @repository.branchList.map { branch => -
  • @helper.html.checkicon(branch == forkedId) @branch
  • +
  • @helper.html.checkicon(branch == forkedId) @branch
  • } } @@ -88,8 +88,17 @@ $(function(){ $('#compare-edit').show(); }); + $('a.origin-branch, a.forked-branch').click(function(){ + var e = $(this); + e.parents('ul').find('i').attr('class', 'icon-white'); + e.find('i').attr('class', 'icon-ok'); + e.parents('div.btn-group').find('button strong').text(e.data('branch')); + }); + $('#refresh-compare').click(function(){ - // TODO send request + location.href = '@url(repository)/pulls/compare/@origin:' + + $.trim($('i.icon-ok').parents('a.origin-branch').text()) + '...' + + $.trim($('i.icon-ok').parents('a.forked-branch').text()); }); $('#toggle-file-list').click(function(){