zhouna 4 سال پیش
والد
کامیت
83d788d558
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      src/js/index.js

+ 5 - 0
src/js/index.js

@@ -131,6 +131,7 @@ function bindModalEvent(){
   $(".modalAction .eye").off("click").on("click",function(){
       switchPwd($(this))
   })
+
   $("#oldWord").off("input").on("input",function(){
       switchToPsd($(this));
     const text = $(this).val();
@@ -139,6 +140,9 @@ function bindModalEvent(){
     if(text.trim()){
         $("#newWord").attr("disabled",false);
     }
+    if(!$(".modalAction .warning:visible").length){
+        $(".alertModal .sureChange").addClass("active");
+    }
   });
   $("#newWord").off("input").on("input",function(){
       switchToPsd($(this));
@@ -455,6 +459,7 @@ function changeWord(oldword,newword){
     }else{
         $(".oldWaring b").text(data.msg);
         $(".oldWaring").show();
+        $(".alertModal .sureChange").removeClass("active");
       return
     }
   });