|
|
@@ -444,28 +444,46 @@ function initContentEvent() {
|
|
|
}
|
|
|
|
|
|
function initOther4Popup(){
|
|
|
+ let clickTimer = null;
|
|
|
+
|
|
|
// 打开弹窗
|
|
|
- $("span.xp").on("click", function () {
|
|
|
- let parent = $(this).parent();
|
|
|
- var commentfirst = parent.find("input[type='hidden']").eq(0).attr("commentfirst");
|
|
|
- var commenttwo = parent.find("input[type='hidden']").eq(1).attr("commenttwo");
|
|
|
- var commentxp = parent.find("input[type='hidden']").eq(2).attr("commentxp");
|
|
|
- var commentscore = parent.find("input[type='hidden']").eq(3).attr("commentscore");
|
|
|
- var bigtype = parent.find("input[type='hidden']").eq(4).attr("bigtype");
|
|
|
- var identificationCode = $(this).attr("identificationCode");
|
|
|
- quietPop(bigtype, identificationCode, commentfirst, commenttwo, commentxp, commentscore);
|
|
|
-
|
|
|
- $(".popup").fadeIn();
|
|
|
- centerPopup(); // 调用居中函数
|
|
|
+ $("span.xp").unbind("click");
|
|
|
+ $("span.xp").on("click", function (e) {
|
|
|
+ clearTimeout(clickTimer);
|
|
|
+ clickTimer = setTimeout(() => {
|
|
|
+ let parent = $(this).parent();
|
|
|
+ var commentfirst = parent.find("input[type='hidden']").eq(0).attr("commentfirst");
|
|
|
+ var commenttwo = parent.find("input[type='hidden']").eq(1).attr("commenttwo");
|
|
|
+ var commentxp = parent.find("input[type='hidden']").eq(2).attr("commentxp");
|
|
|
+ var commentscore = parent.find("input[type='hidden']").eq(3).attr("commentscore");
|
|
|
+ var bigtype = parent.find("input[type='hidden']").eq(4).attr("bigtype");
|
|
|
+ var identificationCode = $(this).attr("identificationCode");
|
|
|
+ var javdbUrl = $(this).attr("title");
|
|
|
+ quietPop(bigtype, identificationCode, commentfirst, commenttwo, commentxp, commentscore, javdbUrl);
|
|
|
+
|
|
|
+ $(".popup-video").fadeIn();
|
|
|
+ centerPopup(); // 调用居中函数
|
|
|
+ }, 300); // 300ms 是判断单击和双击的时间间隔
|
|
|
+ });
|
|
|
+
|
|
|
+ $("span.xp").off("dblclick");
|
|
|
+ $("span.xp").dblclick(function (e) {
|
|
|
+ clearTimeout(clickTimer);
|
|
|
+
|
|
|
+ let javdbUrl = $(this).attr("title");
|
|
|
+ if (javdbUrl != null) {
|
|
|
+ window.open(javdbUrl, "_blank");
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
// 关闭弹窗
|
|
|
+ $(".close-btn").unbind("click");
|
|
|
$(".close-btn").on("click", function () {
|
|
|
- $(".popup").fadeOut();
|
|
|
+ $(".popup-video").fadeOut();
|
|
|
});
|
|
|
|
|
|
// 阻止表单默认提交行为
|
|
|
- $(".popup form").on("submit", function (e) {
|
|
|
+ $(".popup-video form").on("submit", function (e) {
|
|
|
e.preventDefault();
|
|
|
|
|
|
var nameEn = $("#popup-form-hidden-nameEn").val();
|
|
|
@@ -539,7 +557,7 @@ function centerPopup() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function quietPop(bigtype, identificationCode, commentfirst, commenttwo, commentxp, commentscore) {
|
|
|
+function quietPop(bigtype, identificationCode, commentfirst, commenttwo, commentxp, commentscore, javdburl) {
|
|
|
if (bigtype === '骑兵') {
|
|
|
let formContent = "";
|
|
|
formContent += '<div class="form-item"><label for="identificationCode">code:</label><input readonly type="text" name="identificationCode" style="border:revert;" value="' + identificationCode + '"></div>';
|
|
|
@@ -547,6 +565,7 @@ function quietPop(bigtype, identificationCode, commentfirst, commenttwo, comment
|
|
|
formContent += '<div class="form-item"><label for="commenttwo">commenttwo:</label><textarea rows="5" cols="100" style="background: antiquewhite;width: 100%;height: 100%;" name="commenttwo">' + commenttwo + '</textarea></div>';
|
|
|
formContent += '<div class="form-item"><label for="commentxp">commentxp:</label><textarea rows="6" cols="100" style="background: antiquewhite;width: 100%;height: 100%;" name="commentxp">' + commentxp +'</textarea></div>';
|
|
|
formContent += '<div class="form-item"><label for="commentscore">commentscore:</label><input type="text" name="commentscore" placeholder="可为空" style="border:revert;" value="' + commentscore + '"></div>';
|
|
|
+ formContent += '<div class="form-item"><label for="javdbUrl">javdburl:</label><input type="text" name="javdburl" placeholder="可为空" style="border:revert;" value="' + javdburl + '"></div>';
|
|
|
$("#form-container-2").html(formContent);
|
|
|
|
|
|
$("#popup-form-hidden-nameEn").val(bigtype);
|