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
 
@@ -53,112 +53,96 @@ entirety in the file Apache-License-2.0.
 

	
 
Codemirror
 
----------
 

	
 
Kallithea incorporates parts of the Javascript system called
 
[Codemirror](http://codemirror.net/), version 4.7.0, which is primarily:
 

	
 
Copyright &copy; 2013-2014 by Marijn Haverbeke <marijnh@gmail.com>
 

	
 
and licensed under the MIT-permissive license, which is
 
[included in this distribution](MIT-Permissive-License.txt).
 

	
 
Additional files from upstream Codemirror are copyrighted by various authors
 
and licensed under other permissive licenses.  The sub-directories under
 
[.../public/codemirror](kallithea/public/codemirror) include the copyright and
 
license notice and information as they appeared in Codemirror's upstream
 
release.
 

	
 

	
 

	
 
jQuery
 
------
 

	
 
Kallithea incorporates the Javascript system called
 
[jQuery](http://jquery.org/), [herein](kallithea/public/js/jquery.min.js),
 
which can be found together with its Corresponding Source in
 
https://github.com/jquery/jquery at tag 1.12.3 (mirrored at
 
https://kallithea-scm.org/repos/mirror/jquery/files/1.12.3/ ).
 

	
 
It is Copyright 2013 jQuery Foundation and other contributors http://jquery.com/ and is under an
 
[MIT-permissive license](MIT-Permissive-License.txt).
 

	
 

	
 

	
 
DataTables
 
----------
 

	
 
Kallithea incorporates the Javascript system called
 
[DataTables](http://www.datatables.net/) (jquery.dataTables.min.js and .css)
 
which can be found together with their Corresponding Source in
 
https://github.com/DataTables/DataTables at tag 1.10.11 (mirrored at
 
https://kallithea-scm.org/repos/mirror/DataTables/files/1.10.11/ ).
 

	
 
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
 
[copy of which is included in this repository](LICENSE-MERGELY.html),
 
is (GPL|LGPL|MPL).  Kallithea as GPLv3'd project chooses the GPL arm of that
 
tri-license.
 

	
 

	
 

	
 
Select2
 
-------
 

	
 
Kallithea incorporates parts of the Javascript system called
 
[Select2](http://ivaynberg.github.io/select2/), which is:
 

	
 
Copyright 2012 Igor Vaynberg (and probably others)
 

	
 
and is licensed [under the following license](https://github.com/ivaynberg/select2/blob/master/LICENSE):
 

	
 
> This software is licensed under the Apache License, Version 2.0 (the
 
> "Apache License") or the GNU General Public License version 2 (the "GPL
 
> License"). You may choose either license to govern your use of this
 
> software only upon the condition that you accept all of the terms of either
 
> the Apache License or the GPL License.
 

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

	
 
Kallithea will take the Apache license fork of the dual license, since
 
Kallithea is GPLv3'd.
 

	
 

	
 

	
 
Select2-Bootstrap-CSS
 
---------------------
 

	
 
Kallithea incorporates some CSS from a system called
 
[Select2-bootstrap-css](https://github.com/t0m/select2-bootstrap-css), which
 
is:
 

	
 
Copyright &copy; 2013 Tom Terrace (and likely others)
 

	
 
and licensed under the MIT-permissive license, which is
 
[included in this distribution](MIT-Permissive-License.txt).
 

	
kallithea/public/js/mousetrap.js
Show inline comments
 
deleted file
kallithea/templates/base/base.html
Show inline comments
 
@@ -485,195 +485,50 @@
 
                escapeMarkup: function(m){
 
                    // don't escape our custom placeholder
 
                    if(m.substr(0,29) == '<i class="icon-database"></i>'){
 
                        return m;
 
                    }
 

	
 
                    return Select2.util.escapeMarkup(m);
 
                },
 
                query: function(query){
 
                  var key = 'cache';
 
                  var cached = cache[key] ;
 
                  if(cached) {
 
                    var data = {results: []};
 
                    //filter results
 
                    $.each(cached.results, function(){
 
                        var section = this.text;
 
                        var children = [];
 
                        $.each(this.children, function(){
 
                            if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){
 
                                children.push({'id': this.id, 'text': this.text, 'type': this.type, 'obj': this.obj});
 
                            }
 
                        });
 
                        if(children.length !== 0){
 
                            data.results.push({'text': section, 'children': children});
 
                        }
 

	
 
                    });
 
                    query.callback(data);
 
                  }else{
 
                      $.ajax({
 
                        url: "${h.url('repo_switcher_data')}",
 
                        data: {},
 
                        dataType: 'json',
 
                        type: 'GET',
 
                        success: function(data) {
 
                          cache[key] = data;
 
                          query.callback({results: data.results});
 
                        }
 
                      });
 
                  }
 
                }
 
            });
 

	
 
            $("#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
 
@@ -18,97 +18,96 @@
 

	
 
        ## JAVASCRIPT ##
 
        <script type="text/javascript">
 
            ## JS translations map
 
            var TRANSLATION_MAP = {
 
                'Add Another Comment':'${_("Add Another Comment")}',
 
                'Stop following this repository':"${_('Stop following this repository')}",
 
                'Start following this repository':"${_('Start following this repository')}",
 
                'Group':"${_('Group')}",
 
                'members':"${_('members')}",
 
                'Loading ...':"${_('Loading ...')}",
 
                'loading ...':"${_('loading ...')}",
 
                'Search truncated': "${_('Search truncated')}",
 
                'No matching files': "${_('No matching files')}",
 
                'Open New Pull Request from {0}': "${_('Open New Pull Request from {0}')}",
 
                'Open New Pull Request for {0} &rarr; {1}': "${h.literal(_('Open New Pull Request for {0} &rarr; {1}'))}",
 
                'Show Selected Changesets {0} &rarr; {1}': "${h.literal(_('Show Selected Changesets {0} &rarr; {1}'))}",
 
                'Selection Link': "${_('Selection Link')}",
 
                'Collapse Diff': "${_('Collapse Diff')}",
 
                'Expand Diff': "${_('Expand Diff')}",
 
                'Failed to revoke permission': "${_('Failed to revoke permission')}",
 
                'Confirm to revoke permission for {0}: {1} ?': "${_('Confirm to revoke permission for {0}: {1} ?')}",
 
                'Enabled': "${_('Enabled')}",
 
                'Disabled': "${_('Disabled')}",
 
                'Select changeset': "${_('Select changeset')}",
 
                'Specify changeset': "${_('Specify changeset')}",
 
                'MSG_SORTASC': "${_('Click to sort ascending')}",
 
                'MSG_SORTDESC': "${_('Click to sort descending')}",
 
                'MSG_EMPTY': "${_('No records found.')}",
 
                'MSG_ERROR': "${_('Data error.')}",
 
                'MSG_LOADING': "${_('Loading...')}"
 
            };
 
            var _TM = TRANSLATION_MAP;
 

	
 
            var TOGGLE_FOLLOW_URL  = "${h.url('toggle_following')}";
 

	
 
            var REPO_NAME = "";
 
            %if hasattr(c, 'repo_name'):
 
                var REPO_NAME = "${c.repo_name}";
 
            %endif
 

	
 
            var _authentication_token = "${h.authentication_token()}";
 
        </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">
 
            (function(window,undefined){
 
                var History = window.History; // Note: We are using a capital H instead of a lower h
 
                if ( !History.enabled ) {
 
                     // History.js is disabled for this browser.
 
                     // This is because we can optionally choose to support HTML4 browsers or not.
 
                    return false;
 
                }
 
            })(window);
 

	
 
            $(document).ready(function(){
 
              tooltip_activate();
 
              show_more_event();
 
              show_changeset_tooltip();
 
              // routes registration
 
              pyroutes.register('home', "${h.url('home')}", []);
 
              pyroutes.register('new_gist', "${h.url('new_gist')}", []);
 
              pyroutes.register('gists', "${h.url('gists')}", []);
 
              pyroutes.register('new_repo', "${h.url('new_repo')}", []);
 

	
 
              pyroutes.register('summary_home', "${h.url('summary_home', repo_name='%(repo_name)s')}", ['repo_name']);
 
              pyroutes.register('changelog_home', "${h.url('changelog_home', repo_name='%(repo_name)s')}", ['repo_name']);
 
              pyroutes.register('files_home', "${h.url('files_home', repo_name='%(repo_name)s',revision='%(revision)s',f_path='%(f_path)s')}", ['repo_name', 'revision', 'f_path']);
 
              pyroutes.register('edit_repo', "${h.url('edit_repo', repo_name='%(repo_name)s')}", ['repo_name']);
 
              pyroutes.register('edit_repo_perms', "${h.url('edit_repo_perms', repo_name='%(repo_name)s')}", ['repo_name']);
 
              pyroutes.register('pullrequest_home', "${h.url('pullrequest_home', repo_name='%(repo_name)s')}", ['repo_name']);
 

	
 
              pyroutes.register('toggle_following', "${h.url('toggle_following')}");
 
              pyroutes.register('changeset_info', "${h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']);
 
              pyroutes.register('repo_size', "${h.url('repo_size', repo_name='%(repo_name)s')}", ['repo_name']);
 
              pyroutes.register('repo_refs_data', "${h.url('repo_refs_data', repo_name='%(repo_name)s')}", ['repo_name']);
 
             });
 
        </script>
 

	
 
        <%block name="head_extra"/>
 
    </head>
 
    <body id="body">
 
      <div id="header">
 
        <div id="header-inner" class="title">
 
          <div id="logo">
 
            <a href="${h.url('home')}" style="display: block;">
 
              <div class="header">
 
                <img src="${h.url('/images/kallithea-logo.svg')}" onerror="this.onerror='';this.src='${h.url('/images/kallithea-logo.png')}'" alt="Kallithea"/>
scripts/manifest
Show inline comments
 
@@ -596,97 +596,96 @@ kallithea/public/codemirror/mode/turtle/
 
kallithea/public/codemirror/mode/turtle/turtle.js
 
kallithea/public/codemirror/mode/vb/
 
kallithea/public/codemirror/mode/vb/vb.js
 
kallithea/public/codemirror/mode/vbscript/
 
kallithea/public/codemirror/mode/vbscript/vbscript.js
 
kallithea/public/codemirror/mode/velocity/
 
kallithea/public/codemirror/mode/velocity/velocity.js
 
kallithea/public/codemirror/mode/verilog/
 
kallithea/public/codemirror/mode/verilog/verilog.js
 
kallithea/public/codemirror/mode/xml/
 
kallithea/public/codemirror/mode/xml/xml.js
 
kallithea/public/codemirror/mode/xquery/
 
kallithea/public/codemirror/mode/xquery/xquery.js
 
kallithea/public/codemirror/mode/yaml/
 
kallithea/public/codemirror/mode/yaml/yaml.js
 
kallithea/public/codemirror/mode/z80/
 
kallithea/public/codemirror/mode/z80/z80.js
 
kallithea/public/css/
 
kallithea/public/css/bootstrap.css
 
kallithea/public/css/contextbar.css
 
kallithea/public/css/mergely.css
 
kallithea/public/css/pygments.css
 
kallithea/public/css/style.css
 
kallithea/public/fontello/
 
kallithea/public/fontello/README-kallithea.txt
 
kallithea/public/fontello/README.txt
 
kallithea/public/fontello/config.json
 
kallithea/public/fontello/css/
 
kallithea/public/fontello/css/kallithea.css
 
kallithea/public/fontello/font/
 
kallithea/public/fontello/font/kallithea.eot
 
kallithea/public/fontello/font/kallithea.svg
 
kallithea/public/fontello/font/kallithea.ttf
 
kallithea/public/fontello/font/kallithea.woff
 
kallithea/public/images/
 
kallithea/public/images/background.png
 
kallithea/public/images/favicon.ico
 
kallithea/public/images/kallithea-logo.png
 
kallithea/public/images/kallithea-logo.svg
 
kallithea/public/images/pager.png
 
kallithea/public/images/pager_selected.png
 
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
 
kallithea/public/js/select2/select2.png
 
kallithea/public/js/select2/select2x2.png
 
kallithea/public/js/yui.2.9.js
 
kallithea/public/js/yui.flot.js
 
kallithea/templates/
 
kallithea/templates/about.html
 
kallithea/templates/admin/
 
kallithea/templates/admin/admin.html
 
kallithea/templates/admin/admin_log.html
 
kallithea/templates/admin/auth/
 
kallithea/templates/admin/auth/auth_settings.html
 
kallithea/templates/admin/defaults/
 
kallithea/templates/admin/defaults/defaults.html
 
kallithea/templates/admin/gists/
 
kallithea/templates/admin/gists/edit.html
 
kallithea/templates/admin/gists/index.html
 
kallithea/templates/admin/gists/new.html
 
kallithea/templates/admin/gists/show.html
 
kallithea/templates/admin/my_account/
 
kallithea/templates/admin/my_account/my_account.html
 
kallithea/templates/admin/my_account/my_account_api_keys.html
 
kallithea/templates/admin/my_account/my_account_emails.html
 
kallithea/templates/admin/my_account/my_account_password.html
 
kallithea/templates/admin/my_account/my_account_perms.html
 
kallithea/templates/admin/my_account/my_account_profile.html
 
kallithea/templates/admin/my_account/my_account_repos.html
 
kallithea/templates/admin/my_account/my_account_watched.html
 
kallithea/templates/admin/notifications/
 
kallithea/templates/admin/notifications/notifications.html
 
kallithea/templates/admin/notifications/notifications_data.html
 
kallithea/templates/admin/notifications/show_notification.html
 
kallithea/templates/admin/permissions/
 
kallithea/templates/admin/permissions/permissions.html
 
kallithea/templates/admin/permissions/permissions_globals.html
 
kallithea/templates/admin/permissions/permissions_ips.html
 
kallithea/templates/admin/permissions/permissions_perms.html
 
kallithea/templates/admin/repo_groups/
 
kallithea/templates/admin/repo_groups/repo_group_add.html
 
kallithea/templates/admin/repo_groups/repo_group_edit.html
 
kallithea/templates/admin/repo_groups/repo_group_edit_advanced.html
 
kallithea/templates/admin/repo_groups/repo_group_edit_perms.html
 
kallithea/templates/admin/repo_groups/repo_group_edit_settings.html
0 comments (0 inline, 0 general)