Changeset - c6dcda2c9402
[Not reviewed]
default
0 1 0
Takumi IINO - 10 years ago 2015-10-25 17:09:06
trot.thunder@gmail.com
select2: make "Switch To" switch to changelog view everywhere, except in Files context

When already in changelog context, it will apply the change to the existing
branch_filter.
1 file changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/base/base.html
Show inline comments
 
@@ -266,14 +266,18 @@
 
              window.location = pyroutes.url('files_home', {
 
                  'repo_name': REPO_NAME,
 
                  'revision': e.choice.id,
 
                  'f_path': '',
 
                  'at': e.choice.text
 
              });
 
          }
 
          else if(context == 'summary' || context == 'changelog') {
 
          } else if (context == 'changelog') {
 
              if (e.choice.type == 'tag' || e.choice.type == 'book') {
 
                  $("#branch_filter").append($('<option/>').val(e.choice.text));
 
              }
 
              $("#branch_filter").val(e.choice.text).change();
 
          } else {
 
              window.location = pyroutes.url('changelog_home', {
 
                  'repo_name': '${c.repo_name}',
 
                  'branch': e.choice.text
 
              });
 
          }
 
      });
0 comments (0 inline, 0 general)