/*\r
* pettanR libs.js\r
- * version 0.5.44\r
+ * version 0.5.47\r
* \r
* \r
* Type\r
getElementsByClassName: function( _elm, _className, opt_tagName ){\r
var _all = !opt_tagName || opt_tagName === '*',\r
_livenodes = _all === true ? ( _elm.all || _elm.getElementsByTagName( '*' )) : _elm.getElementsByTagName( opt_tagName ),\r
- _nodes = Util.copyArray( _livenodes );\r
+ _nodes = Util.copyArray( _livenodes),\r
+ _node;\r
for( var j = 0; j < _nodes.length; ){\r
_node = _nodes[ j ];\r
if( _node.nodeType !== 1 || Util.hasClassName( _node, _className ) === false ){\r
})();\r
\r
var COLOR = ( function(){\r
- var ret = {}, v, name,\r
+ var ret = {}, v, name, i,\r
list = [\r
'0', 'BLACK',\r
'FF0000', 'RED',\r
right = this.get( name + 'Right' ),\r
bottom = this.get( name + 'Bottom' ),\r
left = this.get( name + 'Left' ),\r
- ret = new PropertyGroupClass( name, top, right, bottom, left );\r
+ ret = new PropertyGroupClass( name, top, right, bottom, left),\r
+ all;\r
if( ret.isValid() === true ) return ret;\r
ret.clear();\r
all = this.style[ name ].split( '(' )[ 1 ].split( ')' )[ 0 ].split( CLIP_SEPARATOR );\r
bottom = this.get( name + 'Bottom' + widthOrColor ),\r
left = this.get( name + 'Left' + widthOrColor ),\r
ret = new FrexiblePropertyClass( name, top, right, bottom, left ),\r
- all, x, v, u, i;\r
+ all, x, v, u, i, l;\r
\r
if( ret.isValid() === true ) return ret;\r
ret.clear();\r
minus = Position.isMinusBodyBorder,\r
body = document.body,\r
element = forElement,\r
- parent;\r
+ parent, border;\r
do {\r
valueT += element.offsetTop || 0;\r
valueL += element.offsetLeft || 0;\r
/*
* pettanR peta.apps.js
- * version 0.5.44
+ * version 0.5.47
*
* author:
* itozyun
this.viewerApplicationList = function( file ){
var data = FileAPI.getFileData( file ),
type = data !== null ? data.type : null;
+ if( data === FILE_DATA_MY_ORIGINAL_PICTURES_ROOT ) return [ PremiumSatge ];
switch( type ){
case FILE_TYPE.COMIC :
case FILE_TYPE.PANEL :
break;
case FILE_TYPE.ARTIST :
return [ PremiumSatge ];
- default :
- if( data === FILE_DATA_MY_ORIGINAL_PICTURES_ROOT ){
- return [ PremiumSatge ];
- };
+ default :
};
return [];
};
var ImageGroupIconClass = function( index, data ){
var elmIconWrap = elmIconOrigin.cloneNode( true ),
elmIconTitle = Util.getElementsByClassName( elmIconWrap, 'image-group-item-title' )[ 0 ],
- originalPicture = data.original_picture,
+ originalPicture = data.original_picture || data,
SRC = [ BASE_PATH, data.id, '.', data.ext ].join( ''),
- LOW_SRC = originalPicture.filesize && originalPicture.filesize > LIMIT_FILESIZE ? [ THUMB_PATH, data.id, '.', originalPicture.ext ].join( '') : null,
+ LOW_SRC = originalPicture.filesize && originalPicture.filesize > LIMIT_FILESIZE ? [ THUMB_PATH, data.id, '.', data.ext ].join( '' ) : null,
reversibleImage = null,
timer = null,
onEnterFlag = false,
var ELM_ITEM_CLASSNAME = 'menubar-item',
currentMenu = null,
elmBar, elmBox,
- nodeBar, nodeBox,
+ nodeBar, nodeBox, layerBox,
barH, menuW;
/** -----------------------------------------
* PrivateOptionDataClass
};
MenuClass.prototype = {
show: function(){
- data = MenuPrivateDataClass.get( this );
+ var data = MenuPrivateDataClass.get( this );
if( data.visible === true ) return;
data.elm.className = ELM_ITEM_CLASSNAME + '-focus';
},
firstOpen : function(){
var win = this.window,
- elmHead = this.elmHead = Util.getElementsByClassName( this.elm, 'window-header' )[ 0 ];
+ elmHead = this.elmHead = Util.getElementsByClassName( this.elm, 'window-header' )[ 0 ],
elmBody = this.elmBody = Util.getElementsByClassName( this.elm, 'window-body' )[ 0 ],
elmClose = Util.getElementsByClassName( this.elm, 'window-close-button' )[ 0 ],
elmFoot = Util.getElementsByClassName( this.elm, 'window-footer' )[ 0 ],
{ x: 1, w: -1, y: 0, h: 1}, //bottom-left
{ x: 0, w: 1, y: 0, h: 1} //bottom-right
],
- startX, startY, startW, startH, startFilpV, startFilpH, startAspect,
+ startX, startY, startW, startH,
+ flipV, flipH, startFilpV, startFilpH, startAspect,
baseX, baseY, baseW, baseH,
currentX, currentY, currentW, currentH,
offsetX, offsetY,
pushoutH = 0,
pushout = false,
currentType = -1,
+ currentElement = null,
visible = false,
node = null,
- ui, inputX, inputY, inputZ, inputA, inputW, inputH, inputAspectRatio,
+ ui, inputX, inputY, inputZ, inputA, inputW, inputH, inputPercentW, inputPercentH, inputAspectRatio,
buttonBack, buttonForward, buttonDel, buttonEdit, butonChange;
function layerBack(){
};
function change(){
if( currentElement === null ) return;
- PremiumSatge.boot( currentElement.artistID, currentElement.resourcePicture, currentElement );
+ PremiumSatge.boot( currentElement.artistID, currentElement.realPicture, currentElement );
};
return {
this.flipV = data.height < 0 ? -1 : 1;
this.flipH = data.width < 0 ? -1 : 1;
this.rPicture = data.picture;
- //this.oPicture = this.rPicture.original_picture;
- //this.artistID = this.oPicture.artist.id || -1;
var self = this;
function animeComplete(){
this.flipV = updateV === true ? -this.flipV : this.flipV;
this.reversibleImage.resize( this.flipH * this.w, this.flipV * this.h );
},
- resourcePicture : function( _rPicture ){
+ realPicture : function( _rPicture ){
if( _rPicture && _rPicture !== this.rPicture ){
HISTORY_CONTROL.saveState( this._updateResourcePicture, this.rPicture, _rPicture, this );
this._updateResourcePicture( _rPicture );
this.actualH = this.oPicture.height;
var _reversibleImage = pettanr.image.createReversibleImage(
- [ pettanr.CONST.RESOURCE_PICTURE_PATH, this.rPicture.id, '.', this.rPicture.ext ].join( '' ),
+ [ pettanr.CONST.PICTURE_PATH, this.rPicture.id, '.', this.rPicture.ext ].join( '' ),
this.flipH * this.w, this.flipV * this.h
);
if( this.reversibleImage !== null ){
var _panelElement;
if( isPanelPictureData !== true ){
_panelElement = new ImageElementClass( {
- picture : data,
+ picture : data.picture,
x : Math.floor( panelW / 2 - data.width / 2 ),
y : Math.floor( panelH / 2 - data.height / 2 ),
z : -1,
function getPanelElementByTiming(){
var i, l = panelElementArray.length;
while( timing < l * 2 ){
- for( i=0; i<l; ++i ){
+ for( i = 0; i < l; ++i ){
if( timing === panelElementArray[ i ].timing ){
// console.log( timing + ' , ' + panelElementArray[ i ].timing );
++timing;
return null;
};
function panelElementToHtml( _panelElement, isAbsoluteUrl, isXHTML ){
- var url;
+ var rPic, url;
if( _panelElement.type === 0 ){
- url = [ pettanr.CONST.RESOURCE_PICTURE_PATH, _panelElement.resourcePicture().id, '.', _panelElement.resourcePicture().ext ].join( '' );
+ rPic = _panelElement.realPicture();
+ url = [ pettanr.CONST.RESOURCE_PICTURE_PATH, rPic.id, '.', rPic.ext ].join( '' );
return [
'<img ',
'src="', isAbsoluteUrl !== true ? url : Util.getAbsolutePath( url ), '" ',
};
};
function getImageJsonGET( _imageElement ){
- var cr = pettanr.LINE_FEED_CODE_TEXTAREA;
+ var cr = pettanr.LINE_FEED_CODE_TEXTAREA,
+ rPic = _imageElement.realPicture();
return [
'{', cr,
'"resource_picture": {', cr,
- '"id": ', _imageElement.resourcePicture().id, ',', cr,
- '"ext": ', '"',_imageElement.resourcePicture().ext, '"', cr,
+ '"id": ', rPic.id, ',', cr,
+ '"ext": ', '"', rPic.ext, '"', cr,
'},', cr,
'"x": ', _imageElement.x, ',', cr,
'"y": ', _imageElement.y, ',', cr,
var cr = pettanr.LINE_FEED_CODE_TEXTAREA;
return [
'{', cr,
- '"picture_id": ', _imageElement.resourcePicture().id, ',', cr,
+ '"picture_id": ', _imageElement.realPicture().id, ',', cr,
'"x": ', _imageElement.x, ',', cr,
'"y": ', _imageElement.y, ',', cr,
'"z": ', _imageElement.z + 1, ',', cr,
this.onClose = function(){
elmOutputArea.value = '';
model.destroy();
- elmOutputArea = comboboxFormat = inputOption = buttonSubmit = buttonClose = panelElementArray = instance = model = null;
+ elmOutputArea = comboboxFormat = inputOption = buttonSubmit = buttonClose = panelElementArray = model = null;
};
}, true, false, 'Output Console', 'outputConsole', null, '#2D89F0' );
/*
* pettanR system.js
- * version 0.5.45
+ * version 0.5.47
*
* gadgetOS
* author:
dataUser = null,
traits = null,
f = true,
- c = Util.copyArray,
- a; /* arguments */
+ copyArray = Util.copyArray;
function getClass( instance ){
var cList = CLASS_LIST,
* http://d.hatena.ne.jp/m-hiyama/20051018/1129605002
*/
function inherits( /* displayName, classSetting, opt_PrivateClass, props */ ){
- var args = c( arguments ),
+ var args = copyArray( arguments ),
params = [],
Super = this,
superDef = getClassDef( Super ),
/* privateDataclass をもつクラスに追加されるメソッド */
function newPrivateData( /* instance, args */ ){
- var args = c( arguments ),
+ var args = copyArray( arguments ),
user = args.shift(),
def = getClassDef( user ),
privateClass = def.privateClass,
userDef.userList.push( dataUser );
} else {
def.live && def.live.push( instance );
- args = c( arguments );
+ args = copyArray( arguments );
};
def[ CONSTRUCTOR ] && def[ CONSTRUCTOR ].apply( instance, args );
return instance;
SUPER_ACCESS : 8,
PRIVATE_DATA : 16,
create : function( /* displayName, classSetting, opt_PrivateClass, props */ ){
- var args = c( arguments ),
+ var args = copyArray( arguments ),
displayName = args[ 0 ],
classSetting,
opt_pool, opt_abstract, opt_final, opt_private,
classDef[ CONSTRUCTOR ] = props[ CONSTRUCTOR ];
};
- klass = function(){ a = arguments; if( f ) return C.apply( a.callee, c( a ) )};
+ klass = function(){ var a = arguments; if( f ) return C.apply( a.callee, a )};
klass.prototype = override( override( traits || {}, props, true ), CommonProps, false );
if( opt_abstract === true ){
var ReadyEvent = ( function(){
var ticketReady,
- ticketLoad;
+ ticketLoad,
+ timer;
function webkitDetect(){
var state = document.readyState;
TMP.onWheel = function( e ){
e = e || window.event;
var cancel = true,
- f = TMP.wheelLegacy;
+ f = TMP.wheelLegacy, i;
if( f ) cancel = f.call( this, e );
for( i = TMP.wheelHandlerList.length; i; ){
function checkTimer(){
var l = TICKET_LIST.length,
- n = 0;
+ n = 0, t;
for( var i = 0; i < l; ++i ){
t = TICKET_LIST[ i ];
++t.time;
},
unload: function( _apiuser, _url ){
_url = _url ? Util.getAbsolutePath( _url ) : null;
+ var t;
for( var i = 0; i < TICKET_LIST.length; ){
t = TICKET_LIST[ i ];
if( t.destroy( _apiuser, _url ) === true ){
var CLASSNAME_FORM = 'uiform-invisible';
var CLASSNAME_FILE_WRAP = 'ui-fileinput-wrapper';
var FormItemData = function(){};
+ var windowW, windowH;
FormItemData.prototype = {
formData : null,
uiItem : null,
};
},
draw : function( folder ){
- _w = this.nodeRoot.width();
+ var _w = this.nodeRoot.width();
this.folder = folder;
var data = this,
iconList = data.iconList,
elmName = Util.getElementsByClassName( elm, 'finder-detail-filename' )[ 0 ],
elmDesc = Util.getElementsByClassName( elm, 'finder-detail-summary' )[ 0 ],
tmpButtons = Util.copyArray( this.appButtons ),
- apps, app, elmContainer;
+ apps, app, elmContainer, button;
if( thumb.image ){
elmThumb.className = 'has-thumbnail';
elmThumb.style.backgroundImage = [ 'url(', thumb.image, ')' ].join( '' );
right = this.get( name + 'Right' ),
bottom = this.get( name + 'Bottom' ),
left = this.get( name + 'Left' ),
- ret = new PropertyGroup( name, top, right, bottom, left );
+ ret = new PropertyGroup( name, top, right, bottom, left),
+ all;
if( ret.isValid() === true ) return ret;
ret.kill();
all = this.style[ name ].split( '(' )[ 1 ].split( ')' )[ 0 ].split( CLIP_SEPARATOR );
parent = this.__parent,
size, data, w, h;
- if( content || ( style && style.hasStyle === true ) ){
+ if( content || ( style && style.hasPaint === true ) ){
if( !this.elmWrap ){
this.elmWrap = DOM.createDiv();
parent.addDisplayElement( this );
parent.removeDisplayElement( this );
};
},
- preSizing : function( boxX, boxY, boxW, boxH, contentX, contentY, contentW, contentH ){
+ preSizing : function(){
var parent = nodeData.__parent,
allowW = parent.contentWidth,
allowH = parent.contentHeight,