From: itozyun Date: Sun, 1 Apr 2012 22:57:42 +0000 (+0900) Subject: fixed pettanr.overlay X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=899294b6d9b895078f44c16b53dcad336eb308fd;hp=01d23ad4151e2cc1b3c5883dba4550293ff058a9;p=pettanr%2Fpettanr.git fixed pettanr.overlay --- diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c0778fb0..d0de5771 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -25,8 +25,9 @@
-
- <%= yield %> +
+ <%= yield %> +

クイックアクセス

新しいコマを描く(いまだけ)

新しいコミックをつくる

画像のアップロード

diff --git a/public/assets/common.js b/public/assets/common.js index 13120a32..1be74696 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -1060,9 +1060,11 @@ pettanr.overlay = ( function(){ }, show: function( _currentOverlay){ if( visible === true && currentOverlay === _currentOverlay) return; + document.body.style.overflow = 'hidden'; jqConteiner.stop().css( { filter: '', - opacity: '' + opacity: '', + top: document.documentElement.scrollTop || document.body.scrollTop }).fadeIn(); this.visible = visible = true; currentOverlay = _currentOverlay; @@ -1072,6 +1074,7 @@ pettanr.overlay = ( function(){ hide: function(){ currentOverlay = null; if( visible === false) return; + document.body.style.overflow = ''; jqConteiner.stop().css( { filter: '', opacity: '' diff --git a/public/assets/work.js b/public/assets/work.js index 25d3256b..b4bd72c9 100644 --- a/public/assets/work.js +++ b/public/assets/work.js @@ -3729,7 +3729,7 @@ pettanr.comicConsole = ( function(){ pettanr.uploadConsole = ( function(){ var UPLOAD_CONSOLE = ( function(){ - var jqWrap, + var jqWrap, windowW, windowH, ID = 'uploadConsole', TARGET_FRAME_NAME = 'targetFrame', elmContainer = document.getElementById( 'uploader'), @@ -3814,6 +3814,7 @@ pettanr.uploadConsole = ( function(){ elmIframe = _iframe; elmForm.target = _iframe.name; elmProgress.innerHTML = ''; + UPLOAD_CONSOLE.onWindowResize( windowW, windowH ); } /* * @@ -3855,6 +3856,8 @@ pettanr.uploadConsole = ( function(){ UPLOAD_CONSOLE.onWindowResize( w, h); }, onWindowResize: function( _windowW, _windowH){ + windowW = _windowW; + windowH = _windowH; jqWrap.css( { left: Math.floor( ( _windowW -jqWrap.width()) /2), @@ -3907,7 +3910,7 @@ pettanr.uploadConsole = ( function(){ pettanr.panelConsole = ( function(){ var PANEL_CONSOLE = ( function(){ - var jqWrap, + var jqWrap, windowW, windowH, ID = 'panelConsole', TARGET_FRAME_NAME = 'targetFrameCreateNewPanel', elmContainer = document.getElementById( 'newpanel'), @@ -3987,6 +3990,7 @@ pettanr.panelConsole = ( function(){ elmIframe = _iframe; elmForm.target = _iframe.name; elmProgress.innerHTML = ''; + PANEL_CONSOLE.onWindowResize( windowW, windowH ); } /* * @@ -4028,6 +4032,8 @@ pettanr.panelConsole = ( function(){ PANEL_CONSOLE.onWindowResize( w, h ); }, onWindowResize: function( _windowW, _windowH){ + windowW = _windowW; + windowH = _windowH; jqWrap.css( { left: Math.floor( ( _windowW -jqWrap.width()) /2), @@ -4078,7 +4084,7 @@ pettanr.panelConsole = ( function(){ pettanr.artistConsole = ( function(){ var ARTIST_CONSOLE = ( function(){ - var jqWrap, + var jqWrap, windowW, windowH, ID = 'artistConsole', TARGET_FRAME_NAME = 'targetFrameResisterArtist', elmContainer = document.getElementById( 'register'), @@ -4130,9 +4136,9 @@ pettanr.artistConsole = ( function(){ } function onLoad(){ elmIframe.onload = null; - ( elmIframe.contentWindow || elmIframe.contentDocument.parentWindow ).close(); + // ( elmIframe.contentWindow || elmIframe.contentDocument.parentWindow ).close(); elmProgress.innerHTML = 'success!'; - setTimeout( clickCancel , 1000); + // setTimeout( clickCancel , 1000); isUploading = false; } @@ -4158,6 +4164,7 @@ pettanr.artistConsole = ( function(){ elmIframe = _iframe; elmForm.target = _iframe.name; elmProgress.innerHTML = ''; + ARTIST_CONSOLE.onWindowResize( windowW, windowH ); } /* * @@ -4199,6 +4206,8 @@ pettanr.artistConsole = ( function(){ ARTIST_CONSOLE.onWindowResize( w, h ); }, onWindowResize: function( _windowW, _windowH){ + windowW = _windowW; + windowH = _windowH; jqWrap.css( { left: Math.floor( ( _windowW -jqWrap.width()) /2),