Revision 795

Date:
2020/06/18 14:03:39
Author:
ahitrov
Revision Log:
Ctrl-q for Save-and-Leave

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/comps/contenido/components/object_form.msn

     
    18 18 % unless ( $proto eq 'sections' && $object->id == 1 ) {
    19 19 <input type="submit" value="Сохранить" class="input_btn">
    20 20 % if (( $proto eq 'documents' ) || ( $proto eq 'sections' )) {
    21 <input type="submit" name="_save_and_leave" value="Сохранить и выйти" class="input_btn">
    21 <script>
    22 <!--
    23 var isCtrlPressed = false;
    24 $().ready(function(){
    25 $(document).keyup(function (e) {
    26 if (e.which == 17) isCtrlPressed=false;
    27 }).keydown(function (e) {
    28 if (e.which == 17) {
    29 isCtrlPressed=true;
    30 }
    31 if (e.which == 81 && isCtrlPressed == true) {
    32 $('#save-and-leave').click();
    33 }
    34 });
    35 });
    36 //-->
    37 </script>
    38 <input type="submit" name="_save_and_leave" value="Сохранить и выйти" class="input_btn" id="save-and-leave">
    22 39 <input type="submit" name="_save_and_again" value="Сохранить и создать новый" class="input_btn">
    23 40 % }
    24 41 % }