Changeset 3241:5ea4e5d537c8
- Timestamp:
- 04/28/16 16:37:42 (9 years ago)
- Branch:
- 2.9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_post.js
r3200 r3241 54 54 $preview_url = $('#post-preview').attr('href'); 55 55 if ($preview_url) { 56 if (window.location.protocol == 'http:' || $preview_url.substring(0,7) != 'http://') { 56 57 // Make $preview_url absolute 58 $a = document.createElement('a'); 59 $a.href = $('#post-preview').attr('href'); 60 $preview_url = $a.href; 61 62 // Check if admin and blog have same protocol (ie not mixed-content) 63 if (window.location.protocol == $preview_url.substring(0,window.location.protocol.length)) { 57 64 // Open preview in a modal iframe 58 // ie (blog uri on admin uri): https on https, http on http, https on http59 65 $('#post-preview').modalWeb($(window).width()-40,$(window).height()-40); 60 } 61 else 62 { 66 } else { 63 67 // Open preview on antother window 64 // ie (blog uri on admin uri): http on https65 68 $('#post-preview').click(function(e) { 66 69 e.preventDefault();
Note: See TracChangeset
for help on using the changeset viewer.