Commit ac1e2f5a by Saliya Randunu

S12521571 # Client - Incoming Issues (raised by Client) #Copy Job Ad does not work

parent 2473dbb3
...@@ -21,15 +21,15 @@ ...@@ -21,15 +21,15 @@
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam(); HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
%> %>
<script> <script>
function copyToClipboard() { function copyToClipboard(which,ele) {
var aux = document.createElement("input"); var aux = document.createElement("textarea");
aux.setAttribute("value", $("#jobURL").attr('href')); aux.value = $(ele).html().trim();
document.body.appendChild(aux); document.body.appendChild(aux);
aux.select(); aux.select();
document.execCommand("copy"); document.execCommand("copy");
document.body.removeChild(aux); document.body.removeChild(aux);
alert("Link copied to clipboard"); alert(which + " copied to clipboard");
} }
</script> </script>
<oneit:form name="editJob" method="post" enctype="multipart/form-data"> <oneit:form name="editJob" method="post" enctype="multipart/form-data">
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<div class="form-page-area no-float"> <div class="form-page-area no-float">
<div class="job-share-icon"> <div class="job-share-icon">
<ul> <ul>
<li class="share-link" onclick="copyToClipboard()"> <li class="share-link" onclick="copyToClipboard('Link', '#jobURL' )">
<a class="linked-col" href="#"> <a class="linked-col" href="#">
<div><%= url %></div> <div><%= url %></div>
<span class="copy-link">(Copy link to clipboard)</span> <span class="copy-link">(Copy link to clipboard)</span>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<span> <span>
Sample job advertisement text Sample job advertisement text
</span> </span>
<a class="copy-to-clipboard" onclick="copyToClipboard()"> <a class="copy-to-clipboard" onclick="copyToClipboard('Text' , '.details-box')">
COPY TO CLIPBOARD COPY TO CLIPBOARD
</a> </a>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment