mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-10 19:11:01 +00:00
Added shortcuts
This commit is contained in:
parent
644b340178
commit
3cc78f0679
16 changed files with 121 additions and 6 deletions
|
@ -30,6 +30,7 @@ class AppKernel extends Kernel
|
||||||
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
|
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
|
||||||
new Craue\ConfigBundle\CraueConfigBundle(),
|
new Craue\ConfigBundle\CraueConfigBundle(),
|
||||||
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
|
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
|
||||||
|
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
|
||||||
|
|
||||||
// wallabag bundles
|
// wallabag bundles
|
||||||
new Wallabag\CoreBundle\WallabagCoreBundle(),
|
new Wallabag\CoreBundle\WallabagCoreBundle(),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
const $ = require('jquery');
|
const $ = require('jquery');
|
||||||
|
require('mousetrap');
|
||||||
|
|
||||||
/* Allows inline call qr-code call */
|
/* Allows inline call qr-code call */
|
||||||
import jrQrcode from 'jr-qrcode'; // eslint-disable-line
|
import jrQrcode from 'jr-qrcode'; // eslint-disable-line
|
||||||
|
@ -51,3 +52,14 @@ function initExport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export { savePercent, retrievePercent, initFilters, initExport };
|
export { savePercent, retrievePercent, initFilters, initExport };
|
||||||
|
|
||||||
|
/** Shortcuts **/
|
||||||
|
|
||||||
|
/* Go to */
|
||||||
|
Mousetrap.bind('g u', function() { window.location.href = Routing.generate('homepage') });
|
||||||
|
Mousetrap.bind('g s', function() { window.location.href = Routing.generate('starred') });
|
||||||
|
|
||||||
|
/* Actions */
|
||||||
|
Mousetrap.bind('g a', function() {
|
||||||
|
$("#nav-btn-add").trigger("click");
|
||||||
|
});
|
||||||
|
|
|
@ -351,3 +351,6 @@ old_sound_rabbit_mq:
|
||||||
queue_options:
|
queue_options:
|
||||||
name: 'wallabag.import.chrome'
|
name: 'wallabag.import.chrome'
|
||||||
callback: wallabag_import.consumer.amqp.chrome
|
callback: wallabag_import.consumer.amqp.chrome
|
||||||
|
|
||||||
|
fos_js_routing:
|
||||||
|
routes_to_expose: [ homepage, starred, archive, all, tag, config, import, developer, howto, about, logout ]
|
||||||
|
|
|
@ -52,3 +52,6 @@ craue_config_settings_modify:
|
||||||
path: /settings
|
path: /settings
|
||||||
defaults:
|
defaults:
|
||||||
_controller: CraueConfigBundle:Settings:modify
|
_controller: CraueConfigBundle:Settings:modify
|
||||||
|
|
||||||
|
fos_js_routing:
|
||||||
|
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
|
||||||
|
|
|
@ -82,7 +82,8 @@
|
||||||
"php-amqplib/rabbitmq-bundle": "^1.8",
|
"php-amqplib/rabbitmq-bundle": "^1.8",
|
||||||
"predis/predis": "^1.0",
|
"predis/predis": "^1.0",
|
||||||
"javibravo/simpleue": "^1.0",
|
"javibravo/simpleue": "^1.0",
|
||||||
"symfony/dom-crawler": "^3.1"
|
"symfony/dom-crawler": "^3.1",
|
||||||
|
"friendsofsymfony/jsrouting-bundle": "^1.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
||||||
|
|
|
@ -101,6 +101,7 @@
|
||||||
"through": "^2.3.8"
|
"through": "^2.3.8"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jr-qrcode": "^1.0.5"
|
"jr-qrcode": "^1.0.5",
|
||||||
|
"mousetrap": "^1.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
{% block css %}
|
{% block css %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
|
<script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
|
||||||
|
<script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<title>{% block title %}{% endblock %} – wallabag</title>
|
<title>{% block title %}{% endblock %} – wallabag</title>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
web/js/fos_js_routes.js
Normal file
1
web/js/fos_js_routes.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
fos.Router.setData({"base_url":"","routes":{"starred":{"tokens":[["variable","\/","[^\/]++","page"],["text","\/starred\/list"]],"defaults":{"page":"1"},"requirements":[],"hosttokens":[]},"starred_rss":{"tokens":[["text","\/starred.xml"],["variable","\/","[^\/]++","token"],["variable","\/","[^\/]++","username"]],"defaults":[],"requirements":[],"hosttokens":[]},"homepage":{"tokens":[["variable","\/","\\d+","page"]],"defaults":{"page":1},"requirements":{"page":"\\d+"},"hosttokens":[]}},"prefix":"","host":"localhost","scheme":"http"});
|
Loading…
Reference in a new issue