##// END OF EJS Templates
templates: removed some unused JS variables....
marcink -
r1285:ef422228 default
parent child Browse files
Show More
@@ -58,7 +58,7 b' function setRCMouseBindings(repoName, re'
58 58 window.location = pyroutes.url('new_repo');
59 59 });
60 60
61 if (repoName !== '' && repoLandingRev !== '') {
61 if (repoName && repoName != '') {
62 62 // nav in repo context
63 63 Mousetrap.bind(['g s'], function(e) {
64 64 window.location = pyroutes.url(
@@ -521,64 +521,6 b''
521 521 window.location = e.choice.url;
522 522 });
523 523
524 ## Global mouse bindings ##
525
526 // general help "?"
527 Mousetrap.bind(['?'], function(e) {
528 $('#help_kb').modal({})
529 });
530
531 // / open the quick filter
532 Mousetrap.bind(['/'], function(e) {
533 $("#repo_switcher").select2("open");
534
535 // return false to prevent default browser behavior
536 // and stop event from bubbling
537 return false;
538 });
539
540 // general nav g + action
541 Mousetrap.bind(['g h'], function(e) {
542 window.location = pyroutes.url('home');
543 });
544 Mousetrap.bind(['g g'], function(e) {
545 window.location = pyroutes.url('gists', {'private':1});
546 });
547 Mousetrap.bind(['g G'], function(e) {
548 window.location = pyroutes.url('gists', {'public':1});
549 });
550 Mousetrap.bind(['n g'], function(e) {
551 window.location = pyroutes.url('new_gist');
552 });
553 Mousetrap.bind(['n r'], function(e) {
554 window.location = pyroutes.url('new_repo');
555 });
556
557 % if hasattr(c, 'repo_name') and hasattr(c, 'rhodecode_db_repo'):
558 // nav in repo context
559 Mousetrap.bind(['g s'], function(e) {
560 window.location = pyroutes.url('summary_home', {'repo_name': REPO_NAME});
561 });
562 Mousetrap.bind(['g c'], function(e) {
563 window.location = pyroutes.url('changelog_home', {'repo_name': REPO_NAME});
564 });
565 Mousetrap.bind(['g F'], function(e) {
566 window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.rhodecode_db_repo.landing_rev[1]}', 'f_path': '', 'search': '1'});
567 });
568 Mousetrap.bind(['g f'], function(e) {
569 window.location = pyroutes.url('files_home', {'repo_name': REPO_NAME, 'revision': '${c.rhodecode_db_repo.landing_rev[1]}', 'f_path': ''});
570 });
571 Mousetrap.bind(['g p'], function(e) {
572 window.location = pyroutes.url('pullrequest_show_all', {'repo_name': REPO_NAME});
573 });
574 Mousetrap.bind(['g o'], function(e) {
575 window.location = pyroutes.url('edit_repo', {'repo_name': REPO_NAME});
576 });
577 Mousetrap.bind(['g O'], function(e) {
578 window.location = pyroutes.url('edit_repo_perms', {'repo_name': REPO_NAME});
579 });
580 % endif
581
582 524 </script>
583 525 <script src="${h.asset('js/rhodecode/base/keyboard-bindings.js', ver=c.rhodecode_version_hash)}"></script>
584 526 </%def>
@@ -79,23 +79,10 b" c.template_context['visual']['default_re"
79 79 // register templateContext to pass template variables to JS
80 80 var templateContext = ${h.json.dumps(c.template_context)|n};
81 81
82 var REPO_NAME = "${getattr(c, 'repo_name', '')}";
83 %if hasattr(c, 'rhodecode_db_repo'):
84 var REPO_LANDING_REV = '${c.rhodecode_db_repo.landing_rev[1]}';
85 var REPO_TYPE = '${c.rhodecode_db_repo.repo_type}';
86 %else:
87 var REPO_LANDING_REV = '';
88 var REPO_TYPE = '';
89 %endif
90 82 var APPLICATION_URL = "${h.url('home').rstrip('/')}";
91 83 var ASSET_URL = "${h.asset('')}";
92 84 var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}";
93 85 var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}";
94 % if getattr(c, 'rhodecode_user', None):
95 var USER = {name:'${c.rhodecode_user.username}'};
96 % else:
97 var USER = {name:null};
98 % endif
99 86
100 87 var APPENLIGHT = {
101 88 enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'},
@@ -7,7 +7,6 b''
7 7 <meta name="robots" content="index, nofollow"/>
8 8 <link rel="icon" href="${h.asset('images/favicon.ico')}" sizes="16x16 32x32" type="image/png" />
9 9
10
11 10 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
12 11 %if c.redirect_time:
13 12 <meta http-equiv="refresh" content="${c.redirect_time}; url=${c.url_redirect}"/>
@@ -18,7 +17,10 b''
18 17 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css')}" media="screen"/>
19 18 <![endif]-->
20 19 <style>body { background:#eeeeee; }</style>
21
20 <script type="text/javascript">
21 // register templateContext to pass template variables to JS
22 var templateContext = {timeago: {}};
23 </script>
22 24 <script type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script>
23 25 </head>
24 26 <body>
General Comments 0
You need to be logged in to leave comments. Login now