From: itozyun Date: Sun, 13 May 2012 23:40:23 +0000 (+0900) Subject: Client is version0.4.29, added exportConsole. X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=commitdiff_plain;h=2dc4a19e472009653fdeddd554debd0b744de8ef Client is version0.4.29, added exportConsole. --- diff --git a/app/assets/stylesheets/common.css b/app/assets/stylesheets/common.css index 2c05cd72..13ea61f3 100644 --- a/app/assets/stylesheets/common.css +++ b/app/assets/stylesheets/common.css @@ -1,3 +1,5 @@ +@charset "UTF-8"; + /* * pettanR * @@ -562,6 +564,11 @@ version: 2.7.0 left: 0; top: 0; } + .pettanr-comic-panel img { + position: absolute; + left: 0; + top: 0; + } .pettanr-comic-balloon .pettanr-comic-speach { position: absolute; top: 0; @@ -579,6 +586,9 @@ version: 2.7.0 text-align: center; vertical-align: middle; } + .pettanr-comic-speach td { + padding: 16.66%; + } .pettanr-comic-speach { table-layout: fixed; /* ie6で上下中央にテキストがならない対処。固定レイアウトアルゴリズムになるので負荷を下げるらしい */ } \ No newline at end of file diff --git a/app/assets/stylesheets/work.css b/app/assets/stylesheets/work.css index 0b32939b..3c1755c6 100644 --- a/app/assets/stylesheets/work.css +++ b/app/assets/stylesheets/work.css @@ -1,3 +1,5 @@ +@charset "UTF-8"; + /* * pettanR * @@ -75,21 +77,6 @@ -moz-border-radius: 5px; -webkit-border-radius: 5px; } - - /* Output Console - --------------------------------------------------------------------------------------*/ - #output-console-wrapper { - position: absolute; - width: 80%; - height: 80%; - background-color: #fff; - } - #output-area { - width: 100%; - height: 100%; - border: 1px outset #ccc; - outline: 1px; - } /* Console Common --------------------------------------------------------------------------------------*/ @@ -138,28 +125,33 @@ margin-top: 15px; color: #666; } - + + /* Field + --------------------------------------------------------------------------------------*/ + .field { + margin: 10px 0; + padding-bottom: 5px; + border-bottom: 1px solid #ccc; + } + .field-label { + display: inline-block; + width: 120px; + line-height: 22px; + color: #666; + cursor: pointer; + } + /* Comic Console --------------------------------------------------------------------------------------*/ #comic-console { } - .comic-console-label { - display: inline-block; - width: 120px; - line-height: 22px; - color: #666; - cursor: pointer; - } + .comic-console-value { width: 40px; text-align: right; } - .comic-console-line { - margin: 10px 0; - padding-bottom: 5px; - border-bottom: 1px solid #ccc; - } + #comic-console-title, #comic-console-height, #comic-console-width, @@ -174,12 +166,33 @@ text-align: center; } - #comic-console-button-container { - margin-top: 20px; - position: relative; - } + + /* Output Console + --------------------------------------------------------------------------------------*/ + + #output-console-wrapper { + } + #output-console-format-value { + width: 180px; + text-align: center + } + #output-console-option-value { + width: 180px; + text-align: left; + } + #output-console-button-container { + margin: 10px 0; + position: relative; + } + #output-area { + width: 100%; + height: 200px; + border: 1px outset #ccc; + outline: 1px; + margin-bottom: 20px; + } /* Upload Console --------------------------------------------------------------------------------------*/ @@ -968,19 +981,19 @@ line-height: 30px; *cursor: pointer; } - .current-option a, - .current-option a:link, - .current-option a:visited { - color: #e6e6ef; - background-color: #66f; - text-decoration: none; - } .option-container a:hover { color: #333; background-color: #ccf; text-decoration: none; *cursor: pointer; } + .current-option a, + .current-option a:link, + .current-option a:visited { + color: #e6e6ef; + background-color: #66f; + text-decoration: none; + } /* Information Window --------------------------------------------------------------------------------------*/ diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 2148d108..b78281b9 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -288,11 +288,6 @@
x
- - -
- -
@@ -346,28 +341,48 @@
+ +
+
Output Console
+
+
+ Format: + +
+
+ Options: + absolute-path +
+
+
generate
+
close
+
+ +
+
+
Create New Comic
-
- Title: +
+ Title: No Title
-
- Default Width: +
+ Default Width: 300
-
- Default Height: +
+ Default Height: 200
-
- Visible: +
+ Visible:
-
- Editable: +
+ Editable:
diff --git a/public/assets/common.js b/public/assets/common.js index c1b19d6e..da0a9e5d 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -1,6 +1,6 @@ /* * pettanR common.js - * version 0.4.28 + * version 0.4.29 * * author: itozyun */ @@ -10,7 +10,7 @@ */ var Type = { isObject : function(v) { - return v !== null && Type.isArray(v) === false && typeof v === 'object'; + return v !== null && typeof v === 'object'; }, isFunction : function(v) { return typeof v === 'function'; @@ -665,7 +665,13 @@ pettanr.ua = ( function(){ pettanr.CONST = ( function(){ var isLocal = pettanr.LOCAL === true || pettanr.URL_PARAMS.exjson === false, isLocalhost = document.location.href.indexOf( 'http:\/\/localhost:3000\/' ) === 0, - PETTANR_ROOT_PATH = isLocalhost === true ? 'http:\/\/localhost:3000\/' : 'http:\/\/pettanr.heroku.com\/'; + PETTANR_ROOT_PATH = isLocalhost === true ? 'http:\/\/localhost:3000\/' : 'http:\/\/pettanr.heroku.com\/', + location = document.location.pathname, + deep = location.indexOf( '\/diary\/' ) !== -1 || + location.indexOf( '\/test\/' ) !== -1 || + location.indexOf( '\/help\/' ) !== -1 || + location.indexOf( '\/sitemap\/' ) !== -1 || + location.indexOf( '\/wiki\/' ) !== -1; return { PETTANR_ROOT_PATH: PETTANR_ROOT_PATH, @@ -674,7 +680,7 @@ pettanr.CONST = ( function(){ URL_COMICS_JSON: ( isLocal === true ? 'json\/' : PETTANR_ROOT_PATH) + 'comics.json', URL_PANELS_JSON: ( isLocal === true ? 'json\/' : PETTANR_ROOT_PATH) + 'panels.json', NS_PETTANR_COMIC: 'pettanr-comic', - RESOURCE_PICTURE_PATH: ( isLocal === true ? '' : PETTANR_ROOT_PATH) + 'resource_pictures\/', + RESOURCE_PICTURE_PATH: ( isLocal === true ? ( deep === true ? '..\/' : '' ) : PETTANR_ROOT_PATH ) + 'resource_pictures\/', CREATE_COMIC_JS: isLocal === true ? 'js\/create_new_comic.js' : PETTANR_ROOT_PATH + 'comics\/new.js', CREATE_PANEL_JS: isLocal === true ? 'js\/create_new_panel.js' : PETTANR_ROOT_PATH + 'panels\/new.js', UPLOAD_PICTURE_JS: isLocal === true ? 'js\/upload_picture.js' : PETTANR_ROOT_PATH + 'original_pictures\/new.js', @@ -752,12 +758,14 @@ pettanr.view = ( function(){ } var AbstractApplication = function(){ + var instance; this.displayName = 'app name'; this.ID = 'app id'; this.rootElement = null; this.parentElement = null; this.nextSibling = null; this.open = function( _w, _h /*, _option */ ){ + instance = this; if( this.MIN_WIDTH > _w || this.MIN_HEIGHT > _h ){ if( Type.isHTMLElement( this.rootElement ) === true ){ // 小さすぎる!、と表示 @@ -782,6 +790,9 @@ pettanr.view = ( function(){ // overrride return true; } // false の場合、close の拒否 + this.addEventListener = function(){ + + } } AbstractApplication.prototype = new AbstractBasicPane(); @@ -1093,21 +1104,21 @@ pettanr.key = ( function(){ log.html( [ e.keyCode, e.shiftKey, e.ctrlKey, e.altKey, e.type].join( ',')); //keyOperationChatcher.val( ''); var cancel = false, - callback = e.type, + type = e.type, key = e.keyCode, overlayEnabled = pettanr.overlay.visible === true, currentViewID = overlayEnabled === true ? pettanr.overlay.currentID : pettanr.view.currentID; - if( callback === 'keypress') callback = 'keydown'; - if( pettanr.form.keyEventRellay( e ) === false){ + if( type === 'keypress') type = 'keydown'; + if( pettanr.form.keyEventRellay( e ) === false ){ var shift = e.shiftKey, ctrl = e.ctrlKey, l = KEYEVENT_ARRAY.length, d; if( key === 16 || e.shiftKey === true){ - shiftEnabled = callback !== 'keyup'; + shiftEnabled = type !== 'keyup'; } if( key === 17 || e.ctrlKey === true){ - ctrlEnabled = callback !== 'keyup'; + ctrlEnabled = type !== 'keyup'; } for( var i=0; i