Commit 72bd86e5 by Saliya Randunu

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

parent 390b7a26
...@@ -31,6 +31,21 @@ ...@@ -31,6 +31,21 @@
document.body.removeChild(aux); document.body.removeChild(aux);
alert(which + " copied to clipboard"); alert(which + " copied to clipboard");
} }
function copyHTMLToClip(ele) {
str = $(ele).html().trim();
function listener(e) {
e.clipboardData.setData("text/html", str);
e.clipboardData.setData("text/plain", str);
e.preventDefault();
}
document.addEventListener("copy", listener);
document.execCommand("copy");
document.removeEventListener("copy", listener);
alert("Text 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">
...@@ -91,17 +106,17 @@ ...@@ -91,17 +106,17 @@
<span> <span>
Sample job advertisement text Sample job advertisement text
</span> </span>
<a class="copy-to-clipboard" onclick="copyToClipboard('Text' , '.details-box')"> <a class="copy-to-clipboard" onclick="copyHTMLToClip('.details-box')">
COPY TO CLIPBOARD COPY TO CLIPBOARD
</a> </a>
</div> </div>
<div class="details-box"> <div class="details-box">
<p><oneit:toString value="<%= job.getJobDescription() %>" mode="ParagraphHTML" /></p> <p><oneit:toString value="<%= job.getJobDescription() %>" mode="ParagraphHTML" /></p>
<strong>Organisation Culture Statement</strong> <b>Organisation Culture Statement</b>
<p><oneit:toString value="<%= job.getCultureStatement() %>" mode="ParagraphHTML" /></p> <p><oneit:toString value="<%= job.getCultureStatement() %>" mode="ParagraphHTML" /></p>
<strong>Requirements</strong> <b>Requirements</b>
<ul> <ul>
<% <%
for (AssessmentCriteria criteria : job.getAssessmentCriteriasSet()) for (AssessmentCriteria criteria : job.getAssessmentCriteriasSet())
......
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