Indefero

Indefero Commit Details


Date:2008-07-25 04:16:18 (16 years 4 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, newdiff, release-1.1, release-1.2, release-1.3, svn
Commit:d19dbb441c86740d6a2df2501cb5875a5fc34e19
Parents: cc5ec30e6a06a3c855848b907512e4b796950981
Message:Added a hotkey tag to easily add them.

Added a new Shift+m hotkey to access the list of submitted issues.
Changes:

File differences

src/IDF/Template/HotKey.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
# ***** BEGIN LICENSE BLOCK *****
# This file is part of InDefero, an open source project management application.
# Copyright (C) 2008 CĂ©ondo Ltd and contributors.
#
# InDefero is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# InDefero is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# ***** END LICENSE BLOCK ***** */
Pluf::loadFunction('Pluf_HTTP_URL_urlForView');
/**
* Hotkey tag.
*/
class IDF_Template_HotKey extends Pluf_Template_Tag
{
function start($key, $view, $params=array(), $get_params=array())
{
$url = addslashes(Pluf_HTTP_URL_urlForView($view, $params, $get_params));
echo "jQuery.hotkeys.add('$key',function (){window.location.href='$url';});";
}
}
src/IDF/templates/js-hotkeys.html
22
33
44
5
6
7
8
9
10
5
6
7
8
9
1110
1211
1312
{if $project}
<script type="text/javascript" charset="utf-8">
// <!--
var hk_submit_issue = '{url 'IDF_Views_Issue::create', array($project.shortname)}';
var hk_recent_issues = '{url 'IDF_Views_Issue::index', array($project.shortname)}';
{literal}
jQuery.hotkeys.add('Shift+a',function (){window.location.href=hk_submit_issue;});
jQuery.hotkeys.add('Shift+r',function (){window.location.href=hk_recent_issues;});
{/literal} //-->
{hotkey 'Shift+a', 'IDF_Views_Issue::create', array($project.shortname)}
{hotkey 'Shift+r', 'IDF_Views_Issue::index', array($project.shortname)}
{if !$user.isAnonymous()}
{hotkey 'Shift+m', 'IDF_Views_Issue::myIssues', array($project.shortname, 'submit')}
{/if} //-->
</script>
{/if}

Archive Download the corresponding diff file

Page rendered in 0.07582s using 13 queries.