How to add "Attachment paperclip" button on top of the catalog item in Kingston version?
How to add "Attachment paperclip" button on top of the catalog item in Kingston version?
Note - I have the attachment clip at the bottom but want at the top as well with same functionality. Can someone help with the steps?
- 레이블:
-
Multiple Versions
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
날짜: 12-02-2019 10:48 AM
You can add a variable of the Type Macro, or Macro with Label, and reference a UI Macro with the below code to replicate the Attachment icon in button format.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<button class="request_catalog_button_with_icon btn cat-btn btn-primary" onclick='attach()'>Attachments</button>
<script language="javascript">
function attach() {
saveCatAttachment(gel('sysparm_item_guid').value, 'sc_cart_item');
}
</script>
<!-- </td></tr></table> -->
</j:jelly>
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
날짜: 12-04-2019 12:35 AM
Hi
i tried the above code and its giving me attachment button but I want to have the attachment paper clip icon how to get that is my concern
Regards
Viraj
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
날짜: 12-04-2019 01:28 AM
Try this
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="jvar_attachment_icon" value="${jvar_icon_path}" />
<g:sc_button id="sc_attachment_button" label="${gs.getMessage('Attachment')}" title="${gs.getMessage('Attachment')}"
classes="header_button icon-paperclip sc_paperclip btn-icon btn cat-btn btn-default"
onclick="attach();" />
<script>
function attach() {
saveCatAttachment(gel('sysparm_item_guid').value, 'sc_cart_item');
}
</script>
<!-- </td></tr></table> -->
</j:jelly>
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
날짜: 12-04-2019 02:50 AM
Hi Vignesh,
The script you have provided is not working over the portal.Can you suggest please?
Regards,
Viraj
