diff options
| author | 2013-11-28 23:46:56 +0100 | |
|---|---|---|
| committer | 2013-11-28 23:46:56 +0100 | |
| commit | 69662117a31bed413d71a4636257fcd44a51384d (patch) | |
| tree | b06d04449cf28e6e17cb0e1f02e829b04a09a00a | |
| parent | 7e65c6b7829cacf371fcece074d4655e15259e7e (diff) | |
Ajoute raccourci load more
Permet de charger les articles suivants en appuyant sur "m" (par défaut)
| -rwxr-xr-x | app/controllers/configureController.php | 3 | ||||
| -rwxr-xr-x | app/models/RSSConfiguration.php | 1 | ||||
| -rw-r--r-- | app/views/configure/shortcut.phtml | 7 | ||||
| -rw-r--r-- | app/views/helpers/javascript_vars.phtml | 3 | ||||
| -rw-r--r-- | public/scripts/main.js | 6 |
5 files changed, 18 insertions, 2 deletions
diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php index 4c9ceebbc..af6140b5d 100755 --- a/app/controllers/configureController.php +++ b/app/controllers/configureController.php @@ -373,7 +373,8 @@ class configureController extends ActionController { 'f10', 'f11', 'f12'); $this->view->list_keys = $list_keys; $list_names = array ('mark_read', 'mark_favorite', 'go_website', 'next_entry', - 'prev_entry', 'next_page', 'prev_page', 'collapse_entry'); + 'prev_entry', 'next_page', 'prev_page', 'collapse_entry', + 'load_more'); if (Request::isPost ()) { $shortcuts = Request::param ('shortcuts'); diff --git a/app/models/RSSConfiguration.php b/app/models/RSSConfiguration.php index fe6cd48d3..37f26b1dd 100755 --- a/app/models/RSSConfiguration.php +++ b/app/models/RSSConfiguration.php @@ -343,6 +343,7 @@ class RSSConfigurationDAO extends Model_array { 'next_entry' => 'j', 'prev_entry' => 'k', 'collapse_entry' => 'c', + 'load_more' => 'm' ); public $mail_login = ''; public $mark_when = array ( diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index 37aa3accc..ac33a869a 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -61,6 +61,13 @@ </div> </div> + <div class="form-group"> + <label class="group-name" for="load_more_shortcut"><?php echo Translate::t ('load_more'); ?></label> + <div class="group-controls"> + <input type="text" id="load_more_shortcut" name="shortcuts[load_more]" list="keys" value="<?php echo $s['load_more']; ?>" /> + </div> + </div> + <div class="form-group form-actions"> <div class="group-controls"> <button type="submit" class="btn btn-important"><?php echo Translate::t ('save'); ?></button> diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index ddebfd876..d6c2550f5 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -17,7 +17,8 @@ 'go_website:"', $s['go_website'], '",', 'prev_entry:"', $s['prev_entry'], '",', 'next_entry:"', $s['next_entry'], '",', - 'collapse_entry:"', $s['collapse_entry'], '"', + 'collapse_entry:"', $s['collapse_entry'], '",', + 'load_more:"', $s['load_more'], '"', "},\n"; if (Request::param ('output') === 'global') { diff --git a/public/scripts/main.js b/public/scripts/main.js index 022d0091b..89effc884 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -381,6 +381,12 @@ function init_shortcuts() { }, { 'disable_in_input': true }); + + shortcut.add(shortcuts.load_more, function () { + load_more_posts(); + }, { + 'disable_in_input': true + }); } function init_stream_delegates(divStream) { |
