panweitong %!s(int64=4) %!d(string=hai) anos
pai
achega
b8a210551e
Modificáronse 2 ficheiros con 56 adicións e 0 borrados
  1. 28 0
      index.js
  2. 28 0
      python/index.js

+ 28 - 0
index.js

@@ -440,6 +440,34 @@ window.onload = function () {
       });
     }
   })
+
+  $('#sketch_name').focus(function () {
+    if (window.location.href.indexOf("en") > -1) {
+      this.setAttribute("placeholder", "Please enter the name of the work");
+      $('#sketch_name').css("width","330px");
+    }
+    else if(window.location.href.indexOf("zh-hans") > -1){
+      this.setAttribute("placeholder", "请输入作品名称");
+      $('#sketch_name').css("width","220px");
+    }
+    else{
+      this.setAttribute("placeholder", "請輸入作品名稱");
+      $('#sketch_name').css("width","220px");
+    }
+  }).blur(function () {
+    if (window.location.href.indexOf("en") > -1) {
+      this.setAttribute("placeholder", "Please enter the name of the work");
+      $('#sketch_name').css("width","330px");
+    }
+    else if(window.location.href.indexOf("zh-hans") > -1){
+      this.setAttribute("placeholder", "请输入作品名称");
+      $('#sketch_name').css("width","220px");
+    }
+    else{
+      this.setAttribute("placeholder", "請輸入作品名稱");
+      $('#sketch_name').css("width","220px");
+    }
+  });
 }
 
 function styled() {

+ 28 - 0
python/index.js

@@ -440,6 +440,34 @@ window.onload = function () {
       });
     }
   })
+
+  $('#sketch_name').focus(function () {
+    if (window.location.href.indexOf("en") > -1) {
+      this.setAttribute("placeholder", "Please enter the name of the work");
+      $('#sketch_name').css("width","330px");
+    }
+    else if(window.location.href.indexOf("zh-hans") > -1){
+      this.setAttribute("placeholder", "请输入作品名称");
+      $('#sketch_name').css("width","220px");
+    }
+    else{
+      this.setAttribute("placeholder", "請輸入作品名稱");
+      $('#sketch_name').css("width","220px");
+    }
+  }).blur(function () {
+    if (window.location.href.indexOf("en") > -1) {
+      this.setAttribute("placeholder", "Please enter the name of the work");
+      $('#sketch_name').css("width","330px");
+    }
+    else if(window.location.href.indexOf("zh-hans") > -1){
+      this.setAttribute("placeholder", "请输入作品名称");
+      $('#sketch_name').css("width","220px");
+    }
+    else{
+      this.setAttribute("placeholder", "請輸入作品名稱");
+      $('#sketch_name').css("width","220px");
+    }
+  });
 }
 
 function styled() {