Changeset - b4db7ff78343
[Not reviewed]
default
1 4 0
Mads Kiilerich - 9 years ago 2016-08-12 03:04:48
madski@unity3d.com
js: remove mousetrap - the current keyboard bindings are quite unknown and irrelevant
5 files changed with 0 insertions and 1094 deletions:
0 comments (0 inline, 0 general)
LICENSE.md
Show inline comments
 
@@ -95,28 +95,12 @@ https://kallithea-scm.org/repos/mirror/D
 

	
 
It is Copyright 2008-2015 SpryMedia Ltd. and is under an
 
[MIT-permissive license](MIT-Permissive-License.txt).
 

	
 

	
 

	
 
Mousetrap
 
---------
 

	
 
Kallithea incorporates parts of the Javascript system called
 
[Mousetrap](http://craig.is/killing/mice/), which is:
 

	
 
   Copyright 2013 Craig Campbell
 

	
 
and licensed under
 
[the Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
 

	
 
A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included
 
in this distribution.
 

	
 

	
 

	
 
Mergely
 
-------
 

	
 
Kallithea incorporates some code from the Javascript system called
 
[Mergely](http://www.mergely.com/), version 3.3.9.
 
[Mergely's license](http://www.mergely.com/license.php), a
kallithea/public/js/mousetrap.js
Show inline comments
 
deleted file
kallithea/templates/base/base.html
Show inline comments
 
@@ -527,153 +527,8 @@
 

	
 
            $("#repo_switcher").on('select2-selecting', function(e){
 
                e.preventDefault();
 
                window.location = pyroutes.url('summary_home', {'repo_name': e.val});
 
            });
 
        });
 

	
 
        ## Global mouse bindings ##
 

	
 
        // general help "?"
 
        Mousetrap.bind(['?'], function(e) {
 
            $('#help_kb').modal({});
 
        });
 

	
 
        // / open the quick filter
 
        Mousetrap.bind(['/'], function(e) {
 
            $("#repo_switcher").select2("open");
 

	
 
            // return false to prevent default browser behavior
 
            // and stop event from bubbling
 
            return false;
 
        });
 

	
 
        // ctrl/command+b, show the the main bar
 
        Mousetrap.bind(['command+b', 'ctrl+b'], function(e) {
 
            if($('#header-inner').hasClass('hover') && $('#content').hasClass('hover')){
 
                $('#header-inner').removeClass('hover');
 
                $('#content').removeClass('hover');
 
            }
 
            else{
 
                $('#header-inner').addClass('hover');
 
                $('#content').addClass('hover');
 
            }
 
            return false;
 
        });
 

	
 
        // general nav g + action
 
        Mousetrap.bind(['g h'], function(e) {
 
            window.location = pyroutes.url('home');
 
        });
 
        Mousetrap.bind(['g g'], function(e) {
 
            window.location = pyroutes.url('gists', {'private':1});
 
        });
 
        Mousetrap.bind(['g G'], function(e) {
 
            window.location = pyroutes.url('gists', {'public':1});
 
        });
 
        Mousetrap.bind(['n g'], function(e) {
 
            window.location = pyroutes.url('new_gist');
 
        });
 
        Mousetrap.bind(['n r'], function(e) {
 
            window.location = pyroutes.url('new_repo');
 
        });
 

	
 
        % if hasattr(c, 'repo_name') and hasattr(c, 'db_repo'):
 
            // nav in repo context
 
            Mousetrap.bind(['g s'], function(e) {
 
                window.location = pyroutes.url('summary_home', {'repo_name': REPO_NAME});
 
            });
 
            Mousetrap.bind(['g c'], function(e) {
 
                window.location = pyroutes.url('changelog_home', {'repo_name': REPO_NAME});
 
            });
 
            Mousetrap.bind(['g F'], function(e) {
 
                window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.db_repo.landing_rev[1]}', 'f_path': '', 'search': '1'});
 
            });
 
            Mousetrap.bind(['g f'], function(e) {
 
                window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.db_repo.landing_rev[1]}', 'f_path': ''});
 
            });
 
            Mousetrap.bind(['g o'], function(e) {
 
                window.location = pyroutes.url('edit_repo', {'repo_name': REPO_NAME});
 
            });
 
            Mousetrap.bind(['g O'], function(e) {
 
                window.location = pyroutes.url('edit_repo_perms', {'repo_name': REPO_NAME});
 
            });
 
        % endif
 

	
 
    </script>
 
</%def>
 

	
 
%if 0:
 
<div class="modal" id="help_kb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 
    <div class="modal-dialog">
 
      <div class="modal-content">
 
        <div class="modal-header">
 
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon-cancel-circled"></i></button>
 
          <h4 class="modal-title">${_('Keyboard shortcuts')}</h4>
 
        </div>
 
        <div class="modal-body">
 
           <div class="row">
 
              <div class="col-md-5">
 
                <table class="keyboard-mappings">
 
                    <tbody>
 
                  <tr>
 
                    <th></th>
 
                    <th>${_('Site-wide shortcuts')}</th>
 
                  </tr>
 
                  <%
 
                     elems = [
 
                         ('/', 'Open quick search box'),
 
                         ('ctrl/cmd+b', 'Show main settings bar'),
 
                         ('g h', 'Goto home page'),
 
                         ('g g', 'Goto my private gists page'),
 
                         ('g G', 'Goto my public gists page'),
 
                         ('n r', 'New repository page'),
 
                         ('n g', 'New gist page'),
 
                     ]
 
                  %>
 
                  %for key, desc in elems:
 
                  <tr>
 
                    <td class="keys">
 
                      <span class="key">${key}</span>
 
                    </td>
 
                    <td>${desc}</td>
 
                  </tr>
 
                %endfor
 
                </tbody>
 
                  </table>
 
              </div>
 
              <div class="col-md-offset-5">
 
                <table class="keyboard-mappings">
 
                <tbody>
 
                  <tr>
 
                    <th></th>
 
                    <th>${_('Repositories')}</th>
 
                  </tr>
 
                  <%
 
                     elems = [
 
                         ('g s', 'Goto summary page'),
 
                         ('g c', 'Goto changelog page'),
 
                         ('g f', 'Goto files page'),
 
                         ('g F', 'Goto files page with file search activated'),
 
                         ('g o', 'Goto repository settings'),
 
                         ('g O', 'Goto repository permissions settings'),
 
                     ]
 
                  %>
 
                  %for key, desc in elems:
 
                  <tr>
 
                    <td class="keys">
 
                      <span class="key">${key}</span>
 
                    </td>
 
                    <td>${desc}</td>
 
                  </tr>
 
                %endfor
 
                </tbody>
 
            </table>
 
              </div>
 
            </div>
 
        </div>
 
        <div class="modal-footer">
 
        </div>
 
      </div><!-- /.modal-content -->
 
    </div><!-- /.modal-dialog -->
 
</div><!-- /.modal -->
 
%endif
kallithea/templates/base/root.html
Show inline comments
 
@@ -60,13 +60,12 @@
 
        </script>
 
        <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/jquery.min.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/jquery.dataTables.min.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/bootstrap.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/select2/select2.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/mousetrap.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript" src="${h.url('/js/base.js', ver=c.kallithea_version)}"></script>
 
        ## EXTRA FOR JS
 
        <%block name="js_extra"/>
 
        <script type="text/javascript">
scripts/manifest
Show inline comments
 
@@ -638,13 +638,12 @@ kallithea/public/js/
 
kallithea/public/js/base.js
 
kallithea/public/js/bootstrap.js
 
kallithea/public/js/codemirror_loadmode.js
 
kallithea/public/js/graph.js
 
kallithea/public/js/jquery.min.js
 
kallithea/public/js/mergely.js
 
kallithea/public/js/mousetrap.js
 
kallithea/public/js/native.history.js
 
kallithea/public/js/select2/
 
kallithea/public/js/select2/select2-bootstrap.css
 
kallithea/public/js/select2/select2-spinner.gif
 
kallithea/public/js/select2/select2.css
 
kallithea/public/js/select2/select2.js
0 comments (0 inline, 0 general)