|
Lines 753-759
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
| 753 |
|
753 |
|
| 754 |
// Automatically detect resizes and change the height of the editor and position of modals. |
754 |
// Automatically detect resizes and change the height of the editor and position of modals. |
| 755 |
var resizeTimer = null; |
755 |
var resizeTimer = null; |
| 756 |
$( window ).resize( function() { |
756 |
function onResize() { |
| 757 |
if ( resizeTimer == null ) resizeTimer = setTimeout( function() { |
757 |
if ( resizeTimer == null ) resizeTimer = setTimeout( function() { |
| 758 |
resizeTimer = null; |
758 |
resizeTimer = null; |
| 759 |
|
759 |
|
|
Lines 770-777
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
| 770 |
return -($(this).width() / 2); |
770 |
return -($(this).width() / 2); |
| 771 |
} |
771 |
} |
| 772 |
} ); |
772 |
} ); |
| 773 |
|
773 |
} |
| 774 |
} ).resize(); |
|
|
| 775 |
|
774 |
|
| 776 |
$( '#macro-ui' ).on( 'shown', function() { |
775 |
$( '#macro-ui' ).on( 'shown', function() { |
| 777 |
if ( macroEditor ) return; |
776 |
if ( macroEditor ) return; |
|
Lines 1087-1092
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
| 1087 |
|
1086 |
|
| 1088 |
Resources.GetAll().done( function() { |
1087 |
Resources.GetAll().done( function() { |
| 1089 |
$("#loading").hide(); |
1088 |
$("#loading").hide(); |
|
|
1089 |
$( window ).resize( onResize ).resize(); |
| 1090 |
editor.focus(); |
1090 |
editor.focus(); |
| 1091 |
} ); |
1091 |
} ); |
| 1092 |
} |
1092 |
} |