Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82494

Set class to editor modal

$
0
0

Hi, i am having an issue when trying to style to Editor modal. I am using bootstrap 5 and this picks up the modal-content from the scss file. I am working with a css file and i want to specify my own styling for the modal and then set this to be picked up. However i am unsure where to set the Class name for the modal.
I have tried a few different ways including setting the node as described here; https://datatables.net/forums/discussion/comment/159312/#Comment_159312
Which seems to be editing the container behind the modal rather than the modal itself.

Any suggestions would be much appreciated and i apologise if this isnt very clear as i am new to using these components.


CSS .modal-progress { background-color: red!important } editor = new $.fn.dataTable.Editor({ table: "#dtPurchaseEnquiryLines", idSrc: 'LineNo', formOptions: { main: { focus: 4 } }, ** // Set class name here?** className: 'modal-progress', template: '#customForm', fields: [{ label: "Item No", name: "ItemNo", type: "readonly" }, { label: "Part No", name: "PartNo", type: "readonly" }, { label: "Qty", name: "Quantity", type: "readonly", attr: { type: "number" } }, { label: "UOP", name: "UOP", type: "readonly" }, { label: "Lead Time (days)", name: "LeadTime", attr: { type: "number" } }, { label: "Unit Price", name: "UnitPriceFC", attr: { type: "number", }, }, { label: "Additional", name: "AdditionalFC", attr: { type: "number" } }, { label: "Freight", name: "FreightFC", attr: { type: "number" } }, { label: "Discount", name: "Discount", attr: { type: "number" } }, { label: "Net Price", name: "NetFC", type: "readonly" }, { label: "Decline", name: "Declined", type: "radio", options: [ //{ label: "Open", value: 0 }, { label: "", value: 1 } ] }, { name: "FeedbackNote", type: "textarea" } ] }); ** // Set class name here ?** var node = $.fn.DataTable.Editor.display.bootstrap.node('editor'); $(node).addClass("modal-progress"); ** // Set class name here ?** editor.on('open', function () { editor.title('Update Feedback') editor.className('modal-progress') })

Viewing all articles
Browse latest Browse all 82494

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>