소스 검색

Copy to clipbord has merged to master

Mohidul Islam 5 년 전
부모
커밋
2557b44755
2개의 변경된 파일40개의 추가작업 그리고 2개의 파일을 삭제
  1. 40 1
      dashboard/templates/_reportsidebar.html
  2. 0 1
      review_automation/settings.py

+ 40 - 1
dashboard/templates/_reportsidebar.html

@@ -30,4 +30,43 @@
       </div>
   </div>
 </div>
-</div>
+</div>
+
+
+<!-- Copy to Clipboard by Pabon Starts -->
+
+<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
+
+<script>
+
+  var len = $('.list-group-item').length;
+
+  for(let i = 0 ; i < len ; i++){
+    // $('.list-group-item')[i].id = i+1;
+    $('.list-group-item')[i].firstChild.id = i+1;
+    // console.log($('.list-group-item')[i].firstChild.id);
+  }
+
+  $(document).on('click', '.list-group-item', (e) => {
+    // console.log("CLicked");
+
+    var id = $(e.target).closest('.list-group-item').find('p')[0].id;
+
+    // console.log(id);
+
+    var text = document.getElementById(id).textContent;
+
+    // console.log(document.getElementById(id).textContent);
+
+    var dummy = document.createElement("textarea");
+    document.body.appendChild(dummy);
+    dummy.value = text;
+    dummy.select();
+    document.execCommand("copy");
+    document.body.removeChild(dummy);
+
+  })
+
+</script>
+
+<!-- Copy to Clipboard by Pabon Ends -->

+ 0 - 1
review_automation/settings.py

@@ -124,7 +124,6 @@ CLIENT_ID = "174657415928-0bt50gt42pslq47gf21ao67n15rom96r.apps.googleuserconten
 CLIENT_SECRET = "ZXYpt07Su0pW3y3jPGOXY_C_"
 TOKEN_URI = "https://oauth2.googleapis.com/token"
 HOST_URI = "http://127.0.0.1:8000"
-NLU_SERVER_URI = 'http://localhost:5005'
 
 
 # Cron-Jobs of the project