function showAlert(divId, title, msg) { if (document.getElementById(divId) === null) { var elemDiv = document.createElement('div'); elemDiv.id = divId; elemDiv.className = 'popup_wrapper'; document.body.appendChild(elemDiv); } var html = ''; html += '
'; html += ' '; $('#' + divId).html(html); $('#' + divId).show(); var popupHeight = parseInt($('.popup').css('height')); $('.popup').css({ 'margin-top': -(popupHeight / 2) }); } //Show Stamping Effect on screen function startStampAnimation() { if (document.getElementById('modal-stamp') === null) { var elemDiv = document.createElement('div'); elemDiv.id = 'modal-stamp'; elemDiv.className = 'stamp-modal'; var htmlStr = ''; htmlStr += '
' htmlStr += '
' htmlStr += ' '; htmlStr += ' '; htmlStr += '
' htmlStr += '
' htmlStr += ''; htmlStr += ''; htmlStr += ''; elemDiv.innerHTML = htmlStr; $('body').append(elemDiv); } $('#modal-stamp').addClass('effect-show'); $('#stampMotion00').addClass("changeImgShow0"); $('#stampMotion05').addClass("scaleUpImg"); $('#stampMotion06').addClass("scaleUpImg2"); $('#stampMotion07').addClass("scaleUpImg3"); } // Dismiss Stamping Effect on screen function stopStampAnimation() { $('#modal-stamp').removeClass('effect-show'); $('#stampMotion00').removeClass("changeImgShow0"); $('#stampMotion05').removeClass("scaleUpImg"); $('#stampMotion06').removeClass("scaleUpImg2"); $('#stampMotion07').removeClass("scaleUpImg3"); } function dateStringWithDelim(dateStr, delim, defaultStr) { if (defaultStr != undefined && dateStr.length <= 0) return defaultStr; var dateString = ""; var year = dateStr.substr(0, 4); var month = dateStr.substr(4, 2); var day = dateStr.substr(6, 2); dateString = year + delim + month + delim + day; return dateString; } function resetPage() { reset(); initialize(); } // ローディングを表示 function showLoading() { if (document.getElementById('loadingDiv') === null) { var elemDiv = document.createElement('div'); elemDiv.id = 'loadingDiv'; var htmlStr = ''; htmlStr += '
'; htmlStr += 'loading.png'; elemDiv.innerHTML = htmlStr; document.body.appendChild(elemDiv); } $('.loading_img').css({ 'width': window.innerWidth * .2, 'margin-left': -window.innerWidth * .1 }); var deg = 0; pane1Interval = window.setInterval(function () { deg += 1; $('#loadingimg').css('-webkit-transform', 'rotate(' + deg + 'deg)'); }, 1); $('#loadingDiv').css('display', 'block'); } function hideLoading() { $('#loadingDiv').css('display', 'none'); //$('#loadingimg').css('display', 'none'); } function doAlert(text="", title="", iconPath="images/logo-mini.svg", isSelector=false, oktext="OK", ngtext="キャンセル", callback_ok=function(){}, callback_ng=function(){}){ if(iconPath == ""){ $(".dialog-icon").hide(); }else{ $(".dialog-icon img").attr("src",iconPath); } if(title == ""){ $(".dialog-title").hide(); }else{ $(".dialog-title").html(title); } $(".dialog-text").html("
" + text + "
"); if(isSelector){ $(".select-btn-box").show(); $(".ok-btn-box").hide(); $(".select-ok-btn").text(oktext); $(".select-no-btn").text(ngtext); $(".select-ok-btn").on("click", function(){ $(".dialog-wrapper").hide(); callback_ok(); }); $(".select-no-btn").on("click", function(){ $(".dialog-wrapper").hide(); callback_ng(); }); }else{ $(".select-btn-box").hide(); $(".ok-btn-box").show(); $(".ok-btn").text(oktext); $(".ok-btn").on("click", function(){ $(".dialog-wrapper").hide(); callback_ok(); }); } $(".dialog-wrapper").show(); }