mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Merge pull request #2633 from thiagotalma/master
Keyboard shortcut for previous, next and refresh buttons
This commit is contained in:
@ -14,6 +14,7 @@ Yii Framework 2 gii extension Change Log
|
||||
- Enh #2327: better visual representation of changed files, added header and refresh button to diff modal (thiagotalma)
|
||||
- Enh #2491: Added support for using the same base class name of search model and data model in Gii (qiangxue)
|
||||
- Enh #2595: Browse through all generated files using right and left arrows (thiagotalma)
|
||||
- Enh #2633: Keyboard shortcuts to browse through files (thiagotalma)
|
||||
|
||||
2.0.0 alpha, December 1, 2013
|
||||
-----------------------------
|
||||
|
@ -69,6 +69,16 @@ yii.gii = (function ($) {
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#preview-modal').on('keydown', function(e) {
|
||||
if (e.keyCode === 37) {
|
||||
$('.modal-previous').trigger('click');
|
||||
} else if(e.keyCode === 39) {
|
||||
$('.modal-next').trigger('click');
|
||||
} else if(e.keyCode === 82) {
|
||||
$('.modal-refresh').trigger('click');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var initConfirmationCheckboxes = function () {
|
||||
|
@ -82,9 +82,9 @@ use yii\gii\CodeFile;
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<div class="btn-group pull-left">
|
||||
<a class="modal-previous btn btn-xs btn-default" href="#"><span class="glyphicon glyphicon-arrow-left"></span></a>
|
||||
<a class="modal-next btn btn-xs btn-default" href="#"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
<a class="modal-refresh btn btn-xs btn-default" href="#"><span class="glyphicon glyphicon-refresh"></span></a>
|
||||
<a class="modal-previous btn btn-xs btn-default" href="#" title="Previous File (Left Arrow)"><span class="glyphicon glyphicon-arrow-left"></span></a>
|
||||
<a class="modal-next btn btn-xs btn-default" href="#" title="Next File (Right Arrow)"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
<a class="modal-refresh btn btn-xs btn-default" href="#" title="Refresh File (R)"><span class="glyphicon glyphicon-refresh"></span></a>
|
||||
|
||||
</div>
|
||||
<strong class="modal-title pull-left">Modal title</strong>
|
||||
|
Reference in New Issue
Block a user