-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditor.foundation.min.js
4 lines (4 loc) · 1.96 KB
/
editor.foundation.min.js
1
2
3
4
/*! Foundation integration for DataTables' Editor
* © SpryMedia Ltd - datatables.net/license
*/
!function(t){var o,l;"function"==typeof define&&define.amd?define(["jquery","datatables.net-zf","datatables.net-editor"],function(e){return t(e,window,document)}):"object"==typeof exports?(o=require("jquery"),l=function(e,n){n.fn.dataTable||require("datatables.net-zf")(e,n),n.fn.dataTable.Editor||require("datatables.net-editor")(e,n)},"undefined"==typeof window?module.exports=function(e,n){return e=e||window,n=n||o(e),l(e,n),t(n,e,e.document)}:(l(window,o),module.exports=t(o,window,window.document))):t(jQuery,window,document)}(function(l,n,a,e){"use strict";var i,t=l.fn.dataTable,d=(t.Editor.defaults.display="foundation",l.extend(!0,t.Editor.classes,{field:{wrapper:"DTE_Field row",label:"small-4 columns inline",input:"small-8 columns",error:"error",multiValue:"panel radius multi-value",multiInfo:"small",multiRestore:"panel radius multi-restore","msg-labelInfo":"label secondary","msg-info":"label secondary","msg-message":"label secondary","msg-error":"label alert"},form:{button:"button small",buttonInternal:"button small"}}),!1);const r={content:l('<div class="reveal reveal-modal DTED" data-reveal></div>'),close:l('<button class="close close-button">×</div>')};return t.Editor.display.foundation=l.extend(!0,{},t.Editor.models.displayController,{init:function(e){return i=i||new n.Foundation.Reveal(r.content,{closeOnClick:!1}),t.Editor.display.foundation},open:function(n,e,t){var o=r.content;o.children().detach(),o.append(e),o.prepend(r.close),r.close.attr("title",n.i18n.close).off("click.dte-zf").on("click.dte-zf",function(){n.close("icon")}),l(a).off("click.dte-zf").on("click.dte-zf","div.reveal-modal-bg, div.reveal-overlay",function(e){l(e.target).closest(r.content).length||n.background()}),d?t&&t():(d=!0,l(r.content).one("open.zf.reveal",function(){t&&t()}),i.open())},close:function(e,n){d&&(i.close(),d=!1),n&&n()},node:function(e){return r.content[0]}}),t.Editor});