Pager.prototype.goLSS0050 = function(params) { var self = this; indicator.on(); self.execApi('/SLS_UII_LSS0050.json', params, function(response) { var pageInfo = response.pageInfo; self.getHtml('LSS0050.html', function() { viewNumber.on("S050"); footer.on(); $('#goLSS0043Back').click(function() { indicator.on(); self.goLSS0043(self.getLSS0043BackParams()); return false; }); $('#goLSS0060').click(function() { indicator.on(); self.goLSS0060(self.getLSS0060RequestParams()); return false; }); self.setLSS0050DefaultParams(pageInfo); indicator.off(); }); }); }; Pager.prototype.setLSS0050DefaultParams = function(pageInfo) { $("input[name='elm_KOKUTI']").val([pageInfo.elm_KOKUTI]); $("input[name='elm_KAKUNIN']").val([pageInfo.elm_KAKUNIN]); $("[id$='_SITUMONN_5']").hide(); var plan_code = pageInfo.elm_PLAN_CODE; if (plan_code == "M2" ) { $('#elm_KOKUTI').hide(); $("[id^='elm_SITUMON_']").hide(); $("[id^='elm_KONNPE_SITUMONN_']").show(); } else { $('#elm_KOKUTI').show(); $("[id^='elm_SITUMON_']").show(); $("[id^='elm_KONNPE_SITUMONN_']").hide(); if (plan_code == "G") { $('#elm_GORUFU_SITUMONN_5').show(); } else if (plan_code == "M1") { $('#elm_MINNA_SITUMONN_5').show(); } } var situmonnShownArr = []; var situmonnTitiles = ['質問事項1', '質問事項2', '質問事項3', '質問事項4', '質問事項5']; $.each($("section[id^='elm_']"), function() { if($(this).css('display') !== 'none') { situmonnShownArr.push($(this)); $(this).find('h3').find('b').text(situmonnTitiles[situmonnShownArr.length -1]); } }); this.pageId = 'LSS0050'; }; Pager.prototype.getLSS0043BackParams = function() { return { "MODE" : "LSS0043_BACK_DISPLAY" }; }; Pager.prototype.getLSS0060RequestParams = function() { return { "MODE" : "LSS0060_DISPLAY", "elm_KOKUTI" : $('input[name=elm_KOKUTI]:checked').val(), "elm_KAKUNIN" : $('input[name=elm_KAKUNIN]:checked').val() }; };