You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gzf/WebRoot/static/assets/libs/summernote/summernote-bs4.min.js

3 lines
125 KiB

5 years ago
/*! Summernote v0.8.12 | (c) 2013- Alan Hong and other contributors | MIT license */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t=t||self).jQuery)}(this,function(C){"use strict";C=C&&C.hasOwnProperty("default")?C.default:C;var i=function(){function t(t,e,o,n){this.markup=t,this.children=e,this.options=o,this.callback=n}return t.prototype.render=function(t){var o=C(this.markup);if(this.options&&this.options.contents&&o.html(this.options.contents),this.options&&this.options.className&&o.addClass(this.options.className),this.options&&this.options.data&&C.each(this.options.data,function(t,e){o.attr("data-"+t,e)}),this.options&&this.options.click&&o.on("click",this.options.click),this.children){var e=o.find(".note-children-container");this.children.forEach(function(t){t.render(e.length?e:o)})}return this.callback&&this.callback(o,this.options),this.options&&this.options.callback&&this.options.callback(o),t&&t.append(o),o},t}(),o=function(o,n){return function(){var t="object"==typeof arguments[1]?arguments[1]:arguments[0],e=Array.isArray(arguments[0])?arguments[0]:[];return t&&t.children&&(e=t.children),new i(o,e,t,n)}},t=o('<div class="note-editor note-frame card"/>'),e=o('<div class="note-toolbar card-header" role="toolbar"></div>'),n=o('<div class="note-editing-area"/>'),r=o('<textarea class="note-codable" role="textbox" aria-multiline="true"/>'),s=o('<div class="note-editable card-block" contentEditable="true" role="textbox" aria-multiline="true"/>'),a=o(['<output class="note-status-output" aria-live="polite"/>','<div class="note-statusbar" role="status">',' <output class="note-status-output" aria-live="polite"></output>',' <div class="note-resizebar" role="seperator" aria-orientation="horizontal" aria-label="Resize">',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>'," </div>","</div>"].join("")),l=o('<div class="note-editor"/>'),c=o(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>','<output class="note-status-output" aria-live="polite"/>'].join("")),d=o('<div class="note-btn-group btn-group">'),u=o('<div class="dropdown-menu" role="list">',function(t,i){var e=Array.isArray(i.items)?i.items.map(function(t){var e="string"==typeof t?t:t.value||"",o=i.template?i.template(t):t,n="object"==typeof t?t.option:void 0;return'<a class="dropdown-item" href="#" '+('data-value="'+e+'"'+(void 0!==n?' data-option="'+n+'"':""))+' role="listitem" aria-label="'+e+'">'+o+"</a>"}).join(""):i.items;t.html(e).attr({"aria-label":i.title})}),h=o('<div class="dropdown-menu note-check" role="list">',function(t,n){var e=Array.isArray(n.items)?n.items.map(function(t){var e="string"==typeof t?t:t.value||"",o=n.template?n.template(t):t;return'<a class="dropdown-item" href="#" data-value="'+e+'" role="listitem" aria-label="'+t+'">'+v(n.checkClassName)+" "+o+"</a>"}).join(""):n.items;t.html(e).attr({"aria-label":n.title})}),p=o('<div class="note-color-palette"/>',function(t,e){for(var o=[],n=0,i=e.colors.length;n<i;n++){for(var r=e.eventName,s=e.colors[n],a=e.colorsName[n],l=[],c=0,d=s.length;c<d;c++){var u=s[c],h=a[c];l.push(['<button type="button" class="note-color-btn"','style="background-color:',u,'" ','data-event="',r,'" ','data-value="',u,'" ','title="',h,'" ','aria-label="',h,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}o.push('<div class="note-color-row">'+l.join("")+"</div>")}t.html(o.join("")),e.tooltip&&t.find(".note-color-btn").tooltip({container:e.container,trigger:"hover",placement:"bottom"})}),f=o('<div class="modal" aria-hidden="false" tabindex="-1" role="dialog"/>',function(t,e){e.fade&&t.addClass("fade"),t.attr({"aria-label":e.title}),t.html(['<div class="modal-dialog">',' <div class="modal-content">',e.title?' <div class="modal-header"> <h4 class="modal-title">'+e.title+'</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">&times;</button> </div>':"",' <div class="modal-body">'+e.body+"</div>",e.footer?' <div class="modal-foo