"use strict"; function webapp($,appcfg){ appcfg._func_this_ = this; /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajaxいいねボタン v2.23 [ GPL ] // Copyright (c) phpkobo.com ( http://jpn.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : LKBNX-223J // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ //-- pollyfill for "toFixed" if (!Number.prototype.toFixed) { Number.prototype.toFixed = function(decimals) { return Math.round(this * Math.pow(10, decimals)) / (Math.pow(10, decimals)); }; } //-- pollyfill for "isArray" if (!Array.isArray) { Array.isArray = function(arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; } //-- pollyfill for "includes" if (!Array.prototype.includes) { Array.prototype.includes = function( findme ) { for( var i=0; i") == -1 ) { return this.toString(); } else { return this .replace(//g,'') .replace(/<\/sb>/g,''); } }; } //-- polyfill for JSON if (!window.JSON) { window.JSON = { parse: function(sJSON) { return eval('(' + sJSON + ')'); }, stringify: (function () { var toString = Object.prototype.toString; var isArray = Array.isArray || function (a) { return toString.call(a) === '[object Array]'; }; var escMap = {'"': '\\"', '\\': '\\\\', '\b': '\\b', '\f': '\\f', '\n': '\\n', '\r': '\\r', '\t': '\\t'}; var escFunc = function (m) { return escMap[m] || '\\u' + (m.charCodeAt(0) + 0x10000).toString(16).substr(1); }; var escRE = /[\\"\u0000-\u001F\u2028\u2029]/g; return function stringify(value) { if (value == null) { return 'null'; } else if (typeof value === 'number') { return isFinite(value) ? value.toString() : 'null'; } else if (typeof value === 'boolean') { return value.toString(); } else if (typeof value === 'object') { if (typeof value.toJSON === 'function') { return stringify(value.toJSON()); } else if (isArray(value)) { var res = '['; for (var i = 0; i < value.length; i++) { res += (i ? ', ' : '') + stringify(value[i]); } return res + ']'; } else if (toString.call(value) === '[object Object]') { var tmp = []; for (var k in value) { if (value.hasOwnProperty(k)) { tmp.push(stringify(k) + ': ' + stringify(value[k])); } } return '{' + tmp.join(', ') + '}'; } } return '"' + value.toString().replace(escRE, escFunc) + '"'; }; })() }; } /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajaxいいねボタン v2.23 [ GPL ] // Copyright (c) phpkobo.com ( http://jpn.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : LKBNX-223J // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CUtil = this.CUtil = { hsc : function( s ) { return $("
").text(s).html(); }, recalcStyle : function( jqo ) { var dummy = jqo.get(0).offsetWidth; }, jsShallowCopy : function( obj ) { return $.extend({},obj); }, jsDeepCopy : function( obj ) { return $.extend(true,{},obj); }, getFilenameFromUrl : function( url ) { return url.substring(url.lastIndexOf('/')+1); }, isIE7or8 : function() { return (navigator.appVersion.indexOf("MSIE 7.")!=-1) || (navigator.appVersion.indexOf("MSIE 8.")!=-1); }, canCssAnim : function() { return ( document.createElement("div") .style.animationName !== undefined ); }, isTouchDevice : function() { return (("ontouchstart" in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)); }, shuffleArray : function(ax) { var tmp, idx; var i = ax.length; while (0 !== i) { idx = Math.floor(Math.random() * i); i -= 1; tmp = ax[i]; ax[i] = ax[idx]; ax[idx] = tmp; } return ax; }, ensureArray : function( s ) { if ( s == undefined ) { return []; } else if ( Array.isArray(s) ) { return s; } else { s = s.trim(); if ( s ) { var sx = s.split(","); for( var i=0; i>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajaxいいねボタン v2.23 [ GPL ] // Copyright (c) phpkobo.com ( http://jpn.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : LKBNX-223J // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ var CHeadReso = this.CHeadReso = { removeCss : function( id ) { if ( $("#"+id).length ) { $("#"+id).remove(); } return id; }, insertCss : function( id, txt ) { this.removeCss(id); var style = document.createElement("style"); style.type = "text/css"; style.id = id; if (style.styleSheet){ style.styleSheet.cssText = txt; } else { style.appendChild(document.createTextNode(txt)); } document.getElementsByTagName("head")[0].appendChild(style); }, removeJs : function( id ) { if ( $("#"+id).length ) { $("#"+id).remove(); } return id; }, insertJs : function( id, txt ) { this.removeJs(id); var script = document.createElement("script"); script.type = "text/javascript"; script.id = id; if ( CUtil.isIE7or8() ) { script.text = txt; } else { script.appendChild(document.createTextNode(txt)); } document.getElementsByTagName("head")[0].appendChild(script); } }; /*js //==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>>==>>> // // Ajaxいいねボタン v2.23 [ GPL ] // Copyright (c) phpkobo.com ( http://jpn.phpkobo.com/ ) // Email : admin@phpkobo.com // ID : LKBNX-223J // //==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<<==<<< */ function CCMS( classname ) { this.classname = classname; this.binding = {}; }; CCMS.prototype = { trigger : function( ename, data, ref ) { if ( this.binding[ename] ) { if ( data == undefined ) { data = {}; } data.ename = ename; var b_skip = (ref?true:false); var ls = this.binding[ename]; for( var i=0; i 0 ) { var ename = sx[0]; var bindex = 0; if ( sx.length > 1 ) { bindex = sx[1]; if ( bindex == "begin" ) { bindex = -100; } else if ( bindex == "end" ) { bindex = 100; } else { bindex = parseFloat(sx[1]); if ( isNaN(bindex) ) { bindex = 0; } } } if (!( ename in this.binding )) { this.binding[ename] = []; } var insert = { bindex:bindex, obj:obj, func:func }; var ls = this.binding[ename]; var b_inserted = false; for ( var j=0; j") .attr("class","webapp-overlay") .append($("
") .attr("class","webapp-overlay-block-uevent") ) .click(function(){ _this.close(); }) .appendTo($("body")); } return this.jqo_overlay; }, getTopDlg : function(){ return ( this.dlgs.length == 0 ) ? null : this.dlgs[this.dlgs.length-1]; }, create : function(){ var jqo_dlg = $("
") .attr("class","webapp-dlgcard") .click(function(e){ e.stopPropagation(); }) .appendTo(this.getOverlay()); this.dlgs.push(jqo_dlg); return jqo_dlg; }, open : function(){ var jqo_dlg = this.getTopDlg(); if ( jqo_dlg ) { this.moveDlg(true); } }, close : function(){ if ( this.dlgs.length > 0 ) { this.moveDlg(false); this.dlgs.pop(); if ( this.dlgs.length == 0 ) { this.jqo_overlay.unbind("click"); var _this = this; setTimeout(function(){ _this.jqo_overlay.remove(); _this.jqo_overlay = null; },600); } } }, moveDlg : function( b_open ) { var dx = -40; var n = this.dlgs.length; /* block/unblock user event */ if ( n > 1 ) { if ( b_open ) { this.dlgs[n-2].css({"z-index":-1}); } else { this.dlgs[n-2].css({"z-index":0}); } } /* shift dlg and webapp */ if ( n > 0 ) { var webapp_dn; var top_dlg_dn; var other_dlg_dn; if ( b_open ) { webapp_dn = 0; top_dlg_dn = "0"; other_dlg_dn = -1; } else { webapp_dn = -1; top_dlg_dn = "100%"; other_dlg_dn = -2; } /* webapp */ this.jqo_webapp.css({"transform":"translate(" +dx*(n+webapp_dn)+"px,0)"}); /* top dlg */ var dummy_w = this.dlgs[n-1].width(); this.dlgs[n-1].css({"transform":"translate(" +top_dlg_dn+",0)"}); /* other dlg */ for( var i=0; i