1$(function () { 2 if (typeof $.modal === "undefined") { 3 throw new Error( 4 "This module requires jquery.modal.js (https://jquerymodal.com/)." 5 ); 6 } 7 8 // ã¯ã¼ãã³ã°ã¢ã¼ãã«ï¼ã¯ã¼ãã³ã°ã¢ã¼ãã«ï¼ãã°ã¤ã³ï¼ 9 $(".js-module-modal").on("click", function (event) { 10 event.preventDefault(); 11 12 if (!$(this).attr("message")) { 13 throw new Error('"message" is required.It should be setted.'); 14 } 15 16 var attrs = { 17 modal: $(this).attr("modal") ? $(this).attr("modal") : "wmodal", // wmodal, wmodal-login 18 message: $(this).attr("message"), // 表示ã¡ãã»ã¼ã¸ 19 warnIcon: $(this).attr("warn-icon") ? $(this).attr("warn-icon") === "true" : true, // ã¯ã¼ãã³ã°ã¢ã¤ã³ã³ã表示ï¼trueï¼ï¼é表示ï¼falseï¼ 20 escapeClose: $(this).attr("escape-close") ? $(this).attr("escape-close") === "true" : true, // Escãã¼ã«ããã¢ã¼ãã«ãé表示ï¼trueï¼ 21 clickClose: $(this).attr("click-close") ? $(this).attr("click-close") === "true" : true, // ã¯ãªãã¯ã«ããã¢ã¼ãã«ãé表示ï¼trueï¼ 22 showClose: $(this).attr("show-close") ? $(this).attr("show-close") === "true" : false // éãããã¿ã³ï¼å³ä¸ï¼ã表示ï¼trueï¼ï¼é表示ï¼falseï¼ 23 } 24 modal(attrs); 25 }); 26 27 // ã¢ã¼ãã«ãåé¤ãã 28 $(document).on($.modal.CLOSE, remove$Modal); 29 function remove$Modal() { 30 $("html").removeClass("fixed"); 31 $(".js-modal.modal").remove(); 32 } 33}); 34 35/** 36 * ã¯ã¼ãã³ã°ã¢ã¼ãã«ã表示ãã 37 * â»ã¡ãã»ã¼ã¸ãæ¹è¡ãã¦è¡¨ç¤ºããå ´åã'\n'ã使ç¨ããã 38 * â»SP表示æãæ¹è¡ãã¾ããã 39 * ãä¾ï¼'大å¤ç³ã訳ãããã¾ããããå¦çã®æ¹ã¯ãç³ãè¾¼ã¿ãã§ãã¾ããã\nãäºæ¿ãã ããã' 40 */ 41function showWModal(message) { 42 modal({ modal: "wmodal", message: message , showClose: false}); 43} 44/** 45 * ã¯ã¼ãã³ã°ã¢ã¼ãã«ï¼ãã°ã¤ã³ï¼ã表示ãã 46 * â»ã¡ãã»ã¼ã¸ãæ¹è¡ãã¦è¡¨ç¤ºããå ´åã'\n'ã使ç¨ããã 47 * â»SP表示æãæ¹è¡ãã¾ããã 48 * ãä¾ï¼'大å¤ç³ã訳ãããã¾ããããå¦çã®æ¹ã¯ãç³ãè¾¼ã¿ãã§ãã¾ããã\nãäºæ¿ãã ããã' 49 */ 50function showWModalLogin(message) { 51 modal({ modal: "wmodal-login", message: message, showClose: true}); 52} 53 54// ã¢ã¼ãã«ã表示ãã 55function modal(options) { 56 var defaultOptions = { 57 modal: "wmodal", // wmodal, wmodal-login 58 urlModal: "", // wmodal, wmodal-login以å¤ã®ã¢ã¼ãã«ã表示ããå ´åãURLãè¨å®ãã 59 message: "", // 表示ã¡ãã»ã¼ã¸ 60 warnIcon: true, // ã¯ã¼ãã³ã°ã¢ã¤ã³ã³ã表示ï¼trueï¼ï¼é表示ï¼falseï¼ 61 escapeClose: true, // Escãã¼ã«ããã¢ã¼ãã«ãé表示ï¼trueï¼ 62 clickClose: true, // ã¯ãªãã¯ã«ããã¢ã¼ãã«ãé表示ï¼trueï¼ 63 showClose: false // éãããã¿ã³ï¼å³ä¸ï¼ã表示ï¼trueï¼ï¼é表示ï¼falseï¼ 64 }; 65 var show = function(args) { 66 try { 67 $.get(args.urlModal, function (html) { 68 $("html").addClass("fixed"); 69 $(html).appendTo("body").modal({ 70 blockerClass: "jquery-modal module_modal", 71 closeText: "", 72 escapeClose: args.escapeClose, 73 clickClose: args.clickClose, 74 showClose: args.showClose, 75 }); 76 77 switch(args.modal) { 78 // wmodal, wmodal-loginã®å ´åãå¦çãã 79 case "wmodal": 80 case "wmodal-login": 81 if (!args.message) { 82 args.message = ""; 83 } 84 args.message = args.message.replace(/\r?\n|\\n/g, "<br>"); 85 let dEl = document.createElement("div"); 86 dEl.innerHTML = "<p>" + args.message + "</p>"; 87 dEl.className = "msg"; 88 $(".js-message").replaceWith(dEl); 89 90 if (args.redir && args.redir !='') { 91 document.getElementById("btn_login").href = "/auth/login/redir/" + args.redir; 92 document.getElementById("btn_add").href = "/user/add/redir/" + args.redir; 93 } 94 if (!args.warnIcon){ 95 $(".modal .model_contents .warn_icon").addClass("none"); 96 } 97 $(".module_modal.blocker").addClass("w-modal"); 98 break; 99 case "fee-revision_dowwnload": 100 var wheight = $(window).height(); 101 var jsmodal = $('.js-modal.modal'); 102 if (!jsmodal) { 103 return; 104 } else { 105 if (wheight < 890) { 106 jsmodal.addClass('mini'); 107 } 108 if (wheight < 569) { 109 $('.module_modal .modal.mini').css({"padding": "32px 15px 12px"}); 110 $('.modal.mini .model_contents .module_paragraph').css({"line-height": "1.5"}); 111 } 112 if (jsmodal[0].clientHeight > wheight) { 113 $(".module_modal.blocker").css("align-items", "flex-start"); 114 } 115 } 116 break; 117 118 // wmodal, wmodal-login以å¤ã®ã¢ã¼ãã«ã表示ããå ´åãããã§å¦çã追å ããï¼å¿ è¦ãªå ´åï¼ 119 default: 120 break; 121 } 122 }); 123 } catch (ex) { 124 throw new Error(ex.message); 125 } 126 }; 127 128 if (!options) { 129 throw new Error('"options" is incorrect.'); 130 } 131 $.extend(defaultOptions, options); 132 133 switch(defaultOptions.modal) { 134 case "wmodal": 135 defaultOptions.urlModal = "/assets/common/component/w-modal.html"; 136 if (!options.message) { 137 throw new Error('"options.message" is incorrect.'); 138 } 139 break; 140 case "wmodal-login": 141 defaultOptions.urlModal = "/assets/common/component/w-modal_login.html"; 142 if (!options.message) { 143 throw new Error('"options.message" is incorrect.'); 144 } 145 break; 146 case "fee-revision_dowwnload": 147 break; 148 149 // wmodal, wmodal-login以å¤ã®ã¢ã¼ãã«ã表示ããå ´åãããã§å¦çã追å ããï¼å¿ è¦ãªå ´åï¼ 150 default: 151 break; 152 } 153 show(defaultOptions); 154} 155// ã¢ã¼ãã«ãéãã 156function closeModal() { 157 if ($.modal) { 158 $.modal.close(); 159 } 160}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.