IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
90 | 90 | showNotice = { |
91 | 91 | warn : function() { |
92 | 92 | var msg = commonL10n.warnDelete || ''; |
93 | | if ( confirm(msg) ) { |
| 93 | if ( confirm( msg ) ) { |
94 | 94 | return true; |
95 | 95 | } |
96 | 96 | |
97 | 97 | return false; |
98 | 98 | }, |
99 | 99 | |
| 100 | warnOffline : function() { |
| 101 | var msg = commonL10n.warnOffline || ''; |
| 102 | if ( navigator.onLine !== true ){ |
| 103 | return confirm( msg ); |
| 104 | } |
| 105 | |
| 106 | // If navigator.onLine returns true or it isn't supported by the current browser, proceed |
| 107 | return true; |
| 108 | }, |
| 109 | |
100 | 110 | note : function(text) { |
101 | 111 | alert(text); |
102 | 112 | } |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
391 | 391 | * Enter on a focused field. |
392 | 392 | */ |
393 | 393 | save : function(id) { |
| 394 | |
| 395 | if ( ! showNotice.warnOffline() ){ |
| 396 | return false; |
| 397 | } |
| 398 | |
394 | 399 | var params, fields, page = $('.post_status_page').val() || ''; |
395 | 400 | |
396 | 401 | if ( typeof(id) === 'object' ) { |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
844 | 844 | * When a navigation menu is saved, store a JSON representation of all form data |
845 | 845 | * in a single input to avoid PHP `max_input_vars` limitations. See #14134. |
846 | 846 | */ |
847 | | $( '#update-nav-menu' ).submit( function() { |
| 847 | $( '#update-nav-menu' ).submit( function( event ) { |
| 848 | |
| 849 | if ( ! showNotice.warnOffline() ){ |
| 850 | event.preventDefault(); |
| 851 | return; |
| 852 | } |
| 853 | |
848 | 854 | var navMenuData = $( '#update-nav-menu' ).serializeArray(); |
849 | 855 | $( '[name="nav-menu-data"]' ).val( JSON.stringify( navMenuData ) ); |
850 | 856 | }); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
884 | 884 | event.preventDefault(); |
885 | 885 | }); |
886 | 886 | |
887 | | // Cancel submit when an invalid timestamp has been selected. |
888 | 887 | $('#post').on( 'submit', function( event ) { |
| 888 | |
| 889 | var $publishingActionSpinner = $( '#publishing-action .spinner' ); |
| 890 | |
| 891 | if ( ! showNotice.warnOffline() ){ |
| 892 | $publishingActionSpinner.removeClass( 'is-active' ); |
| 893 | event.preventDefault(); |
| 894 | return; |
| 895 | } |
| 896 | |
| 897 | // Cancel submit when an invalid timestamp has been selected. |
889 | 898 | if ( ! updateText() ) { |
890 | 899 | event.preventDefault(); |
891 | 900 | $timestampdiv.show(); |
… |
… |
|
894 | 903 | wp.autosave.enableButtons(); |
895 | 904 | } |
896 | 905 | |
897 | | $( '#publishing-action .spinner' ).removeClass( 'is-active' ); |
| 906 | $publishingActionSpinner.removeClass( 'is-active' ); |
898 | 907 | } |
899 | 908 | }); |
900 | 909 | |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
78 | 78 | $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 ); |
79 | 79 | did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array( |
80 | 80 | 'warnDelete' => __( "You are about to permanently delete these items from your site.\nThis action cannot be undone.\n 'Cancel' to stop, 'OK' to delete." ), |
| 81 | 'warnOffline' => __( 'You are offline at the current moment. Are you sure you want to proceed?' ), |
81 | 82 | 'dismiss' => __( 'Dismiss this notice.' ), |
82 | 83 | 'collapseMenu' => __( 'Collapse Main menu' ), |
83 | 84 | 'expandMenu' => __( 'Expand Main menu' ), |