', 'igm');
+ reg_match.lastIndex = this.pos;
+ var reg_array = reg_match.exec(this.input);
+ var end_script = reg_array?reg_array.index:this.input.length; //absolute end of script
+ if(this.pos < end_script) { //get everything in between the script tags
+ content = this.input.substring(this.pos, end_script);
+ this.pos = end_script;
+ }
+ return content;
+ };
+
+ this.record_tag = function (tag){ //function to record a tag and its parent in this.tags Object
+ if (this.tags[tag + 'count']) { //check for the existence of this tag type
+ this.tags[tag + 'count']++;
+ this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level
+ }
+ else { //otherwise initialize this tag type
+ this.tags[tag + 'count'] = 1;
+ this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level
+ }
+ this.tags[tag + this.tags[tag + 'count'] + 'parent'] = this.tags.parent; //set the parent (i.e. in the case of a div this.tags.div1parent)
+ this.tags.parent = tag + this.tags[tag + 'count']; //and make this the current parent (i.e. in the case of a div 'div1')
+ };
+
+ this.retrieve_tag = function (tag) { //function to retrieve the opening tag to the corresponding closer
+ if (this.tags[tag + 'count']) { //if the openener is not in the Object we ignore it
+ var temp_parent = this.tags.parent; //check to see if it's a closable tag.
+ while (temp_parent) { //till we reach '' (the initial value);
+ if (tag + this.tags[tag + 'count'] === temp_parent) { //if this is it use it
+ break;
+ }
+ temp_parent = this.tags[temp_parent + 'parent']; //otherwise keep on climbing up the DOM Tree
+ }
+ if (temp_parent) { //if we caught something
+ this.indent_level = this.tags[tag + this.tags[tag + 'count']]; //set the indent_level accordingly
+ this.tags.parent = this.tags[temp_parent + 'parent']; //and set the current parent
+ }
+ delete this.tags[tag + this.tags[tag + 'count'] + 'parent']; //delete the closed tags parent reference...
+ delete this.tags[tag + this.tags[tag + 'count']]; //...and the tag itself
+ if (this.tags[tag + 'count'] === 1) {
+ delete this.tags[tag + 'count'];
+ }
+ else {
+ this.tags[tag + 'count']--;
+ }
+ }
+ };
+
+ this.get_tag = function (peek) { //function to get a full tag and parse its type
+ var input_char = '',
+ content = [],
+ comment = '',
+ space = false,
+ tag_start, tag_end,
+ orig_pos = this.pos,
+ orig_line_char_count = this.line_char_count;
+
+ peek = peek !== undefined ? peek : false;
+
+ do {
+ if (this.pos >= this.input.length) {
+ if (peek) {
+ this.pos = orig_pos;
+ this.line_char_count = orig_line_char_count;
+ }
+ return content.length?content.join(''):['', 'TK_EOF'];
+ }
+
+ input_char = this.input.charAt(this.pos);
+ this.pos++;
+ this.line_char_count++;
+
+ if (this.Utils.in_array(input_char, this.Utils.whitespace)) { //don't want to insert unnecessary space
+ space = true;
+ this.line_char_count--;
+ continue;
+ }
+
+ if (input_char === "'" || input_char === '"') {
+ if (!content[1] || content[1] !== '!') { //if we're in a comment strings don't get treated specially
+ input_char += this.get_unformatted(input_char);
+ space = true;
+ }
+ }
+
+ if (input_char === '=') { //no space before =
+ space = false;
+ }
+
+ if (content.length && content[content.length-1] !== '=' && input_char !== '>' && space) {
+ //no space after = or before >
+ if (this.line_char_count >= this.max_char) {
+ this.print_newline(false, content);
+ this.line_char_count = 0;
+ }
+ else {
+ content.push(' ');
+ this.line_char_count++;
+ }
+ space = false;
+ }
+ if (input_char === '<') {
+ tag_start = this.pos - 1;
+ }
+ content.push(input_char); //inserts character at-a-time (or string)
+ } while (input_char !== '>');
+
+ var tag_complete = content.join('');
+ var tag_index;
+ if (tag_complete.indexOf(' ') !== -1) { //if there's whitespace, thats where the tag name ends
+ tag_index = tag_complete.indexOf(' ');
+ }
+ else { //otherwise go with the tag ending
+ tag_index = tag_complete.indexOf('>');
+ }
+ var tag_check = tag_complete.substring(1, tag_index).toLowerCase();
+ if (tag_complete.charAt(tag_complete.length-2) === '/' ||
+ this.Utils.in_array(tag_check, this.Utils.single_token)) { //if this tag name is a single tag type (either in the list or has a closing /)
+ if ( ! peek) {
+ this.tag_type = 'SINGLE';
+ }
+ }
+ else if (tag_check === 'script') { //for later script handling
+ if ( ! peek) {
+ this.record_tag(tag_check);
+ this.tag_type = 'SCRIPT';
+ }
+ }
+ else if (tag_check === 'style') { //for future style handling (for now it justs uses get_content)
+ if ( ! peek) {
+ this.record_tag(tag_check);
+ this.tag_type = 'STYLE';
+ }
+ }
+ else if (this.is_unformatted(tag_check, unformatted)) { // do not reformat the "unformatted" tags
+ comment = this.get_unformatted(''+tag_check+'>', tag_complete); //...delegate to get_unformatted function
+ content.push(comment);
+ // Preserve collapsed whitespace either before or after this tag.
+ if (tag_start > 0 && this.Utils.in_array(this.input.charAt(tag_start - 1), this.Utils.whitespace)){
+ content.splice(0, 0, this.input.charAt(tag_start - 1));
+ }
+ tag_end = this.pos - 1;
+ if (this.Utils.in_array(this.input.charAt(tag_end + 1), this.Utils.whitespace)){
+ content.push(this.input.charAt(tag_end + 1));
+ }
+ this.tag_type = 'SINGLE';
+ }
+ else if (tag_check.charAt(0) === '!') { //peek for so...
+ comment = this.get_unformatted('-->', tag_complete); //...delegate to get_unformatted
+ content.push(comment);
+ }
+ if ( ! peek) {
+ this.tag_type = 'START';
+ }
+ }
+ else if (tag_check.indexOf('[endif') !== -1) {//peek for ', tag_complete);
+ content.push(comment);
+ this.tag_type = 'SINGLE';
+ }
+ }
+ else if ( ! peek) {
+ if (tag_check.charAt(0) === '/') { //this tag is a double tag so check for tag-ending
+ this.retrieve_tag(tag_check.substring(1)); //remove it and all ancestors
+ this.tag_type = 'END';
+ }
+ else { //otherwise it's a start-tag
+ this.record_tag(tag_check); //push it on the tag stack
+ this.tag_type = 'START';
+ }
+ if (this.Utils.in_array(tag_check, this.Utils.extra_liners)) { //check if this double needs an extra line
+ this.print_newline(true, this.output);
+ }
+ }
+
+ if (peek) {
+ this.pos = orig_pos;
+ this.line_char_count = orig_line_char_count;
+ }
+
+ return content.join(''); //returns fully formatted tag
+ };
+
+ this.get_unformatted = function (delimiter, orig_tag) { //function to return unformatted content in its entirety
+
+ if (orig_tag && orig_tag.toLowerCase().indexOf(delimiter) !== -1) {
+ return '';
+ }
+ var input_char = '';
+ var content = '';
+ var space = true;
+ do {
+
+ if (this.pos >= this.input.length) {
+ return content;
+ }
+
+ input_char = this.input.charAt(this.pos);
+ this.pos++;
+
+ if (this.Utils.in_array(input_char, this.Utils.whitespace)) {
+ if (!space) {
+ this.line_char_count--;
+ continue;
+ }
+ if (input_char === '\n' || input_char === '\r') {
+ content += '\n';
+ /* Don't change tab indention for unformatted blocks. If using code for html editing, this will greatly affect tags if they are specified in the 'unformatted array'
+ for (var i=0; i]*>\s*$/);
+
+ // if next_tag comes back but is not an isolated tag, then
+ // let's treat the 'a' tag as having content
+ // and respect the unformatted option
+ if (!tag || this.Utils.in_array(tag, unformatted)){
+ return true;
+ } else {
+ return false;
+ }
+ };
+
+ this.printer = function (js_source, indent_character, indent_size, max_char, brace_style) { //handles input/output and some other printing functions
+
+ this.input = js_source || ''; //gets the input for the Parser
+ this.output = [];
+ this.indent_character = indent_character;
+ this.indent_string = '';
+ this.indent_size = indent_size;
+ this.brace_style = brace_style;
+ this.indent_level = 0;
+ this.max_char = max_char;
+ this.line_char_count = 0; //count to see if max_char was exceeded
+
+ for (var i=0; i 0) {
+ this.indent_level--;
+ }
+ };
+ };
+ return this;
+ }
+
+ /*_____________________--------------------_____________________*/
+
+ multi_parser = new Parser(); //wrapping functions Parser
+ multi_parser.printer(html_source, indent_character, indent_size, max_char, brace_style); //initialize starting values
+
+ while (true) {
+ var t = multi_parser.get_token();
+ multi_parser.token_text = t[0];
+ multi_parser.token_type = t[1];
+
+ if (multi_parser.token_type === 'TK_EOF') {
+ break;
+ }
+
+ switch (multi_parser.token_type) {
+ case 'TK_TAG_START':
+ multi_parser.print_newline(false, multi_parser.output);
+ multi_parser.print_token(multi_parser.token_text);
+ multi_parser.indent();
+ multi_parser.current_mode = 'CONTENT';
+ break;
+ case 'TK_TAG_STYLE':
+ case 'TK_TAG_SCRIPT':
+ multi_parser.print_newline(false, multi_parser.output);
+ multi_parser.print_token(multi_parser.token_text);
+ multi_parser.current_mode = 'CONTENT';
+ break;
+ case 'TK_TAG_END':
+ //Print new line only if the tag has no content and has child
+ if (multi_parser.last_token === 'TK_CONTENT' && multi_parser.last_text === '') {
+ var tag_name = multi_parser.token_text.match(/\w+/)[0];
+ var tag_extracted_from_last_output = multi_parser.output[multi_parser.output.length -1].match(/<\s*(\w+)/);
+ if (tag_extracted_from_last_output === null || tag_extracted_from_last_output[1] !== tag_name) {
+ multi_parser.print_newline(true, multi_parser.output);
+ }
+ }
+ multi_parser.print_token(multi_parser.token_text);
+ multi_parser.current_mode = 'CONTENT';
+ break;
+ case 'TK_TAG_SINGLE':
+ // Don't add a newline before elements that should remain unformatted.
+ var tag_check = multi_parser.token_text.match(/^\s*<([a-z]+)/i);
+ if (!tag_check || !multi_parser.Utils.in_array(tag_check[1], unformatted)){
+ multi_parser.print_newline(false, multi_parser.output);
+ }
+ multi_parser.print_token(multi_parser.token_text);
+ multi_parser.current_mode = 'CONTENT';
+ break;
+ case 'TK_CONTENT':
+ if (multi_parser.token_text !== '') {
+ multi_parser.print_token(multi_parser.token_text);
+ }
+ multi_parser.current_mode = 'TAG';
+ break;
+ case 'TK_STYLE':
+ case 'TK_SCRIPT':
+ if (multi_parser.token_text !== '') {
+ multi_parser.output.push('\n');
+ var text = multi_parser.token_text,
+ _beautifier,
+ script_indent_level = 1;
+ if (multi_parser.token_type === 'TK_SCRIPT') {
+ _beautifier = typeof js_beautify === 'function' && js_beautify;
+ } else if (multi_parser.token_type === 'TK_STYLE') {
+ _beautifier = typeof css_beautify === 'function' && css_beautify;
+ }
+
+ if (options.indent_scripts === "keep") {
+ script_indent_level = 0;
+ } else if (options.indent_scripts === "separate") {
+ script_indent_level = -multi_parser.indent_level;
+ }
+
+ var indentation = multi_parser.get_full_indent(script_indent_level);
+ if (_beautifier) {
+ // call the Beautifier if avaliable
+ text = _beautifier(text.replace(/^\s*/, indentation), options);
+ } else {
+ // simply indent the string otherwise
+ var white = text.match(/^\s*/)[0];
+ var _level = white.match(/[^\n\r]*$/)[0].split(multi_parser.indent_string).length - 1;
+ var reindent = multi_parser.get_full_indent(script_indent_level -_level);
+ text = text.replace(/^\s*/, indentation)
+ .replace(/\r\n|\r|\n/g, '\n' + reindent)
+ .replace(/\s*$/, '');
+ }
+ if (text) {
+ multi_parser.print_token(text);
+ multi_parser.print_newline(true, multi_parser.output);
+ }
+ }
+ multi_parser.current_mode = 'TAG';
+ break;
+ }
+ multi_parser.last_token = multi_parser.token_type;
+ multi_parser.last_text = multi_parser.token_text;
+ }
+ return multi_parser.output.join('');
+ }
+
+ // If we're running a web page and don't have either of the above, add our one global
+ window.html_beautify = function(html_source, options) {
+ return style_html(html_source, options, window.js_beautify, window.css_beautify);
+ };
+
+}());
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js b/ruoyi-admin/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js
index 552613d96..67e598181 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/blockUI/jquery.blockUI.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*!
* jQuery blockUI plugin
* Version 2.70.0-2014.11.23
@@ -617,4 +618,625 @@
setup(jQuery);
}
+=======
+/*!
+ * jQuery blockUI plugin
+ * Version 2.70.0-2014.11.23
+ * Requires jQuery v1.7 or later
+ *
+ * Examples at: http://malsup.com/jquery/block/
+ * Copyright (c) 2007-2013 M. Alsup
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Thanks to Amir-Hossein Sobhi for some excellent contributions!
+ */
+
+;(function() {
+/*jshint eqeqeq:false curly:false latedef:false */
+"use strict";
+
+ function setup($) {
+ $.fn._fadeIn = $.fn.fadeIn;
+
+ var noOp = $.noop || function() {};
+
+ // this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
+ // confusing userAgent strings on Vista)
+ var msie = /MSIE/.test(navigator.userAgent);
+ var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
+ var mode = document.documentMode || 0;
+ var setExpr = $.isFunction( document.createElement('div').style.setExpression );
+
+ // global $ methods for blocking/unblocking the entire page
+ $.blockUI = function(opts) { install(window, opts); };
+ $.unblockUI = function(opts) { remove(window, opts); };
+
+ // convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
+ $.growlUI = function(title, message, timeout, onClose) {
+ var $m = $('
');
+ if (title) $m.append(''+title+' ');
+ if (message) $m.append(''+message+' ');
+ if (timeout === undefined) timeout = 3000;
+
+ // Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications
+ var callBlock = function(opts) {
+ opts = opts || {};
+
+ $.blockUI({
+ message: $m,
+ fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700,
+ fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000,
+ timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout,
+ centerY: false,
+ showOverlay: false,
+ onUnblock: onClose,
+ css: $.blockUI.defaults.growlCSS
+ });
+ };
+
+ callBlock();
+ var nonmousedOpacity = $m.css('opacity');
+ $m.mouseover(function() {
+ callBlock({
+ fadeIn: 0,
+ timeout: 30000
+ });
+
+ var displayBlock = $('.blockMsg');
+ displayBlock.stop(); // cancel fadeout if it has started
+ displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency
+ }).mouseout(function() {
+ $('.blockMsg').fadeOut(1000);
+ });
+ // End konapun additions
+ };
+
+ // plugin method for blocking element content
+ $.fn.block = function(opts) {
+ if ( this[0] === window ) {
+ $.blockUI( opts );
+ return this;
+ }
+ var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
+ this.each(function() {
+ var $el = $(this);
+ if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
+ return;
+ $el.unblock({ fadeOut: 0 });
+ });
+
+ return this.each(function() {
+ if ($.css(this,'position') == 'static') {
+ this.style.position = 'relative';
+ $(this).data('blockUI.static', true);
+ }
+ this.style.zoom = 1; // force 'hasLayout' in ie
+ install(this, opts);
+ });
+ };
+
+ // plugin method for unblocking element content
+ $.fn.unblock = function(opts) {
+ if ( this[0] === window ) {
+ $.unblockUI( opts );
+ return this;
+ }
+ return this.each(function() {
+ remove(this, opts);
+ });
+ };
+
+ $.blockUI.version = 2.70; // 2nd generation blocking at no extra cost!
+
+ // override these in your code to change the default behavior and style
+ $.blockUI.defaults = {
+ // message displayed when blocking (use null for no message)
+ message: '',
+
+ title: null, // title string; only used when theme == true
+ draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
+
+ theme: false, // set to true to use with jQuery UI themes
+
+ // styles for the message when blocking; if you wish to disable
+ // these and use an external stylesheet then do this in your code:
+ // $.blockUI.defaults.css = {};
+ css: {
+ padding: 0,
+ margin: 0,
+ width: '30%',
+ top: '40%',
+ left: '35%',
+ textAlign: 'center',
+ color: '#000',
+ border: '0px',
+ backgroundColor:'transparent',
+ cursor: 'wait'
+ },
+
+ // minimal style set used when themes are used
+ themedCSS: {
+ width: '30%',
+ top: '40%',
+ left: '35%'
+ },
+
+ // styles for the overlay
+ overlayCSS: {
+ backgroundColor: '#000',
+ opacity: 0.6,
+ cursor: 'wait'
+ },
+
+ // style to replace wait cursor before unblocking to correct issue
+ // of lingering wait cursor
+ cursorReset: 'default',
+
+ // styles applied when using $.growlUI
+ growlCSS: {
+ width: '350px',
+ top: '10px',
+ left: '',
+ right: '10px',
+ border: 'none',
+ padding: '5px',
+ opacity: 0.6,
+ cursor: 'default',
+ color: '#fff',
+ backgroundColor: '#000',
+ '-webkit-border-radius':'10px',
+ '-moz-border-radius': '10px',
+ 'border-radius': '10px'
+ },
+
+ // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
+ // (hat tip to Jorge H. N. de Vasconcelos)
+ /*jshint scripturl:true */
+ iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
+
+ // force usage of iframe in non-IE browsers (handy for blocking applets)
+ forceIframe: false,
+
+ // z-index for the blocking overlay
+ baseZ: 1000,
+
+ // set these to true to have the message automatically centered
+ centerX: true, // <-- only effects element blocking (page block controlled via css above)
+ centerY: true,
+
+ // allow body element to be stetched in ie6; this makes blocking look better
+ // on "short" pages. disable if you wish to prevent changes to the body height
+ allowBodyStretch: true,
+
+ // enable if you want key and mouse events to be disabled for content that is blocked
+ bindEvents: true,
+
+ // be default blockUI will supress tab navigation from leaving blocking content
+ // (if bindEvents is true)
+ constrainTabKey: true,
+
+ // fadeIn time in millis; set to 0 to disable fadeIn on block
+ fadeIn: 200,
+
+ // fadeOut time in millis; set to 0 to disable fadeOut on unblock
+ fadeOut: 400,
+
+ // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
+ timeout: 0,
+
+ // disable if you don't want to show the overlay
+ showOverlay: true,
+
+ // if true, focus will be placed in the first available input field when
+ // page blocking
+ focusInput: true,
+
+ // elements that can receive focus
+ focusableElements: ':input:enabled:visible',
+
+ // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
+ // no longer needed in 2012
+ // applyPlatformOpacityRules: true,
+
+ // callback method invoked when fadeIn has completed and blocking message is visible
+ onBlock: null,
+
+ // callback method invoked when unblocking has completed; the callback is
+ // passed the element that has been unblocked (which is the window object for page
+ // blocks) and the options that were passed to the unblock call:
+ // onUnblock(element, options)
+ onUnblock: null,
+
+ // callback method invoked when the overlay area is clicked.
+ // setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
+ onOverlayClick: null,
+
+ // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
+ quirksmodeOffsetHack: 4,
+
+ // class name of the message block
+ blockMsgClass: 'blockMsg',
+
+ // if it is already blocked, then ignore it (don't unblock and reblock)
+ ignoreIfBlocked: false
+ };
+
+ // private data and functions follow...
+
+ var pageBlock = null;
+ var pageBlockEls = [];
+
+ function install(el, opts) {
+ var css, themedCSS;
+ var full = (el == window);
+ var msg = (opts && opts.message !== undefined ? opts.message : undefined);
+ opts = $.extend({}, $.blockUI.defaults, opts || {});
+
+ if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
+ return;
+
+ opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
+ css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
+ if (opts.onOverlayClick)
+ opts.overlayCSS.cursor = 'pointer';
+
+ themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
+ msg = msg === undefined ? opts.message : msg;
+
+ // remove the current block (if there is one)
+ if (full && pageBlock)
+ remove(window, {fadeOut:0});
+
+ // if an existing element is being used as the blocking content then we capture
+ // its current place in the DOM (and current display style) so we can restore
+ // it when we unblock
+ if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
+ var node = msg.jquery ? msg[0] : msg;
+ var data = {};
+ $(el).data('blockUI.history', data);
+ data.el = node;
+ data.parent = node.parentNode;
+ data.display = node.style.display;
+ data.position = node.style.position;
+ if (data.parent)
+ data.parent.removeChild(node);
+ }
+
+ $(el).data('blockUI.onUnblock', opts.onUnblock);
+ var z = opts.baseZ;
+
+ // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
+ // layer1 is the iframe layer which is used to supress bleed through of underlying content
+ // layer2 is the overlay layer which has opacity and a wait cursor (by default)
+ // layer3 is the message content that is displayed while blocking
+ var lyr1, lyr2, lyr3, s;
+ if (msie || opts.forceIframe)
+ lyr1 = $('');
+ else
+ lyr1 = $('
');
+
+ if (opts.theme)
+ lyr2 = $('
');
+ else
+ lyr2 = $('
');
+
+ if (opts.theme && full) {
+ s = '';
+ if ( opts.title ) {
+ s += '';
+ }
+ s += '
';
+ s += '
';
+ }
+ else if (opts.theme) {
+ s = '';
+ }
+ else if (full) {
+ s = '
';
+ }
+ else {
+ s = '
';
+ }
+ lyr3 = $(s);
+
+ // if we have a message, style it
+ if (msg) {
+ if (opts.theme) {
+ lyr3.css(themedCSS);
+ lyr3.addClass('ui-widget-content');
+ }
+ else
+ lyr3.css(css);
+ }
+
+ // style the overlay
+ if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
+ lyr2.css(opts.overlayCSS);
+ lyr2.css('position', full ? 'fixed' : 'absolute');
+
+ // make iframe layer transparent in IE
+ if (msie || opts.forceIframe)
+ lyr1.css('opacity',0.0);
+
+ //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
+ var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
+ $.each(layers, function() {
+ this.appendTo($par);
+ });
+
+ if (opts.theme && opts.draggable && $.fn.draggable) {
+ lyr3.draggable({
+ handle: '.ui-dialog-titlebar',
+ cancel: 'li'
+ });
+ }
+
+ // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
+ var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
+ if (ie6 || expr) {
+ // give body 100% height
+ if (full && opts.allowBodyStretch && $.support.boxModel)
+ $('html,body').css('height','100%');
+
+ // fix ie6 issue when blocked element has a border width
+ if ((ie6 || !$.support.boxModel) && !full) {
+ var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
+ var fixT = t ? '(0 - '+t+')' : 0;
+ var fixL = l ? '(0 - '+l+')' : 0;
+ }
+
+ // simulate fixed position
+ $.each(layers, function(i,o) {
+ var s = o[0].style;
+ s.position = 'absolute';
+ if (i < 2) {
+ if (full)
+ s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
+ else
+ s.setExpression('height','this.parentNode.offsetHeight + "px"');
+ if (full)
+ s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
+ else
+ s.setExpression('width','this.parentNode.offsetWidth + "px"');
+ if (fixL) s.setExpression('left', fixL);
+ if (fixT) s.setExpression('top', fixT);
+ }
+ else if (opts.centerY) {
+ if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
+ s.marginTop = 0;
+ }
+ else if (!opts.centerY && full) {
+ var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
+ var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
+ s.setExpression('top',expression);
+ }
+ });
+ }
+
+ // show the message
+ if (msg) {
+ if (opts.theme)
+ lyr3.find('.ui-widget-content').append(msg);
+ else
+ lyr3.append(msg);
+ if (msg.jquery || msg.nodeType)
+ $(msg).show();
+ }
+
+ if ((msie || opts.forceIframe) && opts.showOverlay)
+ lyr1.show(); // opacity is zero
+ if (opts.fadeIn) {
+ var cb = opts.onBlock ? opts.onBlock : noOp;
+ var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
+ var cb2 = msg ? cb : noOp;
+ if (opts.showOverlay)
+ lyr2._fadeIn(opts.fadeIn, cb1);
+ if (msg)
+ lyr3._fadeIn(opts.fadeIn, cb2);
+ }
+ else {
+ if (opts.showOverlay)
+ lyr2.show();
+ if (msg)
+ lyr3.show();
+ if (opts.onBlock)
+ opts.onBlock.bind(lyr3)();
+ }
+
+ // bind key and mouse events
+ bind(1, el, opts);
+
+ if (full) {
+ pageBlock = lyr3[0];
+ pageBlockEls = $(opts.focusableElements,pageBlock);
+ if (opts.focusInput)
+ setTimeout(focus, 20);
+ }
+ else
+ center(lyr3[0], opts.centerX, opts.centerY);
+
+ if (opts.timeout) {
+ // auto-unblock
+ var to = setTimeout(function() {
+ if (full)
+ $.unblockUI(opts);
+ else
+ $(el).unblock(opts);
+ }, opts.timeout);
+ $(el).data('blockUI.timeout', to);
+ }
+ }
+
+ // remove the block
+ function remove(el, opts) {
+ var count;
+ var full = (el == window);
+ var $el = $(el);
+ var data = $el.data('blockUI.history');
+ var to = $el.data('blockUI.timeout');
+ if (to) {
+ clearTimeout(to);
+ $el.removeData('blockUI.timeout');
+ }
+ opts = $.extend({}, $.blockUI.defaults, opts || {});
+ bind(0, el, opts); // unbind events
+
+ if (opts.onUnblock === null) {
+ opts.onUnblock = $el.data('blockUI.onUnblock');
+ $el.removeData('blockUI.onUnblock');
+ }
+
+ var els;
+ if (full) // crazy selector to handle odd field errors in ie6/7
+ els = $('body').children().filter('.blockUI').add('body > .blockUI');
+ else
+ els = $el.find('>.blockUI');
+
+ // fix cursor issue
+ if ( opts.cursorReset ) {
+ if ( els.length > 1 )
+ els[1].style.cursor = opts.cursorReset;
+ if ( els.length > 2 )
+ els[2].style.cursor = opts.cursorReset;
+ }
+
+ if (full)
+ pageBlock = pageBlockEls = null;
+
+ if (opts.fadeOut) {
+ count = els.length;
+ els.stop().fadeOut(opts.fadeOut, function() {
+ if ( --count === 0)
+ reset(els,data,opts,el);
+ });
+ }
+ else
+ reset(els, data, opts, el);
+ }
+
+ // move blocking element back into the DOM where it started
+ function reset(els,data,opts,el) {
+ var $el = $(el);
+ if ( $el.data('blockUI.isBlocked') )
+ return;
+
+ els.each(function(i,o) {
+ // remove via DOM calls so we don't lose event handlers
+ if (this.parentNode)
+ this.parentNode.removeChild(this);
+ });
+
+ if (data && data.el) {
+ data.el.style.display = data.display;
+ data.el.style.position = data.position;
+ data.el.style.cursor = 'default'; // #59
+ if (data.parent)
+ data.parent.appendChild(data.el);
+ $el.removeData('blockUI.history');
+ }
+
+ if ($el.data('blockUI.static')) {
+ $el.css('position', 'static'); // #22
+ }
+
+ if (typeof opts.onUnblock == 'function')
+ opts.onUnblock(el,opts);
+
+ // fix issue in Safari 6 where block artifacts remain until reflow
+ var body = $(document.body), w = body.width(), cssW = body[0].style.width;
+ body.width(w-1).width(w);
+ body[0].style.width = cssW;
+ }
+
+ // bind/unbind the handler
+ function bind(b, el, opts) {
+ var full = el == window, $el = $(el);
+
+ // don't bother unbinding if there is nothing to unbind
+ if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
+ return;
+
+ $el.data('blockUI.isBlocked', b);
+
+ // don't bind events when overlay is not in use or if bindEvents is false
+ if (!full || !opts.bindEvents || (b && !opts.showOverlay))
+ return;
+
+ // bind anchors and inputs for mouse and key events
+ var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
+ if (b)
+ $(document).bind(events, opts, handler);
+ else
+ $(document).unbind(events, handler);
+
+ // former impl...
+ // var $e = $('a,:input');
+ // b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
+ }
+
+ // event handler to suppress keyboard/mouse events when blocking
+ function handler(e) {
+ // allow tab navigation (conditionally)
+ if (e.type === 'keydown' && e.keyCode && e.keyCode == 9) {
+ if (pageBlock && e.data.constrainTabKey) {
+ var els = pageBlockEls;
+ var fwd = !e.shiftKey && e.target === els[els.length-1];
+ var back = e.shiftKey && e.target === els[0];
+ if (fwd || back) {
+ setTimeout(function(){focus(back);},10);
+ return false;
+ }
+ }
+ }
+ var opts = e.data;
+ var target = $(e.target);
+ if (target.hasClass('blockOverlay') && opts.onOverlayClick)
+ opts.onOverlayClick(e);
+
+ // allow events within the message content
+ if (target.parents('div.' + opts.blockMsgClass).length > 0)
+ return true;
+
+ // allow events for content that is not being blocked
+ return target.parents().children().filter('div.blockUI').length === 0;
+ }
+
+ function focus(back) {
+ if (!pageBlockEls)
+ return;
+ var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
+ if (e)
+ e.focus();
+ }
+
+ function center(el, x, y) {
+ var p = el.parentNode, s = el.style;
+ var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
+ var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
+ if (x) s.left = l > 0 ? (l+'px') : '0';
+ if (y) s.top = t > 0 ? (t+'px') : '0';
+ }
+
+ function sz(el, p) {
+ return parseInt($.css(el,p),10)||0;
+ }
+
+ }
+
+
+ /*global define:true */
+ if (typeof define === 'function' && define.amd && define.amd.jQuery) {
+ define(['jquery'], setup);
+ } else {
+ setup(jQuery);
+ }
+
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
})();
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js
index 3aa15ec60..c3c595f5a 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*
* bootstrap-table - v1.11.0 - 2016-07-02
* https://github.com/wenzhixin/bootstrap-table
@@ -5,4 +6,13 @@
* Licensed MIT License
*/
(function(j){var k=null;var m=function(u){var s=arguments,r=true,t=1;u=u.replace(/%s/g,function(){var v=s[t++];if(typeof v==="undefined"){r=false;return""}return v});return r?u:""};var c=function(t,v,u,s){var r="";j.each(t,function(w,x){if(x[v]===s){r=x[u];return false}return true});return r};var i=function(s,t){var r=-1;j.each(s,function(u,v){if(v.field===t){r=u;return false}return true});return r};var l=function(u){var y,x,w,A=0,B=[];for(y=0;y").addClass("fixed-table-scroll-inner"),u=j("
").addClass("fixed-table-scroll-outer"),s,r;u.append(t);j("body").append(u);s=t[0].offsetWidth;u.css("overflow","scroll");r=t[0].offsetWidth;if(s===r){r=u[0].clientWidth}u.remove();k=s-r}return k};var q=function(s,u,t,r){var v=u;if(typeof u==="string"){var w=u.split(".");if(w.length>1){v=window;j.each(w,function(x,y){v=v[y]})}else{v=window[u]}}if(typeof v==="object"){return v}if(typeof v==="function"){return v.apply(s,t)}if(!v&&typeof u==="string"&&m.apply(this,[u].concat(t))){return m.apply(this,[u].concat(t))}return r};var f=function(s,r,w){var x=Object.getOwnPropertyNames(s),u=Object.getOwnPropertyNames(r),v="";if(w){if(x.length!==u.length){return false}}for(var t=0;t-1){if(s[v]!==r[v]){return false}}}return true};var p=function(r){if(typeof r==="string"){return r.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")}return r};var d=function(s){var r=0;s.children().each(function(){if(r0||!!navigator.userAgent.match(/Trident.*rv\:11\./))};var h=function(){if(!Object.keys){Object.keys=(function(){var t=Object.prototype.hasOwnProperty,u=!({toString:null}).propertyIsEnumerable("toString"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=s.length;return function(x){if(typeof x!=="object"&&(typeof x!=="function"||x===null)){throw new TypeError("Object.keys called on non-object")}var v=[],y,w;for(y in x){if(t.call(x,y)){v.push(y)}}if(u){for(w=0;w','
',this.options.paginationVAlign==="top"||this.options.paginationVAlign==="both"?'':"",'','','
','
',this.options.formatLoadingMessage(),"
","
",'',this.options.paginationVAlign==="bottom"||this.options.paginationVAlign==="both"?'':"","
",""].join(""));this.$container.insertAfter(this.$el);this.$tableContainer=this.$container.find(".fixed-table-container");this.$tableHeader=this.$container.find(".fixed-table-header");this.$tableBody=this.$container.find(".fixed-table-body");this.$tableLoading=this.$container.find(".fixed-table-loading");this.$tableFooter=this.$container.find(".fixed-table-footer");this.$toolbar=this.$container.find(".fixed-table-toolbar");this.$pagination=this.$container.find(".fixed-table-pagination");this.$tableBody.append(this.$el);this.$container.after('
');this.$el.addClass(this.options.classes);if(this.options.striped){this.$el.addClass("table-striped")}if(j.inArray("table-no-bordered",this.options.classes.split(" "))!==-1){this.$tableContainer.addClass("table-no-bordered")}};e.prototype.initTable=function(){var t=this,s=[],u=[];this.$header=this.$el.find(">thead");if(!this.$header.length){this.$header=j(" ").appendTo(this.$el)}this.$header.find("tr").each(function(){var v=[];j(this).find("th").each(function(){if(typeof j(this).data("field")!=="undefined"){j(this).data("field",j(this).data("field")+"")}v.push(j.extend({},{title:j(this).html(),"class":j(this).attr("class"),titleTooltip:j(this).attr("title"),rowspan:j(this).attr("rowspan")?+j(this).attr("rowspan"):undefined,colspan:j(this).attr("colspan")?+j(this).attr("colspan"):undefined},j(this).data()))});s.push(v)});if(!j.isArray(this.options.columns[0])){this.options.columns=[this.options.columns]}this.options.columns=j.extend(true,[],s,this.options.columns);this.columns=[];l(this.options.columns);j.each(this.options.columns,function(w,v){j.each(v,function(x,y){y=j.extend({},e.COLUMN_DEFAULTS,y);if(typeof y.fieldIndex!=="undefined"){t.columns[y.fieldIndex]=y}t.options.columns[w][x]=y})});if(this.options.data.length){return}var r=[];this.$el.find(">tbody>tr").each(function(w){var v={};v._id=j(this).attr("id");v._class=j(this).attr("class");v._data=g(j(this).data());j(this).find(">td").each(function(z){var E=j(this),B=+E.attr("colspan")||1,C=+E.attr("rowspan")||1,A,y;for(;r[w]&&r[w][z];z++){}for(A=z;A");if(v===0&&!t.options.cardView&&t.options.detailView){s.push(m('
',t.options.columns.length))}j.each(u,function(B,A){var F="",C="",E="",w="",D=m(' class="%s"',A["class"]),z=t.options.sortOrder||A.order,y="px",x=A.width;if(A.width!==undefined&&(!t.options.cardView)){if(typeof A.width==="string"){if(A.width.indexOf("%")!==-1){y="%"}}}if(A.width&&typeof A.width==="string"){x=A.width.replace("%","").replace("px","")}C=m("text-align: %s; ",A.halign?A.halign:A.align);E=m("text-align: %s; ",A.align);w=m("vertical-align: %s; ",A.valign);w+=m("width: %s; ",(A.checkbox||A.radio)&&!x?"36px":(x?x+y:undefined));if(typeof A.fieldIndex!=="undefined"){t.header.fields[A.fieldIndex]=A.field;t.header.styles[A.fieldIndex]=E+w;t.header.classes[A.fieldIndex]=D;t.header.formatters[A.fieldIndex]=A.formatter;t.header.events[A.fieldIndex]=A.events;t.header.sorters[A.fieldIndex]=A.sorter;t.header.sortNames[A.fieldIndex]=A.sortName;t.header.cellStyles[A.fieldIndex]=A.cellStyle;t.header.searchables[A.fieldIndex]=A.searchable;if(!A.visible){return}if(t.options.cardView&&(!A.cardVisible)){return}r[A.field]=A}s.push("");s.push(m('',t.options.sortable&&A.sortable?"sortable both":""));F=A.title;if(A.checkbox){if(!t.options.singleSelect&&t.options.checkboxHeader){F=' '}t.header.stateField=A.field}if(A.radio){F="";t.header.stateField=A.field;t.options.singleSelect=true}s.push(F);s.push("
");s.push('
');s.push("");s.push(" ")});s.push("")});this.$header.html(s.join(""));this.$header.find("th[data-field]").each(function(u){j(this).data(r[j(this).data("field")])});this.$container.off("click",".th-inner").on("click",".th-inner",function(u){var v=j(this);if(t.options.detailView){if(v.closest(".bootstrap-table")[0]!==t.$container[0]){return false}}if(t.options.sortable&&v.parent().data().sortable){t.onSort(u)}});this.$header.children().children().off("keypress").on("keypress",function(v){if(t.options.sortable&&j(this).data().sortable){var u=v.keyCode||v.which;if(u==13){t.onSort(v)}}});j(window).off("resize.bootstrap-table");if(!this.options.showHeader||this.options.cardView){this.$header.hide();this.$tableHeader.hide();this.$tableLoading.css("top",0)}else{this.$header.show();this.$tableHeader.show();this.$tableLoading.css("top",this.$header.outerHeight()+1);this.getCaret();j(window).on("resize.bootstrap-table",j.proxy(this.resetWidth,this))}this.$selectAll=this.$header.find('[name="btSelectAll"]');this.$selectAll.off("click").on("click",function(){var u=j(this).prop("checked");t[u?"checkAll":"uncheckAll"]();t.updateSelected()})};e.prototype.initFooter=function(){if(!this.options.showFooter||this.options.cardView){this.$tableFooter.hide()}else{this.$tableFooter.show()}};e.prototype.initData=function(s,r){if(r==="append"){this.data=this.data.concat(s)}else{if(r==="prepend"){this.data=[].concat(s).concat(this.data)}else{this.data=s||this.options.data}}if(r==="append"){this.options.data=this.options.data.concat(s)}else{if(r==="prepend"){this.options.data=[].concat(s).concat(this.options.data)}else{this.options.data=this.data}}if(this.options.sidePagination==="server"){return}this.initSort()};e.prototype.initSort=function(){var u=this,t=this.options.sortName,r=this.options.sortOrder==="desc"?-1:1,s=j.inArray(this.options.sortName,this.header.fields);if(this.options.customSort!==j.noop){this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]);return}if(s!==-1){if(this.options.sortStable){j.each(this.data,function(v,w){if(!w.hasOwnProperty("_position")){w._position=v}})}this.data.sort(function(w,v){if(u.header.sortNames[s]){t=u.header.sortNames[s]}var y=o(w,t,u.options.escape),z=o(v,t,u.options.escape),x=q(u.header,u.header.sorters[s],[y,z]);if(x!==undefined){return r*x}if(y===undefined||y===null){y=""}if(z===undefined||z===null){z=""}if(u.options.sortStable&&y===z){y=w._position;z=v._position}if(j.isNumeric(y)&&j.isNumeric(z)){y=parseFloat(y);z=parseFloat(z);if(y',this.options.toolbarAlign)).appendTo(this.$toolbar).append(j(this.options.toolbar))}t=[m('',this.options.buttonsAlign,this.options.buttonsAlign)];if(typeof this.options.icons==="string"){this.options.icons=q(null,this.options.icons)}if(this.options.showSearch){t.push(m('
',this.options.formatSearch()),m(' ',this.options.iconsPrefix,this.options.icons.search)," ")}if(this.options.showPaginationSwitch){t.push(m('
',this.options.formatPaginationSwitch()),m(' ',this.options.iconsPrefix,this.options.icons.paginationSwitchDown)," ")}if(this.options.showRefresh){t.push(m('
',this.options.formatRefresh()),m(' ',this.options.iconsPrefix,this.options.icons.refresh)," ")}if(this.options.showToggle){t.push(m('
',this.options.formatToggle()),m(' ',this.options.iconsPrefix,this.options.icons.toggle)," ")}if(this.options.showColumns){t.push(m('
',this.options.formatColumns()),'',m(' ',this.options.iconsPrefix,this.options.icons.columns),' '," ",'","
")}t.push("
");if(this.showToolbar||t.length>2){this.$toolbar.append(t.join(""))}if(this.options.showPaginationSwitch){this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",j.proxy(this.togglePagination,this))}if(this.options.showRefresh){this.$toolbar.find('button[name="refresh"]').off("click").on("click",j.proxy(this.refresh,this))}if(this.options.showToggle){this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){u.toggleView()})}if(this.options.showSearch){this.$toolbar.find('button[name="showSearch"]').off("click").on("click",function(){j(".search-collapse").slideToggle()})}if(this.options.showColumns){s=this.$toolbar.find(".keep-open");if(r<=this.options.minimumCountColumns){s.find("input").prop("disabled",true)}s.find("li").off("click").on("click",function(x){x.stopImmediatePropagation()});s.find("input").off("click").on("click",function(){var x=j(this);u.toggleColumn(j(this).val(),x.prop("checked"),false);u.trigger("column-switch",j(this).data("field"),x.prop("checked"))})}if(this.options.search){t=[];t.push('',m(' ',this.options.formatSearch()),"
");this.$toolbar.append(t.join(""));v=this.$toolbar.find(".search input");v.off("keyup drop").on("keyup drop",function(x){if(u.options.searchOnEnterKey&&x.keyCode!==13){return}if(j.inArray(x.keyCode,[37,38,39,40])>-1){return}clearTimeout(w);w=setTimeout(function(){u.onSearch(x)},u.options.searchTimeOut)});if(b()){v.off("mouseup").on("mouseup",function(x){clearTimeout(w);w=setTimeout(function(){u.onSearch(x)},u.options.searchTimeOut)})}}};e.prototype.onSearch=function(r){var s=j.trim(j(r.currentTarget).val());if(this.options.trimOnSearch&&j(r.currentTarget).val()!==s){j(r.currentTarget).val(s)}if(s===this.searchText){return}this.searchText=s;this.options.searchText=s;this.options.pageNumber=1;this.initSearch();this.updatePagination();this.trigger("search",s)};e.prototype.initSearch=function(){var t=this;if(this.options.sidePagination!=="server"){if(this.options.customSearch!==j.noop){this.options.customSearch.apply(this,[this.searchText]);return}var r=this.searchText&&(this.options.escape?p(this.searchText):this.searchText).toLowerCase();var u=j.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=u?j.grep(this.options.data,function(w,v){for(var s in u){if(j.isArray(u[s])&&j.inArray(w[s],u[s])===-1||w[s]!==u[s]){return false}}return true}):this.options.data;this.data=r?j.grep(this.data,function(A,x){for(var v=0;v-1){A=true}}}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1;this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages){this.options.pageNumber=this.totalPages}this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1;this.pageTo=this.options.pageNumber*this.options.pageSize;if(this.pageTo>this.options.totalRows){this.pageTo=this.options.totalRows}w.push('",'")}this.$pagination.html(w.join(""));if(!this.options.onlyInfoPagination){H=this.$pagination.find(".page-list a");u=this.$pagination.find(".page-first");G=this.$pagination.find(".page-pre");s=this.$pagination.find(".page-next");B=this.$pagination.find(".page-last");F=this.$pagination.find(".page-number");if(this.options.smartDisplay){if(this.totalPages<=1){this.$pagination.find("div.pagination").hide()}if(r.length<2||this.options.totalRows<=r[0]){this.$pagination.find("span.page-list").hide()}this.$pagination[this.getData().length?"show":"hide"]()}if(A){this.options.pageSize=this.options.formatAllRows()}H.off("click").on("click",j.proxy(this.onPageListChange,this));u.off("click").on("click",j.proxy(this.onPageFirst,this));G.off("click").on("click",j.proxy(this.onPagePre,this));s.off("click").on("click",j.proxy(this.onPageNext,this));B.off("click").on("click",j.proxy(this.onPageLast,this));F.off("click").on("click",j.proxy(this.onPageNumber,this))}};e.prototype.updatePagination=function(r){if(r&&j(r.currentTarget).hasClass("disabled")){return}if(!this.options.maintainSelected){this.resetRows()}this.initPagination();if(this.options.sidePagination==="server"){this.initServer()}else{this.initBody()}this.trigger("page-change",this.options.pageNumber,this.options.pageSize)};e.prototype.onPageListChange=function(r){var s=j(r.currentTarget);s.parent().addClass("active").siblings().removeClass("active");this.options.pageSize=s.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+s.text();this.$toolbar.find(".page-size").text(this.options.pageSize);this.updatePagination(r)};e.prototype.onPageFirst=function(r){this.options.pageNumber=1;this.updatePagination(r)};e.prototype.onPagePre=function(r){if((this.options.pageNumber-1)===0){this.options.pageNumber=this.options.totalPages}else{this.options.pageNumber--}this.updatePagination(r)};e.prototype.onPageNext=function(r){if((this.options.pageNumber+1)>this.options.totalPages){this.options.pageNumber=1}else{this.options.pageNumber++}this.updatePagination(r)};e.prototype.onPageLast=function(r){this.options.pageNumber=this.totalPages;this.updatePagination(r)};e.prototype.onPageNumber=function(r){if(this.options.pageNumber===+j(r.currentTarget).text()){return}this.options.pageNumber=+j(r.currentTarget).text();this.updatePagination(r)};e.prototype.initBody=function(x){var z=this,y=[],v=this.getData();this.trigger("pre-body",v);this.$body=this.$el.find(">tbody");if(!this.$body.length){this.$body=j(" ").appendTo(this.$el)}if(!this.options.pagination||this.options.sidePagination==="server"){this.pageFrom=1;this.pageTo=v.length}for(var w=this.pageFrom-1;w");if(this.options.cardView){y.push(m('',this.header.fields.length))}if(!this.options.cardView&&this.options.detailView){y.push("
",'',m(' ',this.options.iconsPrefix,this.options.icons.detailOpen)," "," ")}j.each(this.header.fields,function(I,L){var P="",M=o(C,L,z.options.escape),K="",E={},Q="",J=z.header.classes[I],G="",O="",R="",H="",F=z.columns[I];if(z.fromHtml&&typeof M==="undefined"){return}if(!F.visible){return}if(z.options.cardView&&!F.cardVisible){return}r=m('style="%s"',s.concat(z.header.styles[I]).join("; "));if(C["_"+L+"_id"]){Q=m(' id="%s"',C["_"+L+"_id"])}if(C["_"+L+"_class"]){J=m(' class="%s"',C["_"+L+"_class"])}if(C["_"+L+"_rowspan"]){O=m(' rowspan="%s"',C["_"+L+"_rowspan"])}if(C["_"+L+"_colspan"]){R=m(' colspan="%s"',C["_"+L+"_colspan"])}if(C["_"+L+"_title"]){H=m(' title="%s"',C["_"+L+"_title"])}E=q(z.header,z.header.cellStyles[I],[M,C,w,L],E);if(E.classes){J=m(' class="%s"',E.classes)}if(E.css){var D=[];for(var N in E.css){D.push(N+": "+E.css[N])}r=m('style="%s"',D.concat(z.header.styles[I]).join("; "))}M=q(F,z.header.formatters[I],[M,C,w],M);if(C["_"+L+"_data"]&&!j.isEmptyObject(C["_"+L+"_data"])){j.each(C["_"+L+"_data"],function(T,S){if(T==="index"){return}G+=m(' data-%s="%s"',T,S)})}if(F.checkbox||F.radio){K=F.checkbox?"checkbox":K;K=F.radio?"radio":K;P=[m(z.options.cardView?'
':'
',F["class"]||"")," ",z.header.formatters[I]&&typeof M==="string"?M:"",z.options.cardView?"":" "].join("");C[z.header.stateField]=M===true||(M&&M.checked)}else{M=typeof M==="undefined"||M===null?z.options.undefinedText:M;P=z.options.cardView?['
',z.options.showHeader?m('%s ',r,c(z.columns,"field","title",L)):"",m('%s ',M),"
"].join(""):[m("
",Q,J,r,G,O,R,H),M," "].join("");if(z.options.cardView&&z.options.smartDisplay&&M===""){P='
'}}y.push(P)});if(this.options.cardView){y.push("
")}y.push("")}if(!y.length){y.push('',m('%s ',this.$header.find("th").length,this.options.formatNoMatches())," ")}this.$body.html(y.join(""));if(!x){this.scrollTo(0)}this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(J){var D=j(this),F=D.parent(),M=z.data[F.data("index")],H=D[0].cellIndex,G=z.getVisibleFields(),K=G[z.options.detailView&&!z.options.cardView?H-1:H],E=z.columns[i(z.columns,K)],L=o(M,K,z.options.escape);if(D.find(".detail-icon").length){return}z.trigger(J.type==="click"?"click-cell":"dbl-click-cell",K,L,M,D);z.trigger(J.type==="click"?"click-row":"dbl-click-row",M,F,K);if(J.type==="click"&&z.options.clickToSelect&&E.clickToSelect){var I=F.find(m('[name="%s"]',z.options.selectItemName));if(I.length){I[0].click()}}});this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var H=j(this),G=H.parent().parent(),E=G.data("index"),I=v[E];if(G.next().is("tr.detail-view")){H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailOpen));G.next().remove();z.trigger("collapse-row",E,I)}else{H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailClose));G.after(m(' ',G.find("td").length));var D=G.next().find("td");var F=q(z.options,z.options.detailFormatter,[E,I,D],"");if(D.length===1){D.append(F)}z.trigger("expand-row",E,I,D)}z.resetView()});this.$selectItem=this.$body.find(m('[name="%s"]',this.options.selectItemName));this.$selectItem.off("click").on("click",function(E){E.stopImmediatePropagation();var F=j(this),D=F.prop("checked"),G=z.data[F.data("index")];if(z.options.maintainSelected&&j(this).is(":radio")){j.each(z.options.data,function(H,I){I[z.header.stateField]=false})}G[z.header.stateField]=D;if(z.options.singleSelect){z.$selectItem.not(this).each(function(){z.data[j(this).data("index")][z.header.stateField]=false});z.$selectItem.filter(":checked").not(this).prop("checked",false)}z.updateSelected();z.trigger(D?"check":"uncheck",G,F)});j.each(this.header.events,function(G,F){if(!F){return}if(typeof F==="string"){F=q(null,F)}var H=z.header.fields[G],D=j.inArray(H,z.getVisibleFields());if(z.options.detailView&&!z.options.cardView){D+=1}for(var E in F){z.$body.find(">tr:not(.no-records-found)").each(function(){var M=j(this),N=M.find(z.options.cardView?".card-view":"td").eq(D),J=E.indexOf(" "),I=E.substring(0,J),K=E.substring(J+1),L=F[E];N.find(K).off(I).on(I,function(Q){var O=M.data("index"),R=z.data[O],P=R[H];L.apply(this,[Q,P,R,O])})})}});this.updateSelected();this.resetView();this.trigger("post-body",v)};e.prototype.initServer=function(r,w,s){var u=this,v={},x={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder},t;if(this.options.pagination){x.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize;x.pageNumber=this.options.pageNumber}if(!(s||this.options.url)&&!this.options.ajax){return}if(this.options.queryParamsType==="limit"){x={search:x.searchText,sort:x.sortName,order:x.sortOrder};if(this.options.pagination){x.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1);x.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize}}if(!(j.isEmptyObject(this.filterColumnsPartial))){x.filter=JSON.stringify(this.filterColumnsPartial,null)}v=q(this.options,this.options.queryParams,[x],v);j.extend(v,w||{});if(v===false){return}if(!r){this.$tableLoading.show()}t=j.extend({},q(null,this.options.ajaxOptions),{type:this.options.method,url:s||this.options.url,data:this.options.contentType==="application/json"&&this.options.method==="post"?JSON.stringify(v):v,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(y){y=q(u.options,u.options.responseHandler,[y],y);u.load(y);u.trigger("load-success",y);if(!r){u.$tableLoading.hide()}},error:function(y){u.trigger("load-error",y.status,y);if(!r){u.$tableLoading.hide()}}});if(this.options.ajax){q(this,this.options.ajax,[t],null)}else{if(this._xhr&&this._xhr.readyState!==4){this._xhr.abort()}this._xhr=j.ajax(t)}};e.prototype.initSearchText=function(){if(this.options.search){if(this.options.searchText!==""){var r=this.$toolbar.find(".search input");r.val(this.options.searchText);this.onSearch({currentTarget:r})}}};e.prototype.getCaret=function(){var r=this;j.each(this.$header.find("th"),function(s,t){j(t).find(".sortable").removeClass("desc asc").addClass(j(t).data("field")===r.options.sortName?r.options.sortOrder:"both")})};e.prototype.updateSelected=function(){var r=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.each(function(){j(this).closest("tr")[j(this).prop("checked")?"addClass":"removeClass"]("selected")})};e.prototype.updateRows=function(){var r=this;this.$selectItem.each(function(){r.data[j(this).data("index")][r.header.stateField]=j(this).prop("checked")})};e.prototype.resetRows=function(){var r=this;j.each(this.data,function(s,t){r.$selectAll.prop("checked",false);r.$selectItem.prop("checked",false);if(r.header.stateField){t[r.header.stateField]=false}})};e.prototype.trigger=function(s){var r=Array.prototype.slice.call(arguments,1);s+=".bs.table";this.options[e.EVENTS[s]].apply(this.options,r);this.$el.trigger(j.Event(s),r);this.options.onAll(s,r);this.$el.trigger(j.Event("all.bs.table"),[s,r])};e.prototype.resetHeader=function(){clearTimeout(this.timeoutId_);this.timeoutId_=setTimeout(j.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)};e.prototype.fitHeader=function(){var t=this,u,r,x,y;if(t.$el.is(":hidden")){t.timeoutId_=setTimeout(j.proxy(t.fitHeader,t),100);return}u=this.$tableBody.get(0);r=u.scrollWidth>u.clientWidth&&u.scrollHeight>u.clientHeight+this.$header.outerHeight()?a():0;this.$el.css("margin-top",-this.$header.outerHeight());x=j(":focus");if(x.length>0){var z=x.parents("th");if(z.length>0){var A=z.attr("data-field");if(A!==undefined){var s=this.$header.find("[data-field='"+A+"']");if(s.length>0){s.find(":input").addClass("focus-temp")}}}}this.$header_=this.$header.clone(true,true);this.$selectAll_=this.$header_.find('[name="btSelectAll"]');this.$tableHeader.css({"margin-right":r}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_);y=j(".focus-temp:visible:eq(0)");if(y.length>0){y.focus();this.$header.find(".focus-temp").removeClass("focus-temp")}this.$header.find("th[data-field]").each(function(B){t.$header_.find(m('th[data-field="%s"]',j(this).data("field"))).data(j(this).data())});var w=this.getVisibleFields(),v=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(C){var E=j(this),B=C;if(t.options.detailView&&!t.options.cardView){if(C===0){t.$header_.find("th.detail").find(".fht-cell").width(E.innerWidth())}B=C-1}var D=t.$header_.find(m('th[data-field="%s"]',w[B]));if(D.length>1){D=j(v[E[0].cellIndex])}D.find(".fht-cell").width(E.innerWidth())});this.$tableBody.off("scroll").on("scroll",function(){t.$tableHeader.scrollLeft(j(this).scrollLeft());if(t.options.showFooter&&!t.options.cardView){t.$tableFooter.scrollLeft(j(this).scrollLeft())}});t.trigger("post-header")};e.prototype.resetFooter=function(){var s=this,t=s.getData(),r=[];if(!this.options.showFooter||this.options.cardView){return}if(!this.options.cardView&&this.options.detailView){r.push('
')}j.each(this.columns,function(x,z){var w,B="",v="",A=[],y={},u=m(' class="%s"',z["class"]);if(!z.visible){return}if(s.options.cardView&&(!z.cardVisible)){return}B=m("text-align: %s; ",z.falign?z.falign:z.align);v=m("vertical-align: %s; ",z.valign);y=q(null,s.options.footerStyle);if(y&&y.css){for(w in y.css){A.push(w+": "+y.css[w])}}r.push("");r.push('');r.push(q(z,z.footerFormatter,[t]," ")||" ");r.push("
");r.push('
');r.push("");r.push(" ")});this.$tableFooter.find("tr").html(r.join(""));this.$tableFooter.show();clearTimeout(this.timeoutFooter_);this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0)};e.prototype.fitFooter=function(){var u=this,r,t,s;clearTimeout(this.timeoutFooter_);if(this.$el.is(":hidden")){this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),100);return}t=this.$el.css("width");s=t>this.$tableBody.width()?a():0;this.$tableFooter.css({"margin-right":s}).find("table").css("width",t).attr("class",this.$el.attr("class"));r=this.$tableFooter.find("td");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(v){var w=j(this);r.eq(v).find(".fht-cell").width(w.innerWidth())})};e.prototype.toggleColumn=function(r,s,u){if(r===-1){return}this.columns[r].visible=s;this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var t=this.$toolbar.find(".keep-open input").prop("disabled",false);if(u){t.filter(m('[value="%s"]',r)).prop("checked",s)}if(t.filter(":checked").length<=this.options.minimumCountColumns){t.filter(":checked").prop("disabled",true)}}};e.prototype.toggleRow=function(r,t,s){if(r===-1){return}this.$body.find(typeof r!=="undefined"?m('tr[data-index="%s"]',r):m('tr[data-uniqueid="%s"]',t))[s?"show":"hide"]()};e.prototype.getVisibleFields=function(){var s=this,r=[];j.each(this.header.fields,function(t,v){var u=s.columns[i(s.columns,v)];if(!u.visible){return}r.push(v)});return r};e.prototype.resetView=function(u){var s=0;if(u&&u.height){this.options.height=u.height}this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length);if(this.options.height){var t=d(this.$toolbar),v=d(this.$pagination),r=this.options.height-t-v;this.$tableContainer.css("height",r+"px")}if(this.options.cardView){this.$el.css("margin-top","0");this.$tableContainer.css("padding-bottom","0");this.$tableFooter.hide();return}if(this.options.showHeader&&this.options.height){this.$tableHeader.show();this.resetHeader();s+=this.$header.outerHeight()}else{this.$tableHeader.hide();this.trigger("post-header")}if(this.options.showFooter){this.resetFooter();if(this.options.height){s+=this.$tableFooter.outerHeight()+1}}this.getCaret();this.$tableContainer.css("padding-bottom",s+"px");this.trigger("reset-view")};e.prototype.getData=function(r){return(this.searchText||!j.isEmptyObject(this.filterColumns)||!j.isEmptyObject(this.filterColumnsPartial))?(r?this.data.slice(this.pageFrom-1,this.pageTo):this.data):(r?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data)};e.prototype.load=function(s){var r=false;if(this.options.sidePagination==="server"){this.options.totalRows=s.total;r=s.fixedScroll;s=s[this.options.dataField]}else{if(!j.isArray(s)){r=s.fixedScroll;s=s.data}}this.initData(s);this.initSearch();this.initPagination();this.initBody(r)};e.prototype.append=function(r){this.initData(r,"append");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.prepend=function(r){this.initData(r,"prepend");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.remove=function(u){var r=this.options.data.length,s,t;if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}for(s=r-1;s>=0;s--){t=this.options.data[s];if(!t.hasOwnProperty(u.field)){continue}if(j.inArray(t[u.field],u.values)!==-1){this.options.data.splice(s,1)}}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.removeAll=function(){if(this.options.data.length>0){this.options.data.splice(0,this.options.data.length);this.initSearch();this.initPagination();this.initBody(true)}};e.prototype.getRowByUniqueId=function(x){var w=this.options.uniqueId,r=this.options.data.length,s=null,t,v,u;for(t=r-1;t>=0;t--){v=this.options.data[t];if(v.hasOwnProperty(w)){u=v[w]}else{if(v._data.hasOwnProperty(w)){u=v._data[w]}else{continue}}if(typeof u==="string"){x=x.toString()}else{if(typeof u==="number"){if((Number(u)===u)&&(u%1===0)){x=parseInt(x)}else{if((u===Number(u))&&(u!==0)){x=parseFloat(x)}}}}if(u===x){s=v;break}}return s};e.prototype.removeByUniqueId=function(t){var r=this.options.data.length,s=this.getRowByUniqueId(t);if(s){this.options.data.splice(this.options.data.indexOf(s),1)}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initBody(true)};e.prototype.updateByUniqueId=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,w){var v;if(!w.hasOwnProperty("id")||!w.hasOwnProperty("row")){return}v=j.inArray(r.getRowByUniqueId(w.id),r.options.data);if(v===-1){return}j.extend(r.options.data[v],w.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.insertRow=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("row")){return}this.data.splice(r.index,0,r.row);this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.updateRow=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,v){if(!v.hasOwnProperty("index")||!v.hasOwnProperty("row")){return}j.extend(r.options.data[v.index],v.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.showRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,true)};e.prototype.hideRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,false)};e.prototype.getRowsHidden=function(r){var t=j(this.$body[0]).children().filter(":hidden"),s=0;if(r){for(;str"),r;if(this.options.detailView&&!this.options.cardView){t+=1}r=x.eq(y).find(">td").eq(t);if(y<0||t<0||y>=this.data.length){return}for(w=y;wtd").eq(v).hide()}}r.attr("rowspan",u).attr("colspan",s).show()};e.prototype.updateCell=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("field")||!r.hasOwnProperty("value")){return}this.data[r.index][r.field]=r.value;if(r.reinit===false){return}this.initSort();this.initBody(true)};e.prototype.getOptions=function(){return this.options};e.prototype.getSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.getAllSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.checkAll=function(){this.checkAll_(true)};e.prototype.uncheckAll=function(){this.checkAll_(false)};e.prototype.checkInvert=function(){var s=this;var t=s.$selectItem.filter(":enabled");var r=t.filter(":checked");t.each(function(){j(this).prop("checked",!j(this).prop("checked"))});s.updateRows();s.updateSelected();s.trigger("uncheck-some",r);r=s.getSelections();s.trigger("check-some",r)};e.prototype.checkAll_=function(r){var s;if(!r){s=this.getSelections()}this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.filter(":enabled").prop("checked",r);this.updateRows();if(r){s=this.getSelections()}this.trigger(r?"check-all":"uncheck-all",s)};e.prototype.check=function(r){this.check_(true,r)};e.prototype.uncheck=function(r){this.check_(false,r)};e.prototype.check_=function(t,r){var s=this.$selectItem.filter(m('[data-index="%s"]',r)).prop("checked",t);this.data[r][this.header.stateField]=t;this.updateSelected();this.trigger(t?"check":"uncheck",this.data[r],s)};e.prototype.checkBy=function(r){this.checkBy_(true,r)};e.prototype.uncheckBy=function(r){this.checkBy_(false,r)};e.prototype.checkBy_=function(s,u){if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}var r=this,t=[];j.each(this.options.data,function(v,x){if(!x.hasOwnProperty(u.field)){return false}if(j.inArray(x[u.field],u.values)!==-1){var w=r.$selectItem.filter(":enabled").filter(m('[data-index="%s"]',v)).prop("checked",s);x[r.header.stateField]=s;t.push(x);r.trigger(s?"check":"uncheck",x,w)}});this.updateSelected();this.trigger(s?"check-some":"uncheck-some",t)};e.prototype.destroy=function(){this.$el.insertBefore(this.$container);j(this.options.toolbar).insertBefore(this.$el);this.$container.next().remove();this.$container.remove();this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")
+=======
+/*
+* bootstrap-table - v1.11.0 - 2016-07-02
+* https://github.com/wenzhixin/bootstrap-table
+* Copyright (c) 2016 zhixin wen
+* Licensed MIT License
+*/
+(function(j){var k=null;var m=function(u){var s=arguments,r=true,t=1;u=u.replace(/%s/g,function(){var v=s[t++];if(typeof v==="undefined"){r=false;return""}return v});return r?u:""};var c=function(t,v,u,s){var r="";j.each(t,function(w,x){if(x[v]===s){r=x[u];return false}return true});return r};var i=function(s,t){var r=-1;j.each(s,function(u,v){if(v.field===t){r=u;return false}return true});return r};var l=function(u){var y,x,w,A=0,B=[];for(y=0;y").addClass("fixed-table-scroll-inner"),u=j("
").addClass("fixed-table-scroll-outer"),s,r;u.append(t);j("body").append(u);s=t[0].offsetWidth;u.css("overflow","scroll");r=t[0].offsetWidth;if(s===r){r=u[0].clientWidth}u.remove();k=s-r}return k};var q=function(s,u,t,r){var v=u;if(typeof u==="string"){var w=u.split(".");if(w.length>1){v=window;j.each(w,function(x,y){v=v[y]})}else{v=window[u]}}if(typeof v==="object"){return v}if(typeof v==="function"){return v.apply(s,t)}if(!v&&typeof u==="string"&&m.apply(this,[u].concat(t))){return m.apply(this,[u].concat(t))}return r};var f=function(s,r,w){var x=Object.getOwnPropertyNames(s),u=Object.getOwnPropertyNames(r),v="";if(w){if(x.length!==u.length){return false}}for(var t=0;t-1){if(s[v]!==r[v]){return false}}}return true};var p=function(r){if(typeof r==="string"){return r.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")}return r};var d=function(s){var r=0;s.children().each(function(){if(r0||!!navigator.userAgent.match(/Trident.*rv\:11\./))};var h=function(){if(!Object.keys){Object.keys=(function(){var t=Object.prototype.hasOwnProperty,u=!({toString:null}).propertyIsEnumerable("toString"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=s.length;return function(x){if(typeof x!=="object"&&(typeof x!=="function"||x===null)){throw new TypeError("Object.keys called on non-object")}var v=[],y,w;for(y in x){if(t.call(x,y)){v.push(y)}}if(u){for(w=0;w','
',this.options.paginationVAlign==="top"||this.options.paginationVAlign==="both"?'':"",'','','
','
',this.options.formatLoadingMessage(),"
","
",'',this.options.paginationVAlign==="bottom"||this.options.paginationVAlign==="both"?'':"","
",""].join(""));this.$container.insertAfter(this.$el);this.$tableContainer=this.$container.find(".fixed-table-container");this.$tableHeader=this.$container.find(".fixed-table-header");this.$tableBody=this.$container.find(".fixed-table-body");this.$tableLoading=this.$container.find(".fixed-table-loading");this.$tableFooter=this.$container.find(".fixed-table-footer");this.$toolbar=this.$container.find(".fixed-table-toolbar");this.$pagination=this.$container.find(".fixed-table-pagination");this.$tableBody.append(this.$el);this.$container.after('
');this.$el.addClass(this.options.classes);if(this.options.striped){this.$el.addClass("table-striped")}if(j.inArray("table-no-bordered",this.options.classes.split(" "))!==-1){this.$tableContainer.addClass("table-no-bordered")}};e.prototype.initTable=function(){var t=this,s=[],u=[];this.$header=this.$el.find(">thead");if(!this.$header.length){this.$header=j(" ").appendTo(this.$el)}this.$header.find("tr").each(function(){var v=[];j(this).find("th").each(function(){if(typeof j(this).data("field")!=="undefined"){j(this).data("field",j(this).data("field")+"")}v.push(j.extend({},{title:j(this).html(),"class":j(this).attr("class"),titleTooltip:j(this).attr("title"),rowspan:j(this).attr("rowspan")?+j(this).attr("rowspan"):undefined,colspan:j(this).attr("colspan")?+j(this).attr("colspan"):undefined},j(this).data()))});s.push(v)});if(!j.isArray(this.options.columns[0])){this.options.columns=[this.options.columns]}this.options.columns=j.extend(true,[],s,this.options.columns);this.columns=[];l(this.options.columns);j.each(this.options.columns,function(w,v){j.each(v,function(x,y){y=j.extend({},e.COLUMN_DEFAULTS,y);if(typeof y.fieldIndex!=="undefined"){t.columns[y.fieldIndex]=y}t.options.columns[w][x]=y})});if(this.options.data.length){return}var r=[];this.$el.find(">tbody>tr").each(function(w){var v={};v._id=j(this).attr("id");v._class=j(this).attr("class");v._data=g(j(this).data());j(this).find(">td").each(function(z){var E=j(this),B=+E.attr("colspan")||1,C=+E.attr("rowspan")||1,A,y;for(;r[w]&&r[w][z];z++){}for(A=z;A");if(v===0&&!t.options.cardView&&t.options.detailView){s.push(m('
',t.options.columns.length))}j.each(u,function(B,A){var F="",C="",E="",w="",D=m(' class="%s"',A["class"]),z=t.options.sortOrder||A.order,y="px",x=A.width;if(A.width!==undefined&&(!t.options.cardView)){if(typeof A.width==="string"){if(A.width.indexOf("%")!==-1){y="%"}}}if(A.width&&typeof A.width==="string"){x=A.width.replace("%","").replace("px","")}C=m("text-align: %s; ",A.halign?A.halign:A.align);E=m("text-align: %s; ",A.align);w=m("vertical-align: %s; ",A.valign);w+=m("width: %s; ",(A.checkbox||A.radio)&&!x?"36px":(x?x+y:undefined));if(typeof A.fieldIndex!=="undefined"){t.header.fields[A.fieldIndex]=A.field;t.header.styles[A.fieldIndex]=E+w;t.header.classes[A.fieldIndex]=D;t.header.formatters[A.fieldIndex]=A.formatter;t.header.events[A.fieldIndex]=A.events;t.header.sorters[A.fieldIndex]=A.sorter;t.header.sortNames[A.fieldIndex]=A.sortName;t.header.cellStyles[A.fieldIndex]=A.cellStyle;t.header.searchables[A.fieldIndex]=A.searchable;if(!A.visible){return}if(t.options.cardView&&(!A.cardVisible)){return}r[A.field]=A}s.push("");s.push(m('',t.options.sortable&&A.sortable?"sortable both":""));F=A.title;if(A.checkbox){if(!t.options.singleSelect&&t.options.checkboxHeader){F=' '}t.header.stateField=A.field}if(A.radio){F="";t.header.stateField=A.field;t.options.singleSelect=true}s.push(F);s.push("
");s.push('
');s.push("");s.push(" ")});s.push("")});this.$header.html(s.join(""));this.$header.find("th[data-field]").each(function(u){j(this).data(r[j(this).data("field")])});this.$container.off("click",".th-inner").on("click",".th-inner",function(u){var v=j(this);if(t.options.detailView){if(v.closest(".bootstrap-table")[0]!==t.$container[0]){return false}}if(t.options.sortable&&v.parent().data().sortable){t.onSort(u)}});this.$header.children().children().off("keypress").on("keypress",function(v){if(t.options.sortable&&j(this).data().sortable){var u=v.keyCode||v.which;if(u==13){t.onSort(v)}}});j(window).off("resize.bootstrap-table");if(!this.options.showHeader||this.options.cardView){this.$header.hide();this.$tableHeader.hide();this.$tableLoading.css("top",0)}else{this.$header.show();this.$tableHeader.show();this.$tableLoading.css("top",this.$header.outerHeight()+1);this.getCaret();j(window).on("resize.bootstrap-table",j.proxy(this.resetWidth,this))}this.$selectAll=this.$header.find('[name="btSelectAll"]');this.$selectAll.off("click").on("click",function(){var u=j(this).prop("checked");t[u?"checkAll":"uncheckAll"]();t.updateSelected()})};e.prototype.initFooter=function(){if(!this.options.showFooter||this.options.cardView){this.$tableFooter.hide()}else{this.$tableFooter.show()}};e.prototype.initData=function(s,r){if(r==="append"){this.data=this.data.concat(s)}else{if(r==="prepend"){this.data=[].concat(s).concat(this.data)}else{this.data=s||this.options.data}}if(r==="append"){this.options.data=this.options.data.concat(s)}else{if(r==="prepend"){this.options.data=[].concat(s).concat(this.options.data)}else{this.options.data=this.data}}if(this.options.sidePagination==="server"){return}this.initSort()};e.prototype.initSort=function(){var u=this,t=this.options.sortName,r=this.options.sortOrder==="desc"?-1:1,s=j.inArray(this.options.sortName,this.header.fields);if(this.options.customSort!==j.noop){this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]);return}if(s!==-1){if(this.options.sortStable){j.each(this.data,function(v,w){if(!w.hasOwnProperty("_position")){w._position=v}})}this.data.sort(function(w,v){if(u.header.sortNames[s]){t=u.header.sortNames[s]}var y=o(w,t,u.options.escape),z=o(v,t,u.options.escape),x=q(u.header,u.header.sorters[s],[y,z]);if(x!==undefined){return r*x}if(y===undefined||y===null){y=""}if(z===undefined||z===null){z=""}if(u.options.sortStable&&y===z){y=w._position;z=v._position}if(j.isNumeric(y)&&j.isNumeric(z)){y=parseFloat(y);z=parseFloat(z);if(y',this.options.toolbarAlign)).appendTo(this.$toolbar).append(j(this.options.toolbar))}t=[m('',this.options.buttonsAlign,this.options.buttonsAlign)];if(typeof this.options.icons==="string"){this.options.icons=q(null,this.options.icons)}if(this.options.showSearch){t.push(m('
',this.options.formatSearch()),m(' ',this.options.iconsPrefix,this.options.icons.search)," ")}if(this.options.showPaginationSwitch){t.push(m('
',this.options.formatPaginationSwitch()),m(' ',this.options.iconsPrefix,this.options.icons.paginationSwitchDown)," ")}if(this.options.showRefresh){t.push(m('
',this.options.formatRefresh()),m(' ',this.options.iconsPrefix,this.options.icons.refresh)," ")}if(this.options.showToggle){t.push(m('
',this.options.formatToggle()),m(' ',this.options.iconsPrefix,this.options.icons.toggle)," ")}if(this.options.showColumns){t.push(m('
',this.options.formatColumns()),'',m(' ',this.options.iconsPrefix,this.options.icons.columns),' '," ",'","
")}t.push("
");if(this.showToolbar||t.length>2){this.$toolbar.append(t.join(""))}if(this.options.showPaginationSwitch){this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",j.proxy(this.togglePagination,this))}if(this.options.showRefresh){this.$toolbar.find('button[name="refresh"]').off("click").on("click",j.proxy(this.refresh,this))}if(this.options.showToggle){this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){u.toggleView()})}if(this.options.showSearch){this.$toolbar.find('button[name="showSearch"]').off("click").on("click",function(){j(".search-collapse").slideToggle()})}if(this.options.showColumns){s=this.$toolbar.find(".keep-open");if(r<=this.options.minimumCountColumns){s.find("input").prop("disabled",true)}s.find("li").off("click").on("click",function(x){x.stopImmediatePropagation()});s.find("input").off("click").on("click",function(){var x=j(this);u.toggleColumn(j(this).val(),x.prop("checked"),false);u.trigger("column-switch",j(this).data("field"),x.prop("checked"))})}if(this.options.search){t=[];t.push('',m(' ',this.options.formatSearch()),"
");this.$toolbar.append(t.join(""));v=this.$toolbar.find(".search input");v.off("keyup drop").on("keyup drop",function(x){if(u.options.searchOnEnterKey&&x.keyCode!==13){return}if(j.inArray(x.keyCode,[37,38,39,40])>-1){return}clearTimeout(w);w=setTimeout(function(){u.onSearch(x)},u.options.searchTimeOut)});if(b()){v.off("mouseup").on("mouseup",function(x){clearTimeout(w);w=setTimeout(function(){u.onSearch(x)},u.options.searchTimeOut)})}}};e.prototype.onSearch=function(r){var s=j.trim(j(r.currentTarget).val());if(this.options.trimOnSearch&&j(r.currentTarget).val()!==s){j(r.currentTarget).val(s)}if(s===this.searchText){return}this.searchText=s;this.options.searchText=s;this.options.pageNumber=1;this.initSearch();this.updatePagination();this.trigger("search",s)};e.prototype.initSearch=function(){var t=this;if(this.options.sidePagination!=="server"){if(this.options.customSearch!==j.noop){this.options.customSearch.apply(this,[this.searchText]);return}var r=this.searchText&&(this.options.escape?p(this.searchText):this.searchText).toLowerCase();var u=j.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=u?j.grep(this.options.data,function(w,v){for(var s in u){if(j.isArray(u[s])&&j.inArray(w[s],u[s])===-1||w[s]!==u[s]){return false}}return true}):this.options.data;this.data=r?j.grep(this.data,function(A,x){for(var v=0;v-1){A=true}}}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1;this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages){this.options.pageNumber=this.totalPages}this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1;this.pageTo=this.options.pageNumber*this.options.pageSize;if(this.pageTo>this.options.totalRows){this.pageTo=this.options.totalRows}w.push('",'")}this.$pagination.html(w.join(""));if(!this.options.onlyInfoPagination){H=this.$pagination.find(".page-list a");u=this.$pagination.find(".page-first");G=this.$pagination.find(".page-pre");s=this.$pagination.find(".page-next");B=this.$pagination.find(".page-last");F=this.$pagination.find(".page-number");if(this.options.smartDisplay){if(this.totalPages<=1){this.$pagination.find("div.pagination").hide()}if(r.length<2||this.options.totalRows<=r[0]){this.$pagination.find("span.page-list").hide()}this.$pagination[this.getData().length?"show":"hide"]()}if(A){this.options.pageSize=this.options.formatAllRows()}H.off("click").on("click",j.proxy(this.onPageListChange,this));u.off("click").on("click",j.proxy(this.onPageFirst,this));G.off("click").on("click",j.proxy(this.onPagePre,this));s.off("click").on("click",j.proxy(this.onPageNext,this));B.off("click").on("click",j.proxy(this.onPageLast,this));F.off("click").on("click",j.proxy(this.onPageNumber,this))}};e.prototype.updatePagination=function(r){if(r&&j(r.currentTarget).hasClass("disabled")){return}if(!this.options.maintainSelected){this.resetRows()}this.initPagination();if(this.options.sidePagination==="server"){this.initServer()}else{this.initBody()}this.trigger("page-change",this.options.pageNumber,this.options.pageSize)};e.prototype.onPageListChange=function(r){var s=j(r.currentTarget);s.parent().addClass("active").siblings().removeClass("active");this.options.pageSize=s.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+s.text();this.$toolbar.find(".page-size").text(this.options.pageSize);this.updatePagination(r)};e.prototype.onPageFirst=function(r){this.options.pageNumber=1;this.updatePagination(r)};e.prototype.onPagePre=function(r){if((this.options.pageNumber-1)===0){this.options.pageNumber=this.options.totalPages}else{this.options.pageNumber--}this.updatePagination(r)};e.prototype.onPageNext=function(r){if((this.options.pageNumber+1)>this.options.totalPages){this.options.pageNumber=1}else{this.options.pageNumber++}this.updatePagination(r)};e.prototype.onPageLast=function(r){this.options.pageNumber=this.totalPages;this.updatePagination(r)};e.prototype.onPageNumber=function(r){if(this.options.pageNumber===+j(r.currentTarget).text()){return}this.options.pageNumber=+j(r.currentTarget).text();this.updatePagination(r)};e.prototype.initBody=function(x){var z=this,y=[],v=this.getData();this.trigger("pre-body",v);this.$body=this.$el.find(">tbody");if(!this.$body.length){this.$body=j(" ").appendTo(this.$el)}if(!this.options.pagination||this.options.sidePagination==="server"){this.pageFrom=1;this.pageTo=v.length}for(var w=this.pageFrom-1;w");if(this.options.cardView){y.push(m('',this.header.fields.length))}if(!this.options.cardView&&this.options.detailView){y.push("
",'',m(' ',this.options.iconsPrefix,this.options.icons.detailOpen)," "," ")}j.each(this.header.fields,function(I,L){var P="",M=o(C,L,z.options.escape),K="",E={},Q="",J=z.header.classes[I],G="",O="",R="",H="",F=z.columns[I];if(z.fromHtml&&typeof M==="undefined"){return}if(!F.visible){return}if(z.options.cardView&&!F.cardVisible){return}r=m('style="%s"',s.concat(z.header.styles[I]).join("; "));if(C["_"+L+"_id"]){Q=m(' id="%s"',C["_"+L+"_id"])}if(C["_"+L+"_class"]){J=m(' class="%s"',C["_"+L+"_class"])}if(C["_"+L+"_rowspan"]){O=m(' rowspan="%s"',C["_"+L+"_rowspan"])}if(C["_"+L+"_colspan"]){R=m(' colspan="%s"',C["_"+L+"_colspan"])}if(C["_"+L+"_title"]){H=m(' title="%s"',C["_"+L+"_title"])}E=q(z.header,z.header.cellStyles[I],[M,C,w,L],E);if(E.classes){J=m(' class="%s"',E.classes)}if(E.css){var D=[];for(var N in E.css){D.push(N+": "+E.css[N])}r=m('style="%s"',D.concat(z.header.styles[I]).join("; "))}M=q(F,z.header.formatters[I],[M,C,w],M);if(C["_"+L+"_data"]&&!j.isEmptyObject(C["_"+L+"_data"])){j.each(C["_"+L+"_data"],function(T,S){if(T==="index"){return}G+=m(' data-%s="%s"',T,S)})}if(F.checkbox||F.radio){K=F.checkbox?"checkbox":K;K=F.radio?"radio":K;P=[m(z.options.cardView?'
':'
',F["class"]||"")," ",z.header.formatters[I]&&typeof M==="string"?M:"",z.options.cardView?"":" "].join("");C[z.header.stateField]=M===true||(M&&M.checked)}else{M=typeof M==="undefined"||M===null?z.options.undefinedText:M;P=z.options.cardView?['
',z.options.showHeader?m('%s ',r,c(z.columns,"field","title",L)):"",m('%s ',M),"
"].join(""):[m("
",Q,J,r,G,O,R,H),M," "].join("");if(z.options.cardView&&z.options.smartDisplay&&M===""){P='
'}}y.push(P)});if(this.options.cardView){y.push("
")}y.push("")}if(!y.length){y.push('',m('%s ',this.$header.find("th").length,this.options.formatNoMatches())," ")}this.$body.html(y.join(""));if(!x){this.scrollTo(0)}this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(J){var D=j(this),F=D.parent(),M=z.data[F.data("index")],H=D[0].cellIndex,G=z.getVisibleFields(),K=G[z.options.detailView&&!z.options.cardView?H-1:H],E=z.columns[i(z.columns,K)],L=o(M,K,z.options.escape);if(D.find(".detail-icon").length){return}z.trigger(J.type==="click"?"click-cell":"dbl-click-cell",K,L,M,D);z.trigger(J.type==="click"?"click-row":"dbl-click-row",M,F,K);if(J.type==="click"&&z.options.clickToSelect&&E.clickToSelect){var I=F.find(m('[name="%s"]',z.options.selectItemName));if(I.length){I[0].click()}}});this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var H=j(this),G=H.parent().parent(),E=G.data("index"),I=v[E];if(G.next().is("tr.detail-view")){H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailOpen));G.next().remove();z.trigger("collapse-row",E,I)}else{H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailClose));G.after(m(' ',G.find("td").length));var D=G.next().find("td");var F=q(z.options,z.options.detailFormatter,[E,I,D],"");if(D.length===1){D.append(F)}z.trigger("expand-row",E,I,D)}z.resetView()});this.$selectItem=this.$body.find(m('[name="%s"]',this.options.selectItemName));this.$selectItem.off("click").on("click",function(E){E.stopImmediatePropagation();var F=j(this),D=F.prop("checked"),G=z.data[F.data("index")];if(z.options.maintainSelected&&j(this).is(":radio")){j.each(z.options.data,function(H,I){I[z.header.stateField]=false})}G[z.header.stateField]=D;if(z.options.singleSelect){z.$selectItem.not(this).each(function(){z.data[j(this).data("index")][z.header.stateField]=false});z.$selectItem.filter(":checked").not(this).prop("checked",false)}z.updateSelected();z.trigger(D?"check":"uncheck",G,F)});j.each(this.header.events,function(G,F){if(!F){return}if(typeof F==="string"){F=q(null,F)}var H=z.header.fields[G],D=j.inArray(H,z.getVisibleFields());if(z.options.detailView&&!z.options.cardView){D+=1}for(var E in F){z.$body.find(">tr:not(.no-records-found)").each(function(){var M=j(this),N=M.find(z.options.cardView?".card-view":"td").eq(D),J=E.indexOf(" "),I=E.substring(0,J),K=E.substring(J+1),L=F[E];N.find(K).off(I).on(I,function(Q){var O=M.data("index"),R=z.data[O],P=R[H];L.apply(this,[Q,P,R,O])})})}});this.updateSelected();this.resetView();this.trigger("post-body",v)};e.prototype.initServer=function(r,w,s){var u=this,v={},x={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder},t;if(this.options.pagination){x.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize;x.pageNumber=this.options.pageNumber}if(!(s||this.options.url)&&!this.options.ajax){return}if(this.options.queryParamsType==="limit"){x={search:x.searchText,sort:x.sortName,order:x.sortOrder};if(this.options.pagination){x.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1);x.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize}}if(!(j.isEmptyObject(this.filterColumnsPartial))){x.filter=JSON.stringify(this.filterColumnsPartial,null)}v=q(this.options,this.options.queryParams,[x],v);j.extend(v,w||{});if(v===false){return}if(!r){this.$tableLoading.show()}t=j.extend({},q(null,this.options.ajaxOptions),{type:this.options.method,url:s||this.options.url,data:this.options.contentType==="application/json"&&this.options.method==="post"?JSON.stringify(v):v,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(y){y=q(u.options,u.options.responseHandler,[y],y);u.load(y);u.trigger("load-success",y);if(!r){u.$tableLoading.hide()}},error:function(y){u.trigger("load-error",y.status,y);if(!r){u.$tableLoading.hide()}}});if(this.options.ajax){q(this,this.options.ajax,[t],null)}else{if(this._xhr&&this._xhr.readyState!==4){this._xhr.abort()}this._xhr=j.ajax(t)}};e.prototype.initSearchText=function(){if(this.options.search){if(this.options.searchText!==""){var r=this.$toolbar.find(".search input");r.val(this.options.searchText);this.onSearch({currentTarget:r})}}};e.prototype.getCaret=function(){var r=this;j.each(this.$header.find("th"),function(s,t){j(t).find(".sortable").removeClass("desc asc").addClass(j(t).data("field")===r.options.sortName?r.options.sortOrder:"both")})};e.prototype.updateSelected=function(){var r=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.each(function(){j(this).closest("tr")[j(this).prop("checked")?"addClass":"removeClass"]("selected")})};e.prototype.updateRows=function(){var r=this;this.$selectItem.each(function(){r.data[j(this).data("index")][r.header.stateField]=j(this).prop("checked")})};e.prototype.resetRows=function(){var r=this;j.each(this.data,function(s,t){r.$selectAll.prop("checked",false);r.$selectItem.prop("checked",false);if(r.header.stateField){t[r.header.stateField]=false}})};e.prototype.trigger=function(s){var r=Array.prototype.slice.call(arguments,1);s+=".bs.table";this.options[e.EVENTS[s]].apply(this.options,r);this.$el.trigger(j.Event(s),r);this.options.onAll(s,r);this.$el.trigger(j.Event("all.bs.table"),[s,r])};e.prototype.resetHeader=function(){clearTimeout(this.timeoutId_);this.timeoutId_=setTimeout(j.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)};e.prototype.fitHeader=function(){var t=this,u,r,x,y;if(t.$el.is(":hidden")){t.timeoutId_=setTimeout(j.proxy(t.fitHeader,t),100);return}u=this.$tableBody.get(0);r=u.scrollWidth>u.clientWidth&&u.scrollHeight>u.clientHeight+this.$header.outerHeight()?a():0;this.$el.css("margin-top",-this.$header.outerHeight());x=j(":focus");if(x.length>0){var z=x.parents("th");if(z.length>0){var A=z.attr("data-field");if(A!==undefined){var s=this.$header.find("[data-field='"+A+"']");if(s.length>0){s.find(":input").addClass("focus-temp")}}}}this.$header_=this.$header.clone(true,true);this.$selectAll_=this.$header_.find('[name="btSelectAll"]');this.$tableHeader.css({"margin-right":r}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_);y=j(".focus-temp:visible:eq(0)");if(y.length>0){y.focus();this.$header.find(".focus-temp").removeClass("focus-temp")}this.$header.find("th[data-field]").each(function(B){t.$header_.find(m('th[data-field="%s"]',j(this).data("field"))).data(j(this).data())});var w=this.getVisibleFields(),v=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(C){var E=j(this),B=C;if(t.options.detailView&&!t.options.cardView){if(C===0){t.$header_.find("th.detail").find(".fht-cell").width(E.innerWidth())}B=C-1}var D=t.$header_.find(m('th[data-field="%s"]',w[B]));if(D.length>1){D=j(v[E[0].cellIndex])}D.find(".fht-cell").width(E.innerWidth())});this.$tableBody.off("scroll").on("scroll",function(){t.$tableHeader.scrollLeft(j(this).scrollLeft());if(t.options.showFooter&&!t.options.cardView){t.$tableFooter.scrollLeft(j(this).scrollLeft())}});t.trigger("post-header")};e.prototype.resetFooter=function(){var s=this,t=s.getData(),r=[];if(!this.options.showFooter||this.options.cardView){return}if(!this.options.cardView&&this.options.detailView){r.push('
')}j.each(this.columns,function(x,z){var w,B="",v="",A=[],y={},u=m(' class="%s"',z["class"]);if(!z.visible){return}if(s.options.cardView&&(!z.cardVisible)){return}B=m("text-align: %s; ",z.falign?z.falign:z.align);v=m("vertical-align: %s; ",z.valign);y=q(null,s.options.footerStyle);if(y&&y.css){for(w in y.css){A.push(w+": "+y.css[w])}}r.push("");r.push('');r.push(q(z,z.footerFormatter,[t]," ")||" ");r.push("
");r.push('
');r.push("");r.push(" ")});this.$tableFooter.find("tr").html(r.join(""));this.$tableFooter.show();clearTimeout(this.timeoutFooter_);this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0)};e.prototype.fitFooter=function(){var u=this,r,t,s;clearTimeout(this.timeoutFooter_);if(this.$el.is(":hidden")){this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),100);return}t=this.$el.css("width");s=t>this.$tableBody.width()?a():0;this.$tableFooter.css({"margin-right":s}).find("table").css("width",t).attr("class",this.$el.attr("class"));r=this.$tableFooter.find("td");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(v){var w=j(this);r.eq(v).find(".fht-cell").width(w.innerWidth())})};e.prototype.toggleColumn=function(r,s,u){if(r===-1){return}this.columns[r].visible=s;this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var t=this.$toolbar.find(".keep-open input").prop("disabled",false);if(u){t.filter(m('[value="%s"]',r)).prop("checked",s)}if(t.filter(":checked").length<=this.options.minimumCountColumns){t.filter(":checked").prop("disabled",true)}}};e.prototype.toggleRow=function(r,t,s){if(r===-1){return}this.$body.find(typeof r!=="undefined"?m('tr[data-index="%s"]',r):m('tr[data-uniqueid="%s"]',t))[s?"show":"hide"]()};e.prototype.getVisibleFields=function(){var s=this,r=[];j.each(this.header.fields,function(t,v){var u=s.columns[i(s.columns,v)];if(!u.visible){return}r.push(v)});return r};e.prototype.resetView=function(u){var s=0;if(u&&u.height){this.options.height=u.height}this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length);if(this.options.height){var t=d(this.$toolbar),v=d(this.$pagination),r=this.options.height-t-v;this.$tableContainer.css("height",r+"px")}if(this.options.cardView){this.$el.css("margin-top","0");this.$tableContainer.css("padding-bottom","0");this.$tableFooter.hide();return}if(this.options.showHeader&&this.options.height){this.$tableHeader.show();this.resetHeader();s+=this.$header.outerHeight()}else{this.$tableHeader.hide();this.trigger("post-header")}if(this.options.showFooter){this.resetFooter();if(this.options.height){s+=this.$tableFooter.outerHeight()+1}}this.getCaret();this.$tableContainer.css("padding-bottom",s+"px");this.trigger("reset-view")};e.prototype.getData=function(r){return(this.searchText||!j.isEmptyObject(this.filterColumns)||!j.isEmptyObject(this.filterColumnsPartial))?(r?this.data.slice(this.pageFrom-1,this.pageTo):this.data):(r?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data)};e.prototype.load=function(s){var r=false;if(this.options.sidePagination==="server"){this.options.totalRows=s.total;r=s.fixedScroll;s=s[this.options.dataField]}else{if(!j.isArray(s)){r=s.fixedScroll;s=s.data}}this.initData(s);this.initSearch();this.initPagination();this.initBody(r)};e.prototype.append=function(r){this.initData(r,"append");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.prepend=function(r){this.initData(r,"prepend");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.remove=function(u){var r=this.options.data.length,s,t;if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}for(s=r-1;s>=0;s--){t=this.options.data[s];if(!t.hasOwnProperty(u.field)){continue}if(j.inArray(t[u.field],u.values)!==-1){this.options.data.splice(s,1)}}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.removeAll=function(){if(this.options.data.length>0){this.options.data.splice(0,this.options.data.length);this.initSearch();this.initPagination();this.initBody(true)}};e.prototype.getRowByUniqueId=function(x){var w=this.options.uniqueId,r=this.options.data.length,s=null,t,v,u;for(t=r-1;t>=0;t--){v=this.options.data[t];if(v.hasOwnProperty(w)){u=v[w]}else{if(v._data.hasOwnProperty(w)){u=v._data[w]}else{continue}}if(typeof u==="string"){x=x.toString()}else{if(typeof u==="number"){if((Number(u)===u)&&(u%1===0)){x=parseInt(x)}else{if((u===Number(u))&&(u!==0)){x=parseFloat(x)}}}}if(u===x){s=v;break}}return s};e.prototype.removeByUniqueId=function(t){var r=this.options.data.length,s=this.getRowByUniqueId(t);if(s){this.options.data.splice(this.options.data.indexOf(s),1)}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initBody(true)};e.prototype.updateByUniqueId=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,w){var v;if(!w.hasOwnProperty("id")||!w.hasOwnProperty("row")){return}v=j.inArray(r.getRowByUniqueId(w.id),r.options.data);if(v===-1){return}j.extend(r.options.data[v],w.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.insertRow=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("row")){return}this.data.splice(r.index,0,r.row);this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.updateRow=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,v){if(!v.hasOwnProperty("index")||!v.hasOwnProperty("row")){return}j.extend(r.options.data[v.index],v.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.showRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,true)};e.prototype.hideRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,false)};e.prototype.getRowsHidden=function(r){var t=j(this.$body[0]).children().filter(":hidden"),s=0;if(r){for(;str"),r;if(this.options.detailView&&!this.options.cardView){t+=1}r=x.eq(y).find(">td").eq(t);if(y<0||t<0||y>=this.data.length){return}for(w=y;wtd").eq(v).hide()}}r.attr("rowspan",u).attr("colspan",s).show()};e.prototype.updateCell=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("field")||!r.hasOwnProperty("value")){return}this.data[r.index][r.field]=r.value;if(r.reinit===false){return}this.initSort();this.initBody(true)};e.prototype.getOptions=function(){return this.options};e.prototype.getSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.getAllSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.checkAll=function(){this.checkAll_(true)};e.prototype.uncheckAll=function(){this.checkAll_(false)};e.prototype.checkInvert=function(){var s=this;var t=s.$selectItem.filter(":enabled");var r=t.filter(":checked");t.each(function(){j(this).prop("checked",!j(this).prop("checked"))});s.updateRows();s.updateSelected();s.trigger("uncheck-some",r);r=s.getSelections();s.trigger("check-some",r)};e.prototype.checkAll_=function(r){var s;if(!r){s=this.getSelections()}this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.filter(":enabled").prop("checked",r);this.updateRows();if(r){s=this.getSelections()}this.trigger(r?"check-all":"uncheck-all",s)};e.prototype.check=function(r){this.check_(true,r)};e.prototype.uncheck=function(r){this.check_(false,r)};e.prototype.check_=function(t,r){var s=this.$selectItem.filter(m('[data-index="%s"]',r)).prop("checked",t);this.data[r][this.header.stateField]=t;this.updateSelected();this.trigger(t?"check":"uncheck",this.data[r],s)};e.prototype.checkBy=function(r){this.checkBy_(true,r)};e.prototype.uncheckBy=function(r){this.checkBy_(false,r)};e.prototype.checkBy_=function(s,u){if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}var r=this,t=[];j.each(this.options.data,function(v,x){if(!x.hasOwnProperty(u.field)){return false}if(j.inArray(x[u.field],u.values)!==-1){var w=r.$selectItem.filter(":enabled").filter(m('[data-index="%s"]',v)).prop("checked",s);x[r.header.stateField]=s;t.push(x);r.trigger(s?"check":"uncheck",x,w)}});this.updateSelected();this.trigger(s?"check-some":"uncheck-some",t)};e.prototype.destroy=function(){this.$el.insertBefore(this.$container);j(this.options.toolbar).insertBefore(this.$el);this.$container.next().remove();this.$container.remove();this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
};e.prototype.showLoading=function(){this.$tableLoading.show()};e.prototype.hideLoading=function(){this.$tableLoading.hide()};e.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var r=this.$toolbar.find('button[name="paginationSwitch"] i');if(this.options.pagination){r.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown)}else{r.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp)}this.updatePagination()};e.prototype.refresh=function(r){if(r&&r.url){this.options.pageNumber=1}this.initServer(r&&r.silent,r&&r.query,r&&r.url);this.trigger("refresh",r)};e.prototype.resetWidth=function(){if(this.options.showHeader&&this.options.height){this.fitHeader()}if(this.options.showFooter){this.fitFooter()}};e.prototype.showColumn=function(r){this.toggleColumn(i(this.columns,r),true,true)};e.prototype.hideColumn=function(r){this.toggleColumn(i(this.columns,r),false,true)};e.prototype.getHiddenColumns=function(){return j.grep(this.columns,function(r){return !r.visible})};e.prototype.getVisibleColumns=function(){return j.grep(this.columns,function(r){return r.visible})};e.prototype.toggleAllColumns=function(r){j.each(this.columns,function(t,u){this.columns[t].visible=r});this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var s=this.$toolbar.find(".keep-open input").prop("disabled",false);if(s.filter(":checked").length<=this.options.minimumCountColumns){s.filter(":checked").prop("disabled",true)}}};e.prototype.showAllColumns=function(){this.toggleAllColumns(true)};e.prototype.hideAllColumns=function(){this.toggleAllColumns(false)};e.prototype.filterBy=function(r){this.filterColumns=j.isEmptyObject(r)?{}:r;this.options.pageNumber=1;this.initSearch();this.updatePagination()};e.prototype.scrollTo=function(r){if(typeof r==="string"){r=r==="bottom"?this.$tableBody[0].scrollHeight:0}if(typeof r==="number"){this.$tableBody.scrollTop(r)}if(typeof r==="undefined"){return this.$tableBody.scrollTop()}};e.prototype.getScrollPosition=function(){return this.scrollTo()};e.prototype.selectPage=function(r){if(r>0&&r<=this.options.totalPages){this.options.pageNumber=r;this.updatePagination()}};e.prototype.prevPage=function(){if(this.options.pageNumber>1){this.options.pageNumber--;this.updatePagination()}};e.prototype.nextPage=function(){if(this.options.pageNumber tr[data-index="%s"]',r));if(t.next().is("tr.detail-view")===(s?false:true)){t.find("> td > .detail-icon").click()}};e.prototype.expandRow=function(r){this.expandRow_(true,r)};e.prototype.collapseRow=function(r){this.expandRow_(false,r)};e.prototype.expandAllRows=function(r){if(r){var w=this.$body.find(m('> tr[data-index="%s"]',0)),x=this,u=null,v=false,s=-1;if(!w.next().is("tr.detail-view")){w.find("> td > .detail-icon").click();v=true}else{if(!w.next().next().is("tr.detail-view")){w.next().find(".detail-icon").click();v=true}}if(v){try{s=setInterval(function(){u=x.$body.find("tr.detail-view").last().find(".detail-icon");if(u.length>0){u.click()}else{clearInterval(s)}},1)}catch(z){clearInterval(s)}}}else{var y=this.$body.children();for(var t=0;t
* extensions: https://github.com/vitalets/x-editable
@@ -143,4 +144,151 @@
this.trigger('editable-init');
};
+=======
+/**
+ * @author zhixin wen
+ * extensions: https://github.com/vitalets/x-editable
+ */
+
+(function($) {
+
+ 'use strict';
+
+ $.extend($.fn.bootstrapTable.defaults, {
+ editable: true,
+ onEditableInit: function() {
+ return false;
+ },
+ onEditableSave: function(field, row, oldValue, $el) {
+ return false;
+ },
+ onEditableShown: function(field, row, $el, editable) {
+ return false;
+ },
+ onEditableHidden: function(field, row, $el, reason) {
+ return false;
+ }
+ });
+
+ $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
+ 'editable-init.bs.table': 'onEditableInit',
+ 'editable-save.bs.table': 'onEditableSave',
+ 'editable-shown.bs.table': 'onEditableShown',
+ 'editable-hidden.bs.table': 'onEditableHidden'
+ });
+
+ var BootstrapTable = $.fn.bootstrapTable.Constructor,
+ _initTable = BootstrapTable.prototype.initTable,
+ _initBody = BootstrapTable.prototype.initBody;
+
+ BootstrapTable.prototype.initTable = function() {
+ var that = this;
+ _initTable.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (!this.options.editable) {
+ return;
+ }
+
+ $.each(this.columns, function(i, column) {
+ if (!column.editable) {
+ return;
+ }
+
+ var editableOptions = {},
+ editableDataMarkup = [],
+ editableDataPrefix = 'editable-';
+
+ var processDataOptions = function(key, value) {
+ // Replace camel case with dashes.
+ var dashKey = key.replace(/([A-Z])/g, function($1) {
+ return "-" + $1.toLowerCase();
+ });
+ if (dashKey.slice(0, editableDataPrefix.length) == editableDataPrefix) {
+ var dataKey = dashKey.replace(editableDataPrefix, 'data-');
+ editableOptions[dataKey] = value;
+ }
+ };
+
+ $.each(that.options, processDataOptions);
+
+ column.formatter = column.formatter || function(value, row, index) {
+ return value;
+ };
+ column._formatter = column._formatter ? column._formatter : column.formatter;
+ column.formatter = function(value, row, index) {
+ var result = column._formatter ? column._formatter(value, row, index) : value;
+
+ $.each(column, processDataOptions);
+
+ $.each(editableOptions, function(key, value) {
+ editableDataMarkup.push(' ' + key + '="' + value + '"');
+ });
+
+ var _dont_edit_formatter = false;
+ if (column.editable.hasOwnProperty('noeditFormatter')) {
+ _dont_edit_formatter = column.editable.noeditFormatter(value, row, index);
+ }
+
+ if (_dont_edit_formatter === false) {
+ return ['' + ' '
+ ].join('');
+ } else {
+ return _dont_edit_formatter;
+ }
+
+ };
+ });
+ };
+
+ BootstrapTable.prototype.initBody = function() {
+ var that = this;
+ _initBody.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (!this.options.editable) {
+ return;
+ }
+
+ $.each(this.columns, function(i, column) {
+ if (!column.editable) {
+ return;
+ }
+
+ that.$body.find('a[data-name="' + column.field + '"]').editable(column.editable)
+ .off('save').on('save', function(e, params) {
+ var data = that.getData(),
+ index = $(this).parents('tr[data-index]').data('index'),
+ row = data[index],
+ oldValue = row[column.field];
+
+ $(this).data('value', params.submitValue);
+ row[column.field] = params.submitValue;
+ that.trigger('editable-save', column.field, row, oldValue, $(this));
+ that.resetFooter();
+ });
+ that.$body.find('a[data-name="' + column.field + '"]').editable(column.editable)
+ .off('shown').on('shown', function(e, editable) {
+ var data = that.getData(),
+ index = $(this).parents('tr[data-index]').data('index'),
+ row = data[index];
+
+ that.trigger('editable-shown', column.field, row, $(this), editable);
+ });
+ that.$body.find('a[data-name="' + column.field + '"]').editable(column.editable)
+ .off('hidden').on('hidden', function(e, reason) {
+ var data = that.getData(),
+ index = $(this).parents('tr[data-index]').data('index'),
+ row = data[index];
+
+ that.trigger('editable-hidden', column.field, row, $(this), reason);
+ });
+ });
+ this.trigger('editable-init');
+ };
+
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
})(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.min.js
index c25643e3e..68c2c6753 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.min.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.min.js
@@ -1,7 +1,16 @@
+<<<<<<< HEAD
/*
* bootstrap-table - v1.11.0 - 2016-07-02
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2016 zhixin wen
* Licensed MIT License
*/
+=======
+/*
+* bootstrap-table - v1.11.0 - 2016-07-02
+* https://github.com/wenzhixin/bootstrap-table
+* Copyright (c) 2016 zhixin wen
+* Licensed MIT License
+*/
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{editable:!0,onEditableInit:function(){return!1},onEditableSave:function(){return!1},onEditableShown:function(){return!1},onEditableHidden:function(){return!1}}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"editable-init.bs.table":"onEditableInit","editable-save.bs.table":"onEditableSave","editable-shown.bs.table":"onEditableShown","editable-hidden.bs.table":"onEditableHidden"});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.initTable,d=b.prototype.initBody;b.prototype.initTable=function(){var b=this;c.apply(this,Array.prototype.slice.apply(arguments)),this.options.editable&&a.each(this.columns,function(c,d){if(d.editable){var e={},f=[],g="editable-",h=function(a,b){var c=a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()});if(c.slice(0,g.length)==g){var d=c.replace(g,"data-");e[d]=b}};a.each(b.options,h),d.formatter=d.formatter||function(a){return a},d._formatter=d._formatter?d._formatter:d.formatter,d.formatter=function(c,g,i){var j=d._formatter?d._formatter(c,g,i):c;a.each(d,h),a.each(e,function(a,b){f.push(" "+a+'="'+b+'"')});var k=!1;return d.editable.hasOwnProperty("noeditFormatter")&&(k=d.editable.noeditFormatter(c,g,i)),k===!1?[' "].join(""):k}}})},b.prototype.initBody=function(){var b=this;d.apply(this,Array.prototype.slice.apply(arguments)),this.options.editable&&(a.each(this.columns,function(c,d){d.editable&&(b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("save").on("save",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g],i=h[d.field];a(this).data("value",e.submitValue),h[d.field]=e.submitValue,b.trigger("editable-save",d.field,h,i,a(this)),b.resetFooter()}),b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("shown").on("shown",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g];b.trigger("editable-shown",d.field,h,a(this),e)}),b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("hidden").on("hidden",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g];b.trigger("editable-hidden",d.field,h,a(this),e)}))}),this.trigger("editable-init"))}}(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js
index f897fbc7f..2f58d47cc 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/**
* @author zhixin wen
* extensions: https://github.com/kayalshri/tableExport.jquery.plugin
@@ -117,3 +118,124 @@
}
};
})(jQuery);
+=======
+/**
+ * @author zhixin wen
+ * extensions: https://github.com/kayalshri/tableExport.jquery.plugin
+ */
+
+(function ($) {
+ 'use strict';
+ var sprintf = $.fn.bootstrapTable.utils.sprintf;
+
+ var TYPE_NAME = {
+ csv: 'CSV',
+ txt: 'TXT',
+ doc: 'Word',
+ excel: 'Excel'
+ };
+
+ $.extend($.fn.bootstrapTable.defaults, {
+ showExport: false,
+ exportDataType: 'all', // basic, all, selected
+ exportTypes: ['csv', 'txt', 'doc', 'excel'],
+ exportOptions: {
+ ignoreColumn: [0] //忽略列索引
+ }
+ });
+
+ $.extend($.fn.bootstrapTable.defaults.icons, {
+ export: 'glyphicon glyphicon-save'
+ });
+
+ $.extend($.fn.bootstrapTable.locales, {
+ formatExport: function () {
+ return 'Export data';
+ }
+ });
+ $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
+
+ var BootstrapTable = $.fn.bootstrapTable.Constructor,
+ _initToolbar = BootstrapTable.prototype.initToolbar;
+
+ BootstrapTable.prototype.initToolbar = function () {
+ this.showToolbar = this.options.showExport;
+
+ _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (this.options.showExport) {
+ var that = this,
+ $btnGroup = this.$toolbar.find('>.btn-group'),
+ $export = $btnGroup.find('div.export');
+
+ if (!$export.length) {
+ $export = $([
+ '',
+ '',
+ sprintf(' ', this.options.iconsPrefix, this.options.icons.export),
+ ' ',
+ ' ',
+ '',
+ '
'].join('')).appendTo($btnGroup);
+
+ var $menu = $export.find('.dropdown-menu'),
+ exportTypes = this.options.exportTypes;
+
+ if (typeof this.options.exportTypes === 'string') {
+ var types = this.options.exportTypes.slice(1, -1).replace(/ /g, '').split(',');
+
+ exportTypes = [];
+ $.each(types, function (i, value) {
+ exportTypes.push(value.slice(1, -1));
+ });
+ }
+ $.each(exportTypes, function (i, type) {
+ if (TYPE_NAME.hasOwnProperty(type)) {
+ $menu.append(['',
+ '',
+ TYPE_NAME[type],
+ ' ',
+ ' '].join(''));
+ }
+ });
+
+ $menu.find('li').click(function () {
+ var type = $(this).data('type'),
+ doExport = function () {
+ that.$el.tableExport($.extend({}, that.options.exportOptions, {
+ type: type,
+ escape: false
+ }));
+ };
+
+ if (that.options.exportDataType === 'all' && that.options.pagination) {
+ that.$el.one(that.options.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table', function () {
+ doExport();
+ that.togglePagination();
+ });
+ that.togglePagination();
+ } else if (that.options.exportDataType === 'selected') {
+ //修改sidePagination属性为server无法导出选中数据
+ var trs = that.$body.children();
+ for (var i = 0; i < trs.length; i++) {
+ var $this = $(trs[i]);
+ if(!$this.find(sprintf('[name="%s"]',that.options.selectItemName)).prop('checked')){
+ $this['hide']();
+ }}
+ doExport();
+ that.getRowsHidden(true);
+ } else {
+ doExport();
+ }
+ });
+ }
+ }
+ };
+})(jQuery);
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/tableExport.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/tableExport.js
index 5e717f2f1..043e4be9a 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/tableExport.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/tableExport.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/**
* @preserve tableExport.jquery.plugin
*
@@ -2255,3 +2256,2262 @@
return this;
}
})(jQuery);
+=======
+/**
+ * @preserve tableExport.jquery.plugin
+ *
+ * Version 1.9.8
+ *
+ * Copyright (c) 2015-2017 hhurz, https://github.com/hhurz
+ *
+ * Original Work Copyright (c) 2014 Giri Raj
+ *
+ * Licensed under the MIT License
+ **/
+
+(function ($) {
+ $.fn.tableExport = function (options) {
+ var defaults = {
+ consoleLog: false,
+ csvEnclosure: '"',
+ csvSeparator: ',',
+ csvUseBOM: true,
+ displayTableName: false,
+ escape: false,
+ excelFileFormat: 'xlshtml', // xmlss = XML Spreadsheet 2003 file format (XMLSS), xlshtml = Excel 2000 html format
+ excelRTL: false, // true = Set Excel option 'DisplayRightToLeft'
+ excelstyles: [], // e.g. ['border-bottom', 'border-top', 'border-left', 'border-right']
+ exportHiddenCells: false, // true = speed up export of large tables with hidden cells (hidden cells will be exported !)
+ fileName: 'export',
+ htmlContent: false,
+ ignoreColumn: [],
+ ignoreRow: [],
+ jsonScope: 'all', // head, data, all
+ jspdf: {
+ orientation: 'p',
+ unit: 'pt',
+ format: 'a4', // jspdf page format or 'bestfit' for autmatic paper format selection
+ margins: {left: 20, right: 10, top: 10, bottom: 10},
+ onDocCreated: null,
+ autotable: {
+ styles: {
+ cellPadding: 2,
+ rowHeight: 12,
+ fontSize: 8,
+ fillColor: 255, // color value or 'inherit' to use css background-color from html table
+ textColor: 50, // color value or 'inherit' to use css color from html table
+ fontStyle: 'normal', // normal, bold, italic, bolditalic or 'inherit' to use css font-weight and fonst-style from html table
+ overflow: 'ellipsize', // visible, hidden, ellipsize or linebreak
+ halign: 'left', // left, center, right
+ valign: 'middle' // top, middle, bottom
+ },
+ headerStyles: {
+ fillColor: [52, 73, 94],
+ textColor: 255,
+ fontStyle: 'bold',
+ halign: 'center'
+ },
+ alternateRowStyles: {
+ fillColor: 245
+ },
+ tableExport: {
+ doc: null, // jsPDF doc object. If set, an already created doc will be used to export to
+ onAfterAutotable: null,
+ onBeforeAutotable: null,
+ onAutotableText: null,
+ onTable: null,
+ outputImages: true
+ }
+ }
+ },
+ numbers: {
+ html: {
+ decimalMark: '.',
+ thousandsSeparator: ','
+ },
+ output: { // set output: false to keep number format in exported output
+ decimalMark: '.',
+ thousandsSeparator: ','
+ }
+ },
+ onCellData: null,
+ onCellHtmlData: null,
+ onIgnoreRow: null, // onIgnoreRow($tr, rowIndex): function should return true to not export a row
+ onMsoNumberFormat: null, // Excel 2000 html format only. See readme.md for more information about msonumberformat
+ outputMode: 'file', // 'file', 'string', 'base64' or 'window' (experimental)
+ pdfmake: {
+ enabled: false, // true: use pdfmake instead of jspdf and jspdf-autotable (experimental)
+ docDefinition: {
+ pageOrientation: 'portrait', // 'portrait' or 'landscape'
+ defaultStyle: {
+ font: 'Roboto' // default is 'Roboto', for arabic font set this option to 'Mirza' and include mirza_fonts.js
+ }
+ },
+ fonts: {}
+ },
+ tbodySelector: 'tr',
+ tfootSelector: 'tr', // set empty ('') to prevent export of tfoot rows
+ theadSelector: 'tr',
+ tableName: 'Table',
+ type: 'csv', // 'csv', 'tsv', 'txt', 'sql', 'json', 'xml', 'excel', 'doc', 'png' or 'pdf'
+ worksheetName: ''
+ };
+
+ var FONT_ROW_RATIO = 1.15;
+ var el = this;
+ var DownloadEvt = null;
+ var $hrows = [];
+ var $rows = [];
+ var rowIndex = 0;
+ var trData = '';
+ var colNames = [];
+ var ranges = [];
+ var blob;
+ var $hiddenTableElements = [];
+ var checkCellVisibilty = false;
+
+ $.extend(true, defaults, options);
+
+ colNames = GetColumnNames(el);
+
+ if ( defaults.type == 'csv' || defaults.type == 'tsv' || defaults.type == 'txt' ) {
+
+ var csvData = "";
+ var rowlength = 0;
+ ranges = [];
+ rowIndex = 0;
+
+ function csvString (cell, rowIndex, colIndex) {
+ var result = '';
+
+ if ( cell !== null ) {
+ var dataString = parseString(cell, rowIndex, colIndex);
+
+ var csvValue = (dataString === null || dataString === '') ? '' : dataString.toString();
+
+ if ( defaults.type == 'tsv' ) {
+ if ( dataString instanceof Date )
+ dataString.toLocaleString();
+
+ // According to http://www.iana.org/assignments/media-types/text/tab-separated-values
+ // are fields that contain tabs not allowable in tsv encoding
+ result = replaceAll(csvValue, '\t', ' ');
+ }
+ else {
+ // Takes a string and encapsulates it (by default in double-quotes) if it
+ // contains the csv field separator, spaces, or linebreaks.
+ if ( dataString instanceof Date )
+ result = defaults.csvEnclosure + dataString.toLocaleString() + defaults.csvEnclosure;
+ else {
+ result = replaceAll(csvValue, defaults.csvEnclosure, defaults.csvEnclosure + defaults.csvEnclosure);
+
+ if ( result.indexOf(defaults.csvSeparator) >= 0 || /[\r\n ]/g.test(result) )
+ result = defaults.csvEnclosure + result + defaults.csvEnclosure;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ var CollectCsvData = function ($rows, rowselector, length) {
+
+ $rows.each(function () {
+ trData = "";
+ ForEachVisibleCell(this, rowselector, rowIndex, length + $rows.length,
+ function (cell, row, col) {
+ trData += csvString(cell, row, col) + (defaults.type == 'tsv' ? '\t' : defaults.csvSeparator);
+ });
+ trData = $.trim(trData).substring(0, trData.length - 1);
+ if ( trData.length > 0 ) {
+
+ if ( csvData.length > 0 )
+ csvData += "\n";
+
+ csvData += trData;
+ }
+ rowIndex++;
+ });
+
+ return $rows.length;
+ };
+
+ rowlength += CollectCsvData($(el).find('thead').first().find(defaults.theadSelector), 'th,td', rowlength);
+ findTablePart($(el),'tbody').each(function () {
+ rowlength += CollectCsvData(findRows($(this), defaults.tbodySelector), 'td,th', rowlength);
+ });
+ if ( defaults.tfootSelector.length )
+ CollectCsvData($(el).find('tfoot').first().find(defaults.tfootSelector), 'td,th', rowlength);
+
+ csvData += "\n";
+
+ //output
+ if ( defaults.consoleLog === true )
+ console.log(csvData);
+
+ if ( defaults.outputMode === 'string' )
+ return csvData;
+
+ if ( defaults.outputMode === 'base64' )
+ return base64encode(csvData);
+
+ if ( defaults.outputMode === 'window' ) {
+ downloadFile(false, 'data:text/' + (defaults.type == 'csv' ? 'csv' : 'plain') + ';charset=utf-8,', csvData);
+ return;
+ }
+
+ try {
+ blob = new Blob([csvData], {type: "text/" + (defaults.type == 'csv' ? 'csv' : 'plain') + ";charset=utf-8"});
+ saveAs(blob, defaults.fileName + '.' + defaults.type, (defaults.type != 'csv' || defaults.csvUseBOM === false));
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.' + defaults.type,
+ 'data:text/' + (defaults.type == 'csv' ? 'csv' : 'plain') + ';charset=utf-8,' + ((defaults.type == 'csv' && defaults.csvUseBOM) ? '\ufeff' : ''),
+ csvData);
+ }
+
+ } else if ( defaults.type == 'sql' ) {
+
+ // Header
+ rowIndex = 0;
+ ranges = [];
+ var tdData = "INSERT INTO `" + defaults.tableName + "` (";
+ $hrows = $(el).find('thead').first().find(defaults.theadSelector);
+ $hrows.each(function () {
+ ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
+ function (cell, row, col) {
+ tdData += "'" + parseString(cell, row, col) + "',";
+ });
+ rowIndex++;
+ tdData = $.trim(tdData).substring(0, tdData.length - 1);
+ });
+ tdData += ") VALUES ";
+
+ // Data
+ $rows = collectRows ($(el));
+ $($rows).each(function () {
+ trData = "";
+ ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
+ function (cell, row, col) {
+ trData += "'" + parseString(cell, row, col) + "',";
+ });
+ if ( trData.length > 3 ) {
+ tdData += "(" + trData;
+ tdData = $.trim(tdData).substring(0, tdData.length - 1);
+ tdData += "),";
+ }
+ rowIndex++;
+ });
+
+ tdData = $.trim(tdData).substring(0, tdData.length - 1);
+ tdData += ";";
+
+ // Output
+ if ( defaults.consoleLog === true )
+ console.log(tdData);
+
+ if ( defaults.outputMode === 'string' )
+ return tdData;
+
+ if ( defaults.outputMode === 'base64' )
+ return base64encode(tdData);
+
+ try {
+ blob = new Blob([tdData], {type: "text/plain;charset=utf-8"});
+ saveAs(blob, defaults.fileName + '.sql');
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.sql',
+ 'data:application/sql;charset=utf-8,',
+ tdData);
+ }
+
+ } else if ( defaults.type == 'json' ) {
+ var jsonHeaderArray = [];
+ ranges = [];
+ $hrows = $(el).find('thead').first().find(defaults.theadSelector);
+ $hrows.each(function () {
+ var jsonArrayTd = [];
+
+ ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
+ function (cell, row, col) {
+ jsonArrayTd.push(parseString(cell, row, col));
+ });
+ jsonHeaderArray.push(jsonArrayTd);
+ });
+
+ // Data
+ var jsonArray = [];
+
+ $rows = collectRows ($(el));
+ $($rows).each(function () {
+ var jsonObjectTd = {};
+ var colIndex = 0;
+
+ ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
+ function (cell, row, col) {
+ if ( jsonHeaderArray.length ) {
+ jsonObjectTd[jsonHeaderArray[jsonHeaderArray.length - 1][colIndex]] = parseString(cell, row, col);
+ } else {
+ jsonObjectTd[colIndex] = parseString(cell, row, col);
+ }
+ colIndex++;
+ });
+ if ( $.isEmptyObject(jsonObjectTd) === false )
+ jsonArray.push(jsonObjectTd);
+
+ rowIndex++;
+ });
+
+ var sdata = "";
+
+ if ( defaults.jsonScope == 'head' )
+ sdata = JSON.stringify(jsonHeaderArray);
+ else if ( defaults.jsonScope == 'data' )
+ sdata = JSON.stringify(jsonArray);
+ else // all
+ sdata = JSON.stringify({header: jsonHeaderArray, data: jsonArray});
+
+ if ( defaults.consoleLog === true )
+ console.log(sdata);
+
+ if ( defaults.outputMode === 'string' )
+ return sdata;
+
+ if ( defaults.outputMode === 'base64' )
+ return base64encode(sdata);
+
+ try {
+ blob = new Blob([sdata], {type: "application/json;charset=utf-8"});
+ saveAs(blob, defaults.fileName + '.json');
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.json',
+ 'data:application/json;charset=utf-8;base64,',
+ sdata);
+ }
+
+ } else if ( defaults.type === 'xml' ) {
+ rowIndex = 0;
+ ranges = [];
+ var xml = '';
+ xml += '';
+
+ // Header
+ $hrows = $(el).find('thead').first().find(defaults.theadSelector);
+ $hrows.each(function () {
+
+ ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
+ function (cell, row, col) {
+ xml += "" + parseString(cell, row, col) + " ";
+ });
+ rowIndex++;
+ });
+ xml += ' ';
+
+ // Data
+ var rowCount = 1;
+
+ $rows = collectRows ($(el));
+ $($rows).each(function () {
+ var colCount = 1;
+ trData = "";
+ ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
+ function (cell, row, col) {
+ trData += "" + parseString(cell, row, col) + " ";
+ colCount++;
+ });
+ if ( trData.length > 0 && trData != " " ) {
+ xml += '' + trData + '
';
+ rowCount++;
+ }
+
+ rowIndex++;
+ });
+ xml += ' ';
+
+ // Output
+ if ( defaults.consoleLog === true )
+ console.log(xml);
+
+ if ( defaults.outputMode === 'string' )
+ return xml;
+
+ if ( defaults.outputMode === 'base64' )
+ return base64encode(xml);
+
+ try {
+ blob = new Blob([xml], {type: "application/xml;charset=utf-8"});
+ saveAs(blob, defaults.fileName + '.xml');
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.xml',
+ 'data:application/xml;charset=utf-8;base64,',
+ xml);
+ }
+ }
+ else if ( defaults.type === 'excel' && defaults.excelFileFormat === 'xmlss' ) {
+ var docDatas = [];
+ var docNames = [];
+
+ $(el).filter(function () {
+ return isVisible($(this));
+ }).each(function () {
+ var $table = $(this);
+
+ var ssName = '';
+ if ( typeof defaults.worksheetName === 'string' && defaults.worksheetName.length )
+ ssName = defaults.worksheetName + ' ' + (docNames.length + 1);
+ else if ( typeof defaults.worksheetName[docNames.length] !== 'undefined' )
+ ssName = defaults.worksheetName[docNames.length];
+ if ( ! ssName.length )
+ ssName = $table.find('caption').text() || '';
+ if ( ! ssName.length )
+ ssName = 'Table ' + (docNames.length + 1);
+ ssName = $.trim(ssName.replace(/[\\\/[\]*:?'"]/g,'').substring(0,31));
+
+ docNames.push($('
').text(ssName).html());
+
+ if ( defaults.exportHiddenCells === false ) {
+ $hiddenTableElements = $table.find("tr, th, td").filter(":hidden");
+ checkCellVisibilty = $hiddenTableElements.length > 0;
+ }
+
+ rowIndex = 0;
+ colNames = GetColumnNames(this);
+ docData = '\r';
+
+ function CollectXmlssData ($rows, rowselector, length) {
+ var spans = [];
+
+ $($rows).each(function () {
+ var ssIndex = 0;
+ var nCols = 0;
+ trData = "";
+
+ ForEachVisibleCell(this, 'td,th', rowIndex, length + $rows.length,
+ function (cell, row, col) {
+ if ( cell !== null ) {
+ var style = "";
+ var data = parseString(cell, row, col);
+ var type = "String";
+
+ if ( jQuery.isNumeric(data) !== false ) {
+ type = "Number";
+ }
+ else {
+ var number = parsePercent(data);
+ if ( number !== false ) {
+ data = number;
+ type = "Number";
+ style += ' ss:StyleID="pct1"';
+ }
+ }
+
+ if ( type !== "Number" )
+ data = data.replace(/\n/g, ' ');
+
+ var colspan = parseInt(cell.getAttribute('colspan'));
+ var rowspan = parseInt(cell.getAttribute('rowspan'));
+
+ // Skip spans
+ $.each(spans, function () {
+ var range = this;
+ if ( rowIndex >= range.s.r && rowIndex <= range.e.r && nCols >= range.s.c && nCols <= range.e.c ) {
+ for ( var i = 0; i <= range.e.c - range.s.c; ++i ) {
+ nCols++;
+ ssIndex++;
+ }
+ }
+ });
+
+ // Handle Row Span
+ if ( rowspan || colspan ) {
+ rowspan = rowspan || 1;
+ colspan = colspan || 1;
+ spans.push({
+ s: {r: rowIndex, c: nCols},
+ e: {r: rowIndex + rowspan - 1, c: nCols + colspan - 1}
+ });
+ }
+
+ // Handle Colspan
+ if ( colspan > 1 ) {
+ style += ' ss:MergeAcross="' + (colspan-1) + '"';
+ nCols += (colspan - 1);
+ }
+
+ if ( rowspan > 1 ) {
+ style += ' ss:MergeDown="' + (rowspan-1) + '" ss:StyleID="rsp1"';
+ }
+
+ if ( ssIndex > 0 ) {
+ style += ' ss:Index="' + (nCols+1) + '"';
+ ssIndex = 0;
+ }
+
+ trData += '' +
+ $(' ').text(data).html() +
+ ' | \r';
+ nCols++;
+ }
+ });
+ if ( trData.length > 0 )
+ docData += '\r' + trData + '
\r';
+ rowIndex++;
+ });
+
+ return $rows.length;
+ }
+
+ var rowLength = 0;
+ rowLength += CollectXmlssData ($table.find('thead').first().find(defaults.theadSelector), 'th,td', rowLength);
+ CollectXmlssData (collectRows ($table), 'td,th', rowLength);
+
+ docData += '
\r';
+ docDatas.push(docData);
+
+ if ( defaults.consoleLog === true )
+ console.log(docData);
+ });
+
+ var count = {};
+ var firstOccurences = {};
+ var item, itemCount;
+ for (var n = 0, c = docNames.length; n < c; n++)
+ {
+ item = docNames[n];
+ itemCount = count[item];
+ itemCount = count[item] = (itemCount == null ? 1 : itemCount + 1);
+
+ if( itemCount == 2 )
+ docNames[firstOccurences[item]] = docNames[firstOccurences[item]].substring(0,29) + "-1";
+ if( count[ item ] > 1 )
+ docNames[n] = docNames[n].substring(0,29) + "-" + count[item];
+ else
+ firstOccurences[item] = n;
+ }
+
+ var CreationDate = new Date().toISOString();
+ var xmlssDocFile = '\r' +
+ '\r' +
+ '\r' +
+ '\r' +
+ ' ' + CreationDate + ' \r' +
+ ' \r' +
+ '\r' +
+ ' \r' +
+ ' \r' +
+ '\r' +
+ ' 9000 \r' +
+ ' 13860 \r' +
+ ' 0 \r' +
+ ' 0 \r' +
+ ' False \r' +
+ ' False \r' +
+ ' \r' +
+ '\r' +
+ ' \r' +
+ ' \r' +
+ ' \r' +
+ ' \r';
+
+ for ( var j = 0; j < docDatas.length; j++ ) {
+ xmlssDocFile += '\r' +
+ docDatas[j];
+ if (defaults.excelRTL) {
+ xmlssDocFile += '\r' +
+ ' \r' +
+ ' \r';
+ }
+ else
+ xmlssDocFile += ' \r';
+ xmlssDocFile += ' \r';
+ }
+
+ xmlssDocFile += ' \r';
+
+ if ( defaults.consoleLog === true )
+ console.log(xmlssDocFile);
+
+ if ( defaults.outputMode === 'string' )
+ return xmlssDocFile;
+
+ if ( defaults.outputMode === 'base64' )
+ return base64encode(xmlssDocFile);
+
+ try {
+ blob = new Blob([xmlssDocFile], {type: "application/xml;charset=utf-8"});
+ saveAs(blob, defaults.fileName + '.xml');
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.xml',
+ 'data:application/xml;charset=utf-8;base64,',
+ xmlssDocFile);
+ }
+ }
+ else if ( defaults.type == 'excel' || defaults.type == 'xls' || defaults.type == 'word' || defaults.type == 'doc' ) {
+
+ var MSDocType = (defaults.type == 'excel' || defaults.type == 'xls') ? 'excel' : 'word';
+ var MSDocExt = (MSDocType == 'excel') ? 'xls' : 'doc';
+ var MSDocSchema = 'xmlns:x="urn:schemas-microsoft-com:office:' + MSDocType + '"';
+ var docData = '';
+ var docName = '';
+
+ $(el).filter(function () {
+ return isVisible($(this));
+ }).each(function () {
+ var $table = $(this);
+
+ if (docName === '') {
+ docName = defaults.worksheetName || $table.find('caption').text() || 'Table';
+ docName = $.trim(docName.replace(/[\\\/[\]*:?'"]/g, '').substring(0, 31));
+ }
+
+ if ( defaults.exportHiddenCells === false ) {
+ $hiddenTableElements = $table.find("tr, th, td").filter(":hidden");
+ checkCellVisibilty = $hiddenTableElements.length > 0;
+ }
+
+ rowIndex = 0;
+ ranges = [];
+ colNames = GetColumnNames(this);
+
+ // Header
+ docData += '';
+ $hrows = $table.find('thead').first().find(defaults.theadSelector);
+ $hrows.each(function () {
+ trData = "";
+ ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
+ function (cell, row, col) {
+ if ( cell !== null ) {
+ var thstyle = '';
+ trData += '' + parseString(cell, row, col) + ' ';
+ }
+ });
+ if ( trData.length > 0 )
+ docData += '' + trData + ' ';
+ rowIndex++;
+ });
+ docData += ' ';
+
+ // Data
+ $rows = collectRows ($table);
+ $($rows).each(function () {
+ var $row = $(this);
+ trData = "";
+ ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
+ function (cell, row, col) {
+ if ( cell !== null ) {
+ var tdvalue = parseString(cell, row, col);
+ var tdstyle = '';
+ var tdcss = $(cell).data("tableexport-msonumberformat");
+
+ if ( typeof tdcss == 'undefined' && typeof defaults.onMsoNumberFormat === 'function' )
+ tdcss = defaults.onMsoNumberFormat(cell, row, col);
+
+ if ( typeof tdcss != 'undefined' && tdcss !== '' )
+ tdstyle = 'style="mso-number-format:\'' + tdcss + '\'';
+
+ for ( var cssStyle in defaults.excelstyles ) {
+ if ( defaults.excelstyles.hasOwnProperty(cssStyle) ) {
+ tdcss = $(cell).css(defaults.excelstyles[cssStyle]);
+ if ( tdcss === '' )
+ tdcss = $row.css(defaults.excelstyles[cssStyle]);
+
+ if ( tdcss !== '' && tdcss != '0px none rgb(0, 0, 0)' && tdcss != 'rgba(0, 0, 0, 0)' ) {
+ tdstyle += (tdstyle === '') ? 'style="' : ';';
+ tdstyle += defaults.excelstyles[cssStyle] + ':' + tdcss;
+ }
+ }
+ }
+ trData += '');
+
+ trData += '>' + tdvalue + ' ';
+ }
+ });
+ if ( trData.length > 0 )
+ docData += '' + trData + ' ';
+ rowIndex++;
+ });
+
+ if ( defaults.displayTableName )
+ docData += '' + parseString($('' + defaults.tableName + '
')) + ' ';
+
+ docData += '
';
+
+ if ( defaults.consoleLog === true )
+ console.log(docData);
+ });
+
+ //noinspection XmlUnusedNamespaceDeclaration
+ var docFile = '';
+ docFile += ' ';
+ docFile += "";
+ if (MSDocType === 'excel') {
+ docFile += "";
+ }
+ docFile += "";
+ docFile += "";
+ docFile += "";
+ docFile += docData;
+ docFile += "";
+ docFile += "";
+
+ if ( defaults.consoleLog === true )
+ console.log(docFile);
+
+ if ( defaults.outputMode === 'string' )
+ return docFile;
+
+ if ( defaults.outputMode === 'base64' )
+ return base64encode(docFile);
+
+ try {
+ blob = new Blob([docFile], {type: 'application/vnd.ms-' + defaults.type});
+ saveAs(blob, defaults.fileName + '.' + MSDocExt);
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.' + MSDocExt,
+ 'data:application/vnd.ms-' + MSDocType + ';base64,',
+ docFile);
+ }
+
+ } else if ( defaults.type == 'xlsx' ) {
+
+ var data = [];
+ var spans = [];
+ rowIndex = 0;
+
+ $rows = $(el).find('thead').first().find(defaults.theadSelector).toArray();
+ $rows.push.apply($rows, collectRows ($(el)));
+
+ $($rows).each(function () {
+ var cols = [];
+ ForEachVisibleCell(this, 'th,td', rowIndex, $rows.length,
+ function (cell, row, col) {
+ if ( typeof cell !== 'undefined' && cell !== null ) {
+
+ var cellValue = parseString(cell, row, col);
+
+ var colspan = parseInt(cell.getAttribute('colspan'));
+ var rowspan = parseInt(cell.getAttribute('rowspan'));
+
+ // Skip span ranges
+ $.each(spans, function () {
+ var range = this;
+ if ( rowIndex >= range.s.r && rowIndex <= range.e.r && cols.length >= range.s.c && cols.length <= range.e.c ) {
+ for ( var i = 0; i <= range.e.c - range.s.c; ++i )
+ cols.push(null);
+ }
+ });
+
+ // Handle Row Span
+ if ( rowspan || colspan ) {
+ rowspan = rowspan || 1;
+ colspan = colspan || 1;
+ spans.push({
+ s: {r: rowIndex, c: cols.length},
+ e: {r: rowIndex + rowspan - 1, c: cols.length + colspan - 1}
+ });
+ }
+
+ // Handle Value
+ if ( typeof defaults.onCellData !== 'function' ) {
+
+ // Type conversion
+ if ( cellValue !== "" && cellValue == +cellValue )
+ cellValue = +cellValue;
+ }
+ cols.push(cellValue !== "" ? cellValue : null);
+
+ // Handle Colspan
+ if ( colspan )
+ for ( var k = 0; k < colspan - 1; ++k )
+ cols.push(null);
+ }
+ });
+ data.push(cols);
+ rowIndex++;
+ });
+
+ //noinspection JSPotentiallyInvalidConstructorUsage
+ var wb = new jx_Workbook(),
+ ws = jx_createSheet(data);
+
+ // add span ranges to worksheet
+ ws['!merges'] = spans;
+
+ // add worksheet to workbook
+ wb.SheetNames.push(defaults.worksheetName);
+ wb.Sheets[defaults.worksheetName] = ws;
+
+ var wbout = XLSX.write(wb, {bookType: defaults.type, bookSST: false, type: 'binary'});
+
+ try {
+ blob = new Blob([jx_s2ab(wbout)], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'});
+ saveAs(blob, defaults.fileName + '.' + defaults.type);
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.' + defaults.type,
+ 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8,',
+ jx_s2ab(wbout));
+ }
+
+ } else if ( defaults.type == 'png' ) {
+ //html2canvas($(el)[0], {
+ // onrendered: function (canvas) {
+ html2canvas($(el)[0]).then(
+ function (canvas) {
+
+ var image = canvas.toDataURL();
+ var byteString = atob(image.substring(22)); // remove data stuff
+ var buffer = new ArrayBuffer(byteString.length);
+ var intArray = new Uint8Array(buffer);
+
+ for ( var i = 0; i < byteString.length; i++ )
+ intArray[i] = byteString.charCodeAt(i);
+
+ if ( defaults.consoleLog === true )
+ console.log(byteString);
+
+ if ( defaults.outputMode === 'string' )
+ return byteString;
+
+ if ( defaults.outputMode === 'base64' )
+ return base64encode(image);
+
+ if ( defaults.outputMode === 'window' ) {
+ window.open(image);
+ return;
+ }
+
+ try {
+ blob = new Blob([buffer], {type: "image/png"});
+ saveAs(blob, defaults.fileName + '.png');
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.png', 'data:image/png,', blob);
+ }
+ //}
+ });
+
+ } else if ( defaults.type == 'pdf' ) {
+
+ if ( defaults.pdfmake.enabled === true ) {
+ // pdf output using pdfmake
+ // https://github.com/bpampuch/pdfmake
+
+ var widths = [];
+ var body = [];
+ rowIndex = 0;
+ ranges = [];
+
+ var CollectPdfmakeData = function ($rows, colselector, length) {
+ var rlength = 0;
+
+ $($rows).each(function () {
+ var r = [];
+
+ ForEachVisibleCell(this, colselector, rowIndex, length,
+ function (cell, row, col) {
+ if ( typeof cell !== 'undefined' && cell !== null ) {
+
+ var colspan = parseInt(cell.getAttribute('colspan'));
+ var rowspan = parseInt(cell.getAttribute('rowspan'));
+
+ var cellValue = parseString(cell, row, col) || " ";
+
+ if ( colspan > 1 || rowspan > 1 ) {
+ colspan = colspan || 1;
+ rowspan = rowspan || 1;
+ r.push({colSpan: colspan, rowSpan: rowspan, text: cellValue});
+ }
+ else
+ r.push(cellValue);
+ }
+ else
+ r.push(" ");
+ });
+
+ if ( r.length )
+ body.push(r);
+
+ if ( rlength < r.length )
+ rlength = r.length;
+
+ rowIndex++;
+ });
+
+ return rlength;
+ };
+
+ $hrows = $(this).find('thead').first().find(defaults.theadSelector);
+
+ var colcount = CollectPdfmakeData($hrows, 'th,td', $hrows.length);
+
+ for ( var i = widths.length; i < colcount; i++ )
+ widths.push("*");
+
+ // Data
+ $rows = collectRows ($(this));
+
+ CollectPdfmakeData($rows, 'th,td', $hrows.length + $rows.length);
+
+ var docDefinition = {
+ content: [{
+ table: {
+ headerRows: $hrows.length,
+ widths: widths,
+ body: body
+ }
+ }]
+ };
+
+ $.extend(true, docDefinition, defaults.pdfmake.docDefinition);
+
+ pdfMake.fonts = {
+ Roboto: {
+ normal: 'Roboto-Regular.ttf',
+ bold: 'Roboto-Medium.ttf',
+ italics: 'Roboto-Italic.ttf',
+ bolditalics: 'Roboto-MediumItalic.ttf'
+ }
+ };
+
+ $.extend(true, pdfMake.fonts, defaults.pdfmake.fonts);
+
+ pdfMake.createPdf(docDefinition).getBuffer(function (buffer) {
+
+ try {
+ var blob = new Blob([buffer], {type: "application/pdf"});
+ saveAs(blob, defaults.fileName + '.pdf');
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.pdf',
+ 'data:application/pdf;base64,',
+ buffer);
+ }
+ });
+
+ }
+ else if ( defaults.jspdf.autotable === false ) {
+ // pdf output using jsPDF's core html support
+
+ var addHtmlOptions = {
+ dim: {
+ w: getPropertyUnitValue($(el).first().get(0), 'width', 'mm'),
+ h: getPropertyUnitValue($(el).first().get(0), 'height', 'mm')
+ },
+ pagesplit: false
+ };
+
+ var doc = new jsPDF(defaults.jspdf.orientation, defaults.jspdf.unit, defaults.jspdf.format);
+ doc.addHTML($(el).first(),
+ defaults.jspdf.margins.left,
+ defaults.jspdf.margins.top,
+ addHtmlOptions,
+ function () {
+ jsPdfOutput(doc, false);
+ });
+ //delete doc;
+ }
+ else {
+ // pdf output using jsPDF AutoTable plugin
+ // https://github.com/simonbengtsson/jsPDF-AutoTable
+
+ var teOptions = defaults.jspdf.autotable.tableExport;
+
+ // When setting jspdf.format to 'bestfit' tableExport tries to choose
+ // the minimum required paper format and orientation in which the table
+ // (or tables in multitable mode) completely fits without column adjustment
+ if ( typeof defaults.jspdf.format === 'string' && defaults.jspdf.format.toLowerCase() === 'bestfit' ) {
+ var pageFormats = {
+ 'a0': [2383.94, 3370.39], 'a1': [1683.78, 2383.94],
+ 'a2': [1190.55, 1683.78], 'a3': [841.89, 1190.55],
+ 'a4': [595.28, 841.89]
+ };
+ var rk = '', ro = '';
+ var mw = 0;
+
+ $(el).each(function () {
+ if ( isVisible($(this)) ) {
+ var w = getPropertyUnitValue($(this).get(0), 'width', 'pt');
+
+ if ( w > mw ) {
+ if ( w > pageFormats.a0[0] ) {
+ rk = 'a0';
+ ro = 'l';
+ }
+ for ( var key in pageFormats ) {
+ if ( pageFormats.hasOwnProperty(key) ) {
+ if ( pageFormats[key][1] > w ) {
+ rk = key;
+ ro = 'l';
+ if ( pageFormats[key][0] > w )
+ ro = 'p';
+ }
+ }
+ }
+ mw = w;
+ }
+ }
+ });
+ defaults.jspdf.format = (rk === '' ? 'a4' : rk);
+ defaults.jspdf.orientation = (ro === '' ? 'w' : ro);
+ }
+
+ // The jsPDF doc object is stored in defaults.jspdf.autotable.tableExport,
+ // thus it can be accessed from any callback function
+ if ( teOptions.doc == null ) {
+ teOptions.doc = new jsPDF(defaults.jspdf.orientation,
+ defaults.jspdf.unit,
+ defaults.jspdf.format);
+
+ if ( typeof defaults.jspdf.onDocCreated === 'function' )
+ defaults.jspdf.onDocCreated(teOptions.doc);
+ }
+
+ if ( teOptions.outputImages === true )
+ teOptions.images = {};
+
+ if ( typeof teOptions.images != 'undefined' ) {
+ $(el).filter(function () {
+ return isVisible($(this));
+ }).each(function () {
+ var rowCount = 0;
+ ranges = [];
+
+ if ( defaults.exportHiddenCells === false ) {
+ $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden");
+ checkCellVisibilty = $hiddenTableElements.length > 0;
+ }
+
+ $hrows = $(this).find('thead').find(defaults.theadSelector);
+ $rows = collectRows ($(this));
+
+ $($rows).each(function () {
+ ForEachVisibleCell(this, 'td,th', $hrows.length + rowCount, $hrows.length + $rows.length,
+ function (cell) {
+ if ( typeof cell !== 'undefined' && cell !== null ) {
+ var kids = $(cell).children();
+ if ( typeof kids != 'undefined' && kids.length > 0 )
+ collectImages(cell, kids, teOptions);
+ }
+ });
+ rowCount++;
+ });
+ });
+
+ $hrows = [];
+ $rows = [];
+ }
+
+ loadImages(teOptions, function () {
+ $(el).filter(function () {
+ return isVisible($(this));
+ }).each(function () {
+ var colKey;
+ rowIndex = 0;
+ ranges = [];
+
+ if ( defaults.exportHiddenCells === false ) {
+ $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden");
+ checkCellVisibilty = $hiddenTableElements.length > 0;
+ }
+
+ colNames = GetColumnNames(this);
+
+ teOptions.columns = [];
+ teOptions.rows = [];
+ teOptions.rowoptions = {};
+
+ // onTable: optional callback function for every matching table that can be used
+ // to modify the tableExport options or to skip the output of a particular table
+ // if the table selector targets multiple tables
+ if ( typeof teOptions.onTable === 'function' )
+ if ( teOptions.onTable($(this), defaults) === false )
+ return true; // continue to next iteration step (table)
+
+ // each table works with an own copy of AutoTable options
+ defaults.jspdf.autotable.tableExport = null; // avoid deep recursion error
+ var atOptions = $.extend(true, {}, defaults.jspdf.autotable);
+ defaults.jspdf.autotable.tableExport = teOptions;
+
+ atOptions.margin = {};
+ $.extend(true, atOptions.margin, defaults.jspdf.margins);
+ atOptions.tableExport = teOptions;
+
+ // Fix jsPDF Autotable's row height calculation
+ if ( typeof atOptions.beforePageContent !== 'function' ) {
+ atOptions.beforePageContent = function (data) {
+ if ( data.pageCount == 1 ) {
+ var all = data.table.rows.concat(data.table.headerRow);
+ $.each(all, function () {
+ var row = this;
+ if ( row.height > 0 ) {
+ row.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize;
+ data.table.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize;
+ }
+ });
+ }
+ };
+ }
+
+ if ( typeof atOptions.createdHeaderCell !== 'function' ) {
+ // apply some original css styles to pdf header cells
+ atOptions.createdHeaderCell = function (cell, data) {
+
+ // jsPDF AutoTable plugin v2.0.14 fix: each cell needs its own styles object
+ cell.styles = $.extend({}, data.row.styles);
+
+ if ( typeof teOptions.columns [data.column.dataKey] != 'undefined' ) {
+ var col = teOptions.columns [data.column.dataKey];
+
+ if ( typeof col.rect != 'undefined' ) {
+ var rh;
+
+ cell.contentWidth = col.rect.width;
+
+ if ( typeof teOptions.heightRatio == 'undefined' || teOptions.heightRatio === 0 ) {
+ if ( data.row.raw [data.column.dataKey].rowspan )
+ rh = data.row.raw [data.column.dataKey].rect.height / data.row.raw [data.column.dataKey].rowspan;
+ else
+ rh = data.row.raw [data.column.dataKey].rect.height;
+
+ teOptions.heightRatio = cell.styles.rowHeight / rh;
+ }
+
+ rh = data.row.raw [data.column.dataKey].rect.height * teOptions.heightRatio;
+ if ( rh > cell.styles.rowHeight )
+ cell.styles.rowHeight = rh;
+ }
+
+ if ( typeof col.style != 'undefined' && col.style.hidden !== true ) {
+ cell.styles.halign = col.style.align;
+ if ( atOptions.styles.fillColor === 'inherit' )
+ cell.styles.fillColor = col.style.bcolor;
+ if ( atOptions.styles.textColor === 'inherit' )
+ cell.styles.textColor = col.style.color;
+ if ( atOptions.styles.fontStyle === 'inherit' )
+ cell.styles.fontStyle = col.style.fstyle;
+ }
+ }
+ };
+ }
+
+ if ( typeof atOptions.createdCell !== 'function' ) {
+ // apply some original css styles to pdf table cells
+ atOptions.createdCell = function (cell, data) {
+ var rowopt = teOptions.rowoptions [data.row.index + ":" + data.column.dataKey];
+
+ if ( typeof rowopt != 'undefined' &&
+ typeof rowopt.style != 'undefined' &&
+ rowopt.style.hidden !== true ) {
+ cell.styles.halign = rowopt.style.align;
+ if ( atOptions.styles.fillColor === 'inherit' )
+ cell.styles.fillColor = rowopt.style.bcolor;
+ if ( atOptions.styles.textColor === 'inherit' )
+ cell.styles.textColor = rowopt.style.color;
+ if ( atOptions.styles.fontStyle === 'inherit' )
+ cell.styles.fontStyle = rowopt.style.fstyle;
+ }
+ };
+ }
+
+ if ( typeof atOptions.drawHeaderCell !== 'function' ) {
+ atOptions.drawHeaderCell = function (cell, data) {
+ var colopt = teOptions.columns [data.column.dataKey];
+
+ if ( (colopt.style.hasOwnProperty("hidden") !== true || colopt.style.hidden !== true) &&
+ colopt.rowIndex >= 0 )
+ return prepareAutoTableText(cell, data, colopt);
+ else
+ return false; // cell is hidden
+ };
+ }
+
+ if ( typeof atOptions.drawCell !== 'function' ) {
+ atOptions.drawCell = function (cell, data) {
+ var rowopt = teOptions.rowoptions [data.row.index + ":" + data.column.dataKey];
+ if ( prepareAutoTableText(cell, data, rowopt) ) {
+
+ teOptions.doc.rect(cell.x, cell.y, cell.width, cell.height, cell.styles.fillStyle);
+
+ if ( typeof rowopt != 'undefined' && typeof rowopt.kids != 'undefined' && rowopt.kids.length > 0 ) {
+
+ var dh = cell.height / rowopt.rect.height;
+ if ( dh > teOptions.dh || typeof teOptions.dh == 'undefined' )
+ teOptions.dh = dh;
+ teOptions.dw = cell.width / rowopt.rect.width;
+
+ var y = cell.textPos.y;
+ drawAutotableElements(cell, rowopt.kids, teOptions);
+ cell.textPos.y = y;
+ drawAutotableText(cell, rowopt.kids, teOptions);
+ }
+ else
+ drawAutotableText(cell, {}, teOptions);
+ }
+ return false;
+ };
+ }
+
+ // collect header and data rows
+ teOptions.headerrows = [];
+ $hrows = $(this).find('thead').find(defaults.theadSelector);
+ $hrows.each(function () {
+ colKey = 0;
+ teOptions.headerrows[rowIndex] = [];
+
+ ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length,
+ function (cell, row, col) {
+ var obj = getCellStyles(cell);
+ obj.title = parseString(cell, row, col);
+ obj.key = colKey++;
+ obj.rowIndex = rowIndex;
+ teOptions.headerrows[rowIndex].push(obj);
+ });
+ rowIndex++;
+ });
+
+ if ( rowIndex > 0 ) {
+ // iterate through last row
+ var lastrow = rowIndex - 1;
+ while ( lastrow >= 0 ) {
+ $.each(teOptions.headerrows[lastrow], function () {
+ var obj = this;
+
+ if ( lastrow > 0 && this.rect === null )
+ obj = teOptions.headerrows[lastrow - 1][this.key];
+
+ if ( obj !== null && obj.rowIndex >= 0 &&
+ (obj.style.hasOwnProperty("hidden") !== true || obj.style.hidden !== true) )
+ teOptions.columns.push(obj);
+ });
+
+ lastrow = (teOptions.columns.length > 0) ? -1 : lastrow - 1;
+ }
+ }
+
+ var rowCount = 0;
+ $rows = [];
+ $rows = collectRows ($(this));
+ $($rows).each(function () {
+ var rowData = [];
+ colKey = 0;
+
+ ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length,
+ function (cell, row, col) {
+ var obj;
+
+ if ( typeof teOptions.columns[colKey] === 'undefined' ) {
+ // jsPDF-Autotable needs columns. Thus define hidden ones for tables without thead
+ obj = {
+ title: '',
+ key: colKey,
+ style: {
+ hidden: true
+ }
+ };
+ teOptions.columns.push(obj);
+ }
+ if ( typeof cell !== 'undefined' && cell !== null ) {
+ obj = getCellStyles(cell);
+ obj.kids = $(cell).children();
+ teOptions.rowoptions [rowCount + ":" + colKey++] = obj;
+ }
+ else {
+ obj = $.extend(true, {}, teOptions.rowoptions [rowCount + ":" + (colKey - 1)]);
+ obj.colspan = -1;
+ teOptions.rowoptions [rowCount + ":" + colKey++] = obj;
+ }
+
+ rowData.push(parseString(cell, row, col));
+ });
+ if ( rowData.length ) {
+ teOptions.rows.push(rowData);
+ rowCount++;
+ }
+ rowIndex++;
+ });
+
+ // onBeforeAutotable: optional callback function before calling
+ // jsPDF AutoTable that can be used to modify the AutoTable options
+ if ( typeof teOptions.onBeforeAutotable === 'function' )
+ teOptions.onBeforeAutotable($(this), teOptions.columns, teOptions.rows, atOptions);
+
+ teOptions.doc.autoTable(teOptions.columns, teOptions.rows, atOptions);
+
+ // onAfterAutotable: optional callback function after returning
+ // from jsPDF AutoTable that can be used to modify the AutoTable options
+ if ( typeof teOptions.onAfterAutotable === 'function' )
+ teOptions.onAfterAutotable($(this), atOptions);
+
+ // set the start position for the next table (in case there is one)
+ defaults.jspdf.autotable.startY = teOptions.doc.autoTableEndPosY() + atOptions.margin.top;
+
+ });
+
+ jsPdfOutput(teOptions.doc, (typeof teOptions.images != 'undefined' && jQuery.isEmptyObject(teOptions.images) === false));
+
+ if ( typeof teOptions.headerrows != 'undefined' )
+ teOptions.headerrows.length = 0;
+ if ( typeof teOptions.columns != 'undefined' )
+ teOptions.columns.length = 0;
+ if ( typeof teOptions.rows != 'undefined' )
+ teOptions.rows.length = 0;
+ delete teOptions.doc;
+ teOptions.doc = null;
+ });
+ }
+ }
+
+ /*
+ function FindColObject (objects, colIndex, rowIndex) {
+ var result = null;
+ $.each(objects, function () {
+ if ( this.rowIndex == rowIndex && this.key == colIndex ) {
+ result = this;
+ return false;
+ }
+ });
+ return result;
+ }
+ */
+ function collectRows ($table) {
+ var result = [];
+ findTablePart($table,'tbody').each(function () {
+ result.push.apply(result, findRows($(this), defaults.tbodySelector).toArray());
+ });
+ if ( defaults.tfootSelector.length ) {
+ findTablePart($table,'tfoot').each(function () {
+ result.push.apply(result, findRows($(this), defaults.tfootSelector).toArray());
+ });
+ }
+ return result;
+ }
+
+ function findTablePart ($table, type) {
+ var tl = $table.parents('table').length;
+ return $table.find(type).filter (function () {
+ return $(this).closest('table').parents('table').length === tl;
+ });
+ }
+
+ function findRows ($tpart, rowSelector) {
+ return $tpart.find(rowSelector).filter (function () {
+ return $(this).find('table').length === 0 && $(this).parents('table').length === 1;
+ });
+ }
+
+ function GetColumnNames (table) {
+ var result = [];
+ $(table).find('thead').first().find('th').each(function (index, el) {
+ if ( $(el).attr("data-field") !== undefined )
+ result[index] = $(el).attr("data-field");
+ else
+ result[index] = index.toString();
+ });
+ return result;
+ }
+
+ function isVisible ($element) {
+ var isCell = typeof $element[0].cellIndex !== 'undefined';
+ var isRow = typeof $element[0].rowIndex !== 'undefined';
+ var isElementVisible = (isCell || isRow) ? isTableElementVisible($element) : $element.is(':visible');
+ var tableexportDisplay = $element.data("tableexport-display");
+
+ if (isCell && tableexportDisplay != 'none' && tableexportDisplay != 'always') {
+ $element = $($element[0].parentNode);
+ isRow = typeof $element[0].rowIndex !== 'undefined';
+ tableexportDisplay = $element.data("tableexport-display");
+ }
+ if (isRow && tableexportDisplay != 'none' && tableexportDisplay != 'always') {
+ tableexportDisplay = $element.closest('table').data("tableexport-display");
+ }
+
+ return tableexportDisplay !== 'none' && (isElementVisible == true || tableexportDisplay == 'always');
+ }
+
+ function isTableElementVisible ($element) {
+ var hiddenEls = [];
+
+ if ( checkCellVisibilty ) {
+ hiddenEls = $hiddenTableElements.filter (function () {
+ var found = false;
+
+ if (this.nodeType == $element[0].nodeType) {
+ if (typeof this.rowIndex !== 'undefined' && this.rowIndex == $element[0].rowIndex)
+ found = true;
+ else if (typeof this.cellIndex !== 'undefined' && this.cellIndex == $element[0].cellIndex &&
+ typeof this.parentNode.rowIndex !== 'undefined' &&
+ typeof $element[0].parentNode.rowIndex !== 'undefined' &&
+ this.parentNode.rowIndex == $element[0].parentNode.rowIndex)
+ found = true;
+ }
+ return found;
+ });
+ }
+ return (checkCellVisibilty == false || hiddenEls.length == 0);
+ }
+
+ function isColumnIgnored ($cell, rowLength, colIndex) {
+ var result = false;
+
+ if (isVisible($cell)) {
+ if ( defaults.ignoreColumn.length > 0 ) {
+ if ( $.inArray(colIndex, defaults.ignoreColumn) != -1 ||
+ $.inArray(colIndex - rowLength, defaults.ignoreColumn) != -1 ||
+ (colNames.length > colIndex && typeof colNames[colIndex] != 'undefined' &&
+ $.inArray(colNames[colIndex], defaults.ignoreColumn) != -1) )
+ result = true;
+ }
+ }
+ else
+ result = true;
+
+ return result;
+ }
+
+ function ForEachVisibleCell (tableRow, selector, rowIndex, rowCount, cellcallback) {
+ if ( typeof (cellcallback) === 'function' ) {
+ var ignoreRow = false;
+
+ if (typeof defaults.onIgnoreRow === 'function')
+ ignoreRow = defaults.onIgnoreRow($(tableRow), rowIndex);
+
+ if (ignoreRow === false &&
+ $.inArray(rowIndex, defaults.ignoreRow) == -1 &&
+ $.inArray(rowIndex - rowCount, defaults.ignoreRow) == -1 &&
+ isVisible($(tableRow))) {
+
+ var $cells = $(tableRow).find(selector);
+ var cellCount = 0;
+
+ $cells.each(function (colIndex) {
+ var $cell = $(this);
+ var c;
+ var colspan = parseInt(this.getAttribute('colspan'));
+ var rowspan = parseInt(this.getAttribute('rowspan'));
+
+ // Skip ranges
+ $.each(ranges, function () {
+ var range = this;
+ if ( rowIndex >= range.s.r && rowIndex <= range.e.r && cellCount >= range.s.c && cellCount <= range.e.c ) {
+ for ( c = 0; c <= range.e.c - range.s.c; ++c )
+ cellcallback(null, rowIndex, cellCount++);
+ }
+ });
+
+ if ( isColumnIgnored($cell, $cells.length, colIndex) === false ) {
+ // Handle Row Span
+ if ( rowspan || colspan ) {
+ rowspan = rowspan || 1;
+ colspan = colspan || 1;
+ ranges.push({
+ s: {r: rowIndex, c: cellCount},
+ e: {r: rowIndex + rowspan - 1, c: cellCount + colspan - 1}
+ });
+ }
+
+ // Handle Value
+ cellcallback(this, rowIndex, cellCount++);
+ }
+
+ // Handle Colspan
+ if ( colspan )
+ for ( c = 0; c < colspan - 1; ++c )
+ cellcallback(null, rowIndex, cellCount++);
+ });
+
+ // Skip ranges
+ $.each(ranges, function () {
+ var range = this;
+ if ( rowIndex >= range.s.r && rowIndex <= range.e.r && cellCount >= range.s.c && cellCount <= range.e.c ) {
+ for ( c = 0; c <= range.e.c - range.s.c; ++c )
+ cellcallback(null, rowIndex, cellCount++);
+ }
+ });
+ }
+ }
+ }
+
+ function jsPdfOutput (doc, hasimages) {
+ if ( defaults.consoleLog === true )
+ console.log(doc.output());
+
+ if ( defaults.outputMode === 'string' )
+ return doc.output();
+
+ if ( defaults.outputMode === 'base64' )
+ return base64encode(doc.output());
+
+ if ( defaults.outputMode === 'window' ) {
+ window.URL = window.URL || window.webkitURL;
+ window.open(window.URL.createObjectURL(doc.output("blob")));
+ return;
+ }
+
+ try {
+ var blob = doc.output('blob');
+ saveAs(blob, defaults.fileName + '.pdf');
+ }
+ catch (e) {
+ downloadFile(defaults.fileName + '.pdf',
+ 'data:application/pdf' + (hasimages ? '' : ';base64') + ',',
+ hasimages ? doc.output('blob') : doc.output());
+ }
+ }
+
+ function prepareAutoTableText (cell, data, cellopt) {
+ var cs = 0;
+ if ( typeof cellopt !== 'undefined' )
+ cs = cellopt.colspan;
+
+ if ( cs >= 0 ) {
+ // colspan handling
+ var cellWidth = cell.width;
+ var textPosX = cell.textPos.x;
+ var i = data.table.columns.indexOf(data.column);
+
+ for ( var c = 1; c < cs; c++ ) {
+ var column = data.table.columns[i + c];
+ cellWidth += column.width;
+ }
+
+ if ( cs > 1 ) {
+ if ( cell.styles.halign === 'right' )
+ textPosX = cell.textPos.x + cellWidth - cell.width;
+ else if ( cell.styles.halign === 'center' )
+ textPosX = cell.textPos.x + (cellWidth - cell.width) / 2;
+ }
+
+ cell.width = cellWidth;
+ cell.textPos.x = textPosX;
+
+ if ( typeof cellopt !== 'undefined' && cellopt.rowspan > 1 )
+ cell.height = cell.height * cellopt.rowspan;
+
+ // fix jsPDF's calculation of text position
+ if ( cell.styles.valign === 'middle' || cell.styles.valign === 'bottom' ) {
+ var splittedText = typeof cell.text === 'string' ? cell.text.split(/\r\n|\r|\n/g) : cell.text;
+ var lineCount = splittedText.length || 1;
+ if ( lineCount > 2 )
+ cell.textPos.y -= ((2 - FONT_ROW_RATIO) / 2 * data.row.styles.fontSize) * (lineCount - 2) / 3;
+ }
+ return true;
+ }
+ else
+ return false; // cell is hidden (colspan = -1), don't draw it
+ }
+
+ function collectImages (cell, elements, teOptions) {
+ if ( typeof teOptions.images != 'undefined' ) {
+ elements.each(function () {
+ var kids = $(this).children();
+
+ if ( $(this).is("img") ) {
+ var hash = strHashCode(this.src);
+
+ teOptions.images[hash] = {
+ url: this.src,
+ src: this.src
+ };
+ }
+
+ if ( typeof kids != 'undefined' && kids.length > 0 )
+ collectImages(cell, kids, teOptions);
+ });
+ }
+ }
+
+ function loadImages (teOptions, callback) {
+ var i;
+ var imageCount = 0;
+ var x = 0;
+
+ function done () {
+ callback(imageCount);
+ }
+
+ function loadImage (image) {
+ if ( !image.url )
+ return;
+ var img = new Image();
+ imageCount = ++x;
+ img.crossOrigin = 'Anonymous';
+ img.onerror = img.onload = function () {
+ if ( img.complete ) {
+
+ if ( img.src.indexOf('data:image/') === 0 ) {
+ img.width = image.width || img.width || 0;
+ img.height = image.height || img.height || 0;
+ }
+
+ if ( img.width + img.height ) {
+ var canvas = document.createElement("canvas");
+ var ctx = canvas.getContext("2d");
+
+ canvas.width = img.width;
+ canvas.height = img.height;
+ ctx.drawImage(img, 0, 0);
+
+ image.src = canvas.toDataURL("image/jpeg");
+ }
+ }
+ if ( !--x )
+ done();
+ };
+ img.src = image.url;
+ }
+
+ if ( typeof teOptions.images != 'undefined' ) {
+ for ( i in teOptions.images )
+ if ( teOptions.images.hasOwnProperty(i) )
+ loadImage(teOptions.images[i]);
+ }
+
+ return x || done();
+ }
+
+ function drawAutotableElements (cell, elements, teOptions) {
+ elements.each(function () {
+ var kids = $(this).children();
+ var uy = 0;
+
+ if ( $(this).is("div") ) {
+ var bcolor = rgb2array(getStyle(this, 'background-color'), [255, 255, 255]);
+ var lcolor = rgb2array(getStyle(this, 'border-top-color'), [0, 0, 0]);
+ var lwidth = getPropertyUnitValue(this, 'border-top-width', defaults.jspdf.unit);
+
+ var r = this.getBoundingClientRect();
+ var ux = this.offsetLeft * teOptions.dw;
+ uy = this.offsetTop * teOptions.dh;
+ var uw = r.width * teOptions.dw;
+ var uh = r.height * teOptions.dh;
+
+ teOptions.doc.setDrawColor.apply(undefined, lcolor);
+ teOptions.doc.setFillColor.apply(undefined, bcolor);
+ teOptions.doc.setLineWidth(lwidth);
+ teOptions.doc.rect(cell.x + ux, cell.y + uy, uw, uh, lwidth ? "FD" : "F");
+ }
+ else if ( $(this).is("img") ) {
+ if ( typeof teOptions.images != 'undefined' ) {
+ var hash = strHashCode(this.src);
+ var image = teOptions.images[hash];
+
+ if ( typeof image != 'undefined' ) {
+
+ var arCell = cell.width / cell.height;
+ var arImg = this.width / this.height;
+ var imgWidth = cell.width;
+ var imgHeight = cell.height;
+ var px2pt = 0.264583 * 72 / 25.4;
+
+ if ( arImg <= arCell ) {
+ imgHeight = Math.min(cell.height, this.height);
+ imgWidth = this.width * imgHeight / this.height;
+ }
+ else if ( arImg > arCell ) {
+ imgWidth = Math.min(cell.width, this.width);
+ imgHeight = this.height * imgWidth / this.width;
+ }
+
+ imgWidth *= px2pt;
+ imgHeight *= px2pt;
+
+ if ( imgHeight < cell.height )
+ uy = (cell.height - imgHeight) / 2;
+
+ try {
+ teOptions.doc.addImage(image.src, cell.textPos.x, cell.y + uy, imgWidth, imgHeight);
+ }
+ catch (e) {
+ // TODO: IE -> convert png to jpeg
+ }
+ cell.textPos.x += imgWidth;
+ }
+ }
+ }
+
+ if ( typeof kids != 'undefined' && kids.length > 0 )
+ drawAutotableElements(cell, kids, teOptions);
+ });
+ }
+
+ function drawAutotableText (cell, texttags, teOptions) {
+ if ( typeof teOptions.onAutotableText === 'function' ) {
+ teOptions.onAutotableText(teOptions.doc, cell, texttags);
+ }
+ else {
+ var x = cell.textPos.x;
+ var y = cell.textPos.y;
+ var style = {halign: cell.styles.halign, valign: cell.styles.valign};
+
+ if ( texttags.length ) {
+ var tag = texttags[0];
+ while ( tag.previousSibling )
+ tag = tag.previousSibling;
+
+ var b = false, i = false;
+
+ while ( tag ) {
+ var txt = tag.innerText || tag.textContent || "";
+
+ txt = ((txt.length && txt[0] == " ") ? " " : "") +
+ $.trim(txt) +
+ ((txt.length > 1 && txt[txt.length - 1] == " ") ? " " : "");
+
+ if ( $(tag).is("br") ) {
+ x = cell.textPos.x;
+ y += teOptions.doc.internal.getFontSize();
+ }
+
+ if ( $(tag).is("b") )
+ b = true;
+ else if ( $(tag).is("i") )
+ i = true;
+
+ if ( b || i )
+ teOptions.doc.setFontType((b && i) ? "bolditalic" : b ? "bold" : "italic");
+
+ var w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize();
+
+ if ( w ) {
+ if ( cell.styles.overflow === 'linebreak' &&
+ x > cell.textPos.x && (x + w) > (cell.textPos.x + cell.width) ) {
+ var chars = ".,!%*;:=-";
+ if ( chars.indexOf(txt.charAt(0)) >= 0 ) {
+ var s = txt.charAt(0);
+ w = teOptions.doc.getStringUnitWidth(s) * teOptions.doc.internal.getFontSize();
+ if ( (x + w) <= (cell.textPos.x + cell.width) ) {
+ teOptions.doc.autoTableText(s, x, y, style);
+ txt = txt.substring(1, txt.length);
+ }
+ w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize();
+ }
+ x = cell.textPos.x;
+ y += teOptions.doc.internal.getFontSize();
+ }
+
+ while ( txt.length && (x + w) > (cell.textPos.x + cell.width) ) {
+ txt = txt.substring(0, txt.length - 1);
+ w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize();
+ }
+
+ teOptions.doc.autoTableText(txt, x, y, style);
+ x += w;
+ }
+
+ if ( b || i ) {
+ if ( $(tag).is("b") )
+ b = false;
+ else if ( $(tag).is("i") )
+ i = false;
+
+ teOptions.doc.setFontType((!b && !i) ? "normal" : b ? "bold" : "italic");
+ }
+
+ tag = tag.nextSibling;
+ }
+ cell.textPos.x = x;
+ cell.textPos.y = y;
+ }
+ else {
+ teOptions.doc.autoTableText(cell.text, cell.textPos.x, cell.textPos.y, style);
+ }
+ }
+ }
+
+ function escapeRegExp (string) {
+ return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
+ }
+
+ function replaceAll (string, find, replace) {
+ return string.replace(new RegExp(escapeRegExp(find), 'g'), replace);
+ }
+
+ function parseNumber (value) {
+ value = value || "0";
+ value = replaceAll(value, defaults.numbers.html.thousandsSeparator, '');
+ value = replaceAll(value, defaults.numbers.html.decimalMark, '.');
+
+ return typeof value === "number" || jQuery.isNumeric(value) !== false ? value : false;
+ }
+
+ function parsePercent (value) {
+ if ( value.indexOf("%") > -1 ) {
+ value = parseNumber(value.replace(/%/g, ""));
+ if ( value !== false )
+ value = value / 100;
+ }
+ else
+ value = false;
+ return value;
+ }
+
+ function parseString (cell, rowIndex, colIndex) {
+ var result = '';
+
+ if ( cell !== null ) {
+ var $cell = $(cell);
+ var htmlData;
+
+ if ( $cell[0].hasAttribute("data-tableexport-value") ) {
+ htmlData = $cell.data("tableexport-value");
+ htmlData = htmlData ? htmlData + '' : ''
+ }
+ else {
+ htmlData = $cell.html();
+
+ if ( typeof defaults.onCellHtmlData === 'function' )
+ htmlData = defaults.onCellHtmlData($cell, rowIndex, colIndex, htmlData);
+ else if ( htmlData != '' ) {
+ var html = $.parseHTML(htmlData);
+ var inputidx = 0;
+ var selectidx = 0;
+
+ htmlData = '';
+ $.each(html, function () {
+ if ( $(this).is("input") )
+ htmlData += $cell.find('input').eq(inputidx++).val();
+ else if ( $(this).is("select") )
+ htmlData += $cell.find('select option:selected').eq(selectidx++).text();
+ else {
+ if ( typeof $(this).html() === 'undefined' )
+ htmlData += $(this).text();
+ else if ( jQuery().bootstrapTable === undefined ||
+ ($(this).hasClass('filterControl') !== true &&
+ $(cell).parents('.detail-view').length === 0) )
+ htmlData += $(this).html();
+ }
+ });
+ }
+ }
+
+ if ( defaults.htmlContent === true ) {
+ result = $.trim(htmlData);
+ }
+ else if ( htmlData && htmlData != '' ) {
+ var cellFormat = $(cell).data("tableexport-cellformat");
+
+ if ( cellFormat != '' ) {
+ var text = htmlData.replace(/\n/g, '\u2028').replace(/ /gi, '\u2060');
+ var obj = $('
').html(text).contents();
+ var number = false;
+ text = '';
+ $.each(obj.text().split("\u2028"), function (i, v) {
+ if ( i > 0 )
+ text += " ";
+ text += $.trim(v);
+ });
+
+ $.each(text.split("\u2060"), function (i, v) {
+ if ( i > 0 )
+ result += "\n";
+ result += $.trim(v).replace(/\u00AD/g, ""); // remove soft hyphens
+ });
+
+ if ( defaults.type == 'json' ||
+ (defaults.type === 'excel' && defaults.excelFileFormat === 'xmlss') ||
+ defaults.numbers.output === false ) {
+ number = parseNumber(result);
+
+ if ( number !== false )
+ result = Number(number);
+ }
+ else if ( defaults.numbers.html.decimalMark != defaults.numbers.output.decimalMark ||
+ defaults.numbers.html.thousandsSeparator != defaults.numbers.output.thousandsSeparator ) {
+ number = parseNumber(result);
+
+ if ( number !== false ) {
+ var frac = ("" + number.substr(number < 0 ? 1 : 0)).split('.');
+ if ( frac.length == 1 )
+ frac[1] = "";
+ var mod = frac[0].length > 3 ? frac[0].length % 3 : 0;
+
+ result = (number < 0 ? "-" : "") +
+ (defaults.numbers.output.thousandsSeparator ? ((mod ? frac[0].substr(0, mod) + defaults.numbers.output.thousandsSeparator : "") + frac[0].substr(mod).replace(/(\d{3})(?=\d)/g, "$1" + defaults.numbers.output.thousandsSeparator)) : frac[0]) +
+ (frac[1].length ? defaults.numbers.output.decimalMark + frac[1] : "");
+ }
+ }
+ }
+ else
+ result = htmlData;
+ }
+
+ if ( defaults.escape === true ) {
+ //noinspection JSDeprecatedSymbols
+ result = escape(result);
+ }
+
+ if ( typeof defaults.onCellData === 'function' ) {
+ result = defaults.onCellData($cell, rowIndex, colIndex, result);
+ }
+ }
+
+ return result;
+ }
+
+ //noinspection JSUnusedLocalSymbols
+ function hyphenate (a, b, c) {
+ return b + "-" + c.toLowerCase();
+ }
+
+ function rgb2array (rgb_string, default_result) {
+ var re = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;
+ var bits = re.exec(rgb_string);
+ var result = default_result;
+ if ( bits )
+ result = [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];
+ return result;
+ }
+
+ function getCellStyles (cell) {
+ var a = getStyle(cell, 'text-align');
+ var fw = getStyle(cell, 'font-weight');
+ var fs = getStyle(cell, 'font-style');
+ var f = '';
+ if ( a == 'start' )
+ a = getStyle(cell, 'direction') == 'rtl' ? 'right' : 'left';
+ if ( fw >= 700 )
+ f = 'bold';
+ if ( fs == 'italic' )
+ f += fs;
+ if ( f === '' )
+ f = 'normal';
+
+ var result = {
+ style: {
+ align: a,
+ bcolor: rgb2array(getStyle(cell, 'background-color'), [255, 255, 255]),
+ color: rgb2array(getStyle(cell, 'color'), [0, 0, 0]),
+ fstyle: f
+ },
+ colspan: (parseInt($(cell).attr('colspan')) || 0),
+ rowspan: (parseInt($(cell).attr('rowspan')) || 0)
+ };
+
+ if ( cell !== null ) {
+ var r = cell.getBoundingClientRect();
+ result.rect = {
+ width: r.width,
+ height: r.height
+ };
+ }
+
+ return result;
+ }
+
+ // get computed style property
+ function getStyle (target, prop) {
+ try {
+ if ( window.getComputedStyle ) { // gecko and webkit
+ prop = prop.replace(/([a-z])([A-Z])/, hyphenate); // requires hyphenated, not camel
+ return window.getComputedStyle(target, null).getPropertyValue(prop);
+ }
+ if ( target.currentStyle ) { // ie
+ return target.currentStyle[prop];
+ }
+ return target.style[prop];
+ }
+ catch (e) {
+ }
+ return "";
+ }
+
+ function getUnitValue (parent, value, unit) {
+ var baseline = 100; // any number serves
+
+ var temp = document.createElement("div"); // create temporary element
+ temp.style.overflow = "hidden"; // in case baseline is set too low
+ temp.style.visibility = "hidden"; // no need to show it
+
+ parent.appendChild(temp); // insert it into the parent for em, ex and %
+
+ temp.style.width = baseline + unit;
+ var factor = baseline / temp.offsetWidth;
+
+ parent.removeChild(temp); // clean up
+
+ return (value * factor);
+ }
+
+ function getPropertyUnitValue (target, prop, unit) {
+ var value = getStyle(target, prop); // get the computed style value
+
+ var numeric = value.match(/\d+/); // get the numeric component
+ if ( numeric !== null ) {
+ numeric = numeric[0]; // get the string
+
+ return getUnitValue(target.parentElement, numeric, unit);
+ }
+ return 0;
+ }
+
+ function jx_Workbook () {
+ if ( !(this instanceof jx_Workbook) ) {
+ //noinspection JSPotentiallyInvalidConstructorUsage
+ return new jx_Workbook();
+ }
+ this.SheetNames = [];
+ this.Sheets = {};
+ }
+
+ function jx_s2ab (s) {
+ var buf = new ArrayBuffer(s.length);
+ var view = new Uint8Array(buf);
+ for ( var i = 0; i != s.length; ++i ) view[i] = s.charCodeAt(i) & 0xFF;
+ return buf;
+ }
+
+ function jx_datenum (v, date1904) {
+ if ( date1904 ) v += 1462;
+ var epoch = Date.parse(v);
+ return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
+ }
+
+ function jx_createSheet (data) {
+ var ws = {};
+ var range = {s: {c: 10000000, r: 10000000}, e: {c: 0, r: 0}};
+ for ( var R = 0; R != data.length; ++R ) {
+ for ( var C = 0; C != data[R].length; ++C ) {
+ if ( range.s.r > R ) range.s.r = R;
+ if ( range.s.c > C ) range.s.c = C;
+ if ( range.e.r < R ) range.e.r = R;
+ if ( range.e.c < C ) range.e.c = C;
+ var cell = {v: data[R][C]};
+ if ( cell.v === null ) continue;
+ var cell_ref = XLSX.utils.encode_cell({c: C, r: R});
+
+ if ( typeof cell.v === 'number' ) cell.t = 'n';
+ else if ( typeof cell.v === 'boolean' ) cell.t = 'b';
+ else if ( cell.v instanceof Date ) {
+ cell.t = 'n';
+ cell.z = XLSX.SSF._table[14];
+ cell.v = jx_datenum(cell.v);
+ }
+ else cell.t = 's';
+ ws[cell_ref] = cell;
+ }
+ }
+
+ if ( range.s.c < 10000000 ) ws['!ref'] = XLSX.utils.encode_range(range);
+ return ws;
+ }
+
+ function strHashCode (str) {
+ var hash = 0, i, chr, len;
+ if ( str.length === 0 ) return hash;
+ for ( i = 0, len = str.length; i < len; i++ ) {
+ chr = str.charCodeAt(i);
+ hash = ((hash << 5) - hash) + chr;
+ hash |= 0; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+ function downloadFile (filename, header, data) {
+ var ua = window.navigator.userAgent;
+ if ( filename !== false && window.navigator.msSaveOrOpenBlob ) {
+ //noinspection JSUnresolvedFunction
+ window.navigator.msSaveOrOpenBlob(new Blob([data]), filename);
+ }
+ else if ( filename !== false && (ua.indexOf("MSIE ") > 0 || !!ua.match(/Trident.*rv\:11\./)) ) {
+ // Internet Explorer (<= 9) workaround by Darryl (https://github.com/dawiong/tableExport.jquery.plugin)
+ // based on sampopes answer on http://stackoverflow.com/questions/22317951
+ // ! Not working for json and pdf format !
+ var frame = document.createElement("iframe");
+
+ if ( frame ) {
+ document.body.appendChild(frame);
+ frame.setAttribute("style", "display:none");
+ frame.contentDocument.open("txt/plain", "replace");
+ frame.contentDocument.write(data);
+ frame.contentDocument.close();
+ frame.contentDocument.focus();
+
+ var extension = filename.substr((filename.lastIndexOf('.') +1));
+ switch(extension) {
+ case 'doc': case 'json': case 'png': case 'pdf': case 'xls': case 'xlsx':
+ filename += ".txt";
+ break;
+ }
+ frame.contentDocument.execCommand("SaveAs", true, filename);
+ document.body.removeChild(frame);
+ }
+ }
+ else {
+ var DownloadLink = document.createElement('a');
+
+ if ( DownloadLink ) {
+ var blobUrl = null;
+
+ DownloadLink.style.display = 'none';
+ if ( filename !== false )
+ DownloadLink.download = filename;
+ else
+ DownloadLink.target = '_blank';
+
+ if ( typeof data == 'object' ) {
+ window.URL = window.URL || window.webkitURL;
+ blobUrl = window.URL.createObjectURL(data);
+ DownloadLink.href = blobUrl;
+ }
+ else if ( header.toLowerCase().indexOf("base64,") >= 0 )
+ DownloadLink.href = header + base64encode(data);
+ else
+ DownloadLink.href = header + encodeURIComponent(data);
+
+ document.body.appendChild(DownloadLink);
+
+ if ( document.createEvent ) {
+ if ( DownloadEvt === null )
+ DownloadEvt = document.createEvent('MouseEvents');
+
+ DownloadEvt.initEvent('click', true, false);
+ DownloadLink.dispatchEvent(DownloadEvt);
+ }
+ else if ( document.createEventObject )
+ DownloadLink.fireEvent('onclick');
+ else if ( typeof DownloadLink.onclick == 'function' )
+ DownloadLink.onclick();
+
+ setTimeout(function(){
+ if ( blobUrl )
+ window.URL.revokeObjectURL(blobUrl);
+ document.body.removeChild(DownloadLink);
+ }, 100);
+ }
+ }
+ }
+
+ function utf8Encode (text) {
+ if (typeof text === 'string') {
+ text = text.replace(/\x0d\x0a/g, "\x0a");
+ var utftext = "";
+ for ( var n = 0; n < text.length; n++ ) {
+ var c = text.charCodeAt(n);
+ if ( c < 128 ) {
+ utftext += String.fromCharCode(c);
+ }
+ else if ( (c > 127) && (c < 2048) ) {
+ utftext += String.fromCharCode((c >> 6) | 192);
+ utftext += String.fromCharCode((c & 63) | 128);
+ }
+ else {
+ utftext += String.fromCharCode((c >> 12) | 224);
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
+ utftext += String.fromCharCode((c & 63) | 128);
+ }
+ }
+ return utftext;
+ }
+ return text;
+ }
+
+ function base64encode (input) {
+ var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+ var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+ var output = "";
+ var i = 0;
+ input = utf8Encode(input);
+ while ( i < input.length ) {
+ chr1 = input.charCodeAt(i++);
+ chr2 = input.charCodeAt(i++);
+ chr3 = input.charCodeAt(i++);
+ enc1 = chr1 >> 2;
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
+ enc4 = chr3 & 63;
+ if ( isNaN(chr2) ) {
+ enc3 = enc4 = 64;
+ } else if ( isNaN(chr3) ) {
+ enc4 = 64;
+ }
+ output = output +
+ keyStr.charAt(enc1) + keyStr.charAt(enc2) +
+ keyStr.charAt(enc3) + keyStr.charAt(enc4);
+ }
+ return output;
+ }
+
+ return this;
+ }
+})(jQuery);
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js
index 50345593c..9e5e993fa 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/**
* @author: Dennis Hernández
* @webSite: http://djhvscf.github.io/Blog
@@ -133,4 +134,141 @@
};
}
};
+=======
+/**
+ * @author: Dennis Hernández
+ * @webSite: http://djhvscf.github.io/Blog
+ * @version: v1.1.0
+ */
+
+!function ($) {
+
+ 'use strict';
+
+ var showHideColumns = function (that, checked) {
+ if (that.options.columnsHidden.length > 0 ) {
+ $.each(that.columns, function (i, column) {
+ if (that.options.columnsHidden.indexOf(column.field) !== -1) {
+ if (column.visible !== checked) {
+ that.toggleColumn($.fn.bootstrapTable.utils.getFieldIndex(that.columns, column.field), checked, true);
+ }
+ }
+ });
+ }
+ };
+
+ var resetView = function (that) {
+ if (that.options.height || that.options.showFooter) {
+ setTimeout(function(){
+ that.resetView.call(that);
+ }, 1);
+ }
+ };
+
+ var changeView = function (that, width, height) {
+ if (that.options.minHeight) {
+ if ((width <= that.options.minWidth) && (height <= that.options.minHeight)) {
+ conditionCardView(that);
+ } else if ((width > that.options.minWidth) && (height > that.options.minHeight)) {
+ conditionFullView(that);
+ }
+ } else {
+ if (width <= that.options.minWidth) {
+ conditionCardView(that);
+ } else if (width > that.options.minWidth) {
+ conditionFullView(that);
+ }
+ }
+
+ resetView(that);
+ };
+
+ var conditionCardView = function (that) {
+ changeTableView(that, false);
+ showHideColumns(that, false);
+ };
+
+ var conditionFullView = function (that) {
+ changeTableView(that, true);
+ showHideColumns(that, true);
+ };
+
+ var changeTableView = function (that, cardViewState) {
+ that.options.cardView = cardViewState;
+ that.toggleView();
+ };
+
+ var debounce = function(func,wait) {
+ var timeout;
+ return function() {
+ var context = this,
+ args = arguments;
+ var later = function() {
+ timeout = null;
+ func.apply(context,args);
+ };
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+ };
+ };
+
+ $.extend($.fn.bootstrapTable.defaults, {
+ mobileResponsive: false,
+ minWidth: 562,
+ minHeight: undefined,
+ heightThreshold: 100, // just slightly larger than mobile chrome's auto-hiding toolbar
+ checkOnInit: true,
+ columnsHidden: []
+ });
+
+ var BootstrapTable = $.fn.bootstrapTable.Constructor,
+ _init = BootstrapTable.prototype.init;
+
+ BootstrapTable.prototype.init = function () {
+ _init.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (!this.options.mobileResponsive) {
+ return;
+ }
+
+ if (!this.options.minWidth) {
+ return;
+ }
+
+ if (this.options.minWidth < 100 && this.options.resizable) {
+ console.log("The minWidth when the resizable extension is active should be greater or equal than 100");
+ this.options.minWidth = 100;
+ }
+
+ var that = this,
+ old = {
+ width: $(window).width(),
+ height: $(window).height()
+ };
+
+ $(window).on('resize orientationchange',debounce(function (evt) {
+ // reset view if height has only changed by at least the threshold.
+ var height = $(this).height(),
+ width = $(this).width();
+
+ if (Math.abs(old.height - height) > that.options.heightThreshold || old.width != width) {
+ changeView(that, width, height);
+ old = {
+ width: width,
+ height: height
+ };
+ }
+ },200));
+
+ if (this.options.checkOnInit) {
+ var height = $(window).height(),
+ width = $(window).width();
+ changeView(this, width, height);
+ old = {
+ width: width,
+ height: height
+ };
+ }
+ };
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
}(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js
index f09bb312b..2ec07c960 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js
@@ -1,7 +1,16 @@
+<<<<<<< HEAD
/*
* bootstrap-table - v1.11.0 - 2016-07-02
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2016 zhixin wen
* Licensed MIT License
*/
+=======
+/*
+* bootstrap-table - v1.11.0 - 2016-07-02
+* https://github.com/wenzhixin/bootstrap-table
+* Copyright (c) 2016 zhixin wen
+* Licensed MIT License
+*/
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
!function(a){"use strict";var b=function(b,c){b.options.columnsHidden.length>0&&a.each(b.columns,function(d,e){-1!==b.options.columnsHidden.indexOf(e.field)&&e.visible!==c&&b.toggleColumn(a.fn.bootstrapTable.utils.getFieldIndex(b.columns,e.field),c,!0)})},c=function(a){(a.options.height||a.options.showFooter)&&setTimeout(function(){a.resetView.call(a)},1)},d=function(a,b,d){a.options.minHeight?b<=a.options.minWidth&&d<=a.options.minHeight?e(a):b>a.options.minWidth&&d>a.options.minHeight&&f(a):b<=a.options.minWidth?e(a):b>a.options.minWidth&&f(a),c(a)},e=function(a){g(a,!1),b(a,!1)},f=function(a){g(a,!0),b(a,!0)},g=function(a,b){a.options.cardView=b,a.toggleView()},h=function(a,b){var c;return function(){var d=this,e=arguments,f=function(){c=null,a.apply(d,e)};clearTimeout(c),c=setTimeout(f,b)}};a.extend(a.fn.bootstrapTable.defaults,{mobileResponsive:!1,minWidth:562,minHeight:void 0,heightThreshold:100,checkOnInit:!0,columnsHidden:[]});var i=a.fn.bootstrapTable.Constructor,j=i.prototype.init;i.prototype.init=function(){if(j.apply(this,Array.prototype.slice.apply(arguments)),this.options.mobileResponsive&&this.options.minWidth){this.options.minWidth<100&&this.options.resizable&&(console.log("The minWidth when the resizable extension is active should be greater or equal than 100"),this.options.minWidth=100);var b=this,c={width:a(window).width(),height:a(window).height()};if(a(window).on("resize orientationchange",h(function(){var e=a(this).height(),f=a(this).width();(Math.abs(c.height-e)>b.options.heightThreshold||c.width!=f)&&(d(b,f,e),c={width:f,height:e})},200)),this.options.checkOnInit){var e=a(window).height(),f=a(window).width();d(this,f,e),c={width:f,height:e}}}}}(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js
index c6dbae25e..b7709dafb 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/**
* @author: aperez
* @version: v2.0.0
@@ -208,4 +209,216 @@
this.updatePagination();
this.trigger('column-advanced-search', $field, text);
};
+=======
+/**
+ * @author: aperez
+ * @version: v2.0.0
+ *
+ * @update Dennis Hernández
+ */
+
+!function($) {
+ 'use strict';
+
+ var firstLoad = false;
+
+ var sprintf = $.fn.bootstrapTable.utils.sprintf;
+
+ var showAvdSearch = function(pColumns, searchTitle, searchText, that) {
+ if (!$("#avdSearchModal" + "_" + that.options.idTable).hasClass("modal")) {
+ var vModal = sprintf("", "_" + that.options.idTable);
+ vModal += "
";
+ vModal += "
";
+ vModal += " ";
+ vModal += "
";
+ vModal += sprintf("
", "_" + that.options.idTable);
+ vModal += "
";
+ vModal += "
";
+ vModal += "
";
+ vModal += "
";
+ vModal += "
";
+
+ $("body").append($(vModal));
+
+ var vFormAvd = createFormAvd(pColumns, searchText, that),
+ timeoutId = 0;;
+
+ $('#avdSearchModalContent' + "_" + that.options.idTable).append(vFormAvd.join(''));
+
+ $('#' + that.options.idForm).off('keyup blur', 'input').on('keyup blur', 'input', function (event) {
+ clearTimeout(timeoutId);
+ timeoutId = setTimeout(function () {
+ that.onColumnAdvancedSearch(event);
+ }, that.options.searchTimeOut);
+ });
+
+ $("#btnCloseAvd" + "_" + that.options.idTable).click(function() {
+ $("#avdSearchModal" + "_" + that.options.idTable).modal('hide');
+ });
+
+ $("#avdSearchModal" + "_" + that.options.idTable).modal();
+ } else {
+ $("#avdSearchModal" + "_" + that.options.idTable).modal();
+ }
+ };
+
+ var createFormAvd = function(pColumns, searchText, that) {
+ var htmlForm = [];
+ htmlForm.push(sprintf('');
+
+ return htmlForm;
+ };
+
+ $.extend($.fn.bootstrapTable.defaults, {
+ advancedSearch: false,
+ idForm: 'advancedSearch',
+ actionForm: '',
+ idTable: undefined,
+ onColumnAdvancedSearch: function (field, text) {
+ return false;
+ }
+ });
+
+ $.extend($.fn.bootstrapTable.defaults.icons, {
+ advancedSearchIcon: 'glyphicon-chevron-down'
+ });
+
+ $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
+ 'column-advanced-search.bs.table': 'onColumnAdvancedSearch'
+ });
+
+ $.extend($.fn.bootstrapTable.locales, {
+ formatAdvancedSearch: function() {
+ return 'Advanced search';
+ },
+ formatAdvancedCloseButton: function() {
+ return "Close";
+ }
+ });
+
+ $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
+
+ var BootstrapTable = $.fn.bootstrapTable.Constructor,
+ _initToolbar = BootstrapTable.prototype.initToolbar,
+ _load = BootstrapTable.prototype.load,
+ _initSearch = BootstrapTable.prototype.initSearch;
+
+ BootstrapTable.prototype.initToolbar = function() {
+ _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (!this.options.search) {
+ return;
+ }
+
+ if (!this.options.advancedSearch) {
+ return;
+ }
+
+ if (!this.options.idTable) {
+ return;
+ }
+
+ var that = this,
+ html = [];
+
+ html.push(sprintf('', this.options.buttonsAlign, this.options.buttonsAlign));
+ html.push(sprintf('', that.options.iconSize === undefined ? '' : ' btn-' + that.options.iconSize, that.options.formatAdvancedSearch()));
+ html.push(sprintf(' ', that.options.iconsPrefix, that.options.icons.advancedSearchIcon))
+ html.push('
');
+
+ that.$toolbar.prepend(html.join(''));
+
+ that.$toolbar.find('button[name="advancedSearch"]')
+ .off('click').on('click', function() {
+ showAvdSearch(that.columns, that.options.formatAdvancedSearch(), that.options.formatAdvancedCloseButton(), that);
+ });
+ };
+
+ BootstrapTable.prototype.load = function(data) {
+ _load.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (!this.options.advancedSearch) {
+ return;
+ }
+
+ if (typeof this.options.idTable === 'undefined') {
+ return;
+ } else {
+ if (!firstLoad) {
+ var height = parseInt($(".bootstrap-table").height());
+ height += 10;
+ $("#" + this.options.idTable).bootstrapTable("resetView", {height: height});
+ firstLoad = true;
+ }
+ }
+ };
+
+ BootstrapTable.prototype.initSearch = function () {
+ _initSearch.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (!this.options.advancedSearch) {
+ return;
+ }
+
+ var that = this;
+ var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
+
+ this.data = fp ? $.grep(this.data, function (item, i) {
+ for (var key in fp) {
+ var fval = fp[key].toLowerCase();
+ var value = item[key];
+ value = $.fn.bootstrapTable.utils.calculateObjectValue(that.header,
+ that.header.formatters[$.inArray(key, that.header.fields)],
+ [value, item, i], value);
+
+ if (!($.inArray(key, that.header.fields) !== -1 &&
+ (typeof value === 'string' || typeof value === 'number') &&
+ (value + '').toLowerCase().indexOf(fval) !== -1)) {
+ return false;
+ }
+ }
+ return true;
+ }) : this.data;
+ };
+
+ BootstrapTable.prototype.onColumnAdvancedSearch = function (event) {
+ var text = $.trim($(event.currentTarget).val());
+ var $field = $(event.currentTarget)[0].id;
+
+ if ($.isEmptyObject(this.filterColumnsPartial)) {
+ this.filterColumnsPartial = {};
+ }
+ if (text) {
+ this.filterColumnsPartial[$field] = text;
+ } else {
+ delete this.filterColumnsPartial[$field];
+ }
+
+ this.options.pageNumber = 1;
+ this.onSearch(event);
+ this.updatePagination();
+ this.trigger('column-advanced-search', $field, text);
+ };
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
}(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js
index bffb3cbfd..9aae2db2b 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js
@@ -1,7 +1,16 @@
+<<<<<<< HEAD
/*
* bootstrap-table - v1.11.0 - 2016-07-02
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2016 zhixin wen
* Licensed MIT License
*/
+=======
+/*
+* bootstrap-table - v1.11.0 - 2016-07-02
+* https://github.com/wenzhixin/bootstrap-table
+* Copyright (c) 2016 zhixin wen
+* Licensed MIT License
+*/
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
!function(a){"use strict";var b=!1,c=a.fn.bootstrapTable.utils.sprintf,d=function(b,d,f,g){if(a("#avdSearchModal_"+g.options.idTable).hasClass("modal"))a("#avdSearchModal_"+g.options.idTable).modal();else{var h=c('',"_"+g.options.idTable);h+='
',h+='
',h+=' ",h+='
',h+=c('
',"_"+g.options.idTable),h+="
",h+="
",h+="
",h+="
",h+="
",a("body").append(a(h));var i=e(b,f,g),j=0;a("#avdSearchModalContent_"+g.options.idTable).append(i.join("")),a("#"+g.options.idForm).off("keyup blur","input").on("keyup blur","input",function(a){clearTimeout(j),j=setTimeout(function(){g.onColumnAdvancedSearch(a)},g.options.searchTimeOut)}),a("#btnCloseAvd_"+g.options.idTable).click(function(){a("#avdSearchModal_"+g.options.idTable).modal("hide")}),a("#avdSearchModal_"+g.options.idTable).modal()}},e=function(a,b,d){var e=[];e.push(c('"),e};a.extend(a.fn.bootstrapTable.defaults,{advancedSearch:!1,idForm:"advancedSearch",actionForm:"",idTable:void 0,onColumnAdvancedSearch:function(){return!1}}),a.extend(a.fn.bootstrapTable.defaults.icons,{advancedSearchIcon:"glyphicon-chevron-down"}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"column-advanced-search.bs.table":"onColumnAdvancedSearch"}),a.extend(a.fn.bootstrapTable.locales,{formatAdvancedSearch:function(){return"Advanced search"},formatAdvancedCloseButton:function(){return"Close"}}),a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales);var f=a.fn.bootstrapTable.Constructor,g=f.prototype.initToolbar,h=f.prototype.load,i=f.prototype.initSearch;f.prototype.initToolbar=function(){if(g.apply(this,Array.prototype.slice.apply(arguments)),this.options.search&&this.options.advancedSearch&&this.options.idTable){var a=this,b=[];b.push(c('',this.options.buttonsAlign,this.options.buttonsAlign)),b.push(c('',void 0===a.options.iconSize?"":" btn-"+a.options.iconSize,a.options.formatAdvancedSearch())),b.push(c(' ',a.options.iconsPrefix,a.options.icons.advancedSearchIcon)),b.push("
"),a.$toolbar.prepend(b.join("")),a.$toolbar.find('button[name="advancedSearch"]').off("click").on("click",function(){d(a.columns,a.options.formatAdvancedSearch(),a.options.formatAdvancedCloseButton(),a)})}},f.prototype.load=function(){if(h.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch&&"undefined"!=typeof this.options.idTable&&!b){var c=parseInt(a(".bootstrap-table").height());c+=10,a("#"+this.options.idTable).bootstrapTable("resetView",{height:c}),b=!0}},f.prototype.initSearch=function(){if(i.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch){var b=this,c=a.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=c?a.grep(this.data,function(d,e){for(var f in c){var g=c[f].toLowerCase(),h=d[f];if(h=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[a.inArray(f,b.header.fields)],[h,d,e],h),-1===a.inArray(f,b.header.fields)||"string"!=typeof h&&"number"!=typeof h||-1===(h+"").toLowerCase().indexOf(g))return!1}return!0}):this.data}},f.prototype.onColumnAdvancedSearch=function(b){var c=a.trim(a(b.currentTarget).val()),d=a(b.currentTarget)[0].id;a.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),c?this.filterColumnsPartial[d]=c:delete this.filterColumnsPartial[d],this.options.pageNumber=1,this.onSearch(b),this.updatePagination(),this.trigger("column-advanced-search",d,c)}}(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.js
index 7e9262dbf..eb9ab6deb 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
(function ($) {
'use strict';
@@ -40,3 +41,47 @@
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
})(jQuery);
+=======
+(function ($) {
+ 'use strict';
+
+ $.fn.bootstrapTable.locales['zh-CN'] = {
+ formatLoadingMessage: function () {
+ return '正在努力地加载数据中,请稍候……';
+ },
+ formatRecordsPerPage: function (pageNumber) {
+ return pageNumber + ' 条记录每页';
+ },
+ formatShowingRows: function (pageFrom, pageTo, totalRows) {
+ return '第 ' + pageFrom + ' 到 ' + pageTo + ' 条,共 ' + totalRows + ' 条记录。';
+ },
+ formatSearch: function () {
+ return '搜索';
+ },
+ formatNoMatches: function () {
+ return '没有找到匹配的记录';
+ },
+ formatPaginationSwitch: function () {
+ return '隐藏/显示分页';
+ },
+ formatRefresh: function () {
+ return '刷新';
+ },
+ formatToggle: function () {
+ return '切换';
+ },
+ formatColumns: function () {
+ return '列';
+ },
+ formatExport: function () {
+ return '导出数据';
+ },
+ formatClearFilters: function () {
+ return '清空过滤';
+ }
+ };
+
+ $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
+
+})(jQuery);
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.css b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.css
index 12577e893..c2b17e4ff 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;}
.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
.bootstrap-tree-table .treetable-selected{background: #f5f5f5 !important;}
@@ -12,3 +13,19 @@
.bootstrap-tree-table .treetable-bars .tool-left{float: left;}
.bootstrap-tree-table .treetable-bars .tool-right{float: right;}
.bootstrap-tree-table .treetable-bars .columns li label{display: block;padding: 3px 20px;clear: both;font-weight: 400;line-height: 1.428571429;max-width: 100%;margin-bottom: 5px;cursor:pointer;}
+=======
+.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;}
+.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
+.bootstrap-tree-table .treetable-selected{background: #f5f5f5 !important;}
+.bootstrap-tree-table .treetable-table{border:0 !important;margin-bottom:0}
+.bootstrap-tree-table .treetable-table tbody {display:block;height:auto;overflow-y:auto;}
+.bootstrap-tree-table .treetable-table thead, .treetable-table tbody tr {display:table;width:100%;table-layout:fixed;}
+.bootstrap-tree-table .treetable-thead th{line-height:24px;border: 0 !important;border-radius: 4px;border-left:0px solid #e7eaec !important;border-bottom:1px solid #ccc!important;text-align: left;}
+.bootstrap-tree-table .treetable-thead tr :first-child{border-left:0 !important}
+.bootstrap-tree-table .treetable-tbody td{border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
+.bootstrap-tree-table .treetable-tbody tr :first-child{border-left:0 !important}
+.bootstrap-tree-table .treetable-bars .tool-left, .bootstrap-tree-table .treetable-bars .tool-right{margin-top: 10px; margin-bottom: 10px;}
+.bootstrap-tree-table .treetable-bars .tool-left{float: left;}
+.bootstrap-tree-table .treetable-bars .tool-right{float: right;}
+.bootstrap-tree-table .treetable-bars .columns li label{display: block;padding: 3px 20px;clear: both;font-weight: 400;line-height: 1.428571429;max-width: 100%;margin-bottom: 5px;cursor:pointer;}
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js
index 3c833552e..ba936bc29 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/**
* bootstrapTreeTable
*
@@ -667,4 +668,675 @@
expanderCollapsedClass: 'glyphicon glyphicon-chevron-right' // 缩起的按钮的图标
};
+=======
+/**
+ * bootstrapTreeTable
+ *
+ * @author swifly
+ */
+(function($) {
+ "use strict";
+
+ $.fn.bootstrapTreeTable = function(options, param) {
+ var target = $(this).data('bootstrap.tree.table');
+ target = target ? target : $(this);
+ // 如果是调用方法
+ if (typeof options == 'string') {
+ return $.fn.bootstrapTreeTable.methods[options](target, param);
+ }
+ // 如果是初始化组件
+ options = $.extend({}, $.fn.bootstrapTreeTable.defaults, options || {});
+ target.hasSelectItem = false;// 是否有radio或checkbox
+ target.data_list = null; //用于缓存格式化后的数据-按父分组
+ target.data_obj = null; //用于缓存格式化后的数据-按id存对象
+ target.hiddenColumns = []; //用于存放被隐藏列的field
+ target.lastAjaxParams; //用户最后一次请求的参数
+ target.isFixWidth=false; //是否有固定宽度
+ // 初始化
+ var init = function() {
+ // 初始化容器
+ initContainer();
+ // 初始化工具栏
+ initToolbar();
+ // 初始化表头
+ initHeader();
+ // 初始化表体
+ initBody();
+ // 初始化数据服务
+ initServer();
+ // 动态设置表头宽度
+ autoTheadWidth(true);
+ // 缓存target对象
+ target.data('bootstrap.tree.table', target);
+ }
+ // 初始化容器
+ var initContainer = function() {
+ // 在外层包装一下div,样式用的bootstrap-table的
+ var $main_div = $("
");
+ var $treetable = $("
");
+ target.before($main_div);
+ $main_div.append($treetable);
+ $treetable.append(target);
+ target.addClass("table");
+ if (options.striped) {
+ target.addClass('table-striped');
+ }
+ if (options.bordered) {
+ target.addClass('table-bordered');
+ }
+ if (options.hover) {
+ target.addClass('table-hover');
+ }
+ if (options.condensed) {
+ target.addClass('table-condensed');
+ }
+ target.html("");
+ }
+ // 初始化工具栏
+ var initToolbar = function() {
+ var $toolbar = $("
");
+ if (options.toolbar) {
+ $(options.toolbar).addClass('tool-left');
+ $toolbar.append($(options.toolbar));
+ }
+ var $rightToolbar = $('');
+ $toolbar.append($rightToolbar);
+ target.parent().before($toolbar);
+ // 是否显示刷新按钮
+ if (options.showRefresh) {
+ var $refreshBtn = $('
');
+ $rightToolbar.append($refreshBtn);
+ registerRefreshBtnClickEvent($refreshBtn);
+ }
+ // 是否显示列选项
+ if (options.showColumns) {
+ var $columns_div = $('
');
+ var $columns_ul = $('
');
+ $.each(options.columns, function(i, column) {
+ if (column.field != 'selectItem') {
+ var _li = null;
+ if(typeof column.visible == "undefined"||column.visible==true){
+ _li = $('
'+column.title+'');
+ }else{
+ _li = $('
'+column.title+'');
+ target.hiddenColumns.push(column.field);
+ }
+ $columns_ul.append(_li);
+ }
+ });
+ $columns_div.append($columns_ul);
+ $rightToolbar.append($columns_div);
+ // 注册列选项事件
+ registerColumnClickEvent();
+ }else{
+ $.each(options.columns, function(i, column) {
+ if (column.field != 'selectItem') {
+ if(!(typeof column.visible == "undefined"||column.visible==true)){
+ target.hiddenColumns.push(column.field);
+ }
+ }
+ });
+ }
+ }
+ // 初始化隐藏列
+ var initHiddenColumns = function(){
+ $.each(target.hiddenColumns, function(i, field) {
+ target.find("."+field+"_cls").hide();
+ });
+ }
+ // 初始化表头
+ var initHeader = function() {
+ var $thr = $('
');
+ $.each(options.columns, function(i, column) {
+ var $th = null;
+ // 判断有没有选择列
+ if (i == 0 && column.field == 'selectItem') {
+ target.hasSelectItem = true;
+ $th = $('
');
+ } else {
+ $th = $('
');
+ }
+ if((!target.isFixWidth)&& column.width){
+ target.isFixWidth = column.width.indexOf("px")>-1?true:false;
+ }
+ $th.text(column.title);
+ $thr.append($th);
+ });
+ var $thead = $('
');
+ $thead.append($thr);
+ target.append($thead);
+ }
+ // 初始化表体
+ var initBody = function() {
+ var $tbody = $('
');
+ target.append($tbody);
+ // 默认高度
+ if (options.height) {
+ $tbody.css("height", options.height);
+ }
+ }
+ // 初始化数据服务
+ var initServer = function(parms) {
+ // 加载数据前先清空
+ target.data_list = {};
+ target.data_obj = {};
+ var $tbody = target.find("tbody");
+ // 添加加载loading
+ var $loading = '
正在努力地加载数据中,请稍候……
'
+ $tbody.html($loading);
+ if (options.url) {
+ $.ajax({
+ type: options.type,
+ url: options.url,
+ data: parms ? parms : options.ajaxParams,
+ dataType: "JSON",
+ success: function(data, textStatus, jqXHR) {
+ renderTable(data);
+ },
+ error: function(xhr, textStatus) {
+ var _errorMsg = '
' + xhr.responseText + '
'
+ $tbody.html(_errorMsg);
+ },
+ });
+ } else {
+ renderTable(options.data);
+ }
+ }
+ // 加载完数据后渲染表格
+ var renderTable = function(data) {
+ var $tbody = target.find("tbody");
+ // 先清空
+ $tbody.html("");
+ if (!data || data.length <= 0) {
+ var _empty = '
没有找到匹配的记录
'
+ $tbody.html(_empty);
+ return;
+ }
+ // 缓存并格式化数据
+ formatData(data);
+ // 获取所有根节点
+ var rootNode = target.data_list["_root_"];
+ // 开始绘制
+ if (rootNode) {
+ $.each(rootNode, function(i, item) {
+ var _child_row_id = "row_id_" + i
+ recursionNode(item, 1, _child_row_id, "row_root");
+ });
+ }
+ // 下边的操作主要是为了查询时让一些没有根节点的节点显示
+ $.each(data, function(i, item) {
+ if (!item.isShow) {
+ var tr = renderRow(item, false, 1, "", "");
+ $tbody.append(tr);
+ }
+ });
+ target.append($tbody);
+ registerExpanderEvent();
+ registerRowClickEvent();
+ initHiddenColumns();
+ // 动态设置表头宽度
+ autoTheadWidth()
+ }
+ // 动态设置表头宽度
+ var autoTheadWidth = function(initFlag) {
+ if(options.height>0){
+ var $thead = target.find("thead");
+ var $tbody = target.find("tbody");
+ var borderWidth = parseInt(target.css("border-left-width")) + parseInt(target.css("border-right-width"))
+
+ $thead.css("width", $tbody.children(":first").width());
+ if(initFlag){
+ var resizeWaiter = false;
+ $(window).resize(function() {
+ if(!resizeWaiter){
+ resizeWaiter = true;
+ setTimeout(function(){
+ if(!target.isFixWidth){
+ $tbody.css("width", target.parent().width()-borderWidth);
+ }
+ $thead.css("width", $tbody.children(":first").width());
+ resizeWaiter = false;
+ }, 300);
+ }
+ });
+ }
+ }
+
+ }
+ // 缓存并格式化数据
+ var formatData = function(data) {
+ var _root = options.rootIdValue ? options.rootIdValue : null
+ $.each(data, function(index, item) {
+ // 添加一个默认属性,用来判断当前节点有没有被显示
+ item.isShow = false;
+ // 这里兼容几种常见Root节点写法
+ // 默认的几种判断
+ var _defaultRootFlag = item[options.parentCode] == '0' ||
+ item[options.parentCode] == 0 ||
+ item[options.parentCode] == null ||
+ item[options.parentCode] == '';
+ if (!item[options.parentCode] || (_root ? (item[options.parentCode] == options.rootIdValue) : _defaultRootFlag)) {
+ if (!target.data_list["_root_"]) {
+ target.data_list["_root_"] = [];
+ }
+ if (!target.data_obj["id_" + item[options.code]]) {
+ target.data_list["_root_"].push(item);
+ }
+ } else {
+ if (!target.data_list["_n_" + item[options.parentCode]]) {
+ target.data_list["_n_" + item[options.parentCode]] = [];
+ }
+ if (!target.data_obj["id_" + item[options.code]]) {
+ target.data_list["_n_" + item[options.parentCode]].push(item);
+ }
+ }
+ target.data_obj["id_" + item[options.code]] = item;
+ });
+ }
+ // 递归获取子节点并且设置子节点
+ var recursionNode = function(parentNode, lv, row_id, p_id) {
+ var $tbody = target.find("tbody");
+ var _ls = target.data_list["_n_" + parentNode[options.code]];
+ var $tr = renderRow(parentNode, _ls ? true : false, lv, row_id, p_id);
+ $tbody.append($tr);
+ if (_ls) {
+ $.each(_ls, function(i, item) {
+ var _child_row_id = row_id + "_" + i
+ recursionNode(item, (lv + 1), _child_row_id, row_id)
+ });
+ }
+ };
+ // 绘制行
+ var renderRow = function(item, isP, lv, row_id, p_id) {
+ // 标记已显示
+ item.isShow = true;
+ item.row_id = row_id;
+ item.p_id = p_id;
+ item.lv = lv;
+ var $tr = $('
');
+ var _icon = options.expanderCollapsedClass;
+ if (options.expandAll) {
+ $tr.css("display", "table");
+ _icon = options.expanderExpandedClass;
+ } else if (lv == 1) {
+ $tr.css("display", "table");
+ _icon = (options.expandFirst) ? options.expanderExpandedClass : options.expanderCollapsedClass;
+ } else if (lv == 2) {
+ if (options.expandFirst) {
+ $tr.css("display", "table");
+ } else {
+ $tr.css("display", "none");
+ }
+ _icon = options.expanderCollapsedClass;
+ } else {
+ $tr.css("display", "none");
+ _icon = options.expanderCollapsedClass;
+ }
+ $.each(options.columns, function(index, column) {
+ // 判断有没有选择列
+ if (column.field == 'selectItem') {
+ target.hasSelectItem = true;
+ var $td = $('
');
+ if (column.radio) {
+ var _ipt = $('
');
+ $td.append(_ipt);
+ }
+ if (column.checkbox) {
+ var _ipt = $('
');
+ $td.append(_ipt);
+ }
+ $tr.append($td);
+ } else {
+ var $td = $('
');
+ if(column.width){
+ $td.css("width",column.width);
+ }
+ if(column.align){
+ $td.css("text-align",column.align);
+ }
+ if(options.expandColumn == index){
+ $td.css("text-align","left");
+ }
+ if(column.valign){
+ $td.css("vertical-align",column.valign);
+ }
+ if(options.showTitle){
+ $td.addClass("ellipsis");
+ }
+ // 增加formatter渲染
+ if (column.formatter) {
+ $td.html(column.formatter.call(this, item[column.field], item, index));
+ } else {
+ if(options.showTitle){
+ // 只在字段没有formatter时才添加title属性
+ $td.attr("title",item[column.field]);
+ }
+ $td.text(item[column.field]);
+ }
+ if (options.expandColumn == index) {
+ if (!isP) {
+ $td.prepend('
')
+ } else {
+ $td.prepend('
')
+ }
+ for (var int = 0; int < (lv - 1); int++) {
+ $td.prepend('
')
+ }
+ }
+ $tr.append($td);
+ }
+ });
+ return $tr;
+ }
+ // 注册刷新按钮点击事件
+ var registerRefreshBtnClickEvent = function(btn) {
+ $(btn).off('click').on('click', function () {
+ target.refresh();
+ });
+ }
+ // 注册列选项事件
+ var registerColumnClickEvent = function() {
+ $(".bootstrap-tree-table .treetable-bars .columns label input").off('click').on('click', function () {
+ var $this = $(this);
+ if($this.prop('checked')){
+ target.showColumn($(this).val());
+ }else{
+ target.hideColumn($(this).val());
+ }
+ });
+ }
+ // 注册行点击选中事件
+ var registerRowClickEvent = function() {
+ target.find("tbody").find("tr").unbind();
+ target.find("tbody").find("tr").click(function() {
+ if (target.hasSelectItem) {
+ var _ipt = $(this).find("input[name='select_item']");
+ if (_ipt.attr("type") == "radio") {
+ _ipt.prop('checked', true);
+ target.find("tbody").find("tr").removeClass("treetable-selected");
+ $(this).addClass("treetable-selected");
+ } else {
+ if (_ipt.prop('checked')) {
+ _ipt.prop('checked', false);
+ $(this).removeClass("treetable-selected");
+ } else {
+ _ipt.prop('checked', true);
+ $(this).addClass("treetable-selected");
+ }
+ }
+ }
+ });
+ }
+ // 注册小图标点击事件--展开缩起
+ var registerExpanderEvent = function() {
+ target.find("tbody").find("tr").find(".treetable-expander").unbind();
+ target.find("tbody").find("tr").find(".treetable-expander").click(function() {
+ var _isExpanded = $(this).hasClass(options.expanderExpandedClass);
+ var _isCollapsed = $(this).hasClass(options.expanderCollapsedClass);
+ if (_isExpanded || _isCollapsed) {
+ var tr = $(this).parent().parent();
+ var row_id = tr.attr("id");
+ var _ls = target.find("tbody").find("tr[id^='" + row_id + "_']"); //下所有
+ if (_isExpanded) {
+ $(this).removeClass(options.expanderExpandedClass);
+ $(this).addClass(options.expanderCollapsedClass);
+ if (_ls && _ls.length > 0) {
+ $.each(_ls, function(index, item) {
+ $(item).css("display", "none");
+ });
+ }
+ } else {
+ $(this).removeClass(options.expanderCollapsedClass);
+ $(this).addClass(options.expanderExpandedClass);
+ if (_ls && _ls.length > 0) {
+ $.each(_ls, function(index, item) {
+ // 父icon
+ var _p_icon = $("#" + $(item).attr("pid")).children().eq(options.expandColumn).find(".treetable-expander");
+ if (_p_icon.hasClass(options.expanderExpandedClass)) {
+ $(item).css("display", "table");
+ }
+ });
+ }
+ }
+ }
+ });
+ }
+ // 刷新数据
+ target.refresh = function(parms) {
+ if(parms){
+ target.lastAjaxParams=parms;
+ }
+ initServer(target.lastAjaxParams);
+ }
+ // 添加数据刷新表格
+ target.appendData = function(data) {
+ // 下边的操作主要是为了查询时让一些没有根节点的节点显示
+ $.each(data, function(i, item) {
+ var _data = target.data_obj["id_" + item[options.code]];
+ var _p_data = target.data_obj["id_" + item[options.parentCode]];
+ var _c_list = target.data_list["_n_" + item[options.parentCode]];
+ var row_id = ""; //行id
+ var p_id = ""; //父行id
+ var _lv = 1; //如果没有父就是1默认显示
+ var tr; //要添加行的对象
+ if (_data && _data.row_id && _data.row_id != "") {
+ row_id = _data.row_id; // 如果已经存在了,就直接引用原来的
+ }
+ if (_p_data) {
+ p_id = _p_data.row_id;
+ if (row_id == "") {
+ var _tmp = 0
+ if (_c_list && _c_list.length > 0) {
+ _tmp = _c_list.length;
+ }
+ row_id = _p_data.row_id + "_" + _tmp;
+ }
+ _lv = _p_data.lv + 1; //如果有父
+ // 绘制行
+ tr = renderRow(item, false, _lv, row_id, p_id);
+
+ var _p_icon = $("#" + _p_data.row_id).children().eq(options.expandColumn).find(".treetable-expander");
+ var _isExpanded = _p_icon.hasClass(options.expanderExpandedClass);
+ var _isCollapsed = _p_icon.hasClass(options.expanderCollapsedClass);
+ // 父节点有没有展开收缩按钮
+ if (_isExpanded || _isCollapsed) {
+ // 父节点展开状态显示新加行
+ if (_isExpanded) {
+ tr.css("display", "table");
+ }
+ } else {
+ // 父节点没有展开收缩按钮则添加
+ _p_icon.addClass(options.expanderCollapsedClass);
+ }
+
+ if (_data) {
+ $("#" + _data.row_id).before(tr);
+ $("#" + _data.row_id).remove();
+ } else {
+ // 计算父的同级下一行
+ var _tmp_ls = _p_data.row_id.split("_");
+ var _p_next = _p_data.row_id.substring(0, _p_data.row_id.length - 1) + (parseInt(_tmp_ls[_tmp_ls.length - 1]) + 1);
+ // 画上
+ $("#" + _p_next).before(tr);
+ }
+ } else {
+ tr = renderRow(item, false, _lv, row_id, p_id);
+ if (_data) {
+ $("#" + _data.row_id).before(tr);
+ $("#" + _data.row_id).remove();
+ } else {
+ // 画上
+ var tbody = target.find("tbody");
+ tbody.append(tr);
+ }
+ }
+ item.isShow = true;
+ // 缓存并格式化数据
+ formatData([item]);
+ });
+ registerExpanderEvent();
+ registerRowClickEvent();
+ initHiddenColumns();
+ }
+
+ // 展开/折叠指定的行
+ target.toggleRow=function(id) {
+ var _rowData = target.data_obj["id_" + id];
+ var $row_expander = $("#"+_rowData.row_id).find(".treetable-expander");
+ $row_expander.trigger("click");
+ }
+ // 展开指定的行
+ target.expandRow=function(id) {
+ var _rowData = target.data_obj["id_" + id];
+ var $row_expander = $("#"+_rowData.row_id).find(".treetable-expander");
+ var _isCollapsed = $row_expander.hasClass(target.options.expanderCollapsedClass);
+ if (_isCollapsed) {
+ $row_expander.trigger("click");
+ }
+ }
+ // 折叠 指定的行
+ target.collapseRow=function(id) {
+ var _rowData = target.data_obj["id_" + id];
+ var $row_expander = $("#"+_rowData.row_id).find(".treetable-expander");
+ var _isExpanded = $row_expander.hasClass(target.options.expanderExpandedClass);
+ if (_isExpanded) {
+ $row_expander.trigger("click");
+ }
+ }
+ // 展开所有的行
+ target.expandAll=function() {
+ target.find("tbody").find("tr").find(".treetable-expander").each(function(i,n){
+ var _isCollapsed = $(n).hasClass(options.expanderCollapsedClass);
+ if (_isCollapsed) {
+ $(n).trigger("click");
+ }
+ })
+ }
+ // 折叠所有的行
+ target.collapseAll=function() {
+ target.find("tbody").find("tr").find(".treetable-expander").each(function(i,n){
+ var _isExpanded = $(n).hasClass(options.expanderExpandedClass);
+ if (_isExpanded) {
+ $(n).trigger("click");
+ }
+ })
+ }
+ // 显示指定列
+ target.showColumn=function(field,flag) {
+ var _index = $.inArray(field, target.hiddenColumns);
+ if (_index > -1) {
+ target.hiddenColumns.splice(_index, 1);
+ }
+ target.find("."+field+"_cls").show();
+ //是否更新列选项状态
+ if(flag&&options.showColumns){
+ var $input = $(".bootstrap-tree-table .treetable-bars .columns label").find("input[value='"+field+"']")
+ $input.prop("checked", 'checked');
+ }
+ }
+ // 隐藏指定列
+ target.hideColumn=function(field,flag) {
+ target.hiddenColumns.push(field);
+ target.find("."+field+"_cls").hide();
+ //是否更新列选项状态
+ if(flag&&options.showColumns){
+ var $input = $(".bootstrap-tree-table .treetable-bars .columns label").find("input[value='"+field+"']")
+ $input.prop("checked", '');
+ }
+ }
+ // 初始化
+ init();
+ return target;
+ };
+
+ // 组件方法封装........
+ $.fn.bootstrapTreeTable.methods = {
+ // 为了兼容bootstrap-table的写法,统一返回数组,这里返回了表格显示列的数据
+ getSelections: function(target, data) {
+ // 所有被选中的记录input
+ var _ipt = target.find("tbody").find("tr").find("input[name='select_item']:checked");
+ var chk_value = [];
+ // 如果是radio
+ if (_ipt.attr("type") == "radio") {
+ var _data = target.data_obj["id_" + _ipt.val()];
+ chk_value.push(_data);
+ } else {
+ _ipt.each(function(_i, _item) {
+ var _data = target.data_obj["id_" + $(_item).val()];
+ chk_value.push(_data);
+ });
+ }
+ return chk_value;
+ },
+ // 刷新记录
+ refresh: function(target, parms) {
+ if (parms) {
+ target.refresh(parms);
+ } else {
+ target.refresh();
+ }
+ },
+ // 添加数据到表格
+ appendData: function(target, data) {
+ if (data) {
+ target.appendData(data);
+ }
+ },
+ // 展开/折叠指定的行
+ toggleRow: function(target, id) {
+ target.toggleRow(id);
+ },
+ // 展开指定的行
+ expandRow: function(target, id) {
+ target.expandRow(id);
+ },
+ // 折叠 指定的行
+ collapseRow: function(target, id) {
+ target.collapseRow(id);
+ },
+ // 展开所有的行
+ expandAll: function(target) {
+ target.expandAll();
+ },
+ // 折叠所有的行
+ collapseAll: function(target) {
+ target.collapseAll();
+ },
+ // 显示指定列
+ showColumn: function(target,field) {
+ target.showColumn(field,true);
+ },
+ // 隐藏指定列
+ hideColumn: function(target,field) {
+ target.hideColumn(field,true);
+ }
+ // 组件的其他方法也可以进行类似封装........
+ };
+
+ $.fn.bootstrapTreeTable.defaults = {
+ code: 'code', // 选取记录返回的值,用于设置父子关系
+ parentCode: 'parentCode', // 用于设置父子关系
+ rootIdValue: null, // 设置根节点id值----可指定根节点,默认为null,"",0,"0"
+ data: null, // 构造table的数据集合
+ type: "GET", // 请求数据的ajax类型
+ url: null, // 请求数据的ajax的url
+ ajaxParams: {}, // 请求数据的ajax的data属性
+ expandColumn: 0, // 在哪一列上面显示展开按钮
+ expandAll: false, // 是否全部展开
+ expandFirst: true, // 是否默认第一级展开--expandAll为false时生效
+ striped: false, // 是否各行渐变色
+ bordered: true, // 是否显示边框
+ hover: true, // 是否鼠标悬停
+ condensed: false, // 是否紧缩表格
+ columns: [], // 列
+ toolbar: null, // 顶部工具条
+ height: 0, // 表格高度
+ showTitle: true, // 是否采用title属性显示字段内容(被formatter格式化的字段不会显示)
+ showColumns: true, // 是否显示内容列下拉框
+ showRefresh: true, // 是否显示刷新按钮
+ expanderExpandedClass: 'glyphicon glyphicon-chevron-down', // 展开的按钮的图标
+ expanderCollapsedClass: 'glyphicon glyphicon-chevron-right' // 缩起的按钮的图标
+
+ };
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
})(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.css b/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.css
index b208d9f53..eb7e95c4b 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@charset "utf-8";
.container {
margin: 10px auto 0 auto;
@@ -125,3 +126,132 @@ a.upload-img:hover{
}
.tc{text-align:center;}
+=======
+@charset "utf-8";
+.container {
+ margin: 10px auto 0 auto;
+ position: relative;
+ font-family: 微软雅黑;
+ font-size: 12px;
+}
+.container p {
+ line-height: 12px;
+ line-height: 0px;
+ height: 0px;
+ margin: 10px;
+ color: #bbb
+}
+.action {
+ width: 400px;
+ height: 30px;
+ margin: 10px 0;
+}
+.cropped {
+ position: absolute;
+ left: 500px;
+ top: 0;
+ width: 200px;
+ border: 1px #ddd solid;
+ height: 440px;
+ padding: 4px;
+ box-shadow: 0px 0px 12px #ddd;
+ text-align: center;
+}
+.imageBox {
+ position: relative;
+ height: 400px;
+ width: 400px;
+ border: 1px solid #aaa;
+ background: #fff;
+ overflow: hidden;
+ background-repeat: no-repeat;
+ cursor: move;
+ box-shadow: 4px 4px 12px #B0B0B0;
+}
+.imageBox .thumbBox {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 200px;
+ height: 200px;
+ margin-top: -100px;
+ margin-left: -100px;
+ box-sizing: border-box;
+ border: 1px solid rgb(102, 102, 102);
+ box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5);
+ background: none repeat scroll 0% 0% transparent;
+}
+.imageBox .spinner {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ text-align: center;
+ line-height: 400px;
+ background: rgba(0,0,0,0.7);
+}
+.Btnsty_peyton{ float: right;
+ width: 46px;
+ display: inline-block;
+ margin-bottom: 10px;
+ height: 37px;
+ line-height: 37px;
+ font-size: 14px;
+ color: #FFFFFF;
+ margin:0px 2px;
+ background-color: #f38e81;
+ border-radius: 3px;
+ text-decoration: none;
+ cursor: pointer;
+ box-shadow: 0px 0px 5px #B0B0B0;
+ border: 0px #fff solid;}
+/*选择文件上传*/
+.new-contentarea {
+ width: 165px;
+ overflow:hidden;
+ margin: 0 auto;
+ position:relative;float:left;
+}
+.new-contentarea label {
+ width:100%;
+ height:100%;
+ display:block;
+}
+.new-contentarea input[type=file] {
+ width:188px;
+ height:60px;
+ background:#333;
+ margin: 0 auto;
+ position:absolute;
+ right:50%;
+ margin-right:-94px;
+ top:0;
+ right/*\**/:0px\9;
+ margin-right/*\**/:0px\9;
+ width/*\**/:10px\9;
+ opacity:0;
+ filter:alpha(opacity=0);
+ z-index:2;
+}
+a.upload-img{
+ width:165px;
+ display: inline-block;
+ margin-bottom: 10px;
+ height:37px;
+ line-height: 37px;
+ font-size: 14px;
+ color: #FFFFFF;
+ background-color: #f38e81;
+ border-radius: 3px;
+ text-decoration:none;
+ cursor:pointer;
+ border: 0px #fff solid;
+ box-shadow: 0px 0px 5px #B0B0B0;
+}
+a.upload-img:hover{
+ background-color: #ec7e70;
+}
+
+.tc{text-align:center;}
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js b/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js
index 540995a01..ed20fdbfb 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
"use strict";
(function (factory) {
if (typeof define === 'function' && define.amd) {
@@ -133,3 +134,140 @@
return new cropbox(options, this);
};
}));
+=======
+"use strict";
+(function (factory) {
+ if (typeof define === 'function' && define.amd) {
+ define(['jquery'], factory);
+ } else {
+ factory(jQuery);
+ }
+}(function ($) {
+ var cropbox = function(options, el){
+ var el = el || $(options.imageBox),
+ obj =
+ {
+ state : {},
+ ratio : 1,
+ options : options,
+ imageBox : el,
+ thumbBox : el.find(options.thumbBox),
+ spinner : el.find(options.spinner),
+ image : new Image(),
+ getDataURL: function ()
+ {
+ var width = this.thumbBox.width(),
+ height = this.thumbBox.height(),
+ canvas = document.createElement("canvas"),
+ dim = el.css('background-position').split(' '),
+ size = el.css('background-size').split(' '),
+ dx = parseInt(dim[0]) - el.width()/2 + width/2,
+ dy = parseInt(dim[1]) - el.height()/2 + height/2,
+ dw = parseInt(size[0]),
+ dh = parseInt(size[1]),
+ sh = parseInt(this.image.height),
+ sw = parseInt(this.image.width);
+
+ canvas.width = width;
+ canvas.height = height;
+ var context = canvas.getContext("2d");
+ context.drawImage(this.image, 0, 0, sw, sh, dx, dy, dw, dh);
+ var imageData = canvas.toDataURL('image/png');
+ return imageData;
+ },
+ getBlob: function()
+ {
+ var imageData = this.getDataURL();
+ var b64 = imageData.replace('data:image/png;base64,','');
+ var binary = atob(b64);
+ var array = [];
+ for (var i = 0; i < binary.length; i++) {
+ array.push(binary.charCodeAt(i));
+ }
+ return new Blob([new Uint8Array(array)], {type: 'image/png'});
+ },
+ zoomIn: function ()
+ {
+ this.ratio*=1.1;
+ setBackground();
+ },
+ zoomOut: function ()
+ {
+ this.ratio*=0.9;
+ setBackground();
+ }
+ },
+ setBackground = function()
+ {
+ var w = parseInt(obj.image.width)*obj.ratio;
+ var h = parseInt(obj.image.height)*obj.ratio;
+
+ var pw = (el.width() - w) / 2;
+ var ph = (el.height() - h) / 2;
+
+ el.css({
+ 'background-image': 'url(' + obj.image.src + ')',
+ 'background-size': w +'px ' + h + 'px',
+ 'background-position': pw + 'px ' + ph + 'px',
+ 'background-repeat': 'no-repeat'});
+ },
+ imgMouseDown = function(e)
+ {
+ e.stopImmediatePropagation();
+
+ obj.state.dragable = true;
+ obj.state.mouseX = e.clientX;
+ obj.state.mouseY = e.clientY;
+ },
+ imgMouseMove = function(e)
+ {
+ e.stopImmediatePropagation();
+
+ if (obj.state.dragable)
+ {
+ var x = e.clientX - obj.state.mouseX;
+ var y = e.clientY - obj.state.mouseY;
+
+ var bg = el.css('background-position').split(' ');
+
+ var bgX = x + parseInt(bg[0]);
+ var bgY = y + parseInt(bg[1]);
+
+ el.css('background-position', bgX +'px ' + bgY + 'px');
+
+ obj.state.mouseX = e.clientX;
+ obj.state.mouseY = e.clientY;
+ }
+ },
+ imgMouseUp = function(e)
+ {
+ e.stopImmediatePropagation();
+ obj.state.dragable = false;
+ },
+ zoomImage = function(e)
+ {
+ e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0 ? obj.ratio*=1.1 : obj.ratio*=0.9;
+ setBackground();
+ }
+
+ obj.spinner.show();
+ obj.image.onload = function() {
+ obj.spinner.hide();
+ setBackground();
+
+ el.bind('mousedown', imgMouseDown);
+ el.bind('mousemove', imgMouseMove);
+ $(window).bind('mouseup', imgMouseUp);
+ el.bind('mousewheel DOMMouseScroll', zoomImage);
+ };
+ obj.image.src = options.imgSrc;
+ el.on('remove', function(){$(window).unbind('mouseup', imgMouseUp)});
+
+ return obj;
+ };
+
+ jQuery.fn.cropbox = function(options){
+ return new cropbox(options, this);
+ };
+}));
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datepicker.js b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datepicker.js
index fe8256350..b63352c92 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datepicker.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datepicker.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/* =========================================================
* bootstrap-datepicker.js
* Repo: https://github.com/eternicode/bootstrap-datepicker/
@@ -1669,3 +1670,1676 @@
});
}(window.jQuery));
+=======
+/* =========================================================
+ * bootstrap-datepicker.js
+ * Repo: https://github.com/eternicode/bootstrap-datepicker/
+ * Demo: http://eternicode.github.io/bootstrap-datepicker/
+ * Docs: http://bootstrap-datepicker.readthedocs.org/
+ * Forked from http://www.eyecon.ro/bootstrap-datepicker
+ * =========================================================
+ * Started by Stefan Petre; improvements by Andrew Rowls + contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+(function($, undefined){
+
+ var $window = $(window);
+
+ function UTCDate(){
+ return new Date(Date.UTC.apply(Date, arguments));
+ }
+ function UTCToday(){
+ var today = new Date();
+ return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
+ }
+ function alias(method){
+ return function(){
+ return this[method].apply(this, arguments);
+ };
+ }
+
+ var DateArray = (function(){
+ var extras = {
+ get: function(i){
+ return this.slice(i)[0];
+ },
+ contains: function(d){
+ // Array.indexOf is not cross-browser;
+ // $.inArray doesn't work with Dates
+ var val = d && d.valueOf();
+ for (var i=0, l=this.length; i < l; i++)
+ if (this[i].valueOf() === val)
+ return i;
+ return -1;
+ },
+ remove: function(i){
+ this.splice(i,1);
+ },
+ replace: function(new_array){
+ if (!new_array)
+ return;
+ if (!$.isArray(new_array))
+ new_array = [new_array];
+ this.clear();
+ this.push.apply(this, new_array);
+ },
+ clear: function(){
+ this.splice(0);
+ },
+ copy: function(){
+ var a = new DateArray();
+ a.replace(this);
+ return a;
+ }
+ };
+
+ return function(){
+ var a = [];
+ a.push.apply(a, arguments);
+ $.extend(a, extras);
+ return a;
+ };
+ })();
+
+
+ // Picker object
+
+ var Datepicker = function(element, options){
+ this.dates = new DateArray();
+ this.viewDate = UTCToday();
+ this.focusDate = null;
+
+ this._process_options(options);
+
+ this.element = $(element);
+ this.isInline = false;
+ this.isInput = this.element.is('input');
+ this.component = this.element.is('.date') ? this.element.find('.add-on, .input-group-addon, .btn') : false;
+ this.hasInput = this.component && this.element.find('input').length;
+ if (this.component && this.component.length === 0)
+ this.component = false;
+
+ this.picker = $(DPGlobal.template);
+ this._buildEvents();
+ this._attachEvents();
+
+ if (this.isInline){
+ this.picker.addClass('datepicker-inline').appendTo(this.element);
+ }
+ else {
+ this.picker.addClass('datepicker-dropdown dropdown-menu');
+ }
+
+ if (this.o.rtl){
+ this.picker.addClass('datepicker-rtl');
+ }
+
+ this.viewMode = this.o.startView;
+
+ if (this.o.calendarWeeks)
+ this.picker.find('tfoot th.today')
+ .attr('colspan', function(i, val){
+ return parseInt(val) + 1;
+ });
+
+ this._allow_update = false;
+
+ this.setStartDate(this._o.startDate);
+ this.setEndDate(this._o.endDate);
+ this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);
+
+ this.fillDow();
+ this.fillMonths();
+
+ this._allow_update = true;
+
+ this.update();
+ this.showMode();
+
+ if (this.isInline){
+ this.show();
+ }
+ };
+
+ Datepicker.prototype = {
+ constructor: Datepicker,
+
+ _process_options: function(opts){
+ // Store raw options for reference
+ this._o = $.extend({}, this._o, opts);
+ // Processed options
+ var o = this.o = $.extend({}, this._o);
+
+ // Check if "de-DE" style date is available, if not language should
+ // fallback to 2 letter code eg "de"
+ var lang = o.language;
+ if (!dates[lang]){
+ lang = lang.split('-')[0];
+ if (!dates[lang])
+ lang = defaults.language;
+ }
+ o.language = lang;
+
+ switch (o.startView){
+ case 2:
+ case 'decade':
+ o.startView = 2;
+ break;
+ case 1:
+ case 'year':
+ o.startView = 1;
+ break;
+ default:
+ o.startView = 0;
+ }
+
+ switch (o.minViewMode){
+ case 1:
+ case 'months':
+ o.minViewMode = 1;
+ break;
+ case 2:
+ case 'years':
+ o.minViewMode = 2;
+ break;
+ default:
+ o.minViewMode = 0;
+ }
+
+ o.startView = Math.max(o.startView, o.minViewMode);
+
+ // true, false, or Number > 0
+ if (o.multidate !== true){
+ o.multidate = Number(o.multidate) || false;
+ if (o.multidate !== false)
+ o.multidate = Math.max(0, o.multidate);
+ else
+ o.multidate = 1;
+ }
+ o.multidateSeparator = String(o.multidateSeparator);
+
+ o.weekStart %= 7;
+ o.weekEnd = ((o.weekStart + 6) % 7);
+
+ var format = DPGlobal.parseFormat(o.format);
+ if (o.startDate !== -Infinity){
+ if (!!o.startDate){
+ if (o.startDate instanceof Date)
+ o.startDate = this._local_to_utc(this._zero_time(o.startDate));
+ else
+ o.startDate = DPGlobal.parseDate(o.startDate, format, o.language);
+ }
+ else {
+ o.startDate = -Infinity;
+ }
+ }
+ if (o.endDate !== Infinity){
+ if (!!o.endDate){
+ if (o.endDate instanceof Date)
+ o.endDate = this._local_to_utc(this._zero_time(o.endDate));
+ else
+ o.endDate = DPGlobal.parseDate(o.endDate, format, o.language);
+ }
+ else {
+ o.endDate = Infinity;
+ }
+ }
+
+ o.daysOfWeekDisabled = o.daysOfWeekDisabled||[];
+ if (!$.isArray(o.daysOfWeekDisabled))
+ o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/);
+ o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d){
+ return parseInt(d, 10);
+ });
+
+ var plc = String(o.orientation).toLowerCase().split(/\s+/g),
+ _plc = o.orientation.toLowerCase();
+ plc = $.grep(plc, function(word){
+ return (/^auto|left|right|top|bottom$/).test(word);
+ });
+ o.orientation = {x: 'auto', y: 'auto'};
+ if (!_plc || _plc === 'auto')
+ ; // no action
+ else if (plc.length === 1){
+ switch (plc[0]){
+ case 'top':
+ case 'bottom':
+ o.orientation.y = plc[0];
+ break;
+ case 'left':
+ case 'right':
+ o.orientation.x = plc[0];
+ break;
+ }
+ }
+ else {
+ _plc = $.grep(plc, function(word){
+ return (/^left|right$/).test(word);
+ });
+ o.orientation.x = _plc[0] || 'auto';
+
+ _plc = $.grep(plc, function(word){
+ return (/^top|bottom$/).test(word);
+ });
+ o.orientation.y = _plc[0] || 'auto';
+ }
+ },
+ _events: [],
+ _secondaryEvents: [],
+ _applyEvents: function(evs){
+ for (var i=0, el, ch, ev; i < evs.length; i++){
+ el = evs[i][0];
+ if (evs[i].length === 2){
+ ch = undefined;
+ ev = evs[i][1];
+ }
+ else if (evs[i].length === 3){
+ ch = evs[i][1];
+ ev = evs[i][2];
+ }
+ el.on(ev, ch);
+ }
+ },
+ _unapplyEvents: function(evs){
+ for (var i=0, el, ev, ch; i < evs.length; i++){
+ el = evs[i][0];
+ if (evs[i].length === 2){
+ ch = undefined;
+ ev = evs[i][1];
+ }
+ else if (evs[i].length === 3){
+ ch = evs[i][1];
+ ev = evs[i][2];
+ }
+ el.off(ev, ch);
+ }
+ },
+ _buildEvents: function(){
+ if (this.isInput){ // single input
+ this._events = [
+ [this.element, {
+ focus: $.proxy(this.show, this),
+ keyup: $.proxy(function(e){
+ if ($.inArray(e.keyCode, [27,37,39,38,40,32,13,9]) === -1)
+ this.update();
+ }, this),
+ keydown: $.proxy(this.keydown, this)
+ }]
+ ];
+ }
+ else if (this.component && this.hasInput){ // component: input + button
+ this._events = [
+ // For components that are not readonly, allow keyboard nav
+ [this.element.find('input'), {
+ focus: $.proxy(this.show, this),
+ keyup: $.proxy(function(e){
+ if ($.inArray(e.keyCode, [27,37,39,38,40,32,13,9]) === -1)
+ this.update();
+ }, this),
+ keydown: $.proxy(this.keydown, this)
+ }],
+ [this.component, {
+ click: $.proxy(this.show, this)
+ }]
+ ];
+ }
+ else if (this.element.is('div')){ // inline datepicker
+ this.isInline = true;
+ }
+ else {
+ this._events = [
+ [this.element, {
+ click: $.proxy(this.show, this)
+ }]
+ ];
+ }
+ this._events.push(
+ // Component: listen for blur on element descendants
+ [this.element, '*', {
+ blur: $.proxy(function(e){
+ this._focused_from = e.target;
+ }, this)
+ }],
+ // Input: listen for blur on element
+ [this.element, {
+ blur: $.proxy(function(e){
+ this._focused_from = e.target;
+ }, this)
+ }]
+ );
+
+ this._secondaryEvents = [
+ [this.picker, {
+ click: $.proxy(this.click, this)
+ }],
+ [$(window), {
+ resize: $.proxy(this.place, this)
+ }],
+ [$(document), {
+ 'mousedown touchstart': $.proxy(function(e){
+ // Clicked outside the datepicker, hide it
+ if (!(
+ this.element.is(e.target) ||
+ this.element.find(e.target).length ||
+ this.picker.is(e.target) ||
+ this.picker.find(e.target).length
+ )){
+ this.hide();
+ }
+ }, this)
+ }]
+ ];
+ },
+ _attachEvents: function(){
+ this._detachEvents();
+ this._applyEvents(this._events);
+ },
+ _detachEvents: function(){
+ this._unapplyEvents(this._events);
+ },
+ _attachSecondaryEvents: function(){
+ this._detachSecondaryEvents();
+ this._applyEvents(this._secondaryEvents);
+ },
+ _detachSecondaryEvents: function(){
+ this._unapplyEvents(this._secondaryEvents);
+ },
+ _trigger: function(event, altdate){
+ var date = altdate || this.dates.get(-1),
+ local_date = this._utc_to_local(date);
+
+ this.element.trigger({
+ type: event,
+ date: local_date,
+ dates: $.map(this.dates, this._utc_to_local),
+ format: $.proxy(function(ix, format){
+ if (arguments.length === 0){
+ ix = this.dates.length - 1;
+ format = this.o.format;
+ }
+ else if (typeof ix === 'string'){
+ format = ix;
+ ix = this.dates.length - 1;
+ }
+ format = format || this.o.format;
+ var date = this.dates.get(ix);
+ return DPGlobal.formatDate(date, format, this.o.language);
+ }, this)
+ });
+ },
+
+ show: function(){
+ if (!this.isInline)
+ this.picker.appendTo('body');
+ this.picker.show();
+ this.place();
+ this._attachSecondaryEvents();
+ this._trigger('show');
+ },
+
+ hide: function(){
+ if (this.isInline)
+ return;
+ if (!this.picker.is(':visible'))
+ return;
+ this.focusDate = null;
+ this.picker.hide().detach();
+ this._detachSecondaryEvents();
+ this.viewMode = this.o.startView;
+ this.showMode();
+
+ if (
+ this.o.forceParse &&
+ (
+ this.isInput && this.element.val() ||
+ this.hasInput && this.element.find('input').val()
+ )
+ )
+ this.setValue();
+ this._trigger('hide');
+ },
+
+ remove: function(){
+ this.hide();
+ this._detachEvents();
+ this._detachSecondaryEvents();
+ this.picker.remove();
+ delete this.element.data().datepicker;
+ if (!this.isInput){
+ delete this.element.data().date;
+ }
+ },
+
+ _utc_to_local: function(utc){
+ return utc && new Date(utc.getTime() + (utc.getTimezoneOffset()*60000));
+ },
+ _local_to_utc: function(local){
+ return local && new Date(local.getTime() - (local.getTimezoneOffset()*60000));
+ },
+ _zero_time: function(local){
+ return local && new Date(local.getFullYear(), local.getMonth(), local.getDate());
+ },
+ _zero_utc_time: function(utc){
+ return utc && new Date(Date.UTC(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()));
+ },
+
+ getDates: function(){
+ return $.map(this.dates, this._utc_to_local);
+ },
+
+ getUTCDates: function(){
+ return $.map(this.dates, function(d){
+ return new Date(d);
+ });
+ },
+
+ getDate: function(){
+ return this._utc_to_local(this.getUTCDate());
+ },
+
+ getUTCDate: function(){
+ return new Date(this.dates.get(-1));
+ },
+
+ setDates: function(){
+ var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
+ this.update.apply(this, args);
+ this._trigger('changeDate');
+ this.setValue();
+ },
+
+ setUTCDates: function(){
+ var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
+ this.update.apply(this, $.map(args, this._utc_to_local));
+ this._trigger('changeDate');
+ this.setValue();
+ },
+
+ setDate: alias('setDates'),
+ setUTCDate: alias('setUTCDates'),
+
+ setValue: function(){
+ var formatted = this.getFormattedDate();
+ if (!this.isInput){
+ if (this.component){
+ this.element.find('input').val(formatted).change();
+ }
+ }
+ else {
+ this.element.val(formatted).change();
+ }
+ },
+
+ getFormattedDate: function(format){
+ if (format === undefined)
+ format = this.o.format;
+
+ var lang = this.o.language;
+ return $.map(this.dates, function(d){
+ return DPGlobal.formatDate(d, format, lang);
+ }).join(this.o.multidateSeparator);
+ },
+
+ setStartDate: function(startDate){
+ this._process_options({startDate: startDate});
+ this.update();
+ this.updateNavArrows();
+ },
+
+ setEndDate: function(endDate){
+ this._process_options({endDate: endDate});
+ this.update();
+ this.updateNavArrows();
+ },
+
+ setDaysOfWeekDisabled: function(daysOfWeekDisabled){
+ this._process_options({daysOfWeekDisabled: daysOfWeekDisabled});
+ this.update();
+ this.updateNavArrows();
+ },
+
+ place: function(){
+ if (this.isInline)
+ return;
+ var calendarWidth = this.picker.outerWidth(),
+ calendarHeight = this.picker.outerHeight(),
+ visualPadding = 10,
+ windowWidth = $window.width(),
+ windowHeight = $window.height(),
+ scrollTop = $window.scrollTop();
+
+ var zIndex = parseInt(this.element.parents().filter(function(){
+ return $(this).css('z-index') !== 'auto';
+ }).first().css('z-index'))+10;
+ var offset = this.component ? this.component.parent().offset() : this.element.offset();
+ var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false);
+ var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false);
+ var left = offset.left,
+ top = offset.top;
+
+ this.picker.removeClass(
+ 'datepicker-orient-top datepicker-orient-bottom '+
+ 'datepicker-orient-right datepicker-orient-left'
+ );
+
+ if (this.o.orientation.x !== 'auto'){
+ this.picker.addClass('datepicker-orient-' + this.o.orientation.x);
+ if (this.o.orientation.x === 'right')
+ left -= calendarWidth - width;
+ }
+ // auto x orientation is best-placement: if it crosses a window
+ // edge, fudge it sideways
+ else {
+ // Default to left
+ this.picker.addClass('datepicker-orient-left');
+ if (offset.left < 0)
+ left -= offset.left - visualPadding;
+ else if (offset.left + calendarWidth > windowWidth)
+ left = windowWidth - calendarWidth - visualPadding;
+ }
+
+ // auto y orientation is best-situation: top or bottom, no fudging,
+ // decision based on which shows more of the calendar
+ var yorient = this.o.orientation.y,
+ top_overflow, bottom_overflow;
+ if (yorient === 'auto'){
+ top_overflow = -scrollTop + offset.top - calendarHeight;
+ bottom_overflow = scrollTop + windowHeight - (offset.top + height + calendarHeight);
+ if (Math.max(top_overflow, bottom_overflow) === bottom_overflow)
+ yorient = 'top';
+ else
+ yorient = 'bottom';
+ }
+ this.picker.addClass('datepicker-orient-' + yorient);
+ if (yorient === 'top')
+ top += height;
+ else
+ top -= calendarHeight + parseInt(this.picker.css('padding-top'));
+
+ this.picker.css({
+ top: top,
+ left: left,
+ zIndex: zIndex
+ });
+ },
+
+ _allow_update: true,
+ update: function(){
+ if (!this._allow_update)
+ return;
+
+ var oldDates = this.dates.copy(),
+ dates = [],
+ fromArgs = false;
+ if (arguments.length){
+ $.each(arguments, $.proxy(function(i, date){
+ if (date instanceof Date)
+ date = this._local_to_utc(date);
+ dates.push(date);
+ }, this));
+ fromArgs = true;
+ }
+ else {
+ dates = this.isInput
+ ? this.element.val()
+ : this.element.data('date') || this.element.find('input').val();
+ if (dates && this.o.multidate)
+ dates = dates.split(this.o.multidateSeparator);
+ else
+ dates = [dates];
+ delete this.element.data().date;
+ }
+
+ dates = $.map(dates, $.proxy(function(date){
+ return DPGlobal.parseDate(date, this.o.format, this.o.language);
+ }, this));
+ dates = $.grep(dates, $.proxy(function(date){
+ return (
+ date < this.o.startDate ||
+ date > this.o.endDate ||
+ !date
+ );
+ }, this), true);
+ this.dates.replace(dates);
+
+ if (this.dates.length)
+ this.viewDate = new Date(this.dates.get(-1));
+ else if (this.viewDate < this.o.startDate)
+ this.viewDate = new Date(this.o.startDate);
+ else if (this.viewDate > this.o.endDate)
+ this.viewDate = new Date(this.o.endDate);
+
+ if (fromArgs){
+ // setting date by clicking
+ this.setValue();
+ }
+ else if (dates.length){
+ // setting date by typing
+ if (String(oldDates) !== String(this.dates))
+ this._trigger('changeDate');
+ }
+ if (!this.dates.length && oldDates.length)
+ this._trigger('clearDate');
+
+ this.fill();
+ },
+
+ fillDow: function(){
+ var dowCnt = this.o.weekStart,
+ html = '
';
+ if (this.o.calendarWeeks){
+ var cell = ' ';
+ html += cell;
+ this.picker.find('.datepicker-days thead tr:first-child').prepend(cell);
+ }
+ while (dowCnt < this.o.weekStart + 7){
+ html += ''+dates[this.o.language].daysMin[(dowCnt++)%7]+' ';
+ }
+ html += ' ';
+ this.picker.find('.datepicker-days thead').append(html);
+ },
+
+ fillMonths: function(){
+ var html = '',
+ i = 0;
+ while (i < 12){
+ html += '
'+dates[this.o.language].monthsShort[i++]+' ';
+ }
+ this.picker.find('.datepicker-months td').html(html);
+ },
+
+ setRange: function(range){
+ if (!range || !range.length)
+ delete this.range;
+ else
+ this.range = $.map(range, function(d){
+ return d.valueOf();
+ });
+ this.fill();
+ },
+
+ getClassNames: function(date){
+ var cls = [],
+ year = this.viewDate.getUTCFullYear(),
+ month = this.viewDate.getUTCMonth(),
+ today = new Date();
+ if (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){
+ cls.push('old');
+ }
+ else if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){
+ cls.push('new');
+ }
+ if (this.focusDate && date.valueOf() === this.focusDate.valueOf())
+ cls.push('focused');
+ // Compare internal UTC date with local today, not UTC today
+ if (this.o.todayHighlight &&
+ date.getUTCFullYear() === today.getFullYear() &&
+ date.getUTCMonth() === today.getMonth() &&
+ date.getUTCDate() === today.getDate()){
+ cls.push('today');
+ }
+ if (this.dates.contains(date) !== -1)
+ cls.push('active');
+ if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate ||
+ $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1){
+ cls.push('disabled');
+ }
+ if (this.range){
+ if (date > this.range[0] && date < this.range[this.range.length-1]){
+ cls.push('range');
+ }
+ if ($.inArray(date.valueOf(), this.range) !== -1){
+ cls.push('selected');
+ }
+ }
+ return cls;
+ },
+
+ fill: function(){
+ var d = new Date(this.viewDate),
+ year = d.getUTCFullYear(),
+ month = d.getUTCMonth(),
+ startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,
+ startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity,
+ endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity,
+ endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity,
+ todaytxt = dates[this.o.language].today || dates['en'].today || '',
+ cleartxt = dates[this.o.language].clear || dates['en'].clear || '',
+ tooltip;
+ this.picker.find('.datepicker-days thead th.datepicker-switch')
+ .text(dates[this.o.language].months[month]+' '+year);
+ this.picker.find('tfoot th.today')
+ .text(todaytxt)
+ .toggle(this.o.todayBtn !== false);
+ this.picker.find('tfoot th.clear')
+ .text(cleartxt)
+ .toggle(this.o.clearBtn !== false);
+ this.updateNavArrows();
+ this.fillMonths();
+ var prevMonth = UTCDate(year, month-1, 28),
+ day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());
+ prevMonth.setUTCDate(day);
+ prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7);
+ var nextMonth = new Date(prevMonth);
+ nextMonth.setUTCDate(nextMonth.getUTCDate() + 42);
+ nextMonth = nextMonth.valueOf();
+ var html = [];
+ var clsName;
+ while (prevMonth.valueOf() < nextMonth){
+ if (prevMonth.getUTCDay() === this.o.weekStart){
+ html.push('
');
+ if (this.o.calendarWeeks){
+ // ISO 8601: First week contains first thursday.
+ // ISO also states week starts on Monday, but we can be more abstract here.
+ var
+ // Start of current week: based on weekstart/current date
+ ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5),
+ // Thursday of this week
+ th = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5),
+ // First Thursday of year, year from thursday
+ yth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5),
+ // Calendar week: ms between thursdays, div ms per day, div 7 days
+ calWeek = (th - yth) / 864e5 / 7 + 1;
+ html.push(''+ calWeek +' ');
+
+ }
+ }
+ clsName = this.getClassNames(prevMonth);
+ clsName.push('day');
+
+ if (this.o.beforeShowDay !== $.noop){
+ var before = this.o.beforeShowDay(this._utc_to_local(prevMonth));
+ if (before === undefined)
+ before = {};
+ else if (typeof(before) === 'boolean')
+ before = {enabled: before};
+ else if (typeof(before) === 'string')
+ before = {classes: before};
+ if (before.enabled === false)
+ clsName.push('disabled');
+ if (before.classes)
+ clsName = clsName.concat(before.classes.split(/\s+/));
+ if (before.tooltip)
+ tooltip = before.tooltip;
+ }
+
+ clsName = $.unique(clsName);
+ html.push(''+prevMonth.getUTCDate() + ' ');
+ if (prevMonth.getUTCDay() === this.o.weekEnd){
+ html.push(' ');
+ }
+ prevMonth.setUTCDate(prevMonth.getUTCDate()+1);
+ }
+ this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
+
+ var months = this.picker.find('.datepicker-months')
+ .find('th:eq(1)')
+ .text(year)
+ .end()
+ .find('span').removeClass('active');
+
+ $.each(this.dates, function(i, d){
+ if (d.getUTCFullYear() === year)
+ months.eq(d.getUTCMonth()).addClass('active');
+ });
+
+ if (year < startYear || year > endYear){
+ months.addClass('disabled');
+ }
+ if (year === startYear){
+ months.slice(0, startMonth).addClass('disabled');
+ }
+ if (year === endYear){
+ months.slice(endMonth+1).addClass('disabled');
+ }
+
+ html = '';
+ year = parseInt(year/10, 10) * 10;
+ var yearCont = this.picker.find('.datepicker-years')
+ .find('th:eq(1)')
+ .text(year + '-' + (year + 9))
+ .end()
+ .find('td');
+ year -= 1;
+ var years = $.map(this.dates, function(d){
+ return d.getUTCFullYear();
+ }),
+ classes;
+ for (var i = -1; i < 11; i++){
+ classes = ['year'];
+ if (i === -1)
+ classes.push('old');
+ else if (i === 10)
+ classes.push('new');
+ if ($.inArray(year, years) !== -1)
+ classes.push('active');
+ if (year < startYear || year > endYear)
+ classes.push('disabled');
+ html += '
'+year+' ';
+ year += 1;
+ }
+ yearCont.html(html);
+ },
+
+ updateNavArrows: function(){
+ if (!this._allow_update)
+ return;
+
+ var d = new Date(this.viewDate),
+ year = d.getUTCFullYear(),
+ month = d.getUTCMonth();
+ switch (this.viewMode){
+ case 0:
+ if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()){
+ this.picker.find('.prev').css({visibility: 'hidden'});
+ }
+ else {
+ this.picker.find('.prev').css({visibility: 'visible'});
+ }
+ if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()){
+ this.picker.find('.next').css({visibility: 'hidden'});
+ }
+ else {
+ this.picker.find('.next').css({visibility: 'visible'});
+ }
+ break;
+ case 1:
+ case 2:
+ if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()){
+ this.picker.find('.prev').css({visibility: 'hidden'});
+ }
+ else {
+ this.picker.find('.prev').css({visibility: 'visible'});
+ }
+ if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()){
+ this.picker.find('.next').css({visibility: 'hidden'});
+ }
+ else {
+ this.picker.find('.next').css({visibility: 'visible'});
+ }
+ break;
+ }
+ },
+
+ click: function(e){
+ e.preventDefault();
+ var target = $(e.target).closest('span, td, th'),
+ year, month, day;
+ if (target.length === 1){
+ switch (target[0].nodeName.toLowerCase()){
+ case 'th':
+ switch (target[0].className){
+ case 'datepicker-switch':
+ this.showMode(1);
+ break;
+ case 'prev':
+ case 'next':
+ var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1);
+ switch (this.viewMode){
+ case 0:
+ this.viewDate = this.moveMonth(this.viewDate, dir);
+ this._trigger('changeMonth', this.viewDate);
+ break;
+ case 1:
+ case 2:
+ this.viewDate = this.moveYear(this.viewDate, dir);
+ if (this.viewMode === 1)
+ this._trigger('changeYear', this.viewDate);
+ break;
+ }
+ this.fill();
+ break;
+ case 'today':
+ var date = new Date();
+ date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
+
+ this.showMode(-2);
+ var which = this.o.todayBtn === 'linked' ? null : 'view';
+ this._setDate(date, which);
+ break;
+ case 'clear':
+ var element;
+ if (this.isInput)
+ element = this.element;
+ else if (this.component)
+ element = this.element.find('input');
+ if (element)
+ element.val("").change();
+ this.update();
+ this._trigger('changeDate');
+ if (this.o.autoclose)
+ this.hide();
+ break;
+ }
+ break;
+ case 'span':
+ if (!target.is('.disabled')){
+ this.viewDate.setUTCDate(1);
+ if (target.is('.month')){
+ day = 1;
+ month = target.parent().find('span').index(target);
+ year = this.viewDate.getUTCFullYear();
+ this.viewDate.setUTCMonth(month);
+ this._trigger('changeMonth', this.viewDate);
+ if (this.o.minViewMode === 1){
+ this._setDate(UTCDate(year, month, day));
+ }
+ }
+ else {
+ day = 1;
+ month = 0;
+ year = parseInt(target.text(), 10)||0;
+ this.viewDate.setUTCFullYear(year);
+ this._trigger('changeYear', this.viewDate);
+ if (this.o.minViewMode === 2){
+ this._setDate(UTCDate(year, month, day));
+ }
+ }
+ this.showMode(-1);
+ this.fill();
+ }
+ break;
+ case 'td':
+ if (target.is('.day') && !target.is('.disabled')){
+ day = parseInt(target.text(), 10)||1;
+ year = this.viewDate.getUTCFullYear();
+ month = this.viewDate.getUTCMonth();
+ if (target.is('.old')){
+ if (month === 0){
+ month = 11;
+ year -= 1;
+ }
+ else {
+ month -= 1;
+ }
+ }
+ else if (target.is('.new')){
+ if (month === 11){
+ month = 0;
+ year += 1;
+ }
+ else {
+ month += 1;
+ }
+ }
+ this._setDate(UTCDate(year, month, day));
+ }
+ break;
+ }
+ }
+ if (this.picker.is(':visible') && this._focused_from){
+ $(this._focused_from).focus();
+ }
+ delete this._focused_from;
+ },
+
+ _toggle_multidate: function(date){
+ var ix = this.dates.contains(date);
+ if (!date){
+ this.dates.clear();
+ }
+ else if (ix !== -1){
+ this.dates.remove(ix);
+ }
+ else {
+ this.dates.push(date);
+ }
+ if (typeof this.o.multidate === 'number')
+ while (this.dates.length > this.o.multidate)
+ this.dates.remove(0);
+ },
+
+ _setDate: function(date, which){
+ if (!which || which === 'date')
+ this._toggle_multidate(date && new Date(date));
+ if (!which || which === 'view')
+ this.viewDate = date && new Date(date);
+
+ this.fill();
+ this.setValue();
+ this._trigger('changeDate');
+ var element;
+ if (this.isInput){
+ element = this.element;
+ }
+ else if (this.component){
+ element = this.element.find('input');
+ }
+ if (element){
+ element.change();
+ }
+ if (this.o.autoclose && (!which || which === 'date')){
+ this.hide();
+ }
+ },
+
+ moveMonth: function(date, dir){
+ if (!date)
+ return undefined;
+ if (!dir)
+ return date;
+ var new_date = new Date(date.valueOf()),
+ day = new_date.getUTCDate(),
+ month = new_date.getUTCMonth(),
+ mag = Math.abs(dir),
+ new_month, test;
+ dir = dir > 0 ? 1 : -1;
+ if (mag === 1){
+ test = dir === -1
+ // If going back one month, make sure month is not current month
+ // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)
+ ? function(){
+ return new_date.getUTCMonth() === month;
+ }
+ // If going forward one month, make sure month is as expected
+ // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)
+ : function(){
+ return new_date.getUTCMonth() !== new_month;
+ };
+ new_month = month + dir;
+ new_date.setUTCMonth(new_month);
+ // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11
+ if (new_month < 0 || new_month > 11)
+ new_month = (new_month + 12) % 12;
+ }
+ else {
+ // For magnitudes >1, move one month at a time...
+ for (var i=0; i < mag; i++)
+ // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...
+ new_date = this.moveMonth(new_date, dir);
+ // ...then reset the day, keeping it in the new month
+ new_month = new_date.getUTCMonth();
+ new_date.setUTCDate(day);
+ test = function(){
+ return new_month !== new_date.getUTCMonth();
+ };
+ }
+ // Common date-resetting loop -- if date is beyond end of month, make it
+ // end of month
+ while (test()){
+ new_date.setUTCDate(--day);
+ new_date.setUTCMonth(new_month);
+ }
+ return new_date;
+ },
+
+ moveYear: function(date, dir){
+ return this.moveMonth(date, dir*12);
+ },
+
+ dateWithinRange: function(date){
+ return date >= this.o.startDate && date <= this.o.endDate;
+ },
+
+ keydown: function(e){
+ if (this.picker.is(':not(:visible)')){
+ if (e.keyCode === 27) // allow escape to hide and re-show picker
+ this.show();
+ return;
+ }
+ var dateChanged = false,
+ dir, newDate, newViewDate,
+ focusDate = this.focusDate || this.viewDate;
+ switch (e.keyCode){
+ case 27: // escape
+ if (this.focusDate){
+ this.focusDate = null;
+ this.viewDate = this.dates.get(-1) || this.viewDate;
+ this.fill();
+ }
+ else
+ this.hide();
+ e.preventDefault();
+ break;
+ case 37: // left
+ case 39: // right
+ if (!this.o.keyboardNavigation)
+ break;
+ dir = e.keyCode === 37 ? -1 : 1;
+ if (e.ctrlKey){
+ newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);
+ newViewDate = this.moveYear(focusDate, dir);
+ this._trigger('changeYear', this.viewDate);
+ }
+ else if (e.shiftKey){
+ newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);
+ newViewDate = this.moveMonth(focusDate, dir);
+ this._trigger('changeMonth', this.viewDate);
+ }
+ else {
+ newDate = new Date(this.dates.get(-1) || UTCToday());
+ newDate.setUTCDate(newDate.getUTCDate() + dir);
+ newViewDate = new Date(focusDate);
+ newViewDate.setUTCDate(focusDate.getUTCDate() + dir);
+ }
+ if (this.dateWithinRange(newDate)){
+ this.focusDate = this.viewDate = newViewDate;
+ this.setValue();
+ this.fill();
+ e.preventDefault();
+ }
+ break;
+ case 38: // up
+ case 40: // down
+ if (!this.o.keyboardNavigation)
+ break;
+ dir = e.keyCode === 38 ? -1 : 1;
+ if (e.ctrlKey){
+ newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);
+ newViewDate = this.moveYear(focusDate, dir);
+ this._trigger('changeYear', this.viewDate);
+ }
+ else if (e.shiftKey){
+ newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);
+ newViewDate = this.moveMonth(focusDate, dir);
+ this._trigger('changeMonth', this.viewDate);
+ }
+ else {
+ newDate = new Date(this.dates.get(-1) || UTCToday());
+ newDate.setUTCDate(newDate.getUTCDate() + dir * 7);
+ newViewDate = new Date(focusDate);
+ newViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7);
+ }
+ if (this.dateWithinRange(newDate)){
+ this.focusDate = this.viewDate = newViewDate;
+ this.setValue();
+ this.fill();
+ e.preventDefault();
+ }
+ break;
+ case 32: // spacebar
+ // Spacebar is used in manually typing dates in some formats.
+ // As such, its behavior should not be hijacked.
+ break;
+ case 13: // enter
+ focusDate = this.focusDate || this.dates.get(-1) || this.viewDate;
+ this._toggle_multidate(focusDate);
+ dateChanged = true;
+ this.focusDate = null;
+ this.viewDate = this.dates.get(-1) || this.viewDate;
+ this.setValue();
+ this.fill();
+ if (this.picker.is(':visible')){
+ e.preventDefault();
+ if (this.o.autoclose)
+ this.hide();
+ }
+ break;
+ case 9: // tab
+ this.focusDate = null;
+ this.viewDate = this.dates.get(-1) || this.viewDate;
+ this.fill();
+ this.hide();
+ break;
+ }
+ if (dateChanged){
+ if (this.dates.length)
+ this._trigger('changeDate');
+ else
+ this._trigger('clearDate');
+ var element;
+ if (this.isInput){
+ element = this.element;
+ }
+ else if (this.component){
+ element = this.element.find('input');
+ }
+ if (element){
+ element.change();
+ }
+ }
+ },
+
+ showMode: function(dir){
+ if (dir){
+ this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir));
+ }
+ this.picker
+ .find('>div')
+ .hide()
+ .filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName)
+ .css('display', 'block');
+ this.updateNavArrows();
+ }
+ };
+
+ var DateRangePicker = function(element, options){
+ this.element = $(element);
+ this.inputs = $.map(options.inputs, function(i){
+ return i.jquery ? i[0] : i;
+ });
+ delete options.inputs;
+
+ $(this.inputs)
+ .datepicker(options)
+ .bind('changeDate', $.proxy(this.dateUpdated, this));
+
+ this.pickers = $.map(this.inputs, function(i){
+ return $(i).data('datepicker');
+ });
+ this.updateDates();
+ };
+ DateRangePicker.prototype = {
+ updateDates: function(){
+ this.dates = $.map(this.pickers, function(i){
+ return i.getUTCDate();
+ });
+ this.updateRanges();
+ },
+ updateRanges: function(){
+ var range = $.map(this.dates, function(d){
+ return d.valueOf();
+ });
+ $.each(this.pickers, function(i, p){
+ p.setRange(range);
+ });
+ },
+ dateUpdated: function(e){
+ // `this.updating` is a workaround for preventing infinite recursion
+ // between `changeDate` triggering and `setUTCDate` calling. Until
+ // there is a better mechanism.
+ if (this.updating)
+ return;
+ this.updating = true;
+
+ var dp = $(e.target).data('datepicker'),
+ new_date = dp.getUTCDate(),
+ i = $.inArray(e.target, this.inputs),
+ l = this.inputs.length;
+ if (i === -1)
+ return;
+
+ $.each(this.pickers, function(i, p){
+ if (!p.getUTCDate())
+ p.setUTCDate(new_date);
+ });
+
+ if (new_date < this.dates[i]){
+ // Date being moved earlier/left
+ while (i >= 0 && new_date < this.dates[i]){
+ this.pickers[i--].setUTCDate(new_date);
+ }
+ }
+ else if (new_date > this.dates[i]){
+ // Date being moved later/right
+ while (i < l && new_date > this.dates[i]){
+ this.pickers[i++].setUTCDate(new_date);
+ }
+ }
+ this.updateDates();
+
+ delete this.updating;
+ },
+ remove: function(){
+ $.map(this.pickers, function(p){ p.remove(); });
+ delete this.element.data().datepicker;
+ }
+ };
+
+ function opts_from_el(el, prefix){
+ // Derive options from element data-attrs
+ var data = $(el).data(),
+ out = {}, inkey,
+ replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])');
+ prefix = new RegExp('^' + prefix.toLowerCase());
+ function re_lower(_,a){
+ return a.toLowerCase();
+ }
+ for (var key in data)
+ if (prefix.test(key)){
+ inkey = key.replace(replace, re_lower);
+ out[inkey] = data[key];
+ }
+ return out;
+ }
+
+ function opts_from_locale(lang){
+ // Derive options from locale plugins
+ var out = {};
+ // Check if "de-DE" style date is available, if not language should
+ // fallback to 2 letter code eg "de"
+ if (!dates[lang]){
+ lang = lang.split('-')[0];
+ if (!dates[lang])
+ return;
+ }
+ var d = dates[lang];
+ $.each(locale_opts, function(i,k){
+ if (k in d)
+ out[k] = d[k];
+ });
+ return out;
+ }
+
+ var old = $.fn.datepicker;
+ $.fn.datepicker = function(option){
+ var args = Array.apply(null, arguments);
+ args.shift();
+ var internal_return;
+ this.each(function(){
+ var $this = $(this),
+ data = $this.data('datepicker'),
+ options = typeof option === 'object' && option;
+ if (!data){
+ var elopts = opts_from_el(this, 'date'),
+ // Preliminary otions
+ xopts = $.extend({}, defaults, elopts, options),
+ locopts = opts_from_locale(xopts.language),
+ // Options priority: js args, data-attrs, locales, defaults
+ opts = $.extend({}, defaults, locopts, elopts, options);
+ if ($this.is('.input-daterange') || opts.inputs){
+ var ropts = {
+ inputs: opts.inputs || $this.find('input').toArray()
+ };
+ $this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts))));
+ }
+ else {
+ $this.data('datepicker', (data = new Datepicker(this, opts)));
+ }
+ }
+ if (typeof option === 'string' && typeof data[option] === 'function'){
+ internal_return = data[option].apply(data, args);
+ if (internal_return !== undefined)
+ return false;
+ }
+ });
+ if (internal_return !== undefined)
+ return internal_return;
+ else
+ return this;
+ };
+
+ var defaults = $.fn.datepicker.defaults = {
+ autoclose: false,
+ beforeShowDay: $.noop,
+ calendarWeeks: false,
+ clearBtn: false,
+ daysOfWeekDisabled: [],
+ endDate: Infinity,
+ forceParse: true,
+ format: 'yyyy-mm-dd',
+ keyboardNavigation: true,
+ language: 'en',
+ minViewMode: 0,
+ multidate: false,
+ multidateSeparator: ',',
+ orientation: "auto",
+ rtl: false,
+ startDate: -Infinity,
+ startView: 0,
+ todayBtn: false,
+ todayHighlight: false,
+ weekStart: 0
+ };
+ var locale_opts = $.fn.datepicker.locale_opts = [
+ 'format',
+ 'rtl',
+ 'weekStart'
+ ];
+ $.fn.datepicker.Constructor = Datepicker;
+ var dates = $.fn.datepicker.dates = {
+ en: {
+ days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
+ daysShort: ["日", "一", "二", "三", "四", "五", "六", "日"],
+ daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
+ months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
+ monthsShort: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
+ today: "今天",
+ clear: "清空"
+ }
+ };
+
+ var DPGlobal = {
+ modes: [
+ {
+ clsName: 'days',
+ navFnc: 'Month',
+ navStep: 1
+ },
+ {
+ clsName: 'months',
+ navFnc: 'FullYear',
+ navStep: 1
+ },
+ {
+ clsName: 'years',
+ navFnc: 'FullYear',
+ navStep: 10
+ }],
+ isLeapYear: function(year){
+ return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0));
+ },
+ getDaysInMonth: function(year, month){
+ return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
+ },
+ validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g,
+ nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,
+ parseFormat: function(format){
+ // IE treats \0 as a string end in inputs (truncating the value),
+ // so it's a bad format delimiter, anyway
+ var separators = format.replace(this.validParts, '\0').split('\0'),
+ parts = format.match(this.validParts);
+ if (!separators || !separators.length || !parts || parts.length === 0){
+ throw new Error("Invalid date format.");
+ }
+ return {separators: separators, parts: parts};
+ },
+ parseDate: function(date, format, language){
+ if (!date)
+ return undefined;
+ if (date instanceof Date)
+ return date;
+ if (typeof format === 'string')
+ format = DPGlobal.parseFormat(format);
+ var part_re = /([\-+]\d+)([dmwy])/,
+ parts = date.match(/([\-+]\d+)([dmwy])/g),
+ part, dir, i;
+ if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)){
+ date = new Date();
+ for (i=0; i < parts.length; i++){
+ part = part_re.exec(parts[i]);
+ dir = parseInt(part[1]);
+ switch (part[2]){
+ case 'd':
+ date.setUTCDate(date.getUTCDate() + dir);
+ break;
+ case 'm':
+ date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir);
+ break;
+ case 'w':
+ date.setUTCDate(date.getUTCDate() + dir * 7);
+ break;
+ case 'y':
+ date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir);
+ break;
+ }
+ }
+ return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0);
+ }
+ parts = date && date.match(this.nonpunctuation) || [];
+ date = new Date();
+ var parsed = {},
+ setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'],
+ setters_map = {
+ yyyy: function(d,v){
+ return d.setUTCFullYear(v);
+ },
+ yy: function(d,v){
+ return d.setUTCFullYear(2000+v);
+ },
+ m: function(d,v){
+ if (isNaN(d))
+ return d;
+ v -= 1;
+ while (v < 0) v += 12;
+ v %= 12;
+ d.setUTCMonth(v);
+ while (d.getUTCMonth() !== v)
+ d.setUTCDate(d.getUTCDate()-1);
+ return d;
+ },
+ d: function(d,v){
+ return d.setUTCDate(v);
+ }
+ },
+ val, filtered;
+ setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];
+ setters_map['dd'] = setters_map['d'];
+ date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
+ var fparts = format.parts.slice();
+ // Remove noop parts
+ if (parts.length !== fparts.length){
+ fparts = $(fparts).filter(function(i,p){
+ return $.inArray(p, setters_order) !== -1;
+ }).toArray();
+ }
+ // Process remainder
+ function match_part(){
+ var m = this.slice(0, parts[i].length),
+ p = parts[i].slice(0, m.length);
+ return m === p;
+ }
+ if (parts.length === fparts.length){
+ var cnt;
+ for (i=0, cnt = fparts.length; i < cnt; i++){
+ val = parseInt(parts[i], 10);
+ part = fparts[i];
+ if (isNaN(val)){
+ switch (part){
+ case 'MM':
+ filtered = $(dates[language].months).filter(match_part);
+ val = $.inArray(filtered[0], dates[language].months) + 1;
+ break;
+ case 'M':
+ filtered = $(dates[language].monthsShort).filter(match_part);
+ val = $.inArray(filtered[0], dates[language].monthsShort) + 1;
+ break;
+ }
+ }
+ parsed[part] = val;
+ }
+ var _date, s;
+ for (i=0; i < setters_order.length; i++){
+ s = setters_order[i];
+ if (s in parsed && !isNaN(parsed[s])){
+ _date = new Date(date);
+ setters_map[s](_date, parsed[s]);
+ if (!isNaN(_date))
+ date = _date;
+ }
+ }
+ }
+ return date;
+ },
+ formatDate: function(date, format, language){
+ if (!date)
+ return '';
+ if (typeof format === 'string')
+ format = DPGlobal.parseFormat(format);
+ var val = {
+ d: date.getUTCDate(),
+ D: dates[language].daysShort[date.getUTCDay()],
+ DD: dates[language].days[date.getUTCDay()],
+ m: date.getUTCMonth() + 1,
+ M: dates[language].monthsShort[date.getUTCMonth()],
+ MM: dates[language].months[date.getUTCMonth()],
+ yy: date.getUTCFullYear().toString().substring(2),
+ yyyy: date.getUTCFullYear()
+ };
+ val.dd = (val.d < 10 ? '0' : '') + val.d;
+ val.mm = (val.m < 10 ? '0' : '') + val.m;
+ date = [];
+ var seps = $.extend([], format.separators);
+ for (var i=0, cnt = format.parts.length; i <= cnt; i++){
+ if (seps.length)
+ date.push(seps.shift());
+ date.push(val[format.parts[i]]);
+ }
+ return date.join('');
+ },
+ headTemplate: '
'+
+ ''+
+ '« '+
+ ' '+
+ '» '+
+ ' '+
+ ' ',
+ contTemplate: '
',
+ footTemplate: '
'+
+ ''+
+ ' '+
+ ' '+
+ ''+
+ ' '+
+ ' '+
+ ' '
+ };
+ DPGlobal.template = '
'+
+ '
'+
+ '
'+
+ DPGlobal.headTemplate+
+ ' '+
+ DPGlobal.footTemplate+
+ '
'+
+ '
'+
+ '
'+
+ '
'+
+ DPGlobal.headTemplate+
+ DPGlobal.contTemplate+
+ DPGlobal.footTemplate+
+ '
'+
+ '
'+
+ '
'+
+ '
'+
+ DPGlobal.headTemplate+
+ DPGlobal.contTemplate+
+ DPGlobal.footTemplate+
+ '
'+
+ '
'+
+ '
';
+
+ $.fn.datepicker.DPGlobal = DPGlobal;
+
+
+ /* DATEPICKER NO CONFLICT
+ * =================== */
+
+ $.fn.datepicker.noConflict = function(){
+ $.fn.datepicker = old;
+ return this;
+ };
+
+
+ /* DATEPICKER DATA-API
+ * ================== */
+
+ $(document).on(
+ 'focus.datepicker.data-api click.datepicker.data-api',
+ '[data-provide="datepicker"]',
+ function(e){
+ var $this = $(this);
+ if ($this.data('datepicker'))
+ return;
+ e.preventDefault();
+ // component click requires us to explicitly show it
+ $this.datepicker('show');
+ }
+ );
+ $(function(){
+ $('[data-provide="datepicker-inline"]').datepicker();
+ });
+
+}(window.jQuery));
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/datepicker3.css b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/datepicker3.css
index d5203af6d..b84f658dc 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/datepicker3.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/datepicker3.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*!
* Datepicker for Bootstrap
*
@@ -787,3 +788,794 @@ fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
.datepicker.dropdown-menu td {
padding: 4px 5px;
}
+=======
+/*!
+ * Datepicker for Bootstrap
+ *
+ * Copyright 2012 Stefan Petre
+ * Improvements by Andrew Rowls
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+.datepicker {
+ padding: 4px;
+ border-radius: 4px;
+ direction: ltr;
+ /*.dow {
+ border-top: 1px solid #ddd !important;
+ }*/
+}
+.datepicker-inline {
+ width: 220px;
+}
+.datepicker.datepicker-rtl {
+ direction: rtl;
+}
+.datepicker.datepicker-rtl table tr td span {
+ float: right;
+}
+.datepicker-dropdown {
+ top: 0;
+ left: 0;
+}
+.datepicker-dropdown:before {
+ content: '';
+ display: inline-block;
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-top: 0;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ position: absolute;
+}
+.datepicker-dropdown:after {
+ content: '';
+ display: inline-block;
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #fff;
+ border-top: 0;
+ position: absolute;
+}
+.datepicker-dropdown.datepicker-orient-left:before {
+ left: 6px;
+}
+.datepicker-dropdown.datepicker-orient-left:after {
+ left: 7px;
+}
+.datepicker-dropdown.datepicker-orient-right:before {
+ right: 6px;
+}
+.datepicker-dropdown.datepicker-orient-right:after {
+ right: 7px;
+}
+.datepicker-dropdown.datepicker-orient-top:before {
+ top: -7px;
+}
+.datepicker-dropdown.datepicker-orient-top:after {
+ top: -6px;
+}
+.datepicker-dropdown.datepicker-orient-bottom:before {
+ bottom: -7px;
+ border-bottom: 0;
+ border-top: 7px solid #999;
+}
+.datepicker-dropdown.datepicker-orient-bottom:after {
+ bottom: -6px;
+ border-bottom: 0;
+ border-top: 6px solid #fff;
+}
+.datepicker > div {
+ display: none;
+}
+.datepicker.days div.datepicker-days {
+ display: block;
+}
+.datepicker.months div.datepicker-months {
+ display: block;
+}
+.datepicker.years div.datepicker-years {
+ display: block;
+}
+.datepicker table {
+ margin: 0;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.datepicker table tr td,
+.datepicker table tr th {
+ text-align: center;
+ width: 30px;
+ height: 30px;
+ border-radius: 4px;
+ border: none;
+}
+.table-striped .datepicker table tr td,
+.table-striped .datepicker table tr th {
+ background-color: transparent;
+}
+.datepicker table tr td.day:hover,
+.datepicker table tr td.day.focused {
+ background: #eeeeee;
+ cursor: pointer;
+}
+.datepicker table tr td.old,
+.datepicker table tr td.new {
+ color: #999999;
+}
+.datepicker table tr td.disabled,
+.datepicker table tr td.disabled:hover {
+ background: none;
+ color: #999999;
+ cursor: default;
+}
+.datepicker table tr td.today,
+.datepicker table tr td.today:hover,
+.datepicker table tr td.today.disabled,
+.datepicker table tr td.today.disabled:hover {
+ color: #000000;
+ background-color: #ffdb99;
+ border-color: #ffb733;
+}
+.datepicker table tr td.today:hover,
+.datepicker table tr td.today:hover:hover,
+.datepicker table tr td.today.disabled:hover,
+.datepicker table tr td.today.disabled:hover:hover,
+.datepicker table tr td.today:focus,
+.datepicker table tr td.today:hover:focus,
+.datepicker table tr td.today.disabled:focus,
+.datepicker table tr td.today.disabled:hover:focus,
+.datepicker table tr td.today:active,
+.datepicker table tr td.today:hover:active,
+.datepicker table tr td.today.disabled:active,
+.datepicker table tr td.today.disabled:hover:active,
+.datepicker table tr td.today.active,
+.datepicker table tr td.today:hover.active,
+.datepicker table tr td.today.disabled.active,
+.datepicker table tr td.today.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.today,
+.open .dropdown-toggle.datepicker table tr td.today:hover,
+.open .dropdown-toggle.datepicker table tr td.today.disabled,
+.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
+ color: #000000;
+ background-color: #ffcd70;
+ border-color: #f59e00;
+}
+.datepicker table tr td.today:active,
+.datepicker table tr td.today:hover:active,
+.datepicker table tr td.today.disabled:active,
+.datepicker table tr td.today.disabled:hover:active,
+.datepicker table tr td.today.active,
+.datepicker table tr td.today:hover.active,
+.datepicker table tr td.today.disabled.active,
+.datepicker table tr td.today.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.today,
+.open .dropdown-toggle.datepicker table tr td.today:hover,
+.open .dropdown-toggle.datepicker table tr td.today.disabled,
+.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td.today.disabled,
+.datepicker table tr td.today:hover.disabled,
+.datepicker table tr td.today.disabled.disabled,
+.datepicker table tr td.today.disabled:hover.disabled,
+.datepicker table tr td.today[disabled],
+.datepicker table tr td.today:hover[disabled],
+.datepicker table tr td.today.disabled[disabled],
+.datepicker table tr td.today.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td.today,
+fieldset[disabled] .datepicker table tr td.today:hover,
+fieldset[disabled] .datepicker table tr td.today.disabled,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover,
+.datepicker table tr td.today.disabled:hover,
+.datepicker table tr td.today:hover.disabled:hover,
+.datepicker table tr td.today.disabled.disabled:hover,
+.datepicker table tr td.today.disabled:hover.disabled:hover,
+.datepicker table tr td.today[disabled]:hover,
+.datepicker table tr td.today:hover[disabled]:hover,
+.datepicker table tr td.today.disabled[disabled]:hover,
+.datepicker table tr td.today.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td.today:hover,
+fieldset[disabled] .datepicker table tr td.today:hover:hover,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover:hover,
+.datepicker table tr td.today.disabled:focus,
+.datepicker table tr td.today:hover.disabled:focus,
+.datepicker table tr td.today.disabled.disabled:focus,
+.datepicker table tr td.today.disabled:hover.disabled:focus,
+.datepicker table tr td.today[disabled]:focus,
+.datepicker table tr td.today:hover[disabled]:focus,
+.datepicker table tr td.today.disabled[disabled]:focus,
+.datepicker table tr td.today.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td.today:focus,
+fieldset[disabled] .datepicker table tr td.today:hover:focus,
+fieldset[disabled] .datepicker table tr td.today.disabled:focus,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover:focus,
+.datepicker table tr td.today.disabled:active,
+.datepicker table tr td.today:hover.disabled:active,
+.datepicker table tr td.today.disabled.disabled:active,
+.datepicker table tr td.today.disabled:hover.disabled:active,
+.datepicker table tr td.today[disabled]:active,
+.datepicker table tr td.today:hover[disabled]:active,
+.datepicker table tr td.today.disabled[disabled]:active,
+.datepicker table tr td.today.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td.today:active,
+fieldset[disabled] .datepicker table tr td.today:hover:active,
+fieldset[disabled] .datepicker table tr td.today.disabled:active,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover:active,
+.datepicker table tr td.today.disabled.active,
+.datepicker table tr td.today:hover.disabled.active,
+.datepicker table tr td.today.disabled.disabled.active,
+.datepicker table tr td.today.disabled:hover.disabled.active,
+.datepicker table tr td.today[disabled].active,
+.datepicker table tr td.today:hover[disabled].active,
+.datepicker table tr td.today.disabled[disabled].active,
+.datepicker table tr td.today.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td.today.active,
+fieldset[disabled] .datepicker table tr td.today:hover.active,
+fieldset[disabled] .datepicker table tr td.today.disabled.active,
+fieldset[disabled] .datepicker table tr td.today.disabled:hover.active {
+ background-color: #ffdb99;
+ border-color: #ffb733;
+}
+.datepicker table tr td.today:hover:hover {
+ color: #000;
+}
+.datepicker table tr td.today.active:hover {
+ color: #fff;
+}
+.datepicker table tr td.range,
+.datepicker table tr td.range:hover,
+.datepicker table tr td.range.disabled,
+.datepicker table tr td.range.disabled:hover {
+ background: #eeeeee;
+ border-radius: 0;
+}
+.datepicker table tr td.range.today,
+.datepicker table tr td.range.today:hover,
+.datepicker table tr td.range.today.disabled,
+.datepicker table tr td.range.today.disabled:hover {
+ color: #000000;
+ background-color: #f7ca77;
+ border-color: #f1a417;
+ border-radius: 0;
+}
+.datepicker table tr td.range.today:hover,
+.datepicker table tr td.range.today:hover:hover,
+.datepicker table tr td.range.today.disabled:hover,
+.datepicker table tr td.range.today.disabled:hover:hover,
+.datepicker table tr td.range.today:focus,
+.datepicker table tr td.range.today:hover:focus,
+.datepicker table tr td.range.today.disabled:focus,
+.datepicker table tr td.range.today.disabled:hover:focus,
+.datepicker table tr td.range.today:active,
+.datepicker table tr td.range.today:hover:active,
+.datepicker table tr td.range.today.disabled:active,
+.datepicker table tr td.range.today.disabled:hover:active,
+.datepicker table tr td.range.today.active,
+.datepicker table tr td.range.today:hover.active,
+.datepicker table tr td.range.today.disabled.active,
+.datepicker table tr td.range.today.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.range.today,
+.open .dropdown-toggle.datepicker table tr td.range.today:hover,
+.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
+.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
+ color: #000000;
+ background-color: #f4bb51;
+ border-color: #bf800c;
+}
+.datepicker table tr td.range.today:active,
+.datepicker table tr td.range.today:hover:active,
+.datepicker table tr td.range.today.disabled:active,
+.datepicker table tr td.range.today.disabled:hover:active,
+.datepicker table tr td.range.today.active,
+.datepicker table tr td.range.today:hover.active,
+.datepicker table tr td.range.today.disabled.active,
+.datepicker table tr td.range.today.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.range.today,
+.open .dropdown-toggle.datepicker table tr td.range.today:hover,
+.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
+.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td.range.today.disabled,
+.datepicker table tr td.range.today:hover.disabled,
+.datepicker table tr td.range.today.disabled.disabled,
+.datepicker table tr td.range.today.disabled:hover.disabled,
+.datepicker table tr td.range.today[disabled],
+.datepicker table tr td.range.today:hover[disabled],
+.datepicker table tr td.range.today.disabled[disabled],
+.datepicker table tr td.range.today.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td.range.today,
+fieldset[disabled] .datepicker table tr td.range.today:hover,
+fieldset[disabled] .datepicker table tr td.range.today.disabled,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
+.datepicker table tr td.range.today.disabled:hover,
+.datepicker table tr td.range.today:hover.disabled:hover,
+.datepicker table tr td.range.today.disabled.disabled:hover,
+.datepicker table tr td.range.today.disabled:hover.disabled:hover,
+.datepicker table tr td.range.today[disabled]:hover,
+.datepicker table tr td.range.today:hover[disabled]:hover,
+.datepicker table tr td.range.today.disabled[disabled]:hover,
+.datepicker table tr td.range.today.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td.range.today:hover,
+fieldset[disabled] .datepicker table tr td.range.today:hover:hover,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:hover,
+.datepicker table tr td.range.today.disabled:focus,
+.datepicker table tr td.range.today:hover.disabled:focus,
+.datepicker table tr td.range.today.disabled.disabled:focus,
+.datepicker table tr td.range.today.disabled:hover.disabled:focus,
+.datepicker table tr td.range.today[disabled]:focus,
+.datepicker table tr td.range.today:hover[disabled]:focus,
+.datepicker table tr td.range.today.disabled[disabled]:focus,
+.datepicker table tr td.range.today.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td.range.today:focus,
+fieldset[disabled] .datepicker table tr td.range.today:hover:focus,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:focus,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:focus,
+.datepicker table tr td.range.today.disabled:active,
+.datepicker table tr td.range.today:hover.disabled:active,
+.datepicker table tr td.range.today.disabled.disabled:active,
+.datepicker table tr td.range.today.disabled:hover.disabled:active,
+.datepicker table tr td.range.today[disabled]:active,
+.datepicker table tr td.range.today:hover[disabled]:active,
+.datepicker table tr td.range.today.disabled[disabled]:active,
+.datepicker table tr td.range.today.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td.range.today:active,
+fieldset[disabled] .datepicker table tr td.range.today:hover:active,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:active,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:active,
+.datepicker table tr td.range.today.disabled.active,
+.datepicker table tr td.range.today:hover.disabled.active,
+.datepicker table tr td.range.today.disabled.disabled.active,
+.datepicker table tr td.range.today.disabled:hover.disabled.active,
+.datepicker table tr td.range.today[disabled].active,
+.datepicker table tr td.range.today:hover[disabled].active,
+.datepicker table tr td.range.today.disabled[disabled].active,
+.datepicker table tr td.range.today.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td.range.today.active,
+fieldset[disabled] .datepicker table tr td.range.today:hover.active,
+fieldset[disabled] .datepicker table tr td.range.today.disabled.active,
+fieldset[disabled] .datepicker table tr td.range.today.disabled:hover.active {
+ background-color: #f7ca77;
+ border-color: #f1a417;
+}
+.datepicker table tr td.selected,
+.datepicker table tr td.selected:hover,
+.datepicker table tr td.selected.disabled,
+.datepicker table tr td.selected.disabled:hover {
+ color: #ffffff;
+ background-color: #999999;
+ border-color: #555555;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+.datepicker table tr td.selected:hover,
+.datepicker table tr td.selected:hover:hover,
+.datepicker table tr td.selected.disabled:hover,
+.datepicker table tr td.selected.disabled:hover:hover,
+.datepicker table tr td.selected:focus,
+.datepicker table tr td.selected:hover:focus,
+.datepicker table tr td.selected.disabled:focus,
+.datepicker table tr td.selected.disabled:hover:focus,
+.datepicker table tr td.selected:active,
+.datepicker table tr td.selected:hover:active,
+.datepicker table tr td.selected.disabled:active,
+.datepicker table tr td.selected.disabled:hover:active,
+.datepicker table tr td.selected.active,
+.datepicker table tr td.selected:hover.active,
+.datepicker table tr td.selected.disabled.active,
+.datepicker table tr td.selected.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.selected,
+.open .dropdown-toggle.datepicker table tr td.selected:hover,
+.open .dropdown-toggle.datepicker table tr td.selected.disabled,
+.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
+ color: #ffffff;
+ background-color: #858585;
+ border-color: #373737;
+}
+.datepicker table tr td.selected:active,
+.datepicker table tr td.selected:hover:active,
+.datepicker table tr td.selected.disabled:active,
+.datepicker table tr td.selected.disabled:hover:active,
+.datepicker table tr td.selected.active,
+.datepicker table tr td.selected:hover.active,
+.datepicker table tr td.selected.disabled.active,
+.datepicker table tr td.selected.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.selected,
+.open .dropdown-toggle.datepicker table tr td.selected:hover,
+.open .dropdown-toggle.datepicker table tr td.selected.disabled,
+.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td.selected.disabled,
+.datepicker table tr td.selected:hover.disabled,
+.datepicker table tr td.selected.disabled.disabled,
+.datepicker table tr td.selected.disabled:hover.disabled,
+.datepicker table tr td.selected[disabled],
+.datepicker table tr td.selected:hover[disabled],
+.datepicker table tr td.selected.disabled[disabled],
+.datepicker table tr td.selected.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td.selected,
+fieldset[disabled] .datepicker table tr td.selected:hover,
+fieldset[disabled] .datepicker table tr td.selected.disabled,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
+.datepicker table tr td.selected.disabled:hover,
+.datepicker table tr td.selected:hover.disabled:hover,
+.datepicker table tr td.selected.disabled.disabled:hover,
+.datepicker table tr td.selected.disabled:hover.disabled:hover,
+.datepicker table tr td.selected[disabled]:hover,
+.datepicker table tr td.selected:hover[disabled]:hover,
+.datepicker table tr td.selected.disabled[disabled]:hover,
+.datepicker table tr td.selected.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td.selected:hover,
+fieldset[disabled] .datepicker table tr td.selected:hover:hover,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover:hover,
+.datepicker table tr td.selected.disabled:focus,
+.datepicker table tr td.selected:hover.disabled:focus,
+.datepicker table tr td.selected.disabled.disabled:focus,
+.datepicker table tr td.selected.disabled:hover.disabled:focus,
+.datepicker table tr td.selected[disabled]:focus,
+.datepicker table tr td.selected:hover[disabled]:focus,
+.datepicker table tr td.selected.disabled[disabled]:focus,
+.datepicker table tr td.selected.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td.selected:focus,
+fieldset[disabled] .datepicker table tr td.selected:hover:focus,
+fieldset[disabled] .datepicker table tr td.selected.disabled:focus,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover:focus,
+.datepicker table tr td.selected.disabled:active,
+.datepicker table tr td.selected:hover.disabled:active,
+.datepicker table tr td.selected.disabled.disabled:active,
+.datepicker table tr td.selected.disabled:hover.disabled:active,
+.datepicker table tr td.selected[disabled]:active,
+.datepicker table tr td.selected:hover[disabled]:active,
+.datepicker table tr td.selected.disabled[disabled]:active,
+.datepicker table tr td.selected.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td.selected:active,
+fieldset[disabled] .datepicker table tr td.selected:hover:active,
+fieldset[disabled] .datepicker table tr td.selected.disabled:active,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover:active,
+.datepicker table tr td.selected.disabled.active,
+.datepicker table tr td.selected:hover.disabled.active,
+.datepicker table tr td.selected.disabled.disabled.active,
+.datepicker table tr td.selected.disabled:hover.disabled.active,
+.datepicker table tr td.selected[disabled].active,
+.datepicker table tr td.selected:hover[disabled].active,
+.datepicker table tr td.selected.disabled[disabled].active,
+.datepicker table tr td.selected.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td.selected.active,
+fieldset[disabled] .datepicker table tr td.selected:hover.active,
+fieldset[disabled] .datepicker table tr td.selected.disabled.active,
+fieldset[disabled] .datepicker table tr td.selected.disabled:hover.active {
+ background-color: #999999;
+ border-color: #555555;
+}
+.datepicker table tr td.active,
+.datepicker table tr td.active:hover,
+.datepicker table tr td.active.disabled,
+.datepicker table tr td.active.disabled:hover {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #357ebd;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+.datepicker table tr td.active:hover,
+.datepicker table tr td.active:hover:hover,
+.datepicker table tr td.active.disabled:hover,
+.datepicker table tr td.active.disabled:hover:hover,
+.datepicker table tr td.active:focus,
+.datepicker table tr td.active:hover:focus,
+.datepicker table tr td.active.disabled:focus,
+.datepicker table tr td.active.disabled:hover:focus,
+.datepicker table tr td.active:active,
+.datepicker table tr td.active:hover:active,
+.datepicker table tr td.active.disabled:active,
+.datepicker table tr td.active.disabled:hover:active,
+.datepicker table tr td.active.active,
+.datepicker table tr td.active:hover.active,
+.datepicker table tr td.active.disabled.active,
+.datepicker table tr td.active.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.active,
+.open .dropdown-toggle.datepicker table tr td.active:hover,
+.open .dropdown-toggle.datepicker table tr td.active.disabled,
+.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
+ color: #ffffff;
+ background-color: #3276b1;
+ border-color: #285e8e;
+}
+.datepicker table tr td.active:active,
+.datepicker table tr td.active:hover:active,
+.datepicker table tr td.active.disabled:active,
+.datepicker table tr td.active.disabled:hover:active,
+.datepicker table tr td.active.active,
+.datepicker table tr td.active:hover.active,
+.datepicker table tr td.active.disabled.active,
+.datepicker table tr td.active.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td.active,
+.open .dropdown-toggle.datepicker table tr td.active:hover,
+.open .dropdown-toggle.datepicker table tr td.active.disabled,
+.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td.active.disabled,
+.datepicker table tr td.active:hover.disabled,
+.datepicker table tr td.active.disabled.disabled,
+.datepicker table tr td.active.disabled:hover.disabled,
+.datepicker table tr td.active[disabled],
+.datepicker table tr td.active:hover[disabled],
+.datepicker table tr td.active.disabled[disabled],
+.datepicker table tr td.active.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td.active,
+fieldset[disabled] .datepicker table tr td.active:hover,
+fieldset[disabled] .datepicker table tr td.active.disabled,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover,
+.datepicker table tr td.active.disabled:hover,
+.datepicker table tr td.active:hover.disabled:hover,
+.datepicker table tr td.active.disabled.disabled:hover,
+.datepicker table tr td.active.disabled:hover.disabled:hover,
+.datepicker table tr td.active[disabled]:hover,
+.datepicker table tr td.active:hover[disabled]:hover,
+.datepicker table tr td.active.disabled[disabled]:hover,
+.datepicker table tr td.active.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td.active:hover,
+fieldset[disabled] .datepicker table tr td.active:hover:hover,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover:hover,
+.datepicker table tr td.active.disabled:focus,
+.datepicker table tr td.active:hover.disabled:focus,
+.datepicker table tr td.active.disabled.disabled:focus,
+.datepicker table tr td.active.disabled:hover.disabled:focus,
+.datepicker table tr td.active[disabled]:focus,
+.datepicker table tr td.active:hover[disabled]:focus,
+.datepicker table tr td.active.disabled[disabled]:focus,
+.datepicker table tr td.active.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td.active:focus,
+fieldset[disabled] .datepicker table tr td.active:hover:focus,
+fieldset[disabled] .datepicker table tr td.active.disabled:focus,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover:focus,
+.datepicker table tr td.active.disabled:active,
+.datepicker table tr td.active:hover.disabled:active,
+.datepicker table tr td.active.disabled.disabled:active,
+.datepicker table tr td.active.disabled:hover.disabled:active,
+.datepicker table tr td.active[disabled]:active,
+.datepicker table tr td.active:hover[disabled]:active,
+.datepicker table tr td.active.disabled[disabled]:active,
+.datepicker table tr td.active.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td.active:active,
+fieldset[disabled] .datepicker table tr td.active:hover:active,
+fieldset[disabled] .datepicker table tr td.active.disabled:active,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover:active,
+.datepicker table tr td.active.disabled.active,
+.datepicker table tr td.active:hover.disabled.active,
+.datepicker table tr td.active.disabled.disabled.active,
+.datepicker table tr td.active.disabled:hover.disabled.active,
+.datepicker table tr td.active[disabled].active,
+.datepicker table tr td.active:hover[disabled].active,
+.datepicker table tr td.active.disabled[disabled].active,
+.datepicker table tr td.active.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td.active.active,
+fieldset[disabled] .datepicker table tr td.active:hover.active,
+fieldset[disabled] .datepicker table tr td.active.disabled.active,
+fieldset[disabled] .datepicker table tr td.active.disabled:hover.active {
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.datepicker table tr td span {
+ display: block;
+ width: 23%;
+ height: 54px;
+ line-height: 54px;
+ float: left;
+ margin: 1%;
+ cursor: pointer;
+ border-radius: 4px;
+}
+.datepicker table tr td span:hover {
+ background: #eeeeee;
+}
+.datepicker table tr td span.disabled,
+.datepicker table tr td span.disabled:hover {
+ background: none;
+ color: #999999;
+ cursor: default;
+}
+.datepicker table tr td span.active,
+.datepicker table tr td span.active:hover,
+.datepicker table tr td span.active.disabled,
+.datepicker table tr td span.active.disabled:hover {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #357ebd;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+.datepicker table tr td span.active:hover,
+.datepicker table tr td span.active:hover:hover,
+.datepicker table tr td span.active.disabled:hover,
+.datepicker table tr td span.active.disabled:hover:hover,
+.datepicker table tr td span.active:focus,
+.datepicker table tr td span.active:hover:focus,
+.datepicker table tr td span.active.disabled:focus,
+.datepicker table tr td span.active.disabled:hover:focus,
+.datepicker table tr td span.active:active,
+.datepicker table tr td span.active:hover:active,
+.datepicker table tr td span.active.disabled:active,
+.datepicker table tr td span.active.disabled:hover:active,
+.datepicker table tr td span.active.active,
+.datepicker table tr td span.active:hover.active,
+.datepicker table tr td span.active.disabled.active,
+.datepicker table tr td span.active.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td span.active,
+.open .dropdown-toggle.datepicker table tr td span.active:hover,
+.open .dropdown-toggle.datepicker table tr td span.active.disabled,
+.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
+ color: #ffffff;
+ background-color: #3276b1;
+ border-color: #285e8e;
+}
+.datepicker table tr td span.active:active,
+.datepicker table tr td span.active:hover:active,
+.datepicker table tr td span.active.disabled:active,
+.datepicker table tr td span.active.disabled:hover:active,
+.datepicker table tr td span.active.active,
+.datepicker table tr td span.active:hover.active,
+.datepicker table tr td span.active.disabled.active,
+.datepicker table tr td span.active.disabled:hover.active,
+.open .dropdown-toggle.datepicker table tr td span.active,
+.open .dropdown-toggle.datepicker table tr td span.active:hover,
+.open .dropdown-toggle.datepicker table tr td span.active.disabled,
+.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
+ background-image: none;
+}
+.datepicker table tr td span.active.disabled,
+.datepicker table tr td span.active:hover.disabled,
+.datepicker table tr td span.active.disabled.disabled,
+.datepicker table tr td span.active.disabled:hover.disabled,
+.datepicker table tr td span.active[disabled],
+.datepicker table tr td span.active:hover[disabled],
+.datepicker table tr td span.active.disabled[disabled],
+.datepicker table tr td span.active.disabled:hover[disabled],
+fieldset[disabled] .datepicker table tr td span.active,
+fieldset[disabled] .datepicker table tr td span.active:hover,
+fieldset[disabled] .datepicker table tr td span.active.disabled,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
+.datepicker table tr td span.active.disabled:hover,
+.datepicker table tr td span.active:hover.disabled:hover,
+.datepicker table tr td span.active.disabled.disabled:hover,
+.datepicker table tr td span.active.disabled:hover.disabled:hover,
+.datepicker table tr td span.active[disabled]:hover,
+.datepicker table tr td span.active:hover[disabled]:hover,
+.datepicker table tr td span.active.disabled[disabled]:hover,
+.datepicker table tr td span.active.disabled:hover[disabled]:hover,
+fieldset[disabled] .datepicker table tr td span.active:hover,
+fieldset[disabled] .datepicker table tr td span.active:hover:hover,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover,
+.datepicker table tr td span.active.disabled:focus,
+.datepicker table tr td span.active:hover.disabled:focus,
+.datepicker table tr td span.active.disabled.disabled:focus,
+.datepicker table tr td span.active.disabled:hover.disabled:focus,
+.datepicker table tr td span.active[disabled]:focus,
+.datepicker table tr td span.active:hover[disabled]:focus,
+.datepicker table tr td span.active.disabled[disabled]:focus,
+.datepicker table tr td span.active.disabled:hover[disabled]:focus,
+fieldset[disabled] .datepicker table tr td span.active:focus,
+fieldset[disabled] .datepicker table tr td span.active:hover:focus,
+fieldset[disabled] .datepicker table tr td span.active.disabled:focus,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus,
+.datepicker table tr td span.active.disabled:active,
+.datepicker table tr td span.active:hover.disabled:active,
+.datepicker table tr td span.active.disabled.disabled:active,
+.datepicker table tr td span.active.disabled:hover.disabled:active,
+.datepicker table tr td span.active[disabled]:active,
+.datepicker table tr td span.active:hover[disabled]:active,
+.datepicker table tr td span.active.disabled[disabled]:active,
+.datepicker table tr td span.active.disabled:hover[disabled]:active,
+fieldset[disabled] .datepicker table tr td span.active:active,
+fieldset[disabled] .datepicker table tr td span.active:hover:active,
+fieldset[disabled] .datepicker table tr td span.active.disabled:active,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover:active,
+.datepicker table tr td span.active.disabled.active,
+.datepicker table tr td span.active:hover.disabled.active,
+.datepicker table tr td span.active.disabled.disabled.active,
+.datepicker table tr td span.active.disabled:hover.disabled.active,
+.datepicker table tr td span.active[disabled].active,
+.datepicker table tr td span.active:hover[disabled].active,
+.datepicker table tr td span.active.disabled[disabled].active,
+.datepicker table tr td span.active.disabled:hover[disabled].active,
+fieldset[disabled] .datepicker table tr td span.active.active,
+fieldset[disabled] .datepicker table tr td span.active:hover.active,
+fieldset[disabled] .datepicker table tr td span.active.disabled.active,
+fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.datepicker table tr td span.old,
+.datepicker table tr td span.new {
+ color: #999999;
+}
+.datepicker th.datepicker-switch {
+ width: 145px;
+}
+.datepicker thead tr:first-child th,
+.datepicker tfoot tr th {
+ cursor: pointer;
+}
+.datepicker thead tr:first-child th:hover,
+.datepicker tfoot tr th:hover {
+ background: #eeeeee;
+}
+.datepicker .cw {
+ font-size: 10px;
+ width: 12px;
+ padding: 0 2px 0 5px;
+ vertical-align: middle;
+}
+.datepicker thead tr:first-child th.cw {
+ cursor: default;
+ background-color: transparent;
+}
+.input-group.date .input-group-addon i {
+ cursor: pointer;
+ width: 16px;
+ height: 16px;
+}
+.input-daterange input {
+ text-align: center;
+}
+.input-daterange input:first-child {
+ border-radius: 3px 0 0 3px;
+}
+.input-daterange input:last-child {
+ border-radius: 0 3px 3px 0;
+}
+.input-daterange .input-group-addon {
+ width: auto;
+ min-width: 16px;
+ padding: 4px 5px;
+ font-weight: normal;
+ line-height: 1.428571429;
+ text-align: center;
+ text-shadow: 0 1px 0 #fff;
+ vertical-align: middle;
+ background-color: #eeeeee;
+ border-width: 1px 0;
+ margin-left: -5px;
+ margin-right: -5px;
+}
+.datepicker.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ float: left;
+ display: none;
+ min-width: 160px;
+ list-style: none;
+ background-color: #ffffff;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 5px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ *border-right-width: 2px;
+ *border-bottom-width: 2px;
+ color: #333333;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 1.428571429;
+}
+.datepicker.dropdown-menu th,
+.datepicker.dropdown-menu td {
+ padding: 4px 5px;
+}
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/fullscreen/jquery.fullscreen.js b/ruoyi-admin/src/main/resources/static/ajax/libs/fullscreen/jquery.fullscreen.js
index 78499f041..662b5e870 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/fullscreen/jquery.fullscreen.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/fullscreen/jquery.fullscreen.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/**
* @name jQuery FullScreen Plugin
* @author Martin Angelov, Morten Sjøgren
@@ -145,3 +146,152 @@
return this;
};
}(jQuery));
+=======
+/**
+ * @name jQuery FullScreen Plugin
+ * @author Martin Angelov, Morten Sjøgren
+ * @version 1.2
+ * @url http://tutorialzine.com/2012/02/enhance-your-website-fullscreen-api/
+ * @license MIT License
+ */
+
+/*jshint browser: true, jquery: true */
+(function($){
+ "use strict";
+
+ // These helper functions available only to our plugin scope.
+ function supportFullScreen(){
+ var doc = document.documentElement;
+
+ return ('requestFullscreen' in doc) ||
+ ('mozRequestFullScreen' in doc && document.mozFullScreenEnabled) ||
+ ('webkitRequestFullScreen' in doc);
+ }
+
+ function requestFullScreen(elem){
+ if (elem.requestFullscreen) {
+ elem.requestFullscreen();
+ } else if (elem.mozRequestFullScreen) {
+ elem.mozRequestFullScreen();
+ } else if (elem.webkitRequestFullScreen) {
+ elem.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
+ }
+ }
+
+ function fullScreenStatus(){
+ return document.fullscreen ||
+ document.mozFullScreen ||
+ document.webkitIsFullScreen ||
+ false;
+ }
+
+ function cancelFullScreen(){
+ if (document.exitFullscreen) {
+ document.exitFullscreen();
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen();
+ } else if (document.webkitCancelFullScreen) {
+ document.webkitCancelFullScreen();
+ }
+ }
+
+ function onFullScreenEvent(callback){
+ $(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange", function(){
+ // The full screen status is automatically
+ // passed to our callback as an argument.
+ callback(fullScreenStatus());
+ });
+ }
+
+ // Adding a new test to the jQuery support object
+ $.support.fullscreen = supportFullScreen();
+
+ // Creating the plugin
+ $.fn.fullScreen = function(props){
+ if(!$.support.fullscreen || this.length !== 1) {
+ // The plugin can be called only
+ // on one element at a time
+
+ return this;
+ }
+
+ if(fullScreenStatus()){
+ // if we are already in fullscreen, exit
+ cancelFullScreen();
+ return this;
+ }
+
+ // You can potentially pas two arguments a color
+ // for the background and a callback function
+
+ var options = $.extend({
+ 'background' : '#111',
+ 'callback' : $.noop( ),
+ 'fullscreenClass' : 'fullScreen'
+ }, props),
+
+ elem = this,
+
+ // This temporary div is the element that is
+ // actually going to be enlarged in full screen
+
+ fs = $('
', {
+ 'css' : {
+ 'overflow-y' : 'auto',
+ 'background' : options.background,
+ 'width' : '100%',
+ 'height' : '100%'
+ }
+ })
+ .insertBefore(elem)
+ .append(elem);
+
+ // You can use the .fullScreen class to
+ // apply styling to your element
+ elem.addClass( options.fullscreenClass );
+
+ // Inserting our element in the temporary
+ // div, after which we zoom it in fullscreen
+
+ requestFullScreen(fs.get(0));
+
+ fs.click(function(e){
+ if(e.target == this){
+ // If the black bar was clicked
+ cancelFullScreen();
+ }
+ });
+
+ elem.cancel = function(){
+ cancelFullScreen();
+ return elem;
+ };
+
+ onFullScreenEvent(function(fullScreen){
+ if(!fullScreen){
+ // We have exited full screen.
+ // Detach event listener
+ $(document).off( 'fullscreenchange mozfullscreenchange webkitfullscreenchange' );
+ // Remove the class and destroy
+ // the temporary div
+
+ elem.removeClass( options.fullscreenClass ).insertBefore(fs);
+ fs.remove();
+ }
+
+ // Calling the facultative user supplied callback
+ if(options.callback) {
+ options.callback(fullScreen);
+ }
+ });
+
+ return elem;
+ };
+
+ $.fn.cancelFullScreen = function( ) {
+ cancelFullScreen();
+
+ return this;
+ };
+}(jQuery));
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/custom.css b/ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/custom.css
index efeea1c18..b4e016104 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/custom.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/custom.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/* iCheck plugin Square skin, green
----------------------------------- */
.icheckbox_square-green,
@@ -70,3 +71,77 @@
background-size: 240px 24px;
}
}
+=======
+/* iCheck plugin Square skin, green
+----------------------------------- */
+.icheckbox_square-green,
+.iradio_square-green {
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(green.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-green-login{
+ display: inline-block;
+ *display: inline;
+ vertical-align: middle;
+ margin: 0;
+ padding: 0;
+ width: 22px;
+ height: 22px;
+ background: url(green-login.png) no-repeat;
+ border: none;
+ cursor: pointer;
+}
+
+.icheckbox_square-green,.icheckbox_square-green-login {
+ background-position: 0 0;
+}
+.icheckbox_square-green.hover,.icheckbox_square-green-login.hover {
+ background-position: -24px 0;
+}
+.icheckbox_square-green.checked,.icheckbox_square-green-login.checked {
+ background-position: -48px 0;
+}
+.icheckbox_square-green.disabled,.icheckbox_square-green.disabled-login {
+ background-position: -72px 0;
+ cursor: default;
+}
+.icheckbox_square-green.checked.disabled,.icheckbox_square-green-login.checked.disabled {
+ background-position: -96px 0;
+}
+
+.iradio_square-green {
+ background-position: -120px 0;
+}
+.iradio_square-green.hover {
+ background-position: -144px 0;
+}
+.iradio_square-green.checked {
+ background-position: -168px 0;
+}
+.iradio_square-green.disabled {
+ background-position: -192px 0;
+ cursor: default;
+}
+.iradio_square-green.checked.disabled {
+ background-position: -216px 0;
+}
+
+/* HiDPI support */
+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
+ .icheckbox_square-green,.icheckbox_square-green-login,
+ .iradio_square-green {
+ background-image: url(green%402x.png);
+ -webkit-background-size: 240px 24px;
+ background-size: 240px 24px;
+ }
+}
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/icheck.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/icheck.min.js
index 9b826fb7e..bab2fccd4 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/icheck.min.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/icheck.min.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate,
v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true");
@@ -9,3 +10,16 @@
'aria-labelledby="';this.id?h+=this.id:(this.id=y,h+=y);h+='"'});h=a.wrap(h+"/>")[_callback]("ifCreated").parent().append(e.insert);d=f('
').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return;
A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d=
b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);
+=======
+/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
+(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate,
+ v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true");
+ g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap();
+ f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i";
+ _add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c=
+ f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this,
+ b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='
")[_callback]("ifCreated").parent().append(e.insert);d=f('
').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return;
+ A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d=
+ b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-layout/jquery.layout-latest.js b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-layout/jquery.layout-latest.js
index 9dfb6c770..996e29db1 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-layout/jquery.layout-latest.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-layout/jquery.layout-latest.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/**
* @preserve
* jquery.layout 1.4.4
@@ -6089,3 +6090,6096 @@ if ($.effects) {
}
})( jQuery );
+=======
+/**
+ * @preserve
+ * jquery.layout 1.4.4
+ * $Date: 2014-11-29 08:00:00 (Sat, 29 November 2014) $
+ * $Rev: 1.0404 $
+ *
+ * Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com)
+ * Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * SEE: http://layout.jquery-dev.com/LICENSE.txt
+ *
+ * Changelog: http://layout.jquery-dev.com/changelog.cfm
+ *
+ * Docs: http://layout.jquery-dev.com/documentation.html
+ * Tips: http://layout.jquery-dev.com/tips.html
+ * Help: http://groups.google.com/group/jquery-ui-layout
+ */
+
+//
东
+//
南
+//
西
+//
北
+//
中
+//
+
+/* JavaDoc Info: http://code.google.com/closure/compiler/docs/js-for-compiler.html
+ * {!Object} non-nullable type (never NULL)
+ * {?string} nullable type (sometimes NULL) - default for {Object}
+ * {number=} optional parameter
+ * {*} ALL types
+ */
+/* TODO for jQ 2.x
+ * check $.fn.disableSelection - this is in jQuery UI 1.9.x
+ */
+
+// NOTE: For best readability, view with a fixed-width font and tabs equal to 4-chars
+
+;(function ($) {
+
+// alias Math methods - used a lot!
+var min = Math.min
+, max = Math.max
+, round = Math.floor
+
+, isStr = function (v) { return $.type(v) === "string"; }
+
+ /**
+ * @param {!Object} Instance
+ * @param {Array.
} a_fn
+ */
+, runPluginCallbacks = function (Instance, a_fn) {
+ if ($.isArray(a_fn))
+ for (var i=0, c=a_fn.length; i ').appendTo("body")
+ , d = { width: $c.outerWidth - $c[0].clientWidth, height: 100 - $c[0].clientHeight };
+ $c.remove();
+ window.scrollbarWidth = d.width;
+ window.scrollbarHeight = d.height;
+ return dim.match(/^(width|height)$/) ? d[dim] : d;
+ }
+
+
+, disableTextSelection: function () {
+ var $d = $(document)
+ , s = 'textSelectionDisabled'
+ , x = 'textSelectionInitialized'
+ ;
+ if ($.fn.disableSelection) {
+ if (!$d.data(x)) // document hasn't been initialized yet
+ $d.on('mouseup', $.layout.enableTextSelection ).data(x, true);
+ if (!$d.data(s))
+ $d.disableSelection().data(s, true);
+ }
+ }
+, enableTextSelection: function () {
+ var $d = $(document)
+ , s = 'textSelectionDisabled';
+ if ($.fn.enableSelection && $d.data(s))
+ $d.enableSelection().data(s, false);
+ }
+
+
+ /**
+ * Returns hash container 'display' and 'visibility'
+ *
+ * @see $.swap() - swaps CSS, runs callback, resets CSS
+ * @param {!Object} $E jQuery element
+ * @param {boolean=} [force=false] Run even if display != none
+ * @return {!Object} Returns current style props, if applicable
+ */
+, showInvisibly: function ($E, force) {
+ if ($E && $E.length && (force || $E.css("display") === "none")) { // only if not *already hidden*
+ var s = $E[0].style
+ // save ONLY the 'style' props because that is what we must restore
+ , CSS = { display: s.display || '', visibility: s.visibility || '' };
+ // show element 'invisibly' so can be measured
+ $E.css({ display: "block", visibility: "hidden" });
+ return CSS;
+ }
+ return {};
+ }
+
+ /**
+ * Returns data for setting size of an element (container or a pane).
+ *
+ * @see _create(), onWindowResize() for container, plus others for pane
+ * @return JSON Returns a hash of all dimensions: top, bottom, left, right, outerWidth, innerHeight, etc
+ */
+, getElementDimensions: function ($E, inset) {
+ var
+ // dimensions hash - start with current data IF passed
+ d = { css: {}, inset: {} }
+ , x = d.css // CSS hash
+ , i = { bottom: 0 } // TEMP insets (bottom = complier hack)
+ , N = $.layout.cssNum
+ , R = Math.round
+ , off = $E.offset()
+ , b, p, ei // TEMP border, padding
+ ;
+ d.offsetLeft = off.left;
+ d.offsetTop = off.top;
+
+ if (!inset) inset = {}; // simplify logic below
+
+ $.each("Left,Right,Top,Bottom".split(","), function (idx, e) { // e = edge
+ b = x["border" + e] = $.layout.borderWidth($E, e);
+ p = x["padding"+ e] = $.layout.cssNum($E, "padding"+e);
+ ei = e.toLowerCase();
+ d.inset[ei] = inset[ei] >= 0 ? inset[ei] : p; // any missing insetX value = paddingX
+ i[ei] = d.inset[ei] + b; // total offset of content from outer side
+ });
+
+ x.width = R($E.width());
+ x.height = R($E.height());
+ x.top = N($E,"top",true);
+ x.bottom = N($E,"bottom",true);
+ x.left = N($E,"left",true);
+ x.right = N($E,"right",true);
+
+ d.outerWidth = R($E.outerWidth());
+ d.outerHeight = R($E.outerHeight());
+ // calc the TRUE inner-dimensions, even in quirks-mode!
+ d.innerWidth = max(0, d.outerWidth - i.left - i.right);
+ d.innerHeight = max(0, d.outerHeight - i.top - i.bottom);
+ // layoutWidth/Height is used in calcs for manual resizing
+ // layoutW/H only differs from innerW/H when in quirks-mode - then is like outerW/H
+ d.layoutWidth = R($E.innerWidth());
+ d.layoutHeight = R($E.innerHeight());
+
+ //if ($E.prop('tagName') === 'BODY') { debugData( d, $E.prop('tagName') ); } // DEBUG
+
+ //d.visible = $E.is(":visible");// && x.width > 0 && x.height > 0;
+
+ return d;
+ }
+
+, getElementStyles: function ($E, list) {
+ var
+ CSS = {}
+ , style = $E[0].style
+ , props = list.split(",")
+ , sides = "Top,Bottom,Left,Right".split(",")
+ , attrs = "Color,Style,Width".split(",")
+ , p, s, a, i, j, k
+ ;
+ for (i=0; i < props.length; i++) {
+ p = props[i];
+ if (p.match(/(border|padding|margin)$/))
+ for (j=0; j < 4; j++) {
+ s = sides[j];
+ if (p === "border")
+ for (k=0; k < 3; k++) {
+ a = attrs[k];
+ CSS[p+s+a] = style[p+s+a];
+ }
+ else
+ CSS[p+s] = style[p+s];
+ }
+ else
+ CSS[p] = style[p];
+ };
+ return CSS
+ }
+
+ /**
+ * Return the innerWidth for the current browser/doctype
+ *
+ * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
+ * @param {Array.
} $E Must pass a jQuery object - first element is processed
+ * @param {number=} outerWidth (optional) Can pass a width, allowing calculations BEFORE element is resized
+ * @return {number} Returns the innerWidth of the elem by subtracting padding and borders
+ */
+, cssWidth: function ($E, outerWidth) {
+ // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
+ if (outerWidth <= 0) return 0;
+
+ var lb = $.layout.browser
+ , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
+ , b = $.layout.borderWidth
+ , n = $.layout.cssNum
+ , W = outerWidth
+ ;
+ // strip border and/or padding from outerWidth to get CSS Width
+ if (bs !== "border-box")
+ W -= (b($E, "Left") + b($E, "Right"));
+ if (bs === "content-box")
+ W -= (n($E, "paddingLeft") + n($E, "paddingRight"));
+ return max(0,W);
+ }
+
+ /**
+ * Return the innerHeight for the current browser/doctype
+ *
+ * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
+ * @param {Array.} $E Must pass a jQuery object - first element is processed
+ * @param {number=} outerHeight (optional) Can pass a width, allowing calculations BEFORE element is resized
+ * @return {number} Returns the innerHeight of the elem by subtracting padding and borders
+ */
+, cssHeight: function ($E, outerHeight) {
+ // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
+ if (outerHeight <= 0) return 0;
+
+ var lb = $.layout.browser
+ , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
+ , b = $.layout.borderWidth
+ , n = $.layout.cssNum
+ , H = outerHeight
+ ;
+ // strip border and/or padding from outerHeight to get CSS Height
+ if (bs !== "border-box")
+ H -= (b($E, "Top") + b($E, "Bottom"));
+ if (bs === "content-box")
+ H -= (n($E, "paddingTop") + n($E, "paddingBottom"));
+ return max(0,H);
+ }
+
+ /**
+ * Returns the 'current CSS numeric value' for a CSS property - 0 if property does not exist
+ *
+ * @see Called by many methods
+ * @param {Array.} $E Must pass a jQuery object - first element is processed
+ * @param {string} prop The name of the CSS property, eg: top, width, etc.
+ * @param {boolean=} [allowAuto=false] true = return 'auto' if that is value; false = return 0
+ * @return {(string|number)} Usually used to get an integer value for position (top, left) or size (height, width)
+ */
+, cssNum: function ($E, prop, allowAuto) {
+ if (!$E.jquery) $E = $($E);
+ var CSS = $.layout.showInvisibly($E)
+ , p = $.css($E[0], prop, true)
+ , v = allowAuto && p=="auto" ? p : Math.round(parseFloat(p) || 0);
+ $E.css( CSS ); // RESET
+ return v;
+ }
+
+, borderWidth: function (el, side) {
+ if (el.jquery) el = el[0];
+ var b = "border"+ side.substr(0,1).toUpperCase() + side.substr(1); // left => Left
+ return $.css(el, b+"Style", true) === "none" ? 0 : Math.round(parseFloat($.css(el, b+"Width", true)) || 0);
+ }
+
+ /**
+ * Mouse-tracking utility - FUTURE REFERENCE
+ *
+ * init: if (!window.mouse) {
+ * window.mouse = { x: 0, y: 0 };
+ * $(document).mousemove( $.layout.trackMouse );
+ * }
+ *
+ * @param {Object} evt
+ *
+, trackMouse: function (evt) {
+ window.mouse = { x: evt.clientX, y: evt.clientY };
+ }
+ */
+
+ /**
+ * SUBROUTINE for preventPrematureSlideClose option
+ *
+ * @param {Object} evt
+ * @param {Object=} el
+ */
+, isMouseOverElem: function (evt, el) {
+ var
+ $E = $(el || this)
+ , d = $E.offset()
+ , T = d.top
+ , L = d.left
+ , R = L + $E.outerWidth()
+ , B = T + $E.outerHeight()
+ , x = evt.pageX // evt.clientX ?
+ , y = evt.pageY // evt.clientY ?
+ ;
+ // if X & Y are < 0, probably means is over an open SELECT
+ return ($.layout.browser.msie && x < 0 && y < 0) || ((x >= L && x <= R) && (y >= T && y <= B));
+ }
+
+ /**
+ * Message/Logging Utility
+ *
+ * @example $.layout.msg("My message"); // log text
+ * @example $.layout.msg("My message", true); // alert text
+ * @example $.layout.msg({ foo: "bar" }, "Title"); // log hash-data, with custom title
+ * @example $.layout.msg({ foo: "bar" }, true, "Title", { sort: false }); -OR-
+ * @example $.layout.msg({ foo: "bar" }, "Title", { sort: false, display: true }); // alert hash-data
+ *
+ * @param {(Object|string)} info String message OR Hash/Array
+ * @param {(Boolean|string|Object)=} [popup=false] True means alert-box - can be skipped
+ * @param {(Object|string)=} [debugTitle=""] Title for Hash data - can be skipped
+ * @param {Object=} [debugOpts] Extra options for debug output
+ */
+, msg: function (info, popup, debugTitle, debugOpts) {
+ if ($.isPlainObject(info) && window.debugData) {
+ if (typeof popup === "string") {
+ debugOpts = debugTitle;
+ debugTitle = popup;
+ }
+ else if (typeof debugTitle === "object") {
+ debugOpts = debugTitle;
+ debugTitle = null;
+ }
+ var t = debugTitle || "log( )"
+ , o = $.extend({ sort: false, returnHTML: false, display: false }, debugOpts);
+ if (popup === true || o.display)
+ debugData( info, t, o );
+ else if (window.console)
+ console.log(debugData( info, t, o ));
+ }
+ else if (popup)
+ alert(info);
+ else if (window.console)
+ console.log(info);
+ else {
+ var id = "#layoutLogger"
+ , $l = $(id);
+ if (!$l.length)
+ $l = createLog();
+ $l.children("ul").append(''+ info.replace(/\/g,">") +' ');
+ }
+
+ function createLog () {
+ var pos = $.support.fixedPosition ? 'fixed' : 'absolute'
+ , $e = $(''
+ + '
'
+ + 'X Layout console.log
'
+ + '
'
+ + '
'
+ ).appendTo("body");
+ $e.css('left', $(window).width() - $e.outerWidth() - 5)
+ if ($.ui.draggable) $e.draggable({ handle: ':first-child' });
+ return $e;
+ };
+ }
+
+};
+
+
+/*
+ * $.layout.browser REPLACES removed $.browser, with extra data
+ * Parsing code here adapted from jQuery 1.8 $.browse
+ */
+(function(){
+ var u = navigator.userAgent.toLowerCase()
+ , m = /(chrome)[ \/]([\w.]+)/.exec( u )
+ || /(webkit)[ \/]([\w.]+)/.exec( u )
+ || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( u )
+ || /(msie) ([\w.]+)/.exec( u )
+ || u.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( u )
+ || []
+ , b = m[1] || ""
+ , v = m[2] || 0
+ , ie = b === "msie"
+ , cm = document.compatMode
+ , $s = $.support
+ , bs = $s.boxSizing !== undefined ? $s.boxSizing : $s.boxSizingReliable
+ , bm = !ie || !cm || cm === "CSS1Compat" || $s.boxModel || false
+ , lb = $.layout.browser = {
+ version: v
+ , safari: b === "webkit" // webkit (NOT chrome) = safari
+ , webkit: b === "chrome" // chrome = webkit
+ , msie: ie
+ , isIE6: ie && v == 6
+ // ONLY IE reverts to old box-model - Note that compatMode was deprecated as of IE8
+ , boxModel: bm
+ , boxSizing: !!(typeof bs === "function" ? bs() : bs)
+ };
+ ;
+ if (b) lb[b] = true; // set CURRENT browser
+ /* OLD versions of jQuery only set $.support.boxModel after page is loaded
+ * so if this is IE, use support.boxModel to test for quirks-mode (ONLY IE changes boxModel) */
+ if (!bm && !cm) $(function(){ lb.boxModel = $s.boxModel; });
+})();
+
+
+// DEFAULT OPTIONS
+$.layout.defaults = {
+/*
+ * LAYOUT & LAYOUT-CONTAINER OPTIONS
+ * - none of these options are applicable to individual panes
+ */
+ name: "" // Not required, but useful for buttons and used for the state-cookie
+, containerClass: "ui-layout-container" // layout-container element
+, inset: null // custom container-inset values (override padding)
+, scrollToBookmarkOnLoad: true // after creating a layout, scroll to bookmark in URL (.../page.htm#myBookmark)
+, resizeWithWindow: true // bind thisLayout.resizeAll() to the window.resize event
+, resizeWithWindowDelay: 50 // delay calling resizeAll because makes window resizing very jerky
+, resizeWithWindowMaxDelay: 0 // 0 = none - force resize every XX ms while window is being resized
+, maskPanesEarly: false // true = create pane-masks on resizer.mouseDown instead of waiting for resizer.dragstart
+, onresizeall_start: null // CALLBACK when resizeAll() STARTS - NOT pane-specific
+, onresizeall_end: null // CALLBACK when resizeAll() ENDS - NOT pane-specific
+, onload_start: null // CALLBACK when Layout inits - after options initialized, but before elements
+, onload_end: null // CALLBACK when Layout inits - after EVERYTHING has been initialized
+, onunload_start: null // CALLBACK when Layout is destroyed OR onWindowUnload
+, onunload_end: null // CALLBACK when Layout is destroyed OR onWindowUnload
+, initPanes: true // false = DO NOT initialize the panes onLoad - will init later
+, showErrorMessages: true // enables fatal error messages to warn developers of common errors
+, showDebugMessages: false // display console-and-alert debug msgs - IF this Layout version _has_ debugging code!
+// Changing this zIndex value will cause other zIndex values to automatically change
+, zIndex: null // the PANE zIndex - resizers and masks will be +1
+// DO NOT CHANGE the zIndex values below unless you clearly understand their relationships
+, zIndexes: { // set _default_ z-index values here...
+ pane_normal: 0 // normal z-index for panes
+ , content_mask: 1 // applied to overlays used to mask content INSIDE panes during resizing
+ , resizer_normal: 2 // normal z-index for resizer-bars
+ , pane_sliding: 100 // applied to *BOTH* the pane and its resizer when a pane is 'slid open'
+ , pane_animate: 1000 // applied to the pane when being animated - not applied to the resizer
+ , resizer_drag: 10000 // applied to the CLONED resizer-bar when being 'dragged'
+ }
+, errors: {
+ pane: "pane" // description of "layout pane element" - used only in error messages
+ , selector: "selector" // description of "jQuery-selector" - used only in error messages
+ , addButtonError: "Error Adding Button\nInvalid "
+ , containerMissing: "UI Layout Initialization Error\nThe specified layout-container does not exist."
+ , centerPaneMissing: "UI Layout Initialization Error\nThe center-pane element does not exist.\nThe center-pane is a required element."
+ , noContainerHeight: "UI Layout Initialization Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the layout is 0-height and hence 'invisible'!"
+ , callbackError: "UI Layout Callback Error\nThe EVENT callback is not a valid function."
+ }
+/*
+ * PANE DEFAULT SETTINGS
+ * - settings under the 'panes' key become the default settings for *all panes*
+ * - ALL pane-options can also be set specifically for each panes, which will override these 'default values'
+ */
+, panes: { // default options for 'all panes' - will be overridden by 'per-pane settings'
+ applyDemoStyles: false // NOTE: renamed from applyDefaultStyles for clarity
+ , closable: true // pane can open & close
+ , resizable: true // when open, pane can be resized
+ , slidable: true // when closed, pane can 'slide open' over other panes - closes on mouse-out
+ , initClosed: false // true = init pane as 'closed'
+ , initHidden: false // true = init pane as 'hidden' - no resizer-bar/spacing
+ // SELECTORS
+ //, paneSelector: "" // MUST be pane-specific - jQuery selector for pane
+ , contentSelector: ".ui-layout-content" // ThinkGem 自动高度的内容类。 // INNER div/element to auto-size so only it scrolls, not the entire pane!
+ , contentIgnoreSelector: ".ui-layout-ignore" // element(s) to 'ignore' when measuring 'content'
+ , findNestedContent: true // ThinkGem 设置 contentSelector 自动高度,默认false // true = $P.find(contentSelector), false = $P.children(contentSelector)
+ // GENERIC ROOT-CLASSES - for auto-generated classNames
+ , paneClass: "ui-layout-pane" // Layout Pane
+ , resizerClass: "ui-layout-resizer" // Resizer Bar
+ , togglerClass: "ui-layout-toggler" // Toggler Button
+ , buttonClass: "ui-layout-button" // CUSTOM Buttons - eg: '[ui-layout-button]-toggle/-open/-close/-pin'
+ // ELEMENT SIZE & SPACING
+ //, size: 100 // MUST be pane-specific -initial size of pane
+ , minSize: 0 // when manually resizing a pane
+ , maxSize: 0 // ditto, 0 = no limit
+ , spacing_open: 8 // ThinkGem 分隔符宽度,默认6 // space between pane and adjacent panes - when pane is 'open'
+ , spacing_closed: 8 // ThinkGem 分隔符宽度,默认6 // ditto - when pane is 'closed'
+ , togglerLength_open: 50 // Length = WIDTH of toggler button on north/south sides - HEIGHT on east/west sides
+ , togglerLength_closed: 50 // 100% OR -1 means 'full height/width of resizer bar' - 0 means 'hidden'
+ , togglerAlign_open: "center" // top/left, bottom/right, center, OR...
+ , togglerAlign_closed: "center" // 1 => nn = offset from top/left, -1 => -nn == offset from bottom/right
+ , togglerContent_open: " " // ThinkGem 设置展开折叠图标,默认空"" // text or HTML to put INSIDE the toggler
+ , togglerContent_closed: " " // ThinkGem 设置展开折叠图标,默认空"" // ditto
+ // RESIZING OPTIONS
+ , resizerDblClickToggle: true //
+ , autoResize: true // IF size is 'auto' or a percentage, then recalc 'pixel size' whenever the layout resizes
+ , autoReopen: true // IF a pane was auto-closed due to noRoom, reopen it when there is room? False = leave it closed
+ , resizerDragOpacity: 1 // option for ui.draggable
+ //, resizerCursor: "" // MUST be pane-specific - cursor when over resizer-bar
+ , maskContents: false // true = add DIV-mask over-or-inside this pane so can 'drag' over IFRAMES
+ , maskObjects: false // true = add IFRAME-mask over-or-inside this pane to cover objects/applets - content-mask will overlay this mask
+ , maskZindex: null // will override zIndexes.content_mask if specified - not applicable to iframe-panes
+ , resizingGrid: false // grid size that the resizers will snap-to during resizing, eg: [20,20]
+ , livePaneResizing: false // true = LIVE Resizing as resizer is dragged
+ , liveContentResizing: false // true = re-measure header/footer heights as resizer is dragged
+ , liveResizingTolerance: 1 // how many px change before pane resizes, to control performance
+ // SLIDING OPTIONS
+ , sliderCursor: "pointer" // cursor when resizer-bar will trigger 'sliding'
+ , slideTrigger_open: "mouseenter"// ThinkGem 设置侧边栏自动展开动作,默认click // click, dblclick, mouseenter
+ , slideTrigger_close: "mouseleave"// ThinkGem 设置侧边栏自动展开动作,默认mouseleave // click, mouseleave
+ , slideDelay_open: 100 // ThinkGem 设置鼠标放到侧边栏的时候自动展开的延迟时间,默认300 //applies only for mouseenter event - 0 = instant open
+ , slideDelay_close: 500 // ThinkGem 设置鼠标放到侧边栏的时候自动展开的延迟时间,默认300 //applies only for mouseleave event (300ms is the minimum!)
+ , hideTogglerOnSlide: false // when pane is slid-open, should the toggler show?
+ , preventQuickSlideClose: $.layout.browser.webkit // Chrome triggers slideClosed as it is opening
+ , preventPrematureSlideClose: false // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
+ // PANE-SPECIFIC TIPS & MESSAGES
+ , tips: {
+ Open: "展开" // ThinkGem 汉化,默认Open // eg: "Open Pane"
+ , Close: "折叠" // ThinkGem 汉化,默认Close
+ , Resize: "调整大小/双击折叠" // ThinkGem 汉化,默认Resize
+ , Slide: "鼠标停留自动展开" // ThinkGem 汉化,默认Slide Open
+ , Pin: "Pin"
+ , Unpin: "Un-Pin"
+ , noRoomToOpen: "Not enough room to show this panel." // alert if user tries to open a pane that cannot
+ , minSizeWarning: "Panel has reached its minimum size" // displays in browser statusbar
+ , maxSizeWarning: "Panel has reached its maximum size" // ditto
+ }
+ // HOT-KEYS & MISC
+ , showOverflowOnHover: false // will bind allowOverflow() utility to pane.onMouseOver
+ , enableCursorHotkey: true // enabled 'cursor' hotkeys
+ //, customHotkey: "" // MUST be pane-specific - EITHER a charCode OR a character
+ , customHotkeyModifier: "SHIFT" // either 'SHIFT', 'CTRL' or 'CTRL+SHIFT' - NOT 'ALT'
+ // PANE ANIMATION
+ // NOTE: fxSss_open, fxSss_close & fxSss_size options (eg: fxName_open) are auto-generated if not passed
+ , fxName: "slide" // ('none' or blank), slide, drop, scale -- only relevant to 'open' & 'close', NOT 'size'
+ , fxSpeed: null // slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
+ , fxSettings: {} // can be passed, eg: { easing: "easeOutBounce", duration: 1500 }
+ , fxOpacityFix: true // tries to fix opacity in IE to restore anti-aliasing after animation
+ , animatePaneSizing: false // true = animate resizing after dragging resizer-bar OR sizePane() is called
+ /* NOTE: Action-specific FX options are auto-generated from the options above if not specifically set:
+ fxName_open: "slide" // 'Open' pane animation
+ fnName_close: "slide" // 'Close' pane animation
+ fxName_size: "slide" // 'Size' pane animation - when animatePaneSizing = true
+ fxSpeed_open: null
+ fxSpeed_close: null
+ fxSpeed_size: null
+ fxSettings_open: {}
+ fxSettings_close: {}
+ fxSettings_size: {}
+ */
+ // CHILD/NESTED LAYOUTS
+ , children: null // Layout-options for nested/child layout - even {} is valid as options
+ , containerSelector: '' // if child is NOT 'directly nested', a selector to find it/them (can have more than one child layout!)
+ , initChildren: true // true = child layout will be created as soon as _this_ layout completes initialization
+ , destroyChildren: true // true = destroy child-layout if this pane is destroyed
+ , resizeChildren: true // true = trigger child-layout.resizeAll() when this pane is resized
+ // EVENT TRIGGERING
+ , triggerEventsOnLoad: false // true = trigger onopen OR onclose callbacks when layout initializes
+ , triggerEventsDuringLiveResize: true // true = trigger onresize callback REPEATEDLY if livePaneResizing==true
+ // PANE CALLBACKS
+ , onshow_start: null // CALLBACK when pane STARTS to Show - BEFORE onopen/onhide_start
+ , onshow_end: null // CALLBACK when pane ENDS being Shown - AFTER onopen/onhide_end
+ , onhide_start: null // CALLBACK when pane STARTS to Close - BEFORE onclose_start
+ , onhide_end: null // CALLBACK when pane ENDS being Closed - AFTER onclose_end
+ , onopen_start: null // CALLBACK when pane STARTS to Open
+ , onopen_end: null // CALLBACK when pane ENDS being Opened
+ , onclose_start: null // CALLBACK when pane STARTS to Close
+ , onclose_end: null // CALLBACK when pane ENDS being Closed
+ , onresize_start: null // CALLBACK when pane STARTS being Resized ***FOR ANY REASON***
+ , onresize_end: null // CALLBACK when pane ENDS being Resized ***FOR ANY REASON***
+ , onsizecontent_start: null // CALLBACK when sizing of content-element STARTS
+ , onsizecontent_end: null // CALLBACK when sizing of content-element ENDS
+ , onswap_start: null // CALLBACK when pane STARTS to Swap
+ , onswap_end: null // CALLBACK when pane ENDS being Swapped
+ , ondrag_start: null // CALLBACK when pane STARTS being ***MANUALLY*** Resized
+ , ondrag_end: null // CALLBACK when pane ENDS being ***MANUALLY*** Resized
+ }
+/*
+ * PANE-SPECIFIC SETTINGS
+ * - options listed below MUST be specified per-pane - they CANNOT be set under 'panes'
+ * - all options under the 'panes' key can also be set specifically for any pane
+ * - most options under the 'panes' key apply only to 'border-panes' - NOT the the center-pane
+ */
+, north: {
+ paneSelector: ".ui-layout-north"
+ , size: "auto" // eg: "auto", "30%", .30, 200
+ , resizerCursor: "n-resize" // custom = url(myCursor.cur)
+ , customHotkey: "" // EITHER a charCode (43) OR a character ("o")
+ }
+, south: {
+ paneSelector: ".ui-layout-south"
+ , size: "auto"
+ , resizerCursor: "s-resize"
+ , customHotkey: ""
+ }
+, east: {
+ paneSelector: ".ui-layout-east"
+ , size: 200
+ , resizerCursor: "e-resize"
+ , customHotkey: ""
+ }
+, west: {
+ paneSelector: ".ui-layout-west"
+ , size: 200
+ , resizerCursor: "w-resize"
+ , customHotkey: ""
+ }
+, center: {
+ paneSelector: ".ui-layout-center"
+ , minWidth: 0
+ , minHeight: 0
+ }
+};
+
+$.layout.optionsMap = {
+ // layout/global options - NOT pane-options
+ layout: ("name,instanceKey,stateManagement,effects,inset,zIndexes,errors,"
+ + "zIndex,scrollToBookmarkOnLoad,showErrorMessages,maskPanesEarly,"
+ + "outset,resizeWithWindow,resizeWithWindowDelay,resizeWithWindowMaxDelay,"
+ + "onresizeall,onresizeall_start,onresizeall_end,onload,onload_start,onload_end,onunload,onunload_start,onunload_end").split(",")
+// borderPanes: [ ALL options that are NOT specified as 'layout' ]
+ // default.panes options that apply to the center-pane (most options apply _only_ to border-panes)
+, center: ("paneClass,contentSelector,contentIgnoreSelector,findNestedContent,applyDemoStyles,triggerEventsOnLoad,"
+ + "showOverflowOnHover,maskContents,maskObjects,liveContentResizing,"
+ + "containerSelector,children,initChildren,resizeChildren,destroyChildren,"
+ + "onresize,onresize_start,onresize_end,onsizecontent,onsizecontent_start,onsizecontent_end").split(",")
+ // options that MUST be specifically set 'per-pane' - CANNOT set in the panes (defaults) key
+, noDefault: ("paneSelector,resizerCursor,customHotkey").split(",")
+};
+
+/**
+ * Processes options passed in converts flat-format data into subkey (JSON) format
+ * In flat-format, subkeys are _currently_ separated with 2 underscores, like north__optName
+ * Plugins may also call this method so they can transform their own data
+ *
+ * @param {!Object} hash Data/options passed by user - may be a single level or nested levels
+ * @param {boolean=} [addKeys=false] Should the primary layout.options keys be added if they do not exist?
+ * @return {Object} Returns hash of minWidth & minHeight
+ */
+$.layout.transformData = function (hash, addKeys) {
+ var json = addKeys ? { panes: {}, center: {} } : {} // init return object
+ , branch, optKey, keys, key, val, i, c;
+
+ if (typeof hash !== "object") return json; // no options passed
+
+ // convert all 'flat-keys' to 'sub-key' format
+ for (optKey in hash) {
+ branch = json;
+ val = hash[ optKey ];
+ keys = optKey.split("__"); // eg: west__size or north__fxSettings__duration
+ c = keys.length - 1;
+ // convert underscore-delimited to subkeys
+ for (i=0; i <= c; i++) {
+ key = keys[i];
+ if (i === c) { // last key = value
+ if ($.isPlainObject( val ))
+ branch[key] = $.layout.transformData( val ); // RECURSE
+ else
+ branch[key] = val;
+ }
+ else {
+ if (!branch[key])
+ branch[key] = {}; // create the subkey
+ // recurse to sub-key for next loop - if not done
+ branch = branch[key];
+ }
+ }
+ }
+ return json;
+};
+
+// INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
+$.layout.backwardCompatibility = {
+ // data used by renameOldOptions()
+ map: {
+ // OLD Option Name: NEW Option Name
+ applyDefaultStyles: "applyDemoStyles"
+ // CHILD/NESTED LAYOUTS
+ , childOptions: "children"
+ , initChildLayout: "initChildren"
+ , destroyChildLayout: "destroyChildren"
+ , resizeChildLayout: "resizeChildren"
+ , resizeNestedLayout: "resizeChildren"
+ // MISC Options
+ , resizeWhileDragging: "livePaneResizing"
+ , resizeContentWhileDragging: "liveContentResizing"
+ , triggerEventsWhileDragging: "triggerEventsDuringLiveResize"
+ , maskIframesOnResize: "maskContents"
+ // STATE MANAGEMENT
+ , useStateCookie: "stateManagement.enabled"
+ , "cookie.autoLoad": "stateManagement.autoLoad"
+ , "cookie.autoSave": "stateManagement.autoSave"
+ , "cookie.keys": "stateManagement.stateKeys"
+ , "cookie.name": "stateManagement.cookie.name"
+ , "cookie.domain": "stateManagement.cookie.domain"
+ , "cookie.path": "stateManagement.cookie.path"
+ , "cookie.expires": "stateManagement.cookie.expires"
+ , "cookie.secure": "stateManagement.cookie.secure"
+ // OLD Language options
+ , noRoomToOpenTip: "tips.noRoomToOpen"
+ , togglerTip_open: "tips.Close" // open = Close
+ , togglerTip_closed: "tips.Open" // closed = Open
+ , resizerTip: "tips.Resize"
+ , sliderTip: "tips.Slide"
+ }
+
+/**
+* @param {Object} opts
+*/
+, renameOptions: function (opts) {
+ var map = $.layout.backwardCompatibility.map
+ , oldData, newData, value
+ ;
+ for (var itemPath in map) {
+ oldData = getBranch( itemPath );
+ value = oldData.branch[ oldData.key ];
+ if (value !== undefined) {
+ newData = getBranch( map[itemPath], true );
+ newData.branch[ newData.key ] = value;
+ delete oldData.branch[ oldData.key ];
+ }
+ }
+
+ /**
+ * @param {string} path
+ * @param {boolean=} [create=false] Create path if does not exist
+ */
+ function getBranch (path, create) {
+ var a = path.split(".") // split keys into array
+ , c = a.length - 1
+ , D = { branch: opts, key: a[c] } // init branch at top & set key (last item)
+ , i = 0, k, undef;
+ for (; i 0) {
+ if (autoHide && $E.data('autoHidden') && $E.innerHeight() > 0) {
+ $E.show().data('autoHidden', false);
+ if (!browser.mozilla) // FireFox refreshes iframes - IE does not
+ // make hidden, then visible to 'refresh' display after animation
+ $E.css(_c.hidden).css(_c.visible);
+ }
+ }
+ else if (autoHide && !$E.data('autoHidden'))
+ $E.hide().data('autoHidden', true);
+ }
+
+ /**
+ * @param {(string|!Object)} el
+ * @param {number=} outerHeight
+ * @param {boolean=} [autoHide=false]
+ */
+, setOuterHeight = function (el, outerHeight, autoHide) {
+ var $E = el, h;
+ if (isStr(el)) $E = $Ps[el]; // west
+ else if (!el.jquery) $E = $(el);
+ h = cssH($E, outerHeight);
+ $E.css({ height: h, visibility: "visible" }); // may have been 'hidden' by sizeContent
+ if (h > 0 && $E.innerWidth() > 0) {
+ if (autoHide && $E.data('autoHidden')) {
+ $E.show().data('autoHidden', false);
+ if (!browser.mozilla) // FireFox refreshes iframes - IE does not
+ $E.css(_c.hidden).css(_c.visible);
+ }
+ }
+ else if (autoHide && !$E.data('autoHidden'))
+ $E.hide().data('autoHidden', true);
+ }
+
+
+ /**
+ * Converts any 'size' params to a pixel/integer size, if not already
+ * If 'auto' or a decimal/percentage is passed as 'size', a pixel-size is calculated
+ *
+ /**
+ * @param {string} pane
+ * @param {(string|number)=} size
+ * @param {string=} [dir]
+ * @return {number}
+ */
+, _parseSize = function (pane, size, dir) {
+ if (!dir) dir = _c[pane].dir;
+
+ if (isStr(size) && size.match(/%/))
+ size = (size === '100%') ? -1 : parseInt(size, 10) / 100; // convert % to decimal
+
+ if (size === 0)
+ return 0;
+ else if (size >= 1)
+ return parseInt(size, 10);
+
+ var o = options, avail = 0;
+ if (dir=="horz") // north or south or center.minHeight
+ avail = sC.innerHeight - ($Ps.north ? o.north.spacing_open : 0) - ($Ps.south ? o.south.spacing_open : 0);
+ else if (dir=="vert") // east or west or center.minWidth
+ avail = sC.innerWidth - ($Ps.west ? o.west.spacing_open : 0) - ($Ps.east ? o.east.spacing_open : 0);
+
+ if (size === -1) // -1 == 100%
+ return avail;
+ else if (size > 0) // percentage, eg: .25
+ return round(avail * size);
+ else if (pane=="center")
+ return 0;
+ else { // size < 0 || size=='auto' || size==Missing || size==Invalid
+ // auto-size the pane
+ var dim = (dir === "horz" ? "height" : "width")
+ , $P = $Ps[pane]
+ , $C = dim === 'height' ? $Cs[pane] : false
+ , vis = $.layout.showInvisibly($P) // show pane invisibly if hidden
+ , szP = $P.css(dim) // SAVE current pane size
+ , szC = $C ? $C.css(dim) : 0 // SAVE current content size
+ ;
+ $P.css(dim, "auto");
+ if ($C) $C.css(dim, "auto");
+ size = (dim === "height") ? $P.outerHeight() : $P.outerWidth(); // MEASURE
+ $P.css(dim, szP).css(vis); // RESET size & visibility
+ if ($C) $C.css(dim, szC);
+ return size;
+ }
+ }
+
+ /**
+ * Calculates current 'size' (outer-width or outer-height) of a border-pane - optionally with 'pane-spacing' added
+ *
+ * @param {(string|!Object)} pane
+ * @param {boolean=} [inclSpace=false]
+ * @return {number} Returns EITHER Width for east/west panes OR Height for north/south panes
+ */
+, getPaneSize = function (pane, inclSpace) {
+ var
+ $P = $Ps[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , oSp = (inclSpace ? o.spacing_open : 0)
+ , cSp = (inclSpace ? o.spacing_closed : 0)
+ ;
+ if (!$P || s.isHidden)
+ return 0;
+ else if (s.isClosed || (s.isSliding && inclSpace))
+ return cSp;
+ else if (_c[pane].dir === "horz")
+ return $P.outerHeight() + oSp;
+ else // dir === "vert"
+ return $P.outerWidth() + oSp;
+ }
+
+ /**
+ * Calculate min/max pane dimensions and limits for resizing
+ *
+ * @param {string} pane
+ * @param {boolean=} [slide=false]
+ */
+, setSizeLimits = function (pane, slide) {
+ if (!isInitialized()) return;
+ var
+ o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , dir = c.dir
+ , type = c.sizeType.toLowerCase()
+ , isSliding = (slide != undefined ? slide : s.isSliding) // only open() passes 'slide' param
+ , $P = $Ps[pane]
+ , paneSpacing = o.spacing_open
+ // measure the pane on the *opposite side* from this pane
+ , altPane = _c.oppositeEdge[pane]
+ , altS = state[altPane]
+ , $altP = $Ps[altPane]
+ , altPaneSize = (!$altP || altS.isVisible===false || altS.isSliding ? 0 : (dir=="horz" ? $altP.outerHeight() : $altP.outerWidth()))
+ , altPaneSpacing = ((!$altP || altS.isHidden ? 0 : options[altPane][ altS.isClosed !== false ? "spacing_closed" : "spacing_open" ]) || 0)
+ // limitSize prevents this pane from 'overlapping' opposite pane
+ , containerSize = (dir=="horz" ? sC.innerHeight : sC.innerWidth)
+ , minCenterDims = cssMinDims("center")
+ , minCenterSize = dir=="horz" ? max(options.center.minHeight, minCenterDims.minHeight) : max(options.center.minWidth, minCenterDims.minWidth)
+ // if pane is 'sliding', then ignore center and alt-pane sizes - because 'overlays' them
+ , limitSize = (containerSize - paneSpacing - (isSliding ? 0 : (_parseSize("center", minCenterSize, dir) + altPaneSize + altPaneSpacing)))
+ , minSize = s.minSize = max( _parseSize(pane, o.minSize), cssMinDims(pane).minSize )
+ , maxSize = s.maxSize = min( (o.maxSize ? _parseSize(pane, o.maxSize) : 100000), limitSize )
+ , r = s.resizerPosition = {} // used to set resizing limits
+ , top = sC.inset.top
+ , left = sC.inset.left
+ , W = sC.innerWidth
+ , H = sC.innerHeight
+ , rW = o.spacing_open // subtract resizer-width to get top/left position for south/east
+ ;
+ switch (pane) {
+ case "north": r.min = top + minSize;
+ r.max = top + maxSize;
+ break;
+ case "west": r.min = left + minSize;
+ r.max = left + maxSize;
+ break;
+ case "south": r.min = top + H - maxSize - rW;
+ r.max = top + H - minSize - rW;
+ break;
+ case "east": r.min = left + W - maxSize - rW;
+ r.max = left + W - minSize - rW;
+ break;
+ };
+ }
+
+ /**
+ * Returns data for setting the size/position of center pane. Also used to set Height for east/west panes
+ *
+ * @return JSON Returns a hash of all dimensions: top, bottom, left, right, (outer) width and (outer) height
+ */
+, calcNewCenterPaneDims = function () {
+ var d = {
+ top: getPaneSize("north", true) // true = include 'spacing' value for pane
+ , bottom: getPaneSize("south", true)
+ , left: getPaneSize("west", true)
+ , right: getPaneSize("east", true)
+ , width: 0
+ , height: 0
+ };
+
+ // NOTE: sC = state.container
+ // calc center-pane outer dimensions
+ d.width = sC.innerWidth - d.left - d.right; // outerWidth
+ d.height = sC.innerHeight - d.bottom - d.top; // outerHeight
+ // add the 'container border/padding' to get final positions relative to the container
+ d.top += sC.inset.top;
+ d.bottom += sC.inset.bottom;
+ d.left += sC.inset.left;
+ d.right += sC.inset.right;
+
+ return d;
+ }
+
+
+ /**
+ * @param {!Object} el
+ * @param {boolean=} [allStates=false]
+ */
+, getHoverClasses = function (el, allStates) {
+ var
+ $El = $(el)
+ , type = $El.data("layoutRole")
+ , pane = $El.data("layoutEdge")
+ , o = options[pane]
+ , root = o[type +"Class"]
+ , _pane = "-"+ pane // eg: "-west"
+ , _open = "-open"
+ , _closed = "-closed"
+ , _slide = "-sliding"
+ , _hover = "-hover " // NOTE the trailing space
+ , _state = $El.hasClass(root+_closed) ? _closed : _open
+ , _alt = _state === _closed ? _open : _closed
+ , classes = (root+_hover) + (root+_pane+_hover) + (root+_state+_hover) + (root+_pane+_state+_hover)
+ ;
+ if (allStates) // when 'removing' classes, also remove alternate-state classes
+ classes += (root+_alt+_hover) + (root+_pane+_alt+_hover);
+
+ if (type=="resizer" && $El.hasClass(root+_slide))
+ classes += (root+_slide+_hover) + (root+_pane+_slide+_hover);
+
+ return $.trim(classes);
+ }
+, addHover = function (evt, el) {
+ var $E = $(el || this);
+ if (evt && $E.data("layoutRole") === "toggler")
+ evt.stopPropagation(); // prevent triggering 'slide' on Resizer-bar
+ $E.addClass( getHoverClasses($E) );
+ }
+, removeHover = function (evt, el) {
+ var $E = $(el || this);
+ $E.removeClass( getHoverClasses($E, true) );
+ }
+
+, onResizerEnter = function (evt) { // ALSO called by toggler.mouseenter
+ var pane = $(this).data("layoutEdge")
+ , s = state[pane]
+ , $d = $(document)
+ ;
+ // ignore closed-panes and mouse moving back & forth over resizer!
+ // also ignore if ANY pane is currently resizing
+ if ( s.isResizing || state.paneResizing ) return;
+
+ if (options.maskPanesEarly)
+ showMasks( pane, { resizing: true });
+ }
+, onResizerLeave = function (evt, el) {
+ var e = el || this // el is only passed when called by the timer
+ , pane = $(e).data("layoutEdge")
+ , name = pane +"ResizerLeave"
+ , $d = $(document)
+ ;
+ timer.clear(pane+"_openSlider"); // cancel slideOpen timer, if set
+ timer.clear(name); // cancel enableSelection timer - may re/set below
+ // this method calls itself on a timer because it needs to allow
+ // enough time for dragging to kick-in and set the isResizing flag
+ // dragging has a 100ms delay set, so this delay must be >100
+ if (!el) // 1st call - mouseleave event
+ timer.set(name, function(){ onResizerLeave(evt, e); }, 200);
+ // if user is resizing, dragStop will reset everything, so skip it here
+ else if (options.maskPanesEarly && !state.paneResizing) // 2nd call - by timer
+ hideMasks();
+ }
+
+/*
+ * ###########################
+ * INITIALIZATION METHODS
+ * ###########################
+ */
+
+ /**
+ * Initialize the layout - called automatically whenever an instance of layout is created
+ *
+ * @see none - triggered onInit
+ * @return mixed true = fully initialized | false = panes not initialized (yet) | 'cancel' = abort
+ */
+, _create = function () {
+ // initialize config/options
+ initOptions();
+ var o = options
+ , s = state;
+
+ // TEMP state so isInitialized returns true during init process
+ s.creatingLayout = true;
+
+ // init plugins for this layout, if there are any (eg: stateManagement)
+ runPluginCallbacks( Instance, $.layout.onCreate );
+
+ // options & state have been initialized, so now run beforeLoad callback
+ // onload will CANCEL layout creation if it returns false
+ if (false === _runCallbacks("onload_start"))
+ return 'cancel';
+
+ // initialize the container element
+ _initContainer();
+
+ // bind hotkey function - keyDown - if required
+ initHotkeys();
+
+ // bind window.onunload
+ $(window).bind("unload."+ sID, unload);
+
+ // init plugins for this layout, if there are any (eg: customButtons)
+ runPluginCallbacks( Instance, $.layout.onLoad );
+
+ // if layout elements are hidden, then layout WILL NOT complete initialization!
+ // initLayoutElements will set initialized=true and run the onload callback IF successful
+ if (o.initPanes) _initLayoutElements();
+
+ delete s.creatingLayout;
+
+ return state.initialized;
+ }
+
+ /**
+ * Initialize the layout IF not already
+ *
+ * @see All methods in Instance run this test
+ * @return boolean true = layoutElements have been initialized | false = panes are not initialized (yet)
+ */
+, isInitialized = function () {
+ if (state.initialized || state.creatingLayout) return true; // already initialized
+ else return _initLayoutElements(); // try to init panes NOW
+ }
+
+ /**
+ * Initialize the layout - called automatically whenever an instance of layout is created
+ *
+ * @see _create() & isInitialized
+ * @param {boolean=} [retry=false] // indicates this is a 2nd try
+ * @return An object pointer to the instance created
+ */
+, _initLayoutElements = function (retry) {
+ // initialize config/options
+ var o = options;
+ // CANNOT init panes inside a hidden container!
+ if (!$N.is(":visible")) {
+ // handle Chrome bug where popup window 'has no height'
+ // if layout is BODY element, try again in 50ms
+ // SEE: http://layout.jquery-dev.com/samples/test_popup_window.html
+ if ( !retry && browser.webkit && $N[0].tagName === "BODY" )
+ setTimeout(function(){ _initLayoutElements(true); }, 50);
+ return false;
+ }
+
+ // a center pane is required, so make sure it exists
+ if (!getPane("center").length) {
+ return _log( o.errors.centerPaneMissing );
+ }
+
+ // TEMP state so isInitialized returns true during init process
+ state.creatingLayout = true;
+
+ // update Container dims
+ $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
+
+ // initialize all layout elements
+ initPanes(); // size & position panes - calls initHandles() - which calls initResizable()
+
+ if (o.scrollToBookmarkOnLoad) {
+ var l = self.location;
+ if (l.hash) l.replace( l.hash ); // scrollTo Bookmark
+ }
+
+ // check to see if this layout 'nested' inside a pane
+ if (Instance.hasParentLayout)
+ o.resizeWithWindow = false;
+ // bind resizeAll() for 'this layout instance' to window.resize event
+ else if (o.resizeWithWindow)
+ $(window).bind("resize."+ sID, windowResize);
+
+ delete state.creatingLayout;
+ state.initialized = true;
+
+ // init plugins for this layout, if there are any
+ runPluginCallbacks( Instance, $.layout.onReady );
+
+ // now run the onload callback, if exists
+ _runCallbacks("onload_end");
+
+ return true; // elements initialized successfully
+ }
+
+ /**
+ * Initialize nested layouts for a specific pane - can optionally pass layout-options
+ *
+ * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
+ * @param {Object=} [opts] Layout-options - if passed, will OVERRRIDE options[pane].children
+ * @return An object pointer to the layout instance created - or null
+ */
+, createChildren = function (evt_or_pane, opts) {
+ var pane = evtPane.call(this, evt_or_pane)
+ , $P = $Ps[pane]
+ ;
+ if (!$P) return;
+ var $C = $Cs[pane]
+ , s = state[pane]
+ , o = options[pane]
+ , sm = options.stateManagement || {}
+ , cos = opts ? (o.children = opts) : o.children
+ ;
+ if ( $.isPlainObject( cos ) )
+ cos = [ cos ]; // convert a hash to a 1-elem array
+ else if (!cos || !$.isArray( cos ))
+ return;
+
+ $.each( cos, function (idx, co) {
+ if ( !$.isPlainObject( co ) ) return;
+
+ // determine which element is supposed to be the 'child container'
+ // if pane has a 'containerSelector' OR a 'content-div', use those instead of the pane
+ var $containers = co.containerSelector ? $P.find( co.containerSelector ) : ($C || $P);
+
+ $containers.each(function(){
+ var $cont = $(this)
+ , child = $cont.data("layout") // see if a child-layout ALREADY exists on this element
+ ;
+ // if no layout exists, but children are set, try to create the layout now
+ if (!child) {
+ // TODO: see about moving this to the stateManagement plugin, as a method
+ // set a unique child-instance key for this layout, if not already set
+ setInstanceKey({ container: $cont, options: co }, s );
+ // If THIS layout has a hash in stateManagement.autoLoad,
+ // then see if it also contains state-data for this child-layout
+ // If so, copy the stateData to child.options.stateManagement.autoLoad
+ if ( sm.includeChildren && state.stateData[pane] ) {
+ // THIS layout's state was cached when its state was loaded
+ var paneChildren = state.stateData[pane].children || {}
+ , childState = paneChildren[ co.instanceKey ]
+ , co_sm = co.stateManagement || (co.stateManagement = { autoLoad: true })
+ ;
+ // COPY the stateData into the autoLoad key
+ if ( co_sm.autoLoad === true && childState ) {
+ co_sm.autoSave = false; // disable autoSave because saving handled by parent-layout
+ co_sm.includeChildren = true; // cascade option - FOR NOW
+ co_sm.autoLoad = $.extend(true, {}, childState); // COPY the state-hash
+ }
+ }
+
+ // create the layout
+ child = $cont.layout( co );
+
+ // if successful, update data
+ if (child) {
+ // add the child and update all layout-pointers
+ // MAY have already been done by child-layout calling parent.refreshChildren()
+ refreshChildren( pane, child );
+ }
+ }
+ });
+ });
+ }
+
+, setInstanceKey = function (child, parentPaneState) {
+ // create a named key for use in state and instance branches
+ var $c = child.container
+ , o = child.options
+ , sm = o.stateManagement
+ , key = o.instanceKey || $c.data("layoutInstanceKey")
+ ;
+ if (!key) key = (sm && sm.cookie ? sm.cookie.name : '') || o.name; // look for a name/key
+ if (!key) key = "layout"+ (++parentPaneState.childIdx); // if no name/key found, generate one
+ else key = key.replace(/[^\w-]/gi, '_').replace(/_{2,}/g, '_'); // ensure is valid as a hash key
+ o.instanceKey = key;
+ $c.data("layoutInstanceKey", key); // useful if layout is destroyed and then recreated
+ return key;
+ }
+
+ /**
+ * @param {string} pane The pane being opened, ie: north, south, east, or west
+ * @param {Object=} newChild New child-layout Instance to add to this pane
+ */
+, refreshChildren = function (pane, newChild) {
+ var $P = $Ps[pane]
+ , pC = children[pane]
+ , s = state[pane]
+ , o
+ ;
+ // check for destroy()ed layouts and update the child pointers & arrays
+ if ($.isPlainObject( pC )) {
+ $.each( pC, function (key, child) {
+ if (child.destroyed) delete pC[key]
+ });
+ // if no more children, remove the children hash
+ if ($.isEmptyObject( pC ))
+ pC = children[pane] = null; // clear children hash
+ }
+
+ // see if there is a directly-nested layout inside this pane
+ // if there is, then there can be only ONE child-layout, so check that...
+ if (!newChild && !pC) {
+ newChild = $P.data("layout");
+ }
+
+ // if a newChild instance was passed, add it to children[pane]
+ if (newChild) {
+ // update child.state
+ newChild.hasParentLayout = true; // set parent-flag in child
+ // instanceKey is a key-name used in both state and children
+ o = newChild.options;
+ // set a unique child-instance key for this layout, if not already set
+ setInstanceKey( newChild, s );
+ // add pointer to pane.children hash
+ if (!pC) pC = children[pane] = {}; // create an empty children hash
+ pC[ o.instanceKey ] = newChild.container.data("layout"); // add childLayout instance
+ }
+
+ // ALWAYS refresh the pane.children alias, even if null
+ Instance[pane].children = children[pane];
+
+ // if newChild was NOT passed - see if there is a child layout NOW
+ if (!newChild) {
+ createChildren(pane); // MAY create a child and re-call this method
+ }
+ }
+
+, windowResize = function () {
+ var o = options
+ , delay = Number(o.resizeWithWindowDelay);
+ if (delay < 10) delay = 100; // MUST have a delay!
+ // resizing uses a delay-loop because the resize event fires repeatly - except in FF, but delay anyway
+ timer.clear("winResize"); // if already running
+ timer.set("winResize", function(){
+ timer.clear("winResize");
+ timer.clear("winResizeRepeater");
+ var dims = elDims( $N, o.inset );
+ // only trigger resizeAll() if container has changed size
+ if (dims.innerWidth !== sC.innerWidth || dims.innerHeight !== sC.innerHeight)
+ resizeAll();
+ }, delay);
+ // ALSO set fixed-delay timer, if not already running
+ if (!timer.data["winResizeRepeater"]) setWindowResizeRepeater();
+ }
+
+, setWindowResizeRepeater = function () {
+ var delay = Number(options.resizeWithWindowMaxDelay);
+ if (delay > 0)
+ timer.set("winResizeRepeater", function(){ setWindowResizeRepeater(); resizeAll(); }, delay);
+ }
+
+, unload = function () {
+ var o = options;
+
+ _runCallbacks("onunload_start");
+
+ // trigger plugin callabacks for this layout (eg: stateManagement)
+ runPluginCallbacks( Instance, $.layout.onUnload );
+
+ _runCallbacks("onunload_end");
+ }
+
+ /**
+ * Validate and initialize container CSS and events
+ *
+ * @see _create()
+ */
+, _initContainer = function () {
+ var
+ N = $N[0]
+ , $H = $("html")
+ , tag = sC.tagName = N.tagName
+ , id = sC.id = N.id
+ , cls = sC.className = N.className
+ , o = options
+ , name = o.name
+ , props = "position,margin,padding,border"
+ , css = "layoutCSS"
+ , CSS = {}
+ , hid = "hidden" // used A LOT!
+ // see if this container is a 'pane' inside an outer-layout
+ , parent = $N.data("parentLayout") // parent-layout Instance
+ , pane = $N.data("layoutEdge") // pane-name in parent-layout
+ , isChild = parent && pane
+ , num = $.layout.cssNum
+ , $parent, n
+ ;
+ // sC = state.container
+ sC.selector = $N.selector.split(".slice")[0];
+ sC.ref = (o.name ? o.name +' layout / ' : '') + tag + (id ? "#"+id : cls ? '.['+cls+']' : ''); // used in messages
+ sC.isBody = (tag === "BODY");
+
+ // try to find a parent-layout
+ if (!isChild && !sC.isBody) {
+ $parent = $N.closest("."+ $.layout.defaults.panes.paneClass);
+ parent = $parent.data("parentLayout");
+ pane = $parent.data("layoutEdge");
+ isChild = parent && pane;
+ }
+
+ $N .data({
+ layout: Instance
+ , layoutContainer: sID // FLAG to indicate this is a layout-container - contains unique internal ID
+ })
+ .addClass(o.containerClass)
+ ;
+ var layoutMethods = {
+ destroy: ''
+ , initPanes: ''
+ , resizeAll: 'resizeAll'
+ , resize: 'resizeAll'
+ };
+ // loop hash and bind all methods - include layoutID namespacing
+ for (name in layoutMethods) {
+ $N.bind("layout"+ name.toLowerCase() +"."+ sID, Instance[ layoutMethods[name] || name ]);
+ }
+
+ // if this container is another layout's 'pane', then set child/parent pointers
+ if (isChild) {
+ // update parent flag
+ Instance.hasParentLayout = true;
+ // set pointers to THIS child-layout (Instance) in parent-layout
+ parent.refreshChildren( pane, Instance );
+ }
+
+ // SAVE original container CSS for use in destroy()
+ if (!$N.data(css)) {
+ // handle props like overflow different for BODY & HTML - has 'system default' values
+ if (sC.isBody) {
+ // SAVE CSS
+ $N.data(css, $.extend( styles($N, props), {
+ height: $N.css("height")
+ , overflow: $N.css("overflow")
+ , overflowX: $N.css("overflowX")
+ , overflowY: $N.css("overflowY")
+ }));
+ // ALSO SAVE CSS
+ $H.data(css, $.extend( styles($H, 'padding'), {
+ height: "auto" // FF would return a fixed px-size!
+ , overflow: $H.css("overflow")
+ , overflowX: $H.css("overflowX")
+ , overflowY: $H.css("overflowY")
+ }));
+ }
+ else // handle props normally for non-body elements
+ $N.data(css, styles($N, props+",top,bottom,left,right,width,height,overflow,overflowX,overflowY") );
+ }
+
+ try {
+ // common container CSS
+ CSS = {
+ overflow: hid
+ , overflowX: hid
+ , overflowY: hid
+ };
+ $N.css( CSS );
+
+ if (o.inset && !$.isPlainObject(o.inset)) {
+ // can specify a single number for equal outset all-around
+ n = parseInt(o.inset, 10) || 0
+ o.inset = {
+ top: n
+ , bottom: n
+ , left: n
+ , right: n
+ };
+ }
+
+ // format html & body if this is a full page layout
+ if (sC.isBody) {
+ // if HTML has padding, use this as an outer-spacing around BODY
+ if (!o.outset) {
+ // use padding from parent-elem (HTML) as outset
+ o.outset = {
+ top: num($H, "paddingTop")
+ , bottom: num($H, "paddingBottom")
+ , left: num($H, "paddingLeft")
+ , right: num($H, "paddingRight")
+ };
+ }
+ else if (!$.isPlainObject(o.outset)) {
+ // can specify a single number for equal outset all-around
+ n = parseInt(o.outset, 10) || 0
+ o.outset = {
+ top: n
+ , bottom: n
+ , left: n
+ , right: n
+ };
+ }
+ // HTML
+ $H.css( CSS ).css({
+ height: "100%"
+ , border: "none" // no border or padding allowed when using height = 100%
+ , padding: 0 // ditto
+ , margin: 0
+ });
+ // BODY
+ if (browser.isIE6) {
+ // IE6 CANNOT use the trick of setting absolute positioning on all 4 sides - must have 'height'
+ $N.css({
+ width: "100%"
+ , height: "100%"
+ , border: "none" // no border or padding allowed when using height = 100%
+ , padding: 0 // ditto
+ , margin: 0
+ , position: "relative"
+ });
+ // convert body padding to an inset option - the border cannot be measured in IE6!
+ if (!o.inset) o.inset = elDims( $N ).inset;
+ }
+ else { // use absolute positioning for BODY to allow borders & padding without overflow
+ $N.css({
+ width: "auto"
+ , height: "auto"
+ , margin: 0
+ , position: "absolute" // allows for border and padding on BODY
+ });
+ // apply edge-positioning created above
+ $N.css( o.outset );
+ }
+ // set current layout-container dimensions
+ $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
+ }
+ else {
+ // container MUST have 'position'
+ var p = $N.css("position");
+ if (!p || !p.match(/(fixed|absolute|relative)/))
+ $N.css("position","relative");
+
+ // set current layout-container dimensions
+ if ( $N.is(":visible") ) {
+ $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT change insetX (padding) values
+ if (sC.innerHeight < 1) // container has no 'height' - warn developer
+ _log( o.errors.noContainerHeight.replace(/CONTAINER/, sC.ref) );
+ }
+ }
+
+ // if container has min-width/height, then enable scrollbar(s)
+ if ( num($N, "minWidth") ) $N.parent().css("overflowX","auto");
+ if ( num($N, "minHeight") ) $N.parent().css("overflowY","auto");
+
+ } catch (ex) {}
+ }
+
+ /**
+ * Bind layout hotkeys - if options enabled
+ *
+ * @see _create() and addPane()
+ * @param {string=} [panes=""] The edge(s) to process
+ */
+, initHotkeys = function (panes) {
+ panes = panes ? panes.split(",") : _c.borderPanes;
+ // bind keyDown to capture hotkeys, if option enabled for ANY pane
+ $.each(panes, function (i, pane) {
+ var o = options[pane];
+ if (o.enableCursorHotkey || o.customHotkey) {
+ $(document).bind("keydown."+ sID, keyDown); // only need to bind this ONCE
+ return false; // BREAK - binding was done
+ }
+ });
+ }
+
+ /**
+ * Build final OPTIONS data
+ *
+ * @see _create()
+ */
+, initOptions = function () {
+ var data, d, pane, key, val, i, c, o;
+
+ // reprocess user's layout-options to have correct options sub-key structure
+ opts = $.layout.transformData( opts, true ); // panes = default subkey
+
+ // auto-rename old options for backward compatibility
+ opts = $.layout.backwardCompatibility.renameAllOptions( opts );
+
+ // if user-options has 'panes' key (pane-defaults), clean it...
+ if (!$.isEmptyObject(opts.panes)) {
+ // REMOVE any pane-defaults that MUST be set per-pane
+ data = $.layout.optionsMap.noDefault;
+ for (i=0, c=data.length; i 0) {
+ z.pane_normal = zo;
+ z.content_mask = max(zo+1, z.content_mask); // MIN = +1
+ z.resizer_normal = max(zo+2, z.resizer_normal); // MIN = +2
+ }
+
+ // DELETE 'panes' key now that we are done - values were copied to EACH pane
+ delete options.panes;
+
+
+ function createFxOptions ( pane ) {
+ var o = options[pane]
+ , d = options.panes;
+ // ensure fxSettings key to avoid errors
+ if (!o.fxSettings) o.fxSettings = {};
+ if (!d.fxSettings) d.fxSettings = {};
+
+ $.each(["_open","_close","_size"], function (i,n) {
+ var
+ sName = "fxName"+ n
+ , sSpeed = "fxSpeed"+ n
+ , sSettings = "fxSettings"+ n
+ // recalculate fxName according to specificity rules
+ , fxName = o[sName] =
+ o[sName] // options.west.fxName_open
+ || d[sName] // options.panes.fxName_open
+ || o.fxName // options.west.fxName
+ || d.fxName // options.panes.fxName
+ || "none" // MEANS $.layout.defaults.panes.fxName == "" || false || null || 0
+ , fxExists = $.effects && ($.effects[fxName] || ($.effects.effect && $.effects.effect[fxName]))
+ ;
+ // validate fxName to ensure is valid effect - MUST have effect-config data in options.effects
+ if (fxName === "none" || !options.effects[fxName] || !fxExists)
+ fxName = o[sName] = "none"; // effect not loaded OR unrecognized fxName
+
+ // set vars for effects subkeys to simplify logic
+ var fx = options.effects[fxName] || {} // effects.slide
+ , fx_all = fx.all || null // effects.slide.all
+ , fx_pane = fx[pane] || null // effects.slide.west
+ ;
+ // create fxSpeed[_open|_close|_size]
+ o[sSpeed] =
+ o[sSpeed] // options.west.fxSpeed_open
+ || d[sSpeed] // options.west.fxSpeed_open
+ || o.fxSpeed // options.west.fxSpeed
+ || d.fxSpeed // options.panes.fxSpeed
+ || null // DEFAULT - let fxSetting.duration control speed
+ ;
+ // create fxSettings[_open|_close|_size]
+ o[sSettings] = $.extend(
+ true
+ , {}
+ , fx_all // effects.slide.all
+ , fx_pane // effects.slide.west
+ , d.fxSettings // options.panes.fxSettings
+ , o.fxSettings // options.west.fxSettings
+ , d[sSettings] // options.panes.fxSettings_open
+ , o[sSettings] // options.west.fxSettings_open
+ );
+ });
+
+ // DONE creating action-specific-settings for this pane,
+ // so DELETE generic options - are no longer meaningful
+ delete o.fxName;
+ delete o.fxSpeed;
+ delete o.fxSettings;
+ }
+ }
+
+ /**
+ * Initialize module objects, styling, size and position for all panes
+ *
+ * @see _initElements()
+ * @param {string} pane The pane to process
+ */
+, getPane = function (pane) {
+ var sel = options[pane].paneSelector
+ if (sel.substr(0,1)==="#") // ID selector
+ // NOTE: elements selected 'by ID' DO NOT have to be 'children'
+ return $N.find(sel).eq(0);
+ else { // class or other selector
+ var $P = $N.children(sel).eq(0);
+ // look for the pane nested inside a 'form' element
+ return $P.length ? $P : $N.children("form:first").children(sel).eq(0);
+ }
+ }
+
+ /**
+ * @param {Object=} evt
+ */
+, initPanes = function (evt) {
+ // stopPropagation if called by trigger("layoutinitpanes") - use evtPane utility
+ evtPane(evt);
+
+ // NOTE: do north & south FIRST so we can measure their height - do center LAST
+ $.each(_c.allPanes, function (idx, pane) {
+ addPane( pane, true );
+ });
+
+ // init the pane-handles NOW in case we have to hide or close the pane below
+ initHandles();
+
+ // now that all panes have been initialized and initially-sized,
+ // make sure there is really enough space available for each pane
+ $.each(_c.borderPanes, function (i, pane) {
+ if ($Ps[pane] && state[pane].isVisible) { // pane is OPEN
+ setSizeLimits(pane);
+ makePaneFit(pane); // pane may be Closed, Hidden or Resized by makePaneFit()
+ }
+ });
+ // size center-pane AGAIN in case we 'closed' a border-pane in loop above
+ sizeMidPanes("center");
+
+ // Chrome/Webkit sometimes fires callbacks BEFORE it completes resizing!
+ // Before RC30.3, there was a 10ms delay here, but that caused layout
+ // to load asynchrously, which is BAD, so try skipping delay for now
+
+ // process pane contents and callbacks, and init/resize child-layout if exists
+ $.each(_c.allPanes, function (idx, pane) {
+ afterInitPane(pane);
+ });
+ }
+
+ /**
+ * Add a pane to the layout - subroutine of initPanes()
+ *
+ * @see initPanes()
+ * @param {string} pane The pane to process
+ * @param {boolean=} [force=false] Size content after init
+ */
+, addPane = function (pane, force) {
+ if ( !force && !isInitialized() ) return;
+ var
+ o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , dir = c.dir
+ , fx = s.fx
+ , spacing = o.spacing_open || 0
+ , isCenter = (pane === "center")
+ , CSS = {}
+ , $P = $Ps[pane]
+ , size, minSize, maxSize, child
+ ;
+ // if pane-pointer already exists, remove the old one first
+ if ($P)
+ removePane( pane, false, true, false );
+ else
+ $Cs[pane] = false; // init
+
+ $P = $Ps[pane] = getPane(pane);
+ if (!$P.length) {
+ $Ps[pane] = false; // logic
+ return;
+ }
+
+ // SAVE original Pane CSS
+ if (!$P.data("layoutCSS")) {
+ var props = "position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border";
+ $P.data("layoutCSS", styles($P, props));
+ }
+
+ // create alias for pane data in Instance - initHandles will add more
+ Instance[pane] = {
+ name: pane
+ , pane: $Ps[pane]
+ , content: $Cs[pane]
+ , options: options[pane]
+ , state: state[pane]
+ , children: children[pane]
+ };
+
+ // add classes, attributes & events
+ $P .data({
+ parentLayout: Instance // pointer to Layout Instance
+ , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
+ , layoutEdge: pane
+ , layoutRole: "pane"
+ })
+ .css(c.cssReq).css("zIndex", options.zIndexes.pane_normal)
+ .css(o.applyDemoStyles ? c.cssDemo : {}) // demo styles
+ .addClass( o.paneClass +" "+ o.paneClass+"-"+pane ) // default = "ui-layout-pane ui-layout-pane-west" - may be a dupe of 'paneSelector'
+ .bind("mouseenter."+ sID, addHover )
+ .bind("mouseleave."+ sID, removeHover )
+ ;
+ var paneMethods = {
+ hide: ''
+ , show: ''
+ , toggle: ''
+ , close: ''
+ , open: ''
+ , slideOpen: ''
+ , slideClose: ''
+ , slideToggle: ''
+ , size: 'sizePane'
+ , sizePane: 'sizePane'
+ , sizeContent: ''
+ , sizeHandles: ''
+ , enableClosable: ''
+ , disableClosable: ''
+ , enableSlideable: ''
+ , disableSlideable: ''
+ , enableResizable: ''
+ , disableResizable: ''
+ , swapPanes: 'swapPanes'
+ , swap: 'swapPanes'
+ , move: 'swapPanes'
+ , removePane: 'removePane'
+ , remove: 'removePane'
+ , createChildren: ''
+ , resizeChildren: ''
+ , resizeAll: 'resizeAll'
+ , resizeLayout: 'resizeAll'
+ }
+ , name;
+ // loop hash and bind all methods - include layoutID namespacing
+ for (name in paneMethods) {
+ $P.bind("layoutpane"+ name.toLowerCase() +"."+ sID, Instance[ paneMethods[name] || name ]);
+ }
+
+ // see if this pane has a 'scrolling-content element'
+ initContent(pane, false); // false = do NOT sizeContent() - called later
+
+ if (!isCenter) {
+ // call _parseSize AFTER applying pane classes & styles - but before making visible (if hidden)
+ // if o.size is auto or not valid, then MEASURE the pane and use that as its 'size'
+ size = s.size = _parseSize(pane, o.size);
+ minSize = _parseSize(pane,o.minSize) || 1;
+ maxSize = _parseSize(pane,o.maxSize) || 100000;
+ if (size > 0) size = max(min(size, maxSize), minSize);
+ s.autoResize = o.autoResize; // used with percentage sizes
+
+ // state for border-panes
+ s.isClosed = false; // true = pane is closed
+ s.isSliding = false; // true = pane is currently open by 'sliding' over adjacent panes
+ s.isResizing= false; // true = pane is in process of being resized
+ s.isHidden = false; // true = pane is hidden - no spacing, resizer or toggler is visible!
+
+ // array for 'pin buttons' whose classNames are auto-updated on pane-open/-close
+ if (!s.pins) s.pins = [];
+ }
+ // states common to ALL panes
+ s.tagName = $P[0].tagName;
+ s.edge = pane; // useful if pane is (or about to be) 'swapped' - easy find out where it is (or is going)
+ s.noRoom = false; // true = pane 'automatically' hidden due to insufficient room - will unhide automatically
+ s.isVisible = true; // false = pane is invisible - closed OR hidden - simplify logic
+
+ // init pane positioning
+ setPanePosition( pane );
+
+ // if pane is not visible,
+ if (dir === "horz") // north or south pane
+ CSS.height = cssH($P, size);
+ else if (dir === "vert") // east or west pane
+ CSS.width = cssW($P, size);
+ //else if (isCenter) {}
+
+ $P.css(CSS); // apply size -- top, bottom & height will be set by sizeMidPanes
+ if (dir != "horz") sizeMidPanes(pane, true); // true = skipCallback
+
+ // if manually adding a pane AFTER layout initialization, then...
+ if (state.initialized) {
+ initHandles( pane );
+ initHotkeys( pane );
+ }
+
+ // close or hide the pane if specified in settings
+ if (o.initClosed && o.closable && !o.initHidden)
+ close(pane, true, true); // true, true = force, noAnimation
+ else if (o.initHidden || o.initClosed)
+ hide(pane); // will be completely invisible - no resizer or spacing
+ else if (!s.noRoom)
+ // make the pane visible - in case was initially hidden
+ $P.css("display","block");
+ // ELSE setAsOpen() - called later by initHandles()
+
+ // RESET visibility now - pane will appear IF display:block
+ $P.css("visibility","visible");
+
+ // check option for auto-handling of pop-ups & drop-downs
+ if (o.showOverflowOnHover)
+ $P.hover( allowOverflow, resetOverflow );
+
+ // if manually adding a pane AFTER layout initialization, then...
+ if (state.initialized) {
+ afterInitPane( pane );
+ }
+ }
+
+, afterInitPane = function (pane) {
+ var $P = $Ps[pane]
+ , s = state[pane]
+ , o = options[pane]
+ ;
+ if (!$P) return;
+
+ // see if there is a directly-nested layout inside this pane
+ if ($P.data("layout"))
+ refreshChildren( pane, $P.data("layout") );
+
+ // process pane contents and callbacks, and init/resize child-layout if exists
+ if (s.isVisible) { // pane is OPEN
+ if (state.initialized) // this pane was added AFTER layout was created
+ resizeAll(); // will also sizeContent
+ else
+ sizeContent(pane);
+
+ if (o.triggerEventsOnLoad)
+ _runCallbacks("onresize_end", pane);
+ else // automatic if onresize called, otherwise call it specifically
+ // resize child - IF inner-layout already exists (created before this layout)
+ resizeChildren(pane, true); // a previously existing childLayout
+ }
+
+ // init childLayouts - even if pane is not visible
+ if (o.initChildren && o.children)
+ createChildren(pane);
+ }
+
+ /**
+ * @param {string=} panes The pane(s) to process
+ */
+, setPanePosition = function (panes) {
+ panes = panes ? panes.split(",") : _c.borderPanes;
+
+ // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
+ $.each(panes, function (i, pane) {
+ var $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , side = _c[pane].side
+ , CSS = {}
+ ;
+ if (!$P) return; // pane does not exist - skip
+
+ // set css-position to account for container borders & padding
+ switch (pane) {
+ case "north": CSS.top = sC.inset.top;
+ CSS.left = sC.inset.left;
+ CSS.right = sC.inset.right;
+ break;
+ case "south": CSS.bottom = sC.inset.bottom;
+ CSS.left = sC.inset.left;
+ CSS.right = sC.inset.right;
+ break;
+ case "west": CSS.left = sC.inset.left; // top, bottom & height set by sizeMidPanes()
+ break;
+ case "east": CSS.right = sC.inset.right; // ditto
+ break;
+ case "center": // top, left, width & height set by sizeMidPanes()
+ }
+ // apply position
+ $P.css(CSS);
+
+ // update resizer position
+ if ($R && s.isClosed)
+ $R.css(side, sC.inset[side]);
+ else if ($R && !s.isHidden)
+ $R.css(side, sC.inset[side] + getPaneSize(pane));
+ });
+ }
+
+ /**
+ * Initialize module objects, styling, size and position for all resize bars and toggler buttons
+ *
+ * @see _create()
+ * @param {string=} [panes=""] The edge(s) to process
+ */
+, initHandles = function (panes) {
+ panes = panes ? panes.split(",") : _c.borderPanes;
+
+ // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
+ $.each(panes, function (i, pane) {
+ var $P = $Ps[pane];
+ $Rs[pane] = false; // INIT
+ $Ts[pane] = false;
+ if (!$P) return; // pane does not exist - skip
+
+ var o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , paneId = o.paneSelector.substr(0,1) === "#" ? o.paneSelector.substr(1) : ""
+ , rClass = o.resizerClass
+ , tClass = o.togglerClass
+ , spacing = (s.isVisible ? o.spacing_open : o.spacing_closed)
+ , _pane = "-"+ pane // used for classNames
+ , _state = (s.isVisible ? "-open" : "-closed") // used for classNames
+ , I = Instance[pane]
+ // INIT RESIZER BAR
+ , $R = I.resizer = $Rs[pane] = $("
")
+ // INIT TOGGLER BUTTON
+ , $T = I.toggler = (o.closable ? $Ts[pane] = $("
") : false)
+ ;
+
+ //if (s.isVisible && o.resizable) ... handled by initResizable
+ if (!s.isVisible && o.slidable)
+ $R.attr("title", o.tips.Slide).css("cursor", o.sliderCursor);
+
+ $R // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-resizer"
+ .attr("id", paneId ? paneId +"-resizer" : "" )
+ .data({
+ parentLayout: Instance
+ , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
+ , layoutEdge: pane
+ , layoutRole: "resizer"
+ })
+ .css(_c.resizers.cssReq).css("zIndex", options.zIndexes.resizer_normal)
+ .css(o.applyDemoStyles ? _c.resizers.cssDemo : {}) // add demo styles
+ .addClass(rClass +" "+ rClass+_pane)
+ .hover(addHover, removeHover) // ALWAYS add hover-classes, even if resizing is not enabled - handle with CSS instead
+ .hover(onResizerEnter, onResizerLeave) // ALWAYS NEED resizer.mouseleave to balance toggler.mouseenter
+ .mousedown($.layout.disableTextSelection) // prevent text-selection OUTSIDE resizer
+ .mouseup($.layout.enableTextSelection) // not really necessary, but just in case
+ .appendTo($N) // append DIV to container
+ ;
+ if ($.fn.disableSelection)
+ $R.disableSelection(); // prevent text-selection INSIDE resizer
+ if (o.resizerDblClickToggle)
+ $R.bind("dblclick."+ sID, toggle );
+
+ if ($T) {
+ $T // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "#paneLeft-toggler"
+ .attr("id", paneId ? paneId +"-toggler" : "" )
+ .data({
+ parentLayout: Instance
+ , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
+ , layoutEdge: pane
+ , layoutRole: "toggler"
+ })
+ .css(_c.togglers.cssReq) // add base/required styles
+ .css(o.applyDemoStyles ? _c.togglers.cssDemo : {}) // add demo styles
+ .addClass(tClass +" "+ tClass+_pane)
+ .hover(addHover, removeHover) // ALWAYS add hover-classes, even if toggling is not enabled - handle with CSS instead
+ .bind("mouseenter", onResizerEnter) // NEED toggler.mouseenter because mouseenter MAY NOT fire on resizer
+ .appendTo($R) // append SPAN to resizer DIV
+ ;
+ // ADD INNER-SPANS TO TOGGLER
+ if (o.togglerContent_open) // ui-layout-open
+ $(""+ o.togglerContent_open +" ")
+ .data({
+ layoutEdge: pane
+ , layoutRole: "togglerContent"
+ })
+ .data("layoutRole", "togglerContent")
+ .data("layoutEdge", pane)
+// .addClass("content content-open")
+ .addClass("ui-content content-open") // ThinkGem content 改为 ui-content 解决与AdminLTE类名冲突
+ .css("display","none")
+ .appendTo( $T )
+ //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-open instead!
+ ;
+ if (o.togglerContent_closed) // ui-layout-closed
+ $(""+ o.togglerContent_closed +" ")
+ .data({
+ layoutEdge: pane
+ , layoutRole: "togglerContent"
+ })
+// .addClass("content content-closed")
+ .addClass("ui-content content-closed") // ThinkGem content 改为 ui-content 解决与AdminLTE类名冲突
+ .css("display","none")
+ .appendTo( $T )
+ //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-closed instead!
+ ;
+ // ADD TOGGLER.click/.hover
+ enableClosable(pane);
+ }
+
+ // add Draggable events
+ initResizable(pane);
+
+ // ADD CLASSNAMES & SLIDE-BINDINGS - eg: class="resizer resizer-west resizer-open"
+ if (s.isVisible)
+ setAsOpen(pane); // onOpen will be called, but NOT onResize
+ else {
+ setAsClosed(pane); // onClose will be called
+ bindStartSlidingEvents(pane, true); // will enable events IF option is set
+ }
+
+ });
+
+ // SET ALL HANDLE DIMENSIONS
+ sizeHandles();
+ }
+
+
+ /**
+ * Initialize scrolling ui-layout-content div - if exists
+ *
+ * @see initPane() - or externally after an Ajax injection
+ * @param {string} pane The pane to process
+ * @param {boolean=} [resize=true] Size content after init
+ */
+, initContent = function (pane, resize) {
+ if (!isInitialized()) return;
+ var
+ o = options[pane]
+ , sel = o.contentSelector
+ , I = Instance[pane]
+ , $P = $Ps[pane]
+ , $C
+ ;
+ if (sel) $C = I.content = $Cs[pane] = (o.findNestedContent)
+ ? $P.find(sel).eq(0) // match 1-element only
+ : $P.children(sel).eq(0)
+ ;
+ if ($C && $C.length) {
+ $C.data("layoutRole", "content");
+ // SAVE original Content CSS
+ if (!$C.data("layoutCSS"))
+ $C.data("layoutCSS", styles($C, "height"));
+ $C.css( _c.content.cssReq );
+ if (o.applyDemoStyles) {
+ $C.css( _c.content.cssDemo ); // add padding & overflow: auto to content-div
+ $P.css( _c.content.cssDemoPane ); // REMOVE padding/scrolling from pane
+ }
+ // ensure no vertical scrollbar on pane - will mess up measurements
+ if ($P.css("overflowX").match(/(scroll|auto)/)) {
+ $P.css("overflow", "hidden");
+ }
+ state[pane].content = {}; // init content state
+ if (resize !== false) sizeContent(pane);
+ // sizeContent() is called AFTER init of all elements
+ }
+ else
+ I.content = $Cs[pane] = false;
+ }
+
+
+ /**
+ * Add resize-bars to all panes that specify it in options
+ * -dependancy: $.fn.resizable - will skip if not found
+ *
+ * @see _create()
+ * @param {string=} [panes=""] The edge(s) to process
+ */
+, initResizable = function (panes) {
+ var draggingAvailable = $.layout.plugins.draggable
+ , side // set in start()
+ ;
+ panes = panes ? panes.split(",") : _c.borderPanes;
+
+ $.each(panes, function (idx, pane) {
+ var o = options[pane];
+ if (!draggingAvailable || !$Ps[pane] || !o.resizable) {
+ o.resizable = false;
+ return true; // skip to next
+ }
+
+ var s = state[pane]
+ , z = options.zIndexes
+ , c = _c[pane]
+ , side = c.dir=="horz" ? "top" : "left"
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , base = o.resizerClass
+ , lastPos = 0 // used when live-resizing
+ , r, live // set in start because may change
+ // 'drag' classes are applied to the ORIGINAL resizer-bar while dragging is in process
+ , resizerClass = base+"-drag" // resizer-drag
+ , resizerPaneClass = base+"-"+pane+"-drag" // resizer-north-drag
+ // 'helper' class is applied to the CLONED resizer-bar while it is being dragged
+ , helperClass = base+"-dragging" // resizer-dragging
+ , helperPaneClass = base+"-"+pane+"-dragging" // resizer-north-dragging
+ , helperLimitClass = base+"-dragging-limit" // resizer-drag
+ , helperPaneLimitClass = base+"-"+pane+"-dragging-limit" // resizer-north-drag
+ , helperClassesSet = false // logic var
+ ;
+
+ if (!s.isClosed)
+ $R.attr("title", o.tips.Resize)
+ .css("cursor", o.resizerCursor); // n-resize, s-resize, etc
+
+ $R.draggable({
+ containment: $N[0] // limit resizing to layout container
+ , axis: (c.dir=="horz" ? "y" : "x") // limit resizing to horz or vert axis
+ , delay: 0
+ , distance: 1
+ , grid: o.resizingGrid
+ // basic format for helper - style it using class: .ui-draggable-dragging
+ , helper: "clone"
+ , opacity: o.resizerDragOpacity
+ , addClasses: false // avoid ui-state-disabled class when disabled
+ //, iframeFix: o.draggableIframeFix // TODO: consider using when bug is fixed
+ , zIndex: z.resizer_drag
+
+ , iframeFix: true // ThinkGem 修复有iframe时拖拽不平滑问题
+
+ , start: function (e, ui) {
+ // REFRESH options & state pointers in case we used swapPanes
+ o = options[pane];
+ s = state[pane];
+ // re-read options
+ live = o.livePaneResizing;
+
+ // ondrag_start callback - will CANCEL hide if returns false
+ // TODO: dragging CANNOT be cancelled like this, so see if there is a way?
+ if (false === _runCallbacks("ondrag_start", pane)) return false;
+
+ s.isResizing = true; // prevent pane from closing while resizing
+ state.paneResizing = pane; // easy to see if ANY pane is resizing
+ timer.clear(pane+"_closeSlider"); // just in case already triggered
+
+ // SET RESIZER LIMITS - used in drag()
+ setSizeLimits(pane); // update pane/resizer state
+ r = s.resizerPosition;
+ lastPos = ui.position[ side ]
+
+ $R.addClass( resizerClass +" "+ resizerPaneClass ); // add drag classes
+ helperClassesSet = false; // reset logic var - see drag()
+
+ // MASK PANES CONTAINING IFRAMES, APPLETS OR OTHER TROUBLESOME ELEMENTS
+ showMasks( pane, { resizing: true });
+ }
+
+ , drag: function (e, ui) {
+ if (!helperClassesSet) { // can only add classes after clone has been added to the DOM
+ //$(".ui-draggable-dragging")
+ ui.helper
+ .addClass( helperClass +" "+ helperPaneClass ) // add helper classes
+ .css({ right: "auto", bottom: "auto" }) // fix dir="rtl" issue
+ .children().css("visibility","hidden") // hide toggler inside dragged resizer-bar
+ ;
+ helperClassesSet = true;
+ // draggable bug!? RE-SET zIndex to prevent E/W resize-bar showing through N/S pane!
+ if (s.isSliding) $Ps[pane].css("zIndex", z.pane_sliding);
+ }
+ // CONTAIN RESIZER-BAR TO RESIZING LIMITS
+ var limit = 0;
+ if (ui.position[side] < r.min) {
+ ui.position[side] = r.min;
+ limit = -1;
+ }
+ else if (ui.position[side] > r.max) {
+ ui.position[side] = r.max;
+ limit = 1;
+ }
+ // ADD/REMOVE dragging-limit CLASS
+ if (limit) {
+ ui.helper.addClass( helperLimitClass +" "+ helperPaneLimitClass ); // at dragging-limit
+ window.defaultStatus = (limit>0 && pane.match(/(north|west)/)) || (limit<0 && pane.match(/(south|east)/)) ? o.tips.maxSizeWarning : o.tips.minSizeWarning;
+ }
+ else {
+ ui.helper.removeClass( helperLimitClass +" "+ helperPaneLimitClass ); // not at dragging-limit
+ window.defaultStatus = "";
+ }
+ // DYNAMICALLY RESIZE PANES IF OPTION ENABLED
+ // won't trigger unless resizer has actually moved!
+ if (live && Math.abs(ui.position[side] - lastPos) >= o.liveResizingTolerance) {
+ lastPos = ui.position[side];
+ resizePanes(e, ui, pane)
+ }
+ }
+
+ , stop: function (e, ui) {
+ $('body').enableSelection(); // RE-ENABLE TEXT SELECTION
+ window.defaultStatus = ""; // clear 'resizing limit' message from statusbar
+ $R.removeClass( resizerClass +" "+ resizerPaneClass ); // remove drag classes from Resizer
+ s.isResizing = false;
+ state.paneResizing = false; // easy to see if ANY pane is resizing
+ resizePanes(e, ui, pane, true); // true = resizingDone
+ }
+
+ });
+ });
+
+ /**
+ * resizePanes
+ *
+ * Sub-routine called from stop() - and drag() if livePaneResizing
+ *
+ * @param {!Object} evt
+ * @param {!Object} ui
+ * @param {string} pane
+ * @param {boolean=} [resizingDone=false]
+ */
+ var resizePanes = function (evt, ui, pane, resizingDone) {
+ var dragPos = ui.position
+ , c = _c[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , resizerPos
+ ;
+ switch (pane) {
+ case "north": resizerPos = dragPos.top; break;
+ case "west": resizerPos = dragPos.left; break;
+ case "south": resizerPos = sC.layoutHeight - dragPos.top - o.spacing_open; break;
+ case "east": resizerPos = sC.layoutWidth - dragPos.left - o.spacing_open; break;
+ };
+ // remove container margin from resizer position to get the pane size
+ var newSize = resizerPos - sC.inset[c.side];
+
+ // Disable OR Resize Mask(s) created in drag.start
+ if (!resizingDone) {
+ // ensure we meet liveResizingTolerance criteria
+ if (Math.abs(newSize - s.size) < o.liveResizingTolerance)
+ return; // SKIP resize this time
+ // resize the pane
+ manualSizePane(pane, newSize, false, true); // true = noAnimation
+ sizeMasks(); // resize all visible masks
+ }
+ else { // resizingDone
+ // ondrag_end callback
+ if (false !== _runCallbacks("ondrag_end", pane))
+ manualSizePane(pane, newSize, false, true); // true = noAnimation
+ hideMasks(true); // true = force hiding all masks even if one is 'sliding'
+ if (s.isSliding) // RE-SHOW 'object-masks' so objects won't show through sliding pane
+ showMasks( pane, { resizing: true });
+ }
+ };
+ }
+
+ /**
+ * sizeMask
+ *
+ * Needed to overlay a DIV over an IFRAME-pane because mask CANNOT be *inside* the pane
+ * Called when mask created, and during livePaneResizing
+ */
+, sizeMask = function () {
+ var $M = $(this)
+ , pane = $M.data("layoutMask") // eg: "west"
+ , s = state[pane]
+ ;
+ // only masks over an IFRAME-pane need manual resizing
+ if (s.tagName == "IFRAME" && s.isVisible) // no need to mask closed/hidden panes
+ $M.css({
+ top: s.offsetTop
+ , left: s.offsetLeft
+ , width: s.outerWidth
+ , height: s.outerHeight
+ });
+ /* ALT Method...
+ var $P = $Ps[pane];
+ $M.css( $P.position() ).css({ width: $P[0].offsetWidth, height: $P[0].offsetHeight });
+ */
+ }
+, sizeMasks = function () {
+ $Ms.each( sizeMask ); // resize all 'visible' masks
+ }
+
+ /**
+ * @param {string} pane The pane being resized, animated or isSliding
+ * @param {Object=} [args] (optional) Options: which masks to apply, and to which panes
+ */
+, showMasks = function (pane, args) {
+ var c = _c[pane]
+ , panes = ["center"]
+ , z = options.zIndexes
+ , a = $.extend({
+ objectsOnly: false
+ , animation: false
+ , resizing: true
+ , sliding: state[pane].isSliding
+ }, args )
+ , o, s
+ ;
+ if (a.resizing)
+ panes.push( pane );
+ if (a.sliding)
+ panes.push( _c.oppositeEdge[pane] ); // ADD the oppositeEdge-pane
+
+ if (c.dir === "horz") {
+ panes.push("west");
+ panes.push("east");
+ }
+
+ $.each(panes, function(i,p){
+ s = state[p];
+ o = options[p];
+ if (s.isVisible && ( o.maskObjects || (!a.objectsOnly && o.maskContents) )) {
+ getMasks(p).each(function(){
+ sizeMask.call(this);
+ this.style.zIndex = s.isSliding ? z.pane_sliding+1 : z.pane_normal+1
+ this.style.display = "block";
+ });
+ }
+ });
+ }
+
+ /**
+ * @param {boolean=} force Hide masks even if a pane is sliding
+ */
+, hideMasks = function (force) {
+ // ensure no pane is resizing - could be a timing issue
+ if (force || !state.paneResizing) {
+ $Ms.hide(); // hide ALL masks
+ }
+ // if ANY pane is sliding, then DO NOT remove masks from panes with maskObjects enabled
+ else if (!force && !$.isEmptyObject( state.panesSliding )) {
+ var i = $Ms.length - 1
+ , p, $M;
+ for (; i >= 0; i--) {
+ $M = $Ms.eq(i);
+ p = $M.data("layoutMask");
+ if (!options[p].maskObjects) {
+ $M.hide();
+ }
+ }
+ }
+ }
+
+ /**
+ * @param {string} pane
+ */
+, getMasks = function (pane) {
+ var $Masks = $([])
+ , $M, i = 0, c = $Ms.length
+ ;
+ for (; i CSS
+ if (sC.tagName === "BODY" && ($N = $("html")).data(css)) // RESET CSS
+ $N.css( $N.data(css) ).removeData(css);
+
+ // trigger plugins for this layout, if there are any
+ runPluginCallbacks( Instance, $.layout.onDestroy );
+
+ // trigger state-management and onunload callback
+ unload();
+
+ // clear the Instance of everything except for container & options (so could recreate)
+ // RE-CREATE: myLayout = myLayout.container.layout( myLayout.options );
+ for (var n in Instance)
+ if (!n.match(/^(container|options)$/)) delete Instance[ n ];
+ // add a 'destroyed' flag to make it easy to check
+ Instance.destroyed = true;
+
+ // if this is a child layout, CLEAR the child-pointer in the parent
+ /* for now the pointer REMAINS, but with only container, options and destroyed keys
+ if (parentPane) {
+ var layout = parentPane.pane.data("parentLayout")
+ , key = layout.options.instanceKey || 'error';
+ // THIS SYNTAX MAY BE WRONG!
+ parentPane.children[key] = layout.children[ parentPane.name ].children[key] = null;
+ }
+ */
+
+ return Instance; // for coding convenience
+ }
+
+ /**
+ * Remove a pane from the layout - subroutine of destroy()
+ *
+ * @see destroy()
+ * @param {(string|Object)} evt_or_pane The pane to process
+ * @param {boolean=} [remove=false] Remove the DOM element?
+ * @param {boolean=} [skipResize=false] Skip calling resizeAll()?
+ * @param {boolean=} [destroyChild=true] Destroy Child-layouts? If not passed, obeys options setting
+ */
+, removePane = function (evt_or_pane, remove, skipResize, destroyChild) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $P = $Ps[pane]
+ , $C = $Cs[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ ;
+ // NOTE: elements can still exist even after remove()
+ // so check for missing data(), which is cleared by removed()
+ if ($P && $.isEmptyObject( $P.data() )) $P = false;
+ if ($C && $.isEmptyObject( $C.data() )) $C = false;
+ if ($R && $.isEmptyObject( $R.data() )) $R = false;
+ if ($T && $.isEmptyObject( $T.data() )) $T = false;
+
+ if ($P) $P.stop(true, true);
+
+ var o = options[pane]
+ , s = state[pane]
+ , d = "layout"
+ , css = "layoutCSS"
+ , pC = children[pane]
+ , hasChildren = $.isPlainObject( pC ) && !$.isEmptyObject( pC )
+ , destroy = destroyChild !== undefined ? destroyChild : o.destroyChildren
+ ;
+ // FIRST destroy the child-layout(s)
+ if (hasChildren && destroy) {
+ $.each( pC, function (key, child) {
+ if (!child.destroyed)
+ child.destroy(true);// tell child-layout to destroy ALL its child-layouts too
+ if (child.destroyed) // destroy was successful
+ delete pC[key];
+ });
+ // if no more children, remove the children hash
+ if ($.isEmptyObject( pC )) {
+ pC = children[pane] = null; // clear children hash
+ hasChildren = false;
+ }
+ }
+
+ // Note: can't 'remove' a pane element with non-destroyed children
+ if ($P && remove && !hasChildren)
+ $P.remove(); // remove the pane-element and everything inside it
+ else if ($P && $P[0]) {
+ // create list of ALL pane-classes that need to be removed
+ var root = o.paneClass // default="ui-layout-pane"
+ , pRoot = root +"-"+ pane // eg: "ui-layout-pane-west"
+ , _open = "-open"
+ , _sliding= "-sliding"
+ , _closed = "-closed"
+ , classes = [ root, root+_open, root+_closed, root+_sliding, // generic classes
+ pRoot, pRoot+_open, pRoot+_closed, pRoot+_sliding ] // pane-specific classes
+ ;
+ $.merge(classes, getHoverClasses($P, true)); // ADD hover-classes
+ // remove all Layout classes from pane-element
+ $P .removeClass( classes.join(" ") ) // remove ALL pane-classes
+ .removeData("parentLayout")
+ .removeData("layoutPane")
+ .removeData("layoutRole")
+ .removeData("layoutEdge")
+ .removeData("autoHidden") // in case set
+ .unbind("."+ sID) // remove ALL Layout events
+ // TODO: remove these extra unbind commands when jQuery is fixed
+ //.unbind("mouseenter"+ sID)
+ //.unbind("mouseleave"+ sID)
+ ;
+ // do NOT reset CSS if this pane/content is STILL the container of a nested layout!
+ // the nested layout will reset its 'container' CSS when/if it is destroyed
+ if (hasChildren && $C) {
+ // a content-div may not have a specific width, so give it one to contain the Layout
+ $C.width( $C.width() );
+ $.each( pC, function (key, child) {
+ child.resizeAll(); // resize the Layout
+ });
+ }
+ else if ($C)
+ $C.css( $C.data(css) ).removeData(css).removeData("layoutRole");
+ // remove pane AFTER content in case there was a nested layout
+ if (!$P.data(d))
+ $P.css( $P.data(css) ).removeData(css);
+ }
+
+ // REMOVE pane resizer and toggler elements
+ if ($T) $T.remove();
+ if ($R) $R.remove();
+
+ // CLEAR all pointers and state data
+ Instance[pane] = $Ps[pane] = $Cs[pane] = $Rs[pane] = $Ts[pane] = false;
+ s = { removed: true };
+
+ if (!skipResize)
+ resizeAll();
+ }
+
+
+/*
+ * ###########################
+ * ACTION METHODS
+ * ###########################
+ */
+
+ /**
+ * @param {string} pane
+ */
+, _hidePane = function (pane) {
+ var $P = $Ps[pane]
+ , o = options[pane]
+ , s = $P[0].style
+ ;
+ if (o.useOffscreenClose) {
+ if (!$P.data(_c.offscreenReset))
+ $P.data(_c.offscreenReset, { left: s.left, right: s.right });
+ $P.css( _c.offscreenCSS );
+ }
+ else
+ $P.hide().removeData(_c.offscreenReset);
+ }
+
+ /**
+ * @param {string} pane
+ */
+, _showPane = function (pane) {
+ var $P = $Ps[pane]
+ , o = options[pane]
+ , off = _c.offscreenCSS
+ , old = $P.data(_c.offscreenReset)
+ , s = $P[0].style
+ ;
+ $P .show() // ALWAYS show, just in case
+ .removeData(_c.offscreenReset);
+ if (o.useOffscreenClose && old) {
+ if (s.left == off.left)
+ s.left = old.left;
+ if (s.right == off.right)
+ s.right = old.right;
+ }
+ }
+
+
+ /**
+ * Completely 'hides' a pane, including its spacing - as if it does not exist
+ * The pane is not actually 'removed' from the source, so can use 'show' to un-hide it
+ *
+ * @param {(string|Object)} evt_or_pane The pane being hidden, ie: north, south, east, or west
+ * @param {boolean=} [noAnimation=false]
+ */
+, hide = function (evt_or_pane, noAnimation) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ ;
+ if (pane === "center" || !$P || s.isHidden) return; // pane does not exist OR is already hidden
+
+ // onhide_start callback - will CANCEL hide if returns false
+ if (state.initialized && false === _runCallbacks("onhide_start", pane)) return;
+
+ s.isSliding = false; // just in case
+ delete state.panesSliding[pane];
+
+ // now hide the elements
+ if ($R) $R.hide(); // hide resizer-bar
+ if (!state.initialized || s.isClosed) {
+ s.isClosed = true; // to trigger open-animation on show()
+ s.isHidden = true;
+ s.isVisible = false;
+ if (!state.initialized)
+ _hidePane(pane); // no animation when loading page
+ sizeMidPanes(_c[pane].dir === "horz" ? "" : "center");
+ if (state.initialized || o.triggerEventsOnLoad)
+ _runCallbacks("onhide_end", pane);
+ }
+ else {
+ s.isHiding = true; // used by onclose
+ close(pane, false, noAnimation); // adjust all panes to fit
+ }
+ }
+
+ /**
+ * Show a hidden pane - show as 'closed' by default unless openPane = true
+ *
+ * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
+ * @param {boolean=} [openPane=false]
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [noAlert=false]
+ */
+, show = function (evt_or_pane, openPane, noAnimation, noAlert) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ ;
+ if (pane === "center" || !$P || !s.isHidden) return; // pane does not exist OR is not hidden
+
+ // onshow_start callback - will CANCEL show if returns false
+ if (false === _runCallbacks("onshow_start", pane)) return;
+
+ s.isShowing = true; // used by onopen/onclose
+ //s.isHidden = false; - will be set by open/close - if not cancelled
+ s.isSliding = false; // just in case
+ delete state.panesSliding[pane];
+
+ // now show the elements
+ //if ($R) $R.show(); - will be shown by open/close
+ if (openPane === false)
+ close(pane, true); // true = force
+ else
+ open(pane, false, noAnimation, noAlert); // adjust all panes to fit
+ }
+
+
+ /**
+ * Toggles a pane open/closed by calling either open or close
+ *
+ * @param {(string|Object)} evt_or_pane The pane being toggled, ie: north, south, east, or west
+ * @param {boolean=} [slide=false]
+ */
+, toggle = function (evt_or_pane, slide) {
+ if (!isInitialized()) return;
+ var evt = evtObj(evt_or_pane)
+ , pane = evtPane.call(this, evt_or_pane)
+ , s = state[pane]
+ ;
+ if (evt) // called from to $R.dblclick OR triggerPaneEvent
+ evt.stopImmediatePropagation();
+ if (s.isHidden)
+ show(pane); // will call 'open' after unhiding it
+ else if (s.isClosed)
+ open(pane, !!slide);
+ else
+ close(pane);
+ }
+
+
+ /**
+ * Utility method used during init or other auto-processes
+ *
+ * @param {string} pane The pane being closed
+ * @param {boolean=} [setHandles=false]
+ */
+, _closePane = function (pane, setHandles) {
+ var
+ $P = $Ps[pane]
+ , s = state[pane]
+ ;
+ _hidePane(pane);
+ s.isClosed = true;
+ s.isVisible = false;
+ if (setHandles) setAsClosed(pane);
+ }
+
+ /**
+ * Close the specified pane (animation optional), and resize all other panes as needed
+ *
+ * @param {(string|Object)} evt_or_pane The pane being closed, ie: north, south, east, or west
+ * @param {boolean=} [force=false]
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [skipCallback=false]
+ */
+, close = function (evt_or_pane, force, noAnimation, skipCallback) {
+ var pane = evtPane.call(this, evt_or_pane);
+ if (pane === "center") return; // validate
+ // if pane has been initialized, but NOT the complete layout, close pane instantly
+ if (!state.initialized && $Ps[pane]) {
+ _closePane(pane, true); // INIT pane as closed
+ return;
+ }
+ if (!isInitialized()) return;
+
+ var
+ $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , doFX, isShowing, isHiding, wasSliding;
+
+ // QUEUE in case another action/animation is in progress
+ $N.queue(function( queueNext ){
+
+ if ( !$P
+ || (!o.closable && !s.isShowing && !s.isHiding) // invalid request // (!o.resizable && !o.closable) ???
+ || (!force && s.isClosed && !s.isShowing) // already closed
+ ) return queueNext();
+
+ // onclose_start callback - will CANCEL hide if returns false
+ // SKIP if just 'showing' a hidden pane as 'closed'
+ var abort = !s.isShowing && false === _runCallbacks("onclose_start", pane);
+
+ // transfer logic vars to temp vars
+ isShowing = s.isShowing;
+ isHiding = s.isHiding;
+ wasSliding = s.isSliding;
+ // now clear the logic vars (REQUIRED before aborting)
+ delete s.isShowing;
+ delete s.isHiding;
+
+ if (abort) return queueNext();
+
+ doFX = !noAnimation && !s.isClosed && (o.fxName_close != "none");
+ s.isMoving = true;
+ s.isClosed = true;
+ s.isVisible = false;
+ // update isHidden BEFORE sizing panes
+ if (isHiding) s.isHidden = true;
+ else if (isShowing) s.isHidden = false;
+
+ if (s.isSliding) // pane is being closed, so UNBIND trigger events
+ bindStopSlidingEvents(pane, false); // will set isSliding=false
+ else // resize panes adjacent to this one
+ sizeMidPanes(_c[pane].dir === "horz" ? "" : "center", false); // false = NOT skipCallback
+
+ // if this pane has a resizer bar, move it NOW - before animation
+ setAsClosed(pane);
+
+ // CLOSE THE PANE
+ if (doFX) { // animate the close
+ lockPaneForFX(pane, true); // need to set left/top so animation will work
+ $P.hide( o.fxName_close, o.fxSettings_close, o.fxSpeed_close, function () {
+ lockPaneForFX(pane, false); // undo
+ if (s.isClosed) close_2();
+ queueNext();
+ });
+ }
+ else { // hide the pane without animation
+ _hidePane(pane);
+ close_2();
+ queueNext();
+ };
+ });
+
+ // SUBROUTINE
+ function close_2 () {
+ s.isMoving = false;
+ bindStartSlidingEvents(pane, true); // will enable if o.slidable = true
+
+ // if opposite-pane was autoClosed, see if it can be autoOpened now
+ var altPane = _c.oppositeEdge[pane];
+ if (state[ altPane ].noRoom) {
+ setSizeLimits( altPane );
+ makePaneFit( altPane );
+ }
+
+ if (!skipCallback && (state.initialized || o.triggerEventsOnLoad)) {
+ // onclose callback - UNLESS just 'showing' a hidden pane as 'closed'
+ if (!isShowing) _runCallbacks("onclose_end", pane);
+ // onhide OR onshow callback
+ if (isShowing) _runCallbacks("onshow_end", pane);
+ if (isHiding) _runCallbacks("onhide_end", pane);
+ }
+ }
+ }
+
+ /**
+ * @param {string} pane The pane just closed, ie: north, south, east, or west
+ */
+, setAsClosed = function (pane) {
+ if (!$Rs[pane]) return; // handles not initialized yet!
+ var
+ $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , side = _c[pane].side
+ , rClass = o.resizerClass
+ , tClass = o.togglerClass
+ , _pane = "-"+ pane // used for classNames
+ , _open = "-open"
+ , _sliding= "-sliding"
+ , _closed = "-closed"
+ ;
+ $R
+ .css(side, sC.inset[side]) // move the resizer
+ .removeClass( rClass+_open +" "+ rClass+_pane+_open )
+ .removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
+ .addClass( rClass+_closed +" "+ rClass+_pane+_closed )
+ ;
+ // handle already-hidden panes in case called by swap() or a similar method
+ if (s.isHidden) $R.hide(); // hide resizer-bar
+
+ // DISABLE 'resizing' when closed - do this BEFORE bindStartSlidingEvents?
+ if (o.resizable && $.layout.plugins.draggable)
+ $R
+ .draggable("disable")
+ .removeClass("ui-state-disabled") // do NOT apply disabled styling - not suitable here
+ .css("cursor", "default")
+ .attr("title","")
+ ;
+
+ // if pane has a toggler button, adjust that too
+ if ($T) {
+ $T
+ .removeClass( tClass+_open +" "+ tClass+_pane+_open )
+ .addClass( tClass+_closed +" "+ tClass+_pane+_closed )
+ .attr("title", o.tips.Open) // may be blank
+ ;
+ // toggler-content - if exists
+ $T.children(".content-open").hide();
+ $T.children(".content-closed").css("display","block");
+ }
+
+ // sync any 'pin buttons'
+ syncPinBtns(pane, false);
+
+ if (state.initialized) {
+ // resize 'length' and position togglers for adjacent panes
+ sizeHandles();
+ }
+ }
+
+ /**
+ * Open the specified pane (animation optional), and resize all other panes as needed
+ *
+ * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
+ * @param {boolean=} [slide=false]
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [noAlert=false]
+ */
+, open = function (evt_or_pane, slide, noAnimation, noAlert) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , doFX, isShowing
+ ;
+ if (pane === "center") return; // validate
+ // QUEUE in case another action/animation is in progress
+ $N.queue(function( queueNext ){
+
+ if ( !$P
+ || (!o.resizable && !o.closable && !s.isShowing) // invalid request
+ || (s.isVisible && !s.isSliding) // already open
+ ) return queueNext();
+
+ // pane can ALSO be unhidden by just calling show(), so handle this scenario
+ if (s.isHidden && !s.isShowing) {
+ queueNext(); // call before show() because it needs the queue free
+ show(pane, true);
+ return;
+ }
+
+ if (s.autoResize && s.size != o.size) // resize pane to original size set in options
+ sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
+ else
+ // make sure there is enough space available to open the pane
+ setSizeLimits(pane, slide);
+
+ // onopen_start callback - will CANCEL open if returns false
+ var cbReturn = _runCallbacks("onopen_start", pane);
+
+ if (cbReturn === "abort")
+ return queueNext();
+
+ // update pane-state again in case options were changed in onopen_start
+ if (cbReturn !== "NC") // NC = "No Callback"
+ setSizeLimits(pane, slide);
+
+ if (s.minSize > s.maxSize) { // INSUFFICIENT ROOM FOR PANE TO OPEN!
+ syncPinBtns(pane, false); // make sure pin-buttons are reset
+ if (!noAlert && o.tips.noRoomToOpen)
+ alert(o.tips.noRoomToOpen);
+ return queueNext(); // ABORT
+ }
+
+ if (slide) // START Sliding - will set isSliding=true
+ bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
+ else if (s.isSliding) // PIN PANE (stop sliding) - open pane 'normally' instead
+ bindStopSlidingEvents(pane, false); // UNBIND trigger events - will set isSliding=false
+ else if (o.slidable)
+ bindStartSlidingEvents(pane, false); // UNBIND trigger events
+
+ s.noRoom = false; // will be reset by makePaneFit if 'noRoom'
+ makePaneFit(pane);
+
+ // transfer logic var to temp var
+ isShowing = s.isShowing;
+ // now clear the logic var
+ delete s.isShowing;
+
+ doFX = !noAnimation && s.isClosed && (o.fxName_open != "none");
+ s.isMoving = true;
+ s.isVisible = true;
+ s.isClosed = false;
+ // update isHidden BEFORE sizing panes - WHY??? Old?
+ if (isShowing) s.isHidden = false;
+
+ if (doFX) { // ANIMATE
+ // mask adjacent panes with objects
+ lockPaneForFX(pane, true); // need to set left/top so animation will work
+ $P.show( o.fxName_open, o.fxSettings_open, o.fxSpeed_open, function() {
+ lockPaneForFX(pane, false); // undo
+ if (s.isVisible) open_2(); // continue
+ queueNext();
+ });
+ }
+ else { // no animation
+ _showPane(pane);// just show pane and...
+ open_2(); // continue
+ queueNext();
+ };
+ });
+
+ // SUBROUTINE
+ function open_2 () {
+ s.isMoving = false;
+
+ // cure iframe display issues
+ _fixIframe(pane);
+
+ // NOTE: if isSliding, then other panes are NOT 'resized'
+ if (!s.isSliding) { // resize all panes adjacent to this one
+ sizeMidPanes(_c[pane].dir=="vert" ? "center" : "", false); // false = NOT skipCallback
+ }
+
+ // set classes, position handles and execute callbacks...
+ setAsOpen(pane);
+ };
+
+ }
+
+ /**
+ * @param {string} pane The pane just opened, ie: north, south, east, or west
+ * @param {boolean=} [skipCallback=false]
+ */
+, setAsOpen = function (pane, skipCallback) {
+ var
+ $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , side = _c[pane].side
+ , rClass = o.resizerClass
+ , tClass = o.togglerClass
+ , _pane = "-"+ pane // used for classNames
+ , _open = "-open"
+ , _closed = "-closed"
+ , _sliding= "-sliding"
+ ;
+ $R
+ .css(side, sC.inset[side] + getPaneSize(pane)) // move the resizer
+ .removeClass( rClass+_closed +" "+ rClass+_pane+_closed )
+ .addClass( rClass+_open +" "+ rClass+_pane+_open )
+ ;
+ if (s.isSliding)
+ $R.addClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
+ else // in case 'was sliding'
+ $R.removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
+
+ removeHover( 0, $R ); // remove hover classes
+ if (o.resizable && $.layout.plugins.draggable)
+ $R .draggable("enable")
+ .css("cursor", o.resizerCursor)
+ .attr("title", o.tips.Resize);
+ else if (!s.isSliding)
+ $R.css("cursor", "default"); // n-resize, s-resize, etc
+
+ // if pane also has a toggler button, adjust that too
+ if ($T) {
+ $T .removeClass( tClass+_closed +" "+ tClass+_pane+_closed )
+ .addClass( tClass+_open +" "+ tClass+_pane+_open )
+ .attr("title", o.tips.Close); // may be blank
+ removeHover( 0, $T ); // remove hover classes
+ // toggler-content - if exists
+ $T.children(".content-closed").hide();
+ $T.children(".content-open").css("display","block");
+ }
+
+ // sync any 'pin buttons'
+ syncPinBtns(pane, !s.isSliding);
+
+ // update pane-state dimensions - BEFORE resizing content
+ $.extend(s, elDims($P));
+
+ if (state.initialized) {
+ // resize resizer & toggler sizes for all panes
+ sizeHandles();
+ // resize content every time pane opens - to be sure
+ sizeContent(pane, true); // true = remeasure headers/footers, even if 'pane.isMoving'
+ }
+
+ if (!skipCallback && (state.initialized || o.triggerEventsOnLoad) && $P.is(":visible")) {
+ // onopen callback
+ _runCallbacks("onopen_end", pane);
+ // onshow callback - TODO: should this be here?
+ if (s.isShowing) _runCallbacks("onshow_end", pane);
+
+ // ALSO call onresize because layout-size *may* have changed while pane was closed
+ if (state.initialized)
+ _runCallbacks("onresize_end", pane);
+ }
+
+ // TODO: Somehow sizePane("north") is being called after this point???
+ }
+
+
+ /**
+ * slideOpen / slideClose / slideToggle
+ *
+ * Pass-though methods for sliding
+ */
+, slideOpen = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var evt = evtObj(evt_or_pane)
+ , pane = evtPane.call(this, evt_or_pane)
+ , s = state[pane]
+ , delay = options[pane].slideDelay_open
+ ;
+ if (pane === "center") return; // validate
+ // prevent event from triggering on NEW resizer binding created below
+ if (evt) evt.stopImmediatePropagation();
+
+ if (s.isClosed && evt && evt.type === "mouseenter" && delay > 0)
+ // trigger = mouseenter - use a delay
+ timer.set(pane+"_openSlider", open_NOW, delay);
+ else
+ open_NOW(); // will unbind events if is already open
+
+ /**
+ * SUBROUTINE for timed open
+ */
+ function open_NOW () {
+ if (!s.isClosed) // skip if no longer closed!
+ bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
+ else if (!s.isMoving)
+ open(pane, true); // true = slide - open() will handle binding
+ };
+ }
+
+, slideClose = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var evt = evtObj(evt_or_pane)
+ , pane = evtPane.call(this, evt_or_pane)
+ , o = options[pane]
+ , s = state[pane]
+ , delay = s.isMoving ? 1000 : 300 // MINIMUM delay - option may override
+ ;
+ if (pane === "center") return; // validate
+ if (s.isClosed || s.isResizing)
+ return; // skip if already closed OR in process of resizing
+ else if (o.slideTrigger_close === "click")
+ close_NOW(); // close immediately onClick
+ else if (o.preventQuickSlideClose && s.isMoving)
+ return; // handle Chrome quick-close on slide-open
+ else if (o.preventPrematureSlideClose && evt && $.layout.isMouseOverElem(evt, $Ps[pane]))
+ return; // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
+ else if (evt) // trigger = mouseleave - use a delay
+ // 1 sec delay if 'opening', else .3 sec
+ timer.set(pane+"_closeSlider", close_NOW, max(o.slideDelay_close, delay));
+ else // called programically
+ close_NOW();
+
+ /**
+ * SUBROUTINE for timed close
+ */
+ function close_NOW () {
+ if (s.isClosed) // skip 'close' if already closed!
+ bindStopSlidingEvents(pane, false); // UNBIND trigger events - TODO: is this needed here?
+ else if (!s.isMoving)
+ close(pane); // close will handle unbinding
+ };
+ }
+
+ /**
+ * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
+ */
+, slideToggle = function (evt_or_pane) {
+ var pane = evtPane.call(this, evt_or_pane);
+ toggle(pane, true);
+ }
+
+
+ /**
+ * Must set left/top on East/South panes so animation will work properly
+ *
+ * @param {string} pane The pane to lock, 'east' or 'south' - any other is ignored!
+ * @param {boolean} doLock true = set left/top, false = remove
+ */
+, lockPaneForFX = function (pane, doLock) {
+ var $P = $Ps[pane]
+ , s = state[pane]
+ , o = options[pane]
+ , z = options.zIndexes
+ ;
+ if (doLock) {
+ showMasks( pane, { animation: true, objectsOnly: true });
+ $P.css({ zIndex: z.pane_animate }); // overlay all elements during animation
+ if (pane=="south")
+ $P.css({ top: sC.inset.top + sC.innerHeight - $P.outerHeight() });
+ else if (pane=="east")
+ $P.css({ left: sC.inset.left + sC.innerWidth - $P.outerWidth() });
+ }
+ else { // animation DONE - RESET CSS
+ hideMasks();
+ $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
+ if (pane=="south")
+ $P.css({ top: "auto" });
+ // if pane is positioned 'off-screen', then DO NOT screw with it!
+ else if (pane=="east" && !$P.css("left").match(/\-99999/))
+ $P.css({ left: "auto" });
+ // fix anti-aliasing in IE - only needed for animations that change opacity
+ if (browser.msie && o.fxOpacityFix && o.fxName_open != "slide" && $P.css("filter") && $P.css("opacity") == 1)
+ $P[0].style.removeAttribute('filter');
+ }
+ }
+
+
+ /**
+ * Toggle sliding functionality of a specific pane on/off by adding removing 'slide open' trigger
+ *
+ * @see open(), close()
+ * @param {string} pane The pane to enable/disable, 'north', 'south', etc.
+ * @param {boolean} enable Enable or Disable sliding?
+ */
+, bindStartSlidingEvents = function (pane, enable) {
+ var o = options[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , evtName = o.slideTrigger_open.toLowerCase()
+ ;
+ if (!$R || (enable && !o.slidable)) return;
+
+ // make sure we have a valid event
+ if (evtName.match(/mouseover/))
+ evtName = o.slideTrigger_open = "mouseenter";
+ else if (!evtName.match(/(click|dblclick|mouseenter)/))
+ evtName = o.slideTrigger_open = "click";
+
+ // must remove double-click-toggle when using dblclick-slide
+ if (o.resizerDblClickToggle && evtName.match(/click/)) {
+ $R[enable ? "unbind" : "bind"]('dblclick.'+ sID, toggle)
+ }
+
+ $R
+ // add or remove event
+ [enable ? "bind" : "unbind"](evtName +'.'+ sID, slideOpen)
+ // set the appropriate cursor & title/tip
+ .css("cursor", enable ? o.sliderCursor : "default")
+ .attr("title", enable ? o.tips.Slide : "")
+ ;
+ }
+
+ /**
+ * Add or remove 'mouseleave' events to 'slide close' when pane is 'sliding' open or closed
+ * Also increases zIndex when pane is sliding open
+ * See bindStartSlidingEvents for code to control 'slide open'
+ *
+ * @see slideOpen(), slideClose()
+ * @param {string} pane The pane to process, 'north', 'south', etc.
+ * @param {boolean} enable Enable or Disable events?
+ */
+, bindStopSlidingEvents = function (pane, enable) {
+ var o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , z = options.zIndexes
+ , evtName = o.slideTrigger_close.toLowerCase()
+ , action = (enable ? "bind" : "unbind")
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ ;
+ timer.clear(pane+"_closeSlider"); // just in case
+
+ if (enable) {
+ s.isSliding = true;
+ state.panesSliding[pane] = true;
+ // remove 'slideOpen' event from resizer
+ // ALSO will raise the zIndex of the pane & resizer
+ bindStartSlidingEvents(pane, false);
+ }
+ else {
+ s.isSliding = false;
+ delete state.panesSliding[pane];
+ }
+
+ // RE/SET zIndex - increases when pane is sliding-open, resets to normal when not
+ $P.css("zIndex", enable ? z.pane_sliding : z.pane_normal);
+ $R.css("zIndex", enable ? z.pane_sliding+2 : z.resizer_normal); // NOTE: mask = pane_sliding+1
+
+ // make sure we have a valid event
+ if (!evtName.match(/(click|mouseleave)/))
+ evtName = o.slideTrigger_close = "mouseleave"; // also catches 'mouseout'
+
+ // add/remove slide triggers
+ $R[action](evtName, slideClose); // base event on resize
+ // need extra events for mouseleave
+ if (evtName === "mouseleave") {
+ // also close on pane.mouseleave
+ $P[action]("mouseleave."+ sID, slideClose);
+ // cancel timer when mouse moves between 'pane' and 'resizer'
+ $R[action]("mouseenter."+ sID, cancelMouseOut);
+ $P[action]("mouseenter."+ sID, cancelMouseOut);
+ }
+
+ if (!enable)
+ timer.clear(pane+"_closeSlider");
+ else if (evtName === "click" && !o.resizable) {
+ // IF pane is not resizable (which already has a cursor and tip)
+ // then set the a cursor & title/tip on resizer when sliding
+ $R.css("cursor", enable ? o.sliderCursor : "default");
+ $R.attr("title", enable ? o.tips.Close : ""); // use Toggler-tip, eg: "Close Pane"
+ }
+
+ // SUBROUTINE for mouseleave timer clearing
+ function cancelMouseOut (evt) {
+ timer.clear(pane+"_closeSlider");
+ evt.stopPropagation();
+ }
+ }
+
+
+ /**
+ * Hides/closes a pane if there is insufficient room - reverses this when there is room again
+ * MUST have already called setSizeLimits() before calling this method
+ *
+ * @param {string} pane The pane being resized
+ * @param {boolean=} [isOpening=false] Called from onOpen?
+ * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
+ * @param {boolean=} [force=false]
+ */
+, makePaneFit = function (pane, isOpening, skipCallback, force) {
+ var o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , isSidePane = c.dir==="vert"
+ , hasRoom = false
+ ;
+ // special handling for center & east/west panes
+ if (pane === "center" || (isSidePane && s.noVerticalRoom)) {
+ // see if there is enough room to display the pane
+ // ERROR: hasRoom = s.minHeight <= s.maxHeight && (isSidePane || s.minWidth <= s.maxWidth);
+ hasRoom = (s.maxHeight >= 0);
+ if (hasRoom && s.noRoom) { // previously hidden due to noRoom, so show now
+ _showPane(pane);
+ if ($R) $R.show();
+ s.isVisible = true;
+ s.noRoom = false;
+ if (isSidePane) s.noVerticalRoom = false;
+ _fixIframe(pane);
+ }
+ else if (!hasRoom && !s.noRoom) { // not currently hidden, so hide now
+ _hidePane(pane);
+ if ($R) $R.hide();
+ s.isVisible = false;
+ s.noRoom = true;
+ }
+ }
+
+ // see if there is enough room to fit the border-pane
+ if (pane === "center") {
+ // ignore center in this block
+ }
+ else if (s.minSize <= s.maxSize) { // pane CAN fit
+ hasRoom = true;
+ if (s.size > s.maxSize) // pane is too big - shrink it
+ sizePane(pane, s.maxSize, skipCallback, true, force); // true = noAnimation
+ else if (s.size < s.minSize) // pane is too small - enlarge it
+ sizePane(pane, s.minSize, skipCallback, true, force); // true = noAnimation
+ // need s.isVisible because new pseudoClose method keeps pane visible, but off-screen
+ else if ($R && s.isVisible && $P.is(":visible")) {
+ // make sure resizer-bar is positioned correctly
+ // handles situation where nested layout was 'hidden' when initialized
+ var pos = s.size + sC.inset[c.side];
+ if ($.layout.cssNum( $R, c.side ) != pos) $R.css( c.side, pos );
+ }
+
+ // if was previously hidden due to noRoom, then RESET because NOW there is room
+ if (s.noRoom) {
+ // s.noRoom state will be set by open or show
+ if (s.wasOpen && o.closable) {
+ if (o.autoReopen)
+ open(pane, false, true, true); // true = noAnimation, true = noAlert
+ else // leave the pane closed, so just update state
+ s.noRoom = false;
+ }
+ else
+ show(pane, s.wasOpen, true, true); // true = noAnimation, true = noAlert
+ }
+ }
+ else { // !hasRoom - pane CANNOT fit
+ if (!s.noRoom) { // pane not set as noRoom yet, so hide or close it now...
+ s.noRoom = true; // update state
+ s.wasOpen = !s.isClosed && !s.isSliding;
+ if (s.isClosed){} // SKIP
+ else if (o.closable) // 'close' if possible
+ close(pane, true, true); // true = force, true = noAnimation
+ else // 'hide' pane if cannot just be closed
+ hide(pane, true); // true = noAnimation
+ }
+ }
+ }
+
+
+ /**
+ * manualSizePane is an exposed flow-through method allowing extra code when pane is 'manually resized'
+ *
+ * @param {(string|Object)} evt_or_pane The pane being resized
+ * @param {number} size The *desired* new size for this pane - will be validated
+ * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [force=false] Force resizing even if does not seem necessary
+ */
+, manualSizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , o = options[pane]
+ , s = state[pane]
+ // if resizing callbacks have been delayed and resizing is now DONE, force resizing to complete...
+ , forceResize = force || (o.livePaneResizing && !s.isResizing)
+ ;
+ if (pane === "center") return; // validate
+ // ANY call to manualSizePane disables autoResize - ie, percentage sizing
+ s.autoResize = false;
+ // flow-through...
+ sizePane(pane, size, skipCallback, noAnimation, forceResize); // will animate resize if option enabled
+ }
+
+ /**
+ * sizePane is called only by internal methods whenever a pane needs to be resized
+ *
+ * @param {(string|Object)} evt_or_pane The pane being resized
+ * @param {number} size The *desired* new size for this pane - will be validated
+ * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [force=false] Force resizing even if does not seem necessary
+ */
+, sizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane) // probably NEVER called from event?
+ , o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , side = _c[pane].side
+ , dimName = _c[pane].sizeType.toLowerCase()
+ , skipResizeWhileDragging = s.isResizing && !o.triggerEventsDuringLiveResize
+ , doFX = noAnimation !== true && o.animatePaneSizing
+ , oldSize, newSize
+ ;
+ if (pane === "center") return; // validate
+ // QUEUE in case another action/animation is in progress
+ $N.queue(function( queueNext ){
+ // calculate 'current' min/max sizes
+ setSizeLimits(pane); // update pane-state
+ oldSize = s.size;
+ size = _parseSize(pane, size); // handle percentages & auto
+ size = max(size, _parseSize(pane, o.minSize));
+ size = min(size, s.maxSize);
+ if (size < s.minSize) { // not enough room for pane!
+ queueNext(); // call before makePaneFit() because it needs the queue free
+ makePaneFit(pane, false, skipCallback); // will hide or close pane
+ return;
+ }
+
+ // IF newSize is same as oldSize, then nothing to do - abort
+ if (!force && size === oldSize)
+ return queueNext();
+
+ s.newSize = size;
+
+ // onresize_start callback CANNOT cancel resizing because this would break the layout!
+ if (!skipCallback && state.initialized && s.isVisible)
+ _runCallbacks("onresize_start", pane);
+
+ // resize the pane, and make sure its visible
+ newSize = cssSize(pane, size);
+
+ if (doFX && $P.is(":visible")) { // ANIMATE
+ var fx = $.layout.effects.size[pane] || $.layout.effects.size.all
+ , easing = o.fxSettings_size.easing || fx.easing
+ , z = options.zIndexes
+ , props = {};
+ props[ dimName ] = newSize +'px';
+ s.isMoving = true;
+ // overlay all elements during animation
+ $P.css({ zIndex: z.pane_animate })
+ .show().animate( props, o.fxSpeed_size, easing, function(){
+ // reset zIndex after animation
+ $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
+ s.isMoving = false;
+ delete s.newSize;
+ sizePane_2(); // continue
+ queueNext();
+ });
+ }
+ else { // no animation
+ $P.css( dimName, newSize ); // resize pane
+ delete s.newSize;
+ // if pane is visible, then
+ if ($P.is(":visible"))
+ sizePane_2(); // continue
+ else {
+ // pane is NOT VISIBLE, so just update state data...
+ // when pane is *next opened*, it will have the new size
+ s.size = size; // update state.size
+ //$.extend(s, elDims($P)); // update state dimensions - CANNOT do this when not visible! }
+ }
+ queueNext();
+ };
+
+ });
+
+ // SUBROUTINE
+ function sizePane_2 () {
+ /* Panes are sometimes not sized precisely in some browsers!?
+ * This code will resize the pane up to 3 times to nudge the pane to the correct size
+ */
+ var actual = dimName==='width' ? $P.outerWidth() : $P.outerHeight()
+ , tries = [{
+ pane: pane
+ , count: 1
+ , target: size
+ , actual: actual
+ , correct: (size === actual)
+ , attempt: size
+ , cssSize: newSize
+ }]
+ , lastTry = tries[0]
+ , thisTry = {}
+ , msg = 'Inaccurate size after resizing the '+ pane +'-pane.'
+ ;
+ while ( !lastTry.correct ) {
+ thisTry = { pane: pane, count: lastTry.count+1, target: size };
+
+ if (lastTry.actual > size)
+ thisTry.attempt = max(0, lastTry.attempt - (lastTry.actual - size));
+ else // lastTry.actual < size
+ thisTry.attempt = max(0, lastTry.attempt + (size - lastTry.actual));
+
+ thisTry.cssSize = cssSize(pane, thisTry.attempt);
+ $P.css( dimName, thisTry.cssSize );
+
+ thisTry.actual = dimName=='width' ? $P.outerWidth() : $P.outerHeight();
+ thisTry.correct = (size === thisTry.actual);
+
+ // log attempts and alert the user of this *non-fatal error* (if showDebugMessages)
+ if ( tries.length === 1) {
+ _log(msg, false, true);
+ _log(lastTry, false, true);
+ }
+ _log(thisTry, false, true);
+ // after 4 tries, is as close as its gonna get!
+ if (tries.length > 3) break;
+
+ tries.push( thisTry );
+ lastTry = tries[ tries.length - 1 ];
+ }
+ // END TESTING CODE
+
+ // update pane-state dimensions
+ s.size = size;
+ $.extend(s, elDims($P));
+
+ if (s.isVisible && $P.is(":visible")) {
+ // reposition the resizer-bar
+ if ($R) $R.css( side, size + sC.inset[side] );
+ // resize the content-div
+ sizeContent(pane);
+ }
+
+ if (!skipCallback && !skipResizeWhileDragging && state.initialized && s.isVisible)
+ _runCallbacks("onresize_end", pane);
+
+ // resize all the adjacent panes, and adjust their toggler buttons
+ // when skipCallback passed, it means the controlling method will handle 'other panes'
+ if (!skipCallback) {
+ // also no callback if live-resize is in progress and NOT triggerEventsDuringLiveResize
+ if (!s.isSliding) sizeMidPanes(_c[pane].dir=="horz" ? "" : "center", skipResizeWhileDragging, force);
+ sizeHandles();
+ }
+
+ // if opposite-pane was autoClosed, see if it can be autoOpened now
+ var altPane = _c.oppositeEdge[pane];
+ if (size < oldSize && state[ altPane ].noRoom) {
+ setSizeLimits( altPane );
+ makePaneFit( altPane, false, skipCallback );
+ }
+
+ // DEBUG - ALERT user/developer so they know there was a sizing problem
+ if (tries.length > 1)
+ _log(msg +'\nSee the Error Console for details.', true, true);
+ }
+ }
+
+ /**
+ * @see initPanes(), sizePane(), resizeAll(), open(), close(), hide()
+ * @param {(Array.|string)} panes The pane(s) being resized, comma-delmited string
+ * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
+ * @param {boolean=} [force=false]
+ */
+, sizeMidPanes = function (panes, skipCallback, force) {
+ panes = (panes ? panes : "east,west,center").split(",");
+
+ $.each(panes, function (i, pane) {
+ if (!$Ps[pane]) return; // NO PANE - skip
+ var
+ o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , isCenter= (pane=="center")
+ , hasRoom = true
+ , CSS = {}
+ // if pane is not visible, show it invisibly NOW rather than for *each call* in this script
+ , visCSS = $.layout.showInvisibly($P)
+
+ , newCenter = calcNewCenterPaneDims()
+ ;
+
+ // update pane-state dimensions
+ $.extend(s, elDims($P));
+
+ if (pane === "center") {
+ if (!force && s.isVisible && newCenter.width === s.outerWidth && newCenter.height === s.outerHeight) {
+ $P.css(visCSS);
+ return true; // SKIP - pane already the correct size
+ }
+ // set state for makePaneFit() logic
+ $.extend(s, cssMinDims(pane), {
+ maxWidth: newCenter.width
+ , maxHeight: newCenter.height
+ });
+ CSS = newCenter;
+ s.newWidth = CSS.width;
+ s.newHeight = CSS.height;
+ // convert OUTER width/height to CSS width/height
+ CSS.width = cssW($P, CSS.width);
+ // NEW - allow pane to extend 'below' visible area rather than hide it
+ CSS.height = cssH($P, CSS.height);
+ hasRoom = CSS.width >= 0 && CSS.height >= 0; // height >= 0 = ALWAYS TRUE NOW
+
+ // during layout init, try to shrink east/west panes to make room for center
+ if (!state.initialized && o.minWidth > newCenter.width) {
+ var
+ reqPx = o.minWidth - s.outerWidth
+ , minE = options.east.minSize || 0
+ , minW = options.west.minSize || 0
+ , sizeE = state.east.size
+ , sizeW = state.west.size
+ , newE = sizeE
+ , newW = sizeW
+ ;
+ if (reqPx > 0 && state.east.isVisible && sizeE > minE) {
+ newE = max( sizeE-minE, sizeE-reqPx );
+ reqPx -= sizeE-newE;
+ }
+ if (reqPx > 0 && state.west.isVisible && sizeW > minW) {
+ newW = max( sizeW-minW, sizeW-reqPx );
+ reqPx -= sizeW-newW;
+ }
+ // IF we found enough extra space, then resize the border panes as calculated
+ if (reqPx === 0) {
+ if (sizeE && sizeE != minE)
+ sizePane('east', newE, true, true, force); // true = skipCallback/noAnimation - initPanes will handle when done
+ if (sizeW && sizeW != minW)
+ sizePane('west', newW, true, true, force); // true = skipCallback/noAnimation
+ // now start over!
+ sizeMidPanes('center', skipCallback, force);
+ $P.css(visCSS);
+ return; // abort this loop
+ }
+ }
+ }
+ else { // for east and west, set only the height, which is same as center height
+ // set state.min/maxWidth/Height for makePaneFit() logic
+ if (s.isVisible && !s.noVerticalRoom)
+ $.extend(s, elDims($P), cssMinDims(pane))
+ if (!force && !s.noVerticalRoom && newCenter.height === s.outerHeight) {
+ $P.css(visCSS);
+ return true; // SKIP - pane already the correct size
+ }
+ // east/west have same top, bottom & height as center
+ CSS.top = newCenter.top;
+ CSS.bottom = newCenter.bottom;
+ s.newSize = newCenter.height
+ // NEW - allow pane to extend 'below' visible area rather than hide it
+ CSS.height = cssH($P, newCenter.height);
+ s.maxHeight = CSS.height;
+ hasRoom = (s.maxHeight >= 0); // ALWAYS TRUE NOW
+ if (!hasRoom) s.noVerticalRoom = true; // makePaneFit() logic
+ }
+
+ if (hasRoom) {
+ // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
+ if (!skipCallback && state.initialized)
+ _runCallbacks("onresize_start", pane);
+
+ $P.css(CSS); // apply the CSS to pane
+ if (pane !== "center")
+ sizeHandles(pane); // also update resizer length
+ if (s.noRoom && !s.isClosed && !s.isHidden)
+ makePaneFit(pane); // will re-open/show auto-closed/hidden pane
+ if (s.isVisible) {
+ $.extend(s, elDims($P)); // update pane dimensions
+ if (state.initialized) sizeContent(pane); // also resize the contents, if exists
+ }
+ }
+ else if (!s.noRoom && s.isVisible) // no room for pane
+ makePaneFit(pane); // will hide or close pane
+
+ // reset visibility, if necessary
+ $P.css(visCSS);
+
+ delete s.newSize;
+ delete s.newWidth;
+ delete s.newHeight;
+
+ if (!s.isVisible)
+ return true; // DONE - next pane
+
+ /*
+ * Extra CSS for IE6 or IE7 in Quirks-mode - add 'width' to NORTH/SOUTH panes
+ * Normally these panes have only 'left' & 'right' positions so pane auto-sizes
+ * ALSO required when pane is an IFRAME because will NOT default to 'full width'
+ * TODO: Can I use width:100% for a north/south iframe?
+ * TODO: Sounds like a job for $P.outerWidth( sC.innerWidth ) SETTER METHOD
+ */
+ if (pane === "center") { // finished processing midPanes
+ var fix = browser.isIE6 || !browser.boxModel;
+ if ($Ps.north && (fix || state.north.tagName=="IFRAME"))
+ $Ps.north.css("width", cssW($Ps.north, sC.innerWidth));
+ if ($Ps.south && (fix || state.south.tagName=="IFRAME"))
+ $Ps.south.css("width", cssW($Ps.south, sC.innerWidth));
+ }
+
+ // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
+ if (!skipCallback && state.initialized)
+ _runCallbacks("onresize_end", pane);
+ });
+ }
+
+
+ /**
+ * @see window.onresize(), callbacks or custom code
+ * @param {(Object|boolean)=} evt_or_refresh If 'true', then also reset pane-positioning
+ */
+, resizeAll = function (evt_or_refresh) {
+ var oldW = sC.innerWidth
+ , oldH = sC.innerHeight
+ ;
+ // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
+ evtPane(evt_or_refresh);
+
+ // cannot size layout when 'container' is hidden or collapsed
+ if (!$N.is(":visible")) return;
+
+ if (!state.initialized) {
+ _initLayoutElements();
+ return; // no need to resize since we just initialized!
+ }
+
+ if (evt_or_refresh === true && $.isPlainObject(options.outset)) {
+ // update container CSS in case outset option has changed
+ $N.css( options.outset );
+ }
+ // UPDATE container dimensions
+ $.extend(sC, elDims( $N, options.inset ));
+ if (!sC.outerHeight) return;
+
+ // if 'true' passed, refresh pane & handle positioning too
+ if (evt_or_refresh === true) {
+ setPanePosition();
+ }
+
+ // onresizeall_start will CANCEL resizing if returns false
+ // state.container has already been set, so user can access this info for calcuations
+ if (false === _runCallbacks("onresizeall_start")) return false;
+
+ var // see if container is now 'smaller' than before
+ shrunkH = (sC.innerHeight < oldH)
+ , shrunkW = (sC.innerWidth < oldW)
+ , $P, o, s
+ ;
+ // NOTE special order for sizing: S-N-E-W
+ $.each(["south","north","east","west"], function (i, pane) {
+ if (!$Ps[pane]) return; // no pane - SKIP
+ o = options[pane];
+ s = state[pane];
+ if (s.autoResize && s.size != o.size) // resize pane to original size set in options
+ sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
+ else {
+ setSizeLimits(pane);
+ makePaneFit(pane, false, true, true); // true=skipCallback/forceResize
+ }
+ });
+
+ sizeMidPanes("", true, true); // true=skipCallback/forceResize
+ sizeHandles(); // reposition the toggler elements
+
+ // trigger all individual pane callbacks AFTER layout has finished resizing
+ $.each(_c.allPanes, function (i, pane) {
+ $P = $Ps[pane];
+ if (!$P) return; // SKIP
+ if (state[pane].isVisible) // undefined for non-existent panes
+ _runCallbacks("onresize_end", pane); // callback - if exists
+ });
+
+ _runCallbacks("onresizeall_end");
+ //_triggerLayoutEvent(pane, 'resizeall');
+ }
+
+ /**
+ * Whenever a pane resizes or opens that has a nested layout, trigger resizeAll
+ *
+ * @param {(string|Object)} evt_or_pane The pane just resized or opened
+ */
+, resizeChildren = function (evt_or_pane, skipRefresh) {
+ var pane = evtPane.call(this, evt_or_pane);
+
+ if (!options[pane].resizeChildren) return;
+
+ // ensure the pane-children are up-to-date
+ if (!skipRefresh) refreshChildren( pane );
+ var pC = children[pane];
+ if ($.isPlainObject( pC )) {
+ // resize one or more children
+ $.each( pC, function (key, child) {
+ if (!child.destroyed) child.resizeAll();
+ });
+ }
+ }
+
+ /**
+ * IF pane has a content-div, then resize all elements inside pane to fit pane-height
+ *
+ * @param {(string|Object)} evt_or_panes The pane(s) being resized
+ * @param {boolean=} [remeasure=false] Should the content (header/footer) be remeasured?
+ */
+, sizeContent = function (evt_or_panes, remeasure) {
+ if (!isInitialized()) return;
+
+ var panes = evtPane.call(this, evt_or_panes);
+ panes = panes ? panes.split(",") : _c.allPanes;
+
+ $.each(panes, function (idx, pane) {
+ var
+ $P = $Ps[pane]
+ , $C = $Cs[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , m = s.content // m = measurements
+ ;
+ if (!$P || !$C || !$P.is(":visible")) return true; // NOT VISIBLE - skip
+
+ // if content-element was REMOVED, update OR remove the pointer
+ if (!$C.length) {
+ initContent(pane, false); // false = do NOT sizeContent() - already there!
+ if (!$C) return; // no replacement element found - pointer have been removed
+ }
+
+ // onsizecontent_start will CANCEL resizing if returns false
+ if (false === _runCallbacks("onsizecontent_start", pane)) return;
+
+ // skip re-measuring offsets if live-resizing
+ if ((!s.isMoving && !s.isResizing) || o.liveContentResizing || remeasure || m.top == undefined) {
+ _measure();
+ // if any footers are below pane-bottom, they may not measure correctly,
+ // so allow pane overflow and re-measure
+ if (m.hiddenFooters > 0 && $P.css("overflow") === "hidden") {
+ $P.css("overflow", "visible");
+ _measure(); // remeasure while overflowing
+ $P.css("overflow", "hidden");
+ }
+ }
+ // NOTE: spaceAbove/Below *includes* the pane paddingTop/Bottom, but not pane.borders
+ var newH = s.innerHeight - (m.spaceAbove - s.css.paddingTop) - (m.spaceBelow - s.css.paddingBottom);
+
+ if (!$C.is(":visible") || m.height != newH) {
+ // size the Content element to fit new pane-size - will autoHide if not enough room
+ setOuterHeight($C, newH, true); // true=autoHide
+ m.height = newH; // save new height
+ };
+
+ if (state.initialized)
+ _runCallbacks("onsizecontent_end", pane);
+
+ function _below ($E) {
+ return max(s.css.paddingBottom, (parseInt($E.css("marginBottom"), 10) || 0));
+ };
+
+ function _measure () {
+ var
+ ignore = options[pane].contentIgnoreSelector
+ , $Fs = $C.nextAll().not(".ui-layout-mask").not(ignore || ":lt(0)") // not :lt(0) = ALL
+ , $Fs_vis = $Fs.filter(':visible')
+ , $F = $Fs_vis.filter(':last')
+ ;
+ m = {
+ top: $C[0].offsetTop
+ , height: $C.outerHeight()
+ , numFooters: $Fs.length
+ , hiddenFooters: $Fs.length - $Fs_vis.length
+ , spaceBelow: 0 // correct if no content footer ($E)
+ }
+ m.spaceAbove = m.top; // just for state - not used in calc
+ m.bottom = m.top + m.height;
+ if ($F.length)
+ //spaceBelow = (LastFooter.top + LastFooter.height) [footerBottom] - Content.bottom + max(LastFooter.marginBottom, pane.paddingBotom)
+ m.spaceBelow = ($F[0].offsetTop + $F.outerHeight()) - m.bottom + _below($F);
+ else // no footer - check marginBottom on Content element itself
+ m.spaceBelow = _below($C);
+ };
+ });
+ }
+
+
+ /**
+ * Called every time a pane is opened, closed, or resized to slide the togglers to 'center' and adjust their length if necessary
+ *
+ * @see initHandles(), open(), close(), resizeAll()
+ * @param {(string|Object)=} evt_or_panes The pane(s) being resized
+ */
+, sizeHandles = function (evt_or_panes) {
+ var panes = evtPane.call(this, evt_or_panes)
+ panes = panes ? panes.split(",") : _c.borderPanes;
+
+ $.each(panes, function (i, pane) {
+ var
+ o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , $TC
+ ;
+ if (!$P || !$R) return;
+
+ var
+ dir = _c[pane].dir
+ , _state = (s.isClosed ? "_closed" : "_open")
+ , spacing = o["spacing"+ _state]
+ , togAlign = o["togglerAlign"+ _state]
+ , togLen = o["togglerLength"+ _state]
+ , paneLen
+ , left
+ , offset
+ , CSS = {}
+ ;
+
+ if (spacing === 0) {
+ $R.hide();
+ return;
+ }
+ else if (!s.noRoom && !s.isHidden) // skip if resizer was hidden for any reason
+ $R.show(); // in case was previously hidden
+
+ // Resizer Bar is ALWAYS same width/height of pane it is attached to
+ if (dir === "horz") { // north/south
+ //paneLen = $P.outerWidth(); // s.outerWidth ||
+ paneLen = sC.innerWidth; // handle offscreen-panes
+ s.resizerLength = paneLen;
+ left = $.layout.cssNum($P, "left")
+ $R.css({
+ width: cssW($R, paneLen) // account for borders & padding
+ , height: cssH($R, spacing) // ditto
+ , left: left > -9999 ? left : sC.inset.left // handle offscreen-panes
+ });
+ }
+ else { // east/west
+ paneLen = $P.outerHeight(); // s.outerHeight ||
+ s.resizerLength = paneLen;
+ $R.css({
+ height: cssH($R, paneLen) // account for borders & padding
+ , width: cssW($R, spacing) // ditto
+ , top: sC.inset.top + getPaneSize("north", true) // TODO: what if no North pane?
+ //, top: $.layout.cssNum($Ps["center"], "top")
+ });
+ }
+
+ // remove hover classes
+ removeHover( o, $R );
+
+ if ($T) {
+ if (togLen === 0 || (s.isSliding && o.hideTogglerOnSlide)) {
+ $T.hide(); // always HIDE the toggler when 'sliding'
+ return;
+ }
+ else
+ $T.show(); // in case was previously hidden
+
+ if (!(togLen > 0) || togLen === "100%" || togLen > paneLen) {
+ togLen = paneLen;
+ offset = 0;
+ }
+ else { // calculate 'offset' based on options.PANE.togglerAlign_open/closed
+ if (isStr(togAlign)) {
+ switch (togAlign) {
+ case "top":
+ case "left": offset = 0;
+ break;
+ case "bottom":
+ case "right": offset = paneLen - togLen;
+ break;
+ case "middle":
+ case "center":
+ default: offset = round((paneLen - togLen) / 2); // 'default' catches typos
+ }
+ }
+ else { // togAlign = number
+ var x = parseInt(togAlign, 10); //
+ if (togAlign >= 0) offset = x;
+ else offset = paneLen - togLen + x; // NOTE: x is negative!
+ }
+ }
+
+ if (dir === "horz") { // north/south
+ var width = cssW($T, togLen);
+ $T.css({
+ width: width // account for borders & padding
+ , height: cssH($T, spacing) // ditto
+ , left: offset // TODO: VERIFY that toggler positions correctly for ALL values
+ , top: 0
+ });
+ // CENTER the toggler content SPAN
+// $T.children(".content").each(function(){
+// $T.children(".ui-content").each(function(){ // ThinkGem content 改为 ui-content 解决与AdminLTE类名冲突
+// $TC = $(this);
+// $TC.css("marginLeft", round((width-$TC.outerWidth())/2)); // could be negative
+// });
+ // ThinkGem 以上4行代码不需要,因为在css里会自动居中
+ }
+ else { // east/west
+ var height = cssH($T, togLen);
+ $T.css({
+ height: height // account for borders & padding
+ , width: cssW($T, spacing) // ditto
+ , top: offset // POSITION the toggler
+ , left: 0
+ });
+ // CENTER the toggler content SPAN
+// $T.children(".content").each(function(){
+ $T.children(".ui-content").each(function(){ // ThinkGem content 改为 ui-content 解决与AdminLTE类名冲突
+ $TC = $(this);
+ $TC.css("marginTop", round((height-$TC.outerHeight())/2)); // could be negative
+ });
+ }
+
+ // remove ALL hover classes
+ removeHover( 0, $T );
+ }
+
+ // DONE measuring and sizing this resizer/toggler, so can be 'hidden' now
+ if (!state.initialized && (o.initHidden || s.isHidden)) {
+ $R.hide();
+ if ($T) $T.hide();
+ }
+ });
+ }
+
+
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, enableClosable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $T = $Ts[pane]
+ , o = options[pane]
+ ;
+ if (!$T) return;
+ o.closable = true;
+ $T .bind("click."+ sID, function(evt){ evt.stopPropagation(); toggle(pane); })
+ .css("visibility", "visible")
+ .css("cursor", "pointer")
+ .attr("title", state[pane].isClosed ? o.tips.Open : o.tips.Close) // may be blank
+ .show();
+ }
+ /**
+ * @param {(string|Object)} evt_or_pane
+ * @param {boolean=} [hide=false]
+ */
+, disableClosable = function (evt_or_pane, hide) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $T = $Ts[pane]
+ ;
+ if (!$T) return;
+ options[pane].closable = false;
+ // is closable is disable, then pane MUST be open!
+ if (state[pane].isClosed) open(pane, false, true);
+ $T .unbind("."+ sID)
+ .css("visibility", hide ? "hidden" : "visible") // instead of hide(), which creates logic issues
+ .css("cursor", "default")
+ .attr("title", "");
+ }
+
+
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, enableSlidable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $R = $Rs[pane]
+ ;
+ if (!$R || !$R.data('draggable')) return;
+ options[pane].slidable = true;
+ if (state[pane].isClosed)
+ bindStartSlidingEvents(pane, true);
+ }
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, disableSlidable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $R = $Rs[pane]
+ ;
+ if (!$R) return;
+ options[pane].slidable = false;
+ if (state[pane].isSliding)
+ close(pane, false, true);
+ else {
+ bindStartSlidingEvents(pane, false);
+ $R .css("cursor", "default")
+ .attr("title", "");
+ removeHover(null, $R[0]); // in case currently hovered
+ }
+ }
+
+
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, enableResizable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $R = $Rs[pane]
+ , o = options[pane]
+ ;
+ if (!$R || !$R.data('draggable')) return;
+ o.resizable = true;
+ $R.draggable("enable");
+ if (!state[pane].isClosed)
+ $R .css("cursor", o.resizerCursor)
+ .attr("title", o.tips.Resize);
+ }
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, disableResizable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $R = $Rs[pane]
+ ;
+ if (!$R || !$R.data('draggable')) return;
+ options[pane].resizable = false;
+ $R .draggable("disable")
+ .css("cursor", "default")
+ .attr("title", "");
+ removeHover(null, $R[0]); // in case currently hovered
+ }
+
+
+ /**
+ * Move a pane from source-side (eg, west) to target-side (eg, east)
+ * If pane exists on target-side, move that to source-side, ie, 'swap' the panes
+ *
+ * @param {(string|Object)} evt_or_pane1 The pane/edge being swapped
+ * @param {string} pane2 ditto
+ */
+, swapPanes = function (evt_or_pane1, pane2) {
+ if (!isInitialized()) return;
+ var pane1 = evtPane.call(this, evt_or_pane1);
+ // change state.edge NOW so callbacks can know where pane is headed...
+ state[pane1].edge = pane2;
+ state[pane2].edge = pane1;
+ // run these even if NOT state.initialized
+ if (false === _runCallbacks("onswap_start", pane1)
+ || false === _runCallbacks("onswap_start", pane2)
+ ) {
+ state[pane1].edge = pane1; // reset
+ state[pane2].edge = pane2;
+ return;
+ }
+
+ var
+ oPane1 = copy( pane1 )
+ , oPane2 = copy( pane2 )
+ , sizes = {}
+ ;
+ sizes[pane1] = oPane1 ? oPane1.state.size : 0;
+ sizes[pane2] = oPane2 ? oPane2.state.size : 0;
+
+ // clear pointers & state
+ $Ps[pane1] = false;
+ $Ps[pane2] = false;
+ state[pane1] = {};
+ state[pane2] = {};
+
+ // ALWAYS remove the resizer & toggler elements
+ if ($Ts[pane1]) $Ts[pane1].remove();
+ if ($Ts[pane2]) $Ts[pane2].remove();
+ if ($Rs[pane1]) $Rs[pane1].remove();
+ if ($Rs[pane2]) $Rs[pane2].remove();
+ $Rs[pane1] = $Rs[pane2] = $Ts[pane1] = $Ts[pane2] = false;
+
+ // transfer element pointers and data to NEW Layout keys
+ move( oPane1, pane2 );
+ move( oPane2, pane1 );
+
+ // cleanup objects
+ oPane1 = oPane2 = sizes = null;
+
+ // make panes 'visible' again
+ if ($Ps[pane1]) $Ps[pane1].css(_c.visible);
+ if ($Ps[pane2]) $Ps[pane2].css(_c.visible);
+
+ // fix any size discrepancies caused by swap
+ resizeAll();
+
+ // run these even if NOT state.initialized
+ _runCallbacks("onswap_end", pane1);
+ _runCallbacks("onswap_end", pane2);
+
+ return;
+
+ function copy (n) { // n = pane
+ var
+ $P = $Ps[n]
+ , $C = $Cs[n]
+ ;
+ return !$P ? false : {
+ pane: n
+ , P: $P ? $P[0] : false
+ , C: $C ? $C[0] : false
+ , state: $.extend(true, {}, state[n])
+ , options: $.extend(true, {}, options[n])
+ }
+ };
+
+ function move (oPane, pane) {
+ if (!oPane) return;
+ var
+ P = oPane.P
+ , C = oPane.C
+ , oldPane = oPane.pane
+ , c = _c[pane]
+ // save pane-options that should be retained
+ , s = $.extend(true, {}, state[pane])
+ , o = options[pane]
+ // RETAIN side-specific FX Settings - more below
+ , fx = { resizerCursor: o.resizerCursor }
+ , re, size, pos
+ ;
+ $.each("fxName,fxSpeed,fxSettings".split(","), function (i, k) {
+ fx[k +"_open"] = o[k +"_open"];
+ fx[k +"_close"] = o[k +"_close"];
+ fx[k +"_size"] = o[k +"_size"];
+ });
+
+ // update object pointers and attributes
+ $Ps[pane] = $(P)
+ .data({
+ layoutPane: Instance[pane] // NEW pointer to pane-alias-object
+ , layoutEdge: pane
+ })
+ .css(_c.hidden)
+ .css(c.cssReq)
+ ;
+ $Cs[pane] = C ? $(C) : false;
+
+ // set options and state
+ options[pane] = $.extend(true, {}, oPane.options, fx);
+ state[pane] = $.extend(true, {}, oPane.state);
+
+ // change classNames on the pane, eg: ui-layout-pane-east ==> ui-layout-pane-west
+ re = new RegExp(o.paneClass +"-"+ oldPane, "g");
+ P.className = P.className.replace(re, o.paneClass +"-"+ pane);
+
+ // ALWAYS regenerate the resizer & toggler elements
+ initHandles(pane); // create the required resizer & toggler
+
+ // if moving to different orientation, then keep 'target' pane size
+ if (c.dir != _c[oldPane].dir) {
+ size = sizes[pane] || 0;
+ setSizeLimits(pane); // update pane-state
+ size = max(size, state[pane].minSize);
+ // use manualSizePane to disable autoResize - not useful after panes are swapped
+ manualSizePane(pane, size, true, true); // true/true = skipCallback/noAnimation
+ }
+ else // move the resizer here
+ $Rs[pane].css(c.side, sC.inset[c.side] + (state[pane].isVisible ? getPaneSize(pane) : 0));
+
+
+ // ADD CLASSNAMES & SLIDE-BINDINGS
+ if (oPane.state.isVisible && !s.isVisible)
+ setAsOpen(pane, true); // true = skipCallback
+ else {
+ setAsClosed(pane);
+ bindStartSlidingEvents(pane, true); // will enable events IF option is set
+ }
+
+ // DESTROY the object
+ oPane = null;
+ };
+ }
+
+
+ /**
+ * INTERNAL method to sync pin-buttons when pane is opened or closed
+ * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
+ *
+ * @see open(), setAsOpen(), setAsClosed()
+ * @param {string} pane These are the params returned to callbacks by layout()
+ * @param {boolean} doPin True means set the pin 'down', False means 'up'
+ */
+, syncPinBtns = function (pane, doPin) {
+ if ($.layout.plugins.buttons)
+ $.each(state[pane].pins, function (i, selector) {
+ $.layout.buttons.setPinState(Instance, $(selector), pane, doPin);
+ });
+ }
+
+; // END var DECLARATIONS
+
+ /**
+ * Capture keys when enableCursorHotkey - toggle pane if hotkey pressed
+ *
+ * @see document.keydown()
+ */
+ function keyDown (evt) {
+ if (!evt) return true;
+ var code = evt.keyCode;
+ if (code < 33) return true; // ignore special keys: ENTER, TAB, etc
+
+ var
+ PANE = {
+ 38: "north" // Up Cursor - $.ui.keyCode.UP
+ , 40: "south" // Down Cursor - $.ui.keyCode.DOWN
+ , 37: "west" // Left Cursor - $.ui.keyCode.LEFT
+ , 39: "east" // Right Cursor - $.ui.keyCode.RIGHT
+ }
+ , ALT = evt.altKey // no worky!
+ , SHIFT = evt.shiftKey
+ , CTRL = evt.ctrlKey
+ , CURSOR = (CTRL && code >= 37 && code <= 40)
+ , o, k, m, pane
+ ;
+
+ if (CURSOR && options[PANE[code]].enableCursorHotkey) // valid cursor-hotkey
+ pane = PANE[code];
+ else if (CTRL || SHIFT) // check to see if this matches a custom-hotkey
+ $.each(_c.borderPanes, function (i, p) { // loop each pane to check its hotkey
+ o = options[p];
+ k = o.customHotkey;
+ m = o.customHotkeyModifier; // if missing or invalid, treated as "CTRL+SHIFT"
+ if ((SHIFT && m=="SHIFT") || (CTRL && m=="CTRL") || (CTRL && SHIFT)) { // Modifier matches
+ if (k && code === (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { // Key matches
+ pane = p;
+ return false; // BREAK
+ }
+ }
+ });
+
+ // validate pane
+ if (!pane || !$Ps[pane] || !options[pane].closable || state[pane].isHidden)
+ return true;
+
+ toggle(pane);
+
+ evt.stopPropagation();
+ evt.returnValue = false; // CANCEL key
+ return false;
+ };
+
+
+/*
+ * ######################################
+ * UTILITY METHODS
+ * called externally or by initButtons
+ * ######################################
+ */
+
+ /**
+ * Change/reset a pane overflow setting & zIndex to allow popups/drop-downs to work
+ *
+ * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
+ */
+ function allowOverflow (el) {
+ if (!isInitialized()) return;
+ if (this && this.tagName) el = this; // BOUND to element
+ var $P;
+ if (isStr(el))
+ $P = $Ps[el];
+ else if ($(el).data("layoutRole"))
+ $P = $(el);
+ else
+ $(el).parents().each(function(){
+ if ($(this).data("layoutRole")) {
+ $P = $(this);
+ return false; // BREAK
+ }
+ });
+ if (!$P || !$P.length) return; // INVALID
+
+ var
+ pane = $P.data("layoutEdge")
+ , s = state[pane]
+ ;
+
+ // if pane is already raised, then reset it before doing it again!
+ // this would happen if allowOverflow is attached to BOTH the pane and an element
+ if (s.cssSaved)
+ resetOverflow(pane); // reset previous CSS before continuing
+
+ // if pane is raised by sliding or resizing, or its closed, then abort
+ if (s.isSliding || s.isResizing || s.isClosed) {
+ s.cssSaved = false;
+ return;
+ }
+
+ var
+ newCSS = { zIndex: (options.zIndexes.resizer_normal + 1) }
+ , curCSS = {}
+ , of = $P.css("overflow")
+ , ofX = $P.css("overflowX")
+ , ofY = $P.css("overflowY")
+ ;
+ // determine which, if any, overflow settings need to be changed
+ if (of != "visible") {
+ curCSS.overflow = of;
+ newCSS.overflow = "visible";
+ }
+ if (ofX && !ofX.match(/(visible|auto)/)) {
+ curCSS.overflowX = ofX;
+ newCSS.overflowX = "visible";
+ }
+ if (ofY && !ofY.match(/(visible|auto)/)) {
+ curCSS.overflowY = ofX;
+ newCSS.overflowY = "visible";
+ }
+
+ // save the current overflow settings - even if blank!
+ s.cssSaved = curCSS;
+
+ // apply new CSS to raise zIndex and, if necessary, make overflow 'visible'
+ $P.css( newCSS );
+
+ // make sure the zIndex of all other panes is normal
+ $.each(_c.allPanes, function(i, p) {
+ if (p != pane) resetOverflow(p);
+ });
+
+ };
+ /**
+ * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
+ */
+ function resetOverflow (el) {
+ if (!isInitialized()) return;
+ if (this && this.tagName) el = this; // BOUND to element
+ var $P;
+ if (isStr(el))
+ $P = $Ps[el];
+ else if ($(el).data("layoutRole"))
+ $P = $(el);
+ else
+ $(el).parents().each(function(){
+ if ($(this).data("layoutRole")) {
+ $P = $(this);
+ return false; // BREAK
+ }
+ });
+ if (!$P || !$P.length) return; // INVALID
+
+ var
+ pane = $P.data("layoutEdge")
+ , s = state[pane]
+ , CSS = s.cssSaved || {}
+ ;
+ // reset the zIndex
+ if (!s.isSliding && !s.isResizing)
+ $P.css("zIndex", options.zIndexes.pane_normal);
+
+ // reset Overflow - if necessary
+ $P.css( CSS );
+
+ // clear var
+ s.cssSaved = false;
+ };
+
+/*
+ * #####################
+ * CREATE/RETURN LAYOUT
+ * #####################
+ */
+
+ // validate that container exists
+ var $N = $(this).eq(0); // FIRST matching Container element
+ if (!$N.length) {
+ return _log( options.errors.containerMissing );
+ };
+
+ // Users retrieve Instance of a layout with: $N.layout() OR $N.data("layout")
+ // return the Instance-pointer if layout has already been initialized
+ if ($N.data("layoutContainer") && $N.data("layout"))
+ return $N.data("layout"); // cached pointer
+
+ // init global vars
+ var
+ $Ps = {} // Panes x5 - set in initPanes()
+ , $Cs = {} // Content x5 - set in initPanes()
+ , $Rs = {} // Resizers x4 - set in initHandles()
+ , $Ts = {} // Togglers x4 - set in initHandles()
+ , $Ms = $([]) // Masks - up to 2 masks per pane (IFRAME + DIV)
+ // aliases for code brevity
+ , sC = state.container // alias for easy access to 'container dimensions'
+ , sID = state.id // alias for unique layout ID/namespace - eg: "layout435"
+ ;
+
+ // create Instance object to expose data & option Properties, and primary action Methods
+ var Instance = {
+ // layout data
+ options: options // property - options hash
+ , state: state // property - dimensions hash
+ // object pointers
+ , container: $N // property - object pointers for layout container
+ , panes: $Ps // property - object pointers for ALL Panes: panes.north, panes.center
+ , contents: $Cs // property - object pointers for ALL Content: contents.north, contents.center
+ , resizers: $Rs // property - object pointers for ALL Resizers, eg: resizers.north
+ , togglers: $Ts // property - object pointers for ALL Togglers, eg: togglers.north
+ // border-pane open/close
+ , hide: hide // method - ditto
+ , show: show // method - ditto
+ , toggle: toggle // method - pass a 'pane' ("north", "west", etc)
+ , open: open // method - ditto
+ , close: close // method - ditto
+ , slideOpen: slideOpen // method - ditto
+ , slideClose: slideClose // method - ditto
+ , slideToggle: slideToggle // method - ditto
+ // pane actions
+ , setSizeLimits: setSizeLimits // method - pass a 'pane' - update state min/max data
+ , _sizePane: sizePane // method -intended for user by plugins only!
+ , sizePane: manualSizePane // method - pass a 'pane' AND an 'outer-size' in pixels or percent, or 'auto'
+ , sizeContent: sizeContent // method - pass a 'pane'
+ , swapPanes: swapPanes // method - pass TWO 'panes' - will swap them
+ , showMasks: showMasks // method - pass a 'pane' OR list of panes - default = all panes with mask option set
+ , hideMasks: hideMasks // method - ditto'
+ // pane element methods
+ , initContent: initContent // method - ditto
+ , addPane: addPane // method - pass a 'pane'
+ , removePane: removePane // method - pass a 'pane' to remove from layout, add 'true' to delete the pane-elem
+ , createChildren: createChildren // method - pass a 'pane' and (optional) layout-options (OVERRIDES options[pane].children
+ , refreshChildren: refreshChildren // method - pass a 'pane' and a layout-instance
+ // special pane option setting
+ , enableClosable: enableClosable // method - pass a 'pane'
+ , disableClosable: disableClosable // method - ditto
+ , enableSlidable: enableSlidable // method - ditto
+ , disableSlidable: disableSlidable // method - ditto
+ , enableResizable: enableResizable // method - ditto
+ , disableResizable: disableResizable// method - ditto
+ // utility methods for panes
+ , allowOverflow: allowOverflow // utility - pass calling element (this)
+ , resetOverflow: resetOverflow // utility - ditto
+ // layout control
+ , destroy: destroy // method - no parameters
+ , initPanes: isInitialized // method - no parameters
+ , resizeAll: resizeAll // method - no parameters
+ // callback triggering
+ , runCallbacks: _runCallbacks // method - pass evtName & pane (if a pane-event), eg: trigger("onopen", "west")
+ // alias collections of options, state and children - created in addPane and extended elsewhere
+ , hasParentLayout: false // set by initContainer()
+ , children: children // pointers to child-layouts, eg: Instance.children.west.layoutName
+ , north: false // alias group: { name: pane, pane: $Ps[pane], options: options[pane], state: state[pane], children: children[pane] }
+ , south: false // ditto
+ , west: false // ditto
+ , east: false // ditto
+ , center: false // ditto
+ };
+
+ // create the border layout NOW
+ if (_create() === 'cancel') // onload_start callback returned false to CANCEL layout creation
+ return null;
+ else // true OR false -- if layout-elements did NOT init (hidden or do not exist), can auto-init later
+ return Instance; // return the Instance object
+
+}
+
+
+})( jQuery );
+
+
+
+
+/**
+ * jquery.layout.state 1.2
+ * $Date: 2014-08-30 08:00:00 (Sat, 30 Aug 2014) $
+ *
+ * Copyright (c) 2014
+ * Kevin Dalman (http://allpro.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * @requires: UI Layout 1.4.0 or higher
+ * @requires: $.ui.cookie (above)
+ *
+ * @see: http://groups.google.com/group/jquery-ui-layout
+ */
+;(function ($) {
+
+if (!$.layout) return;
+
+
+/**
+ * UI COOKIE UTILITY
+ *
+ * A $.cookie OR $.ui.cookie namespace *should be standard*, but until then...
+ * This creates $.ui.cookie so Layout does not need the cookie.jquery.js plugin
+ * NOTE: This utility is REQUIRED by the layout.state plugin
+ *
+ * Cookie methods in Layout are created as part of State Management
+ */
+if (!$.ui) $.ui = {};
+$.ui.cookie = {
+
+ // cookieEnabled is not in DOM specs, but DOES works in all browsers,including IE6
+ acceptsCookies: !!navigator.cookieEnabled
+
+, read: function (name) {
+ var
+ c = document.cookie
+ , cs = c ? c.split(';') : []
+ , pair, data, i
+ ;
+ for (i=0; pair=cs[i]; i++) {
+ data = $.trim(pair).split('='); // name=value => [ name, value ]
+ if (data[0] == name) // found the layout cookie
+ return decodeURIComponent(data[1]);
+ }
+ return null;
+ }
+
+, write: function (name, val, cookieOpts) {
+ var params = ""
+ , date = ""
+ , clear = false
+ , o = cookieOpts || {}
+ , x = o.expires || null
+ , t = $.type(x)
+ ;
+ if (t === "date")
+ date = x;
+ else if (t === "string" && x > 0) {
+ x = parseInt(x,10);
+ t = "number";
+ }
+ if (t === "number") {
+ date = new Date();
+ if (x > 0)
+ date.setDate(date.getDate() + x);
+ else {
+ date.setFullYear(1970);
+ clear = true;
+ }
+ }
+ if (date) params += ";expires="+ date.toUTCString();
+ if (o.path) params += ";path="+ o.path;
+ if (o.domain) params += ";domain="+ o.domain;
+ if (o.secure) params += ";secure";
+ document.cookie = name +"="+ (clear ? "" : encodeURIComponent( val )) + params; // write or clear cookie
+ }
+
+, clear: function (name) {
+ $.ui.cookie.write(name, "", {expires: -1});
+ }
+
+};
+// if cookie.jquery.js is not loaded, create an alias to replicate it
+// this may be useful to other plugins or code dependent on that plugin
+if (!$.cookie) $.cookie = function (k, v, o) {
+ var C = $.ui.cookie;
+ if (v === null)
+ C.clear(k);
+ else if (v === undefined)
+ return C.read(k);
+ else
+ C.write(k, v, o);
+};
+
+
+
+/**
+ * State-management options stored in options.stateManagement, which includes a .cookie hash
+ * Default options saves ALL KEYS for ALL PANES, ie: pane.size, pane.isClosed, pane.isHidden
+ *
+ * // STATE/COOKIE OPTIONS
+ * @example $(el).layout({
+ stateManagement: {
+ enabled: true
+ , stateKeys: "east.size,west.size,east.isClosed,west.isClosed"
+ , cookie: { name: "appLayout", path: "/" }
+ }
+ })
+ * @example $(el).layout({ stateManagement__enabled: true }) // enable auto-state-management using cookies
+ * @example $(el).layout({ stateManagement__cookie: { name: "appLayout", path: "/" } })
+ * @example $(el).layout({ stateManagement__cookie__name: "appLayout", stateManagement__cookie__path: "/" })
+ *
+ * // STATE/COOKIE METHODS
+ * @example myLayout.saveCookie( "west.isClosed,north.size,south.isHidden", {expires: 7} );
+ * @example myLayout.loadCookie();
+ * @example myLayout.deleteCookie();
+ * @example var JSON = myLayout.readState(); // CURRENT Layout State
+ * @example var JSON = myLayout.readCookie(); // SAVED Layout State (from cookie)
+ * @example var JSON = myLayout.state.stateData; // LAST LOADED Layout State (cookie saved in layout.state hash)
+ *
+ * CUSTOM STATE-MANAGEMENT (eg, saved in a database)
+ * @example var JSON = myLayout.readState( "west.isClosed,north.size,south.isHidden" );
+ * @example myLayout.loadState( JSON );
+ */
+
+// tell Layout that the state plugin is available
+$.layout.plugins.stateManagement = true;
+
+// Add State-Management options to layout.defaults
+$.layout.defaults.stateManagement = {
+ enabled: false // true = enable state-management, even if not using cookies
+, autoSave: true // Save a state-cookie when page exits?
+, autoLoad: true // Load the state-cookie when Layout inits?
+, animateLoad: true // animate panes when loading state into an active layout
+, includeChildren: true // recurse into child layouts to include their state as well
+ // List state-data to save - must be pane-specific
+, stateKeys: "north.size,south.size,east.size,west.size,"+
+ "north.isClosed,south.isClosed,east.isClosed,west.isClosed,"+
+ "north.isHidden,south.isHidden,east.isHidden,west.isHidden"
+, cookie: {
+ name: "" // If not specified, will use Layout.name, else just "Layout"
+ , domain: "" // blank = current domain
+ , path: "" // blank = current page, "/" = entire website
+ , expires: "" // 'days' to keep cookie - leave blank for 'session cookie'
+ , secure: false
+ }
+};
+
+// Set stateManagement as a 'layout-option', NOT a 'pane-option'
+$.layout.optionsMap.layout.push("stateManagement");
+// Update config so layout does not move options into the pane-default branch (panes)
+$.layout.config.optionRootKeys.push("stateManagement");
+
+/*
+ * State Management methods
+ */
+$.layout.state = {
+
+ /**
+ * Get the current layout state and save it to a cookie
+ *
+ * myLayout.saveCookie( keys, cookieOpts )
+ *
+ * @param {Object} inst
+ * @param {(string|Array)=} keys
+ * @param {Object=} cookieOpts
+ */
+ saveCookie: function (inst, keys, cookieOpts) {
+ var o = inst.options
+ , sm = o.stateManagement
+ , oC = $.extend(true, {}, sm.cookie, cookieOpts || null)
+ , data = inst.state.stateData = inst.readState( keys || sm.stateKeys ) // read current panes-state
+ ;
+ $.ui.cookie.write( oC.name || o.name || "Layout", $.layout.state.encodeJSON(data), oC );
+ return $.extend(true, {}, data); // return COPY of state.stateData data
+ }
+
+ /**
+ * Remove the state cookie
+ *
+ * @param {Object} inst
+ */
+, deleteCookie: function (inst) {
+ var o = inst.options;
+ $.ui.cookie.clear( o.stateManagement.cookie.name || o.name || "Layout" );
+ }
+
+ /**
+ * Read & return data from the cookie - as JSON
+ *
+ * @param {Object} inst
+ */
+, readCookie: function (inst) {
+ var o = inst.options;
+ var c = $.ui.cookie.read( o.stateManagement.cookie.name || o.name || "Layout" );
+ // convert cookie string back to a hash and return it
+ return c ? $.layout.state.decodeJSON(c) : {};
+ }
+
+ /**
+ * Get data from the cookie and USE IT to loadState
+ *
+ * @param {Object} inst
+ */
+, loadCookie: function (inst) {
+ var c = $.layout.state.readCookie(inst); // READ the cookie
+ if (c && !$.isEmptyObject( c )) {
+ inst.state.stateData = $.extend(true, {}, c); // SET state.stateData
+ inst.loadState(c); // LOAD the retrieved state
+ }
+ return c;
+ }
+
+ /**
+ * Update layout options from the cookie, if one exists
+ *
+ * @param {Object} inst
+ * @param {Object=} stateData
+ * @param {boolean=} animate
+ */
+, loadState: function (inst, data, opts) {
+ if (!$.isPlainObject( data ) || $.isEmptyObject( data )) return;
+
+ // normalize data & cache in the state object
+ data = inst.state.stateData = $.layout.transformData( data ); // panes = default subkey
+
+ // add missing/default state-restore options
+ var smo = inst.options.stateManagement;
+ opts = $.extend({
+ animateLoad: false //smo.animateLoad
+ , includeChildren: smo.includeChildren
+ }, opts );
+
+ if (!inst.state.initialized) {
+ /*
+ * layout NOT initialized, so just update its options
+ */
+ // MUST remove pane.children keys before applying to options
+ // use a copy so we don't remove keys from original data
+ var o = $.extend(true, {}, data);
+ //delete o.center; // center has no state-data - only children
+ $.each($.layout.config.allPanes, function (idx, pane) {
+ if (o[pane]) delete o[pane].children;
+ });
+ // update CURRENT layout-options with saved state data
+ $.extend(true, inst.options, o);
+ }
+ else {
+ /*
+ * layout already initialized, so modify layout's configuration
+ */
+ var noAnimate = !opts.animateLoad
+ , o, c, h, state, open
+ ;
+ $.each($.layout.config.borderPanes, function (idx, pane) {
+ o = data[ pane ];
+ if (!$.isPlainObject( o )) return; // no key, skip pane
+
+ s = o.size;
+ c = o.initClosed;
+ h = o.initHidden;
+ ar = o.autoResize
+ state = inst.state[pane];
+ open = state.isVisible;
+
+ // reset autoResize
+ if (ar)
+ state.autoResize = ar;
+ // resize BEFORE opening
+ if (!open)
+ inst._sizePane(pane, s, false, false, false); // false=skipCallback/noAnimation/forceResize
+ // open/close as necessary - DO NOT CHANGE THIS ORDER!
+ if (h === true) inst.hide(pane, noAnimate);
+ else if (c === true) inst.close(pane, false, noAnimate);
+ else if (c === false) inst.open (pane, false, noAnimate);
+ else if (h === false) inst.show (pane, false, noAnimate);
+ // resize AFTER any other actions
+ if (open)
+ inst._sizePane(pane, s, false, false, noAnimate); // animate resize if option passed
+ });
+
+ /*
+ * RECURSE INTO CHILD-LAYOUTS
+ */
+ if (opts.includeChildren) {
+ var paneStateChildren, childState;
+ $.each(inst.children, function (pane, paneChildren) {
+ paneStateChildren = data[pane] ? data[pane].children : 0;
+ if (paneStateChildren && paneChildren) {
+ $.each(paneChildren, function (stateKey, child) {
+ childState = paneStateChildren[stateKey];
+ if (child && childState)
+ child.loadState( childState );
+ });
+ }
+ });
+ }
+ }
+ }
+
+ /**
+ * Get the *current layout state* and return it as a hash
+ *
+ * @param {Object=} inst // Layout instance to get state for
+ * @param {object=} [opts] // State-Managements override options
+ */
+, readState: function (inst, opts) {
+ // backward compatility
+ if ($.type(opts) === 'string') opts = { keys: opts };
+ if (!opts) opts = {};
+ var sm = inst.options.stateManagement
+ , ic = opts.includeChildren
+ , recurse = ic !== undefined ? ic : sm.includeChildren
+ , keys = opts.stateKeys || sm.stateKeys
+ , alt = { isClosed: 'initClosed', isHidden: 'initHidden' }
+ , state = inst.state
+ , panes = $.layout.config.allPanes
+ , data = {}
+ , pair, pane, key, val
+ , ps, pC, child, array, count, branch
+ ;
+ if ($.isArray(keys)) keys = keys.join(",");
+ // convert keys to an array and change delimiters from '__' to '.'
+ keys = keys.replace(/__/g, ".").split(',');
+ // loop keys and create a data hash
+ for (var i=0, n=keys.length; i < n; i++) {
+ pair = keys[i].split(".");
+ pane = pair[0];
+ key = pair[1];
+ if ($.inArray(pane, panes) < 0) continue; // bad pane!
+ val = state[ pane ][ key ];
+ if (val == undefined) continue;
+ if (key=="isClosed" && state[pane]["isSliding"])
+ val = true; // if sliding, then *really* isClosed
+ ( data[pane] || (data[pane]={}) )[ alt[key] ? alt[key] : key ] = val;
+ }
+
+ // recurse into the child-layouts for each pane
+ if (recurse) {
+ $.each(panes, function (idx, pane) {
+ pC = inst.children[pane];
+ ps = state.stateData[pane];
+ if ($.isPlainObject( pC ) && !$.isEmptyObject( pC )) {
+ // ensure a key exists for this 'pane', eg: branch = data.center
+ branch = data[pane] || (data[pane] = {});
+ if (!branch.children) branch.children = {};
+ $.each( pC, function (key, child) {
+ // ONLY read state from an initialize layout
+ if ( child.state.initialized )
+ branch.children[ key ] = $.layout.state.readState( child );
+ // if we have PREVIOUS (onLoad) state for this child-layout, KEEP IT!
+ else if ( ps && ps.children && ps.children[ key ] ) {
+ branch.children[ key ] = $.extend(true, {}, ps.children[ key ] );
+ }
+ });
+ }
+ });
+ }
+
+ return data;
+ }
+
+ /**
+ * Stringify a JSON hash so can save in a cookie or db-field
+ */
+, encodeJSON: function (json) {
+ var local = window.JSON || {};
+ return (local.stringify || stringify)(json);
+
+ function stringify (h) {
+ var D=[], i=0, k, v, t // k = key, v = value
+ , a = $.isArray(h)
+ ;
+ for (k in h) {
+ v = h[k];
+ t = typeof v;
+ if (t == 'string') // STRING - add quotes
+ v = '"'+ v +'"';
+ else if (t == 'object') // SUB-KEY - recurse into it
+ v = parse(v);
+ D[i++] = (!a ? '"'+ k +'":' : '') + v;
+ }
+ return (a ? '[' : '{') + D.join(',') + (a ? ']' : '}');
+ };
+ }
+
+ /**
+ * Convert stringified JSON back to a hash object
+ * @see $.parseJSON(), adding in jQuery 1.4.1
+ */
+, decodeJSON: function (str) {
+ try { return $.parseJSON ? $.parseJSON(str) : window["eval"]("("+ str +")") || {}; }
+ catch (e) { return {}; }
+ }
+
+
+, _create: function (inst) {
+ var s = $.layout.state
+ , o = inst.options
+ , sm = o.stateManagement
+ ;
+ // ADD State-Management plugin methods to inst
+ $.extend( inst, {
+ // readCookie - update options from cookie - returns hash of cookie data
+ readCookie: function () { return s.readCookie(inst); }
+ // deleteCookie
+ , deleteCookie: function () { s.deleteCookie(inst); }
+ // saveCookie - optionally pass keys-list and cookie-options (hash)
+ , saveCookie: function (keys, cookieOpts) { return s.saveCookie(inst, keys, cookieOpts); }
+ // loadCookie - readCookie and use to loadState() - returns hash of cookie data
+ , loadCookie: function () { return s.loadCookie(inst); }
+ // loadState - pass a hash of state to use to update options
+ , loadState: function (stateData, opts) { s.loadState(inst, stateData, opts); }
+ // readState - returns hash of current layout-state
+ , readState: function (keys) { return s.readState(inst, keys); }
+ // add JSON utility methods too...
+ , encodeJSON: s.encodeJSON
+ , decodeJSON: s.decodeJSON
+ });
+
+ // init state.stateData key, even if plugin is initially disabled
+ inst.state.stateData = {};
+
+ // autoLoad MUST BE one of: data-array, data-hash, callback-function, or TRUE
+ if ( !sm.autoLoad ) return;
+
+ // When state-data exists in the autoLoad key USE IT,
+ // even if stateManagement.enabled == false
+ if ($.isPlainObject( sm.autoLoad )) {
+ if (!$.isEmptyObject( sm.autoLoad )) {
+ inst.loadState( sm.autoLoad );
+ }
+ }
+ else if ( sm.enabled ) {
+ // update the options from cookie or callback
+ // if options is a function, call it to get stateData
+ if ($.isFunction( sm.autoLoad )) {
+ var d = {};
+ try {
+ d = sm.autoLoad( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
+ } catch (e) {}
+ if (d && $.isPlainObject( d ) && !$.isEmptyObject( d ))
+ inst.loadState(d);
+ }
+ else // any other truthy value will trigger loadCookie
+ inst.loadCookie();
+ }
+ }
+
+, _unload: function (inst) {
+ var sm = inst.options.stateManagement;
+ if (sm.enabled && sm.autoSave) {
+ // if options is a function, call it to save the stateData
+ if ($.isFunction( sm.autoSave )) {
+ try {
+ sm.autoSave( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
+ } catch (e) {}
+ }
+ else // any truthy value will trigger saveCookie
+ inst.saveCookie();
+ }
+ }
+
+};
+
+// add state initialization method to Layout's onCreate array of functions
+$.layout.onCreate.push( $.layout.state._create );
+$.layout.onUnload.push( $.layout.state._unload );
+
+})( jQuery );
+
+
+
+/**
+ * @preserve jquery.layout.buttons 1.0
+ * $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
+ *
+ * Copyright (c) 2011
+ * Kevin Dalman (http://allpro.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * @dependancies: UI Layout 1.3.0.rc30.1 or higher
+ *
+ * @support: http://groups.google.com/group/jquery-ui-layout
+ *
+ * Docs: [ to come ]
+ * Tips: [ to come ]
+ */
+;(function ($) {
+
+if (!$.layout) return;
+
+
+// tell Layout that the state plugin is available
+$.layout.plugins.buttons = true;
+
+// Add State-Management options to layout.defaults
+$.layout.defaults.autoBindCustomButtons = false;
+// Set stateManagement as a layout-option, NOT a pane-option
+$.layout.optionsMap.layout.push("autoBindCustomButtons");
+
+/*
+ * Button methods
+ */
+$.layout.buttons = {
+ // set data used by multiple methods below
+ config: {
+ borderPanes: "north,south,west,east"
+ }
+
+ /**
+ * Searches for .ui-layout-button-xxx elements and auto-binds them as layout-buttons
+ *
+ * @see _create()
+ */
+, init: function (inst) {
+ var pre = "ui-layout-button-"
+ , layout = inst.options.name || ""
+ , name;
+ $.each("toggle,open,close,pin,toggle-slide,open-slide".split(","), function (i, action) {
+ $.each($.layout.buttons.config.borderPanes.split(","), function (ii, pane) {
+ $("."+pre+action+"-"+pane).each(function(){
+ // if button was previously 'bound', data.layoutName was set, but is blank if layout has no 'name'
+ name = $(this).data("layoutName") || $(this).attr("layoutName");
+ if (name == undefined || name === layout)
+ inst.bindButton(this, action, pane);
+ });
+ });
+ });
+ }
+
+ /**
+ * Helper function to validate params received by addButton utilities
+ *
+ * Two classes are added to the element, based on the buttonClass...
+ * The type of button is appended to create the 2nd className:
+ * - ui-layout-button-pin
+ * - ui-layout-pane-button-toggle
+ * - ui-layout-pane-button-open
+ * - ui-layout-pane-button-close
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
+ * @return {Array.} If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise returns null
+ */
+, get: function (inst, selector, pane, action) {
+ var $E = $(selector)
+ , o = inst.options
+ //, err = o.showErrorMessages
+ ;
+ if ($E.length && $.layout.buttons.config.borderPanes.indexOf(pane) >= 0) {
+ var btn = o[pane].buttonClass +"-"+ action;
+ $E .addClass( btn +" "+ btn +"-"+ pane )
+ .data("layoutName", o.name); // add layout identifier - even if blank!
+ }
+ return $E;
+ }
+
+
+ /**
+ * NEW syntax for binding layout-buttons - will eventually replace addToggle, addOpen, etc.
+ *
+ * @param {(string|!Object)} sel jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} action
+ * @param {string} pane
+ */
+, bind: function (inst, sel, action, pane) {
+ var _ = $.layout.buttons;
+ switch (action.toLowerCase()) {
+ case "toggle": _.addToggle (inst, sel, pane); break;
+ case "open": _.addOpen (inst, sel, pane); break;
+ case "close": _.addClose (inst, sel, pane); break;
+ case "pin": _.addPin (inst, sel, pane); break;
+ case "toggle-slide": _.addToggle (inst, sel, pane, true); break;
+ case "open-slide": _.addOpen (inst, sel, pane, true); break;
+ }
+ return inst;
+ }
+
+ /**
+ * Add a custom Toggler button for a pane
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
+ * @param {boolean=} slide true = slide-open, false = pin-open
+ */
+, addToggle: function (inst, selector, pane, slide) {
+ $.layout.buttons.get(inst, selector, pane, "toggle")
+ .click(function(evt){
+ inst.toggle(pane, !!slide);
+ evt.stopPropagation();
+ });
+ return inst;
+ }
+
+ /**
+ * Add a custom Open button for a pane
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
+ * @param {boolean=} slide true = slide-open, false = pin-open
+ */
+, addOpen: function (inst, selector, pane, slide) {
+ $.layout.buttons.get(inst, selector, pane, "open")
+ .attr("title", inst.options[pane].tips.Open)
+ .click(function (evt) {
+ inst.open(pane, !!slide);
+ evt.stopPropagation();
+ });
+ return inst;
+ }
+
+ /**
+ * Add a custom Close button for a pane
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
+ */
+, addClose: function (inst, selector, pane) {
+ $.layout.buttons.get(inst, selector, pane, "close")
+ .attr("title", inst.options[pane].tips.Close)
+ .click(function (evt) {
+ inst.close(pane);
+ evt.stopPropagation();
+ });
+ return inst;
+ }
+
+ /**
+ * Add a custom Pin button for a pane
+ *
+ * Four classes are added to the element, based on the paneClass for the associated pane...
+ * Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin:
+ * - ui-layout-pane-pin
+ * - ui-layout-pane-west-pin
+ * - ui-layout-pane-pin-up
+ * - ui-layout-pane-west-pin-up
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the pin is for: 'north', 'south', etc.
+ */
+, addPin: function (inst, selector, pane) {
+ var $E = $.layout.buttons.get(inst, selector, pane, "pin");
+ if ($E.length) {
+ var s = inst.state[pane];
+ $E.click(function (evt) {
+ $.layout.buttons.setPinState(inst, $(this), pane, (s.isSliding || s.isClosed));
+ if (s.isSliding || s.isClosed) inst.open( pane ); // change from sliding to open
+ else inst.close( pane ); // slide-closed
+ evt.stopPropagation();
+ });
+ // add up/down pin attributes and classes
+ $.layout.buttons.setPinState(inst, $E, pane, (!s.isClosed && !s.isSliding));
+ // add this pin to the pane data so we can 'sync it' automatically
+ // PANE.pins key is an array so we can store multiple pins for each pane
+ s.pins.push( selector ); // just save the selector string
+ }
+ return inst;
+ }
+
+ /**
+ * Change the class of the pin button to make it look 'up' or 'down'
+ *
+ * @see addPin(), syncPins()
+ * @param {Array.} $Pin The pin-span element in a jQuery wrapper
+ * @param {string} pane These are the params returned to callbacks by layout()
+ * @param {boolean} doPin true = set the pin 'down', false = set it 'up'
+ */
+, setPinState: function (inst, $Pin, pane, doPin) {
+ var updown = $Pin.attr("pin");
+ if (updown && doPin === (updown=="down")) return; // already in correct state
+ var
+ po = inst.options[pane]
+ , lang = po.tips
+ , pin = po.buttonClass +"-pin"
+ , side = pin +"-"+ pane
+ , UP = pin +"-up "+ side +"-up"
+ , DN = pin +"-down "+side +"-down"
+ ;
+ $Pin
+ .attr("pin", doPin ? "down" : "up") // logic
+ .attr("title", doPin ? lang.Unpin : lang.Pin)
+ .removeClass( doPin ? UP : DN )
+ .addClass( doPin ? DN : UP )
+ ;
+ }
+
+ /**
+ * INTERNAL function to sync 'pin buttons' when pane is opened or closed
+ * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
+ *
+ * @see open(), close()
+ * @param {string} pane These are the params returned to callbacks by layout()
+ * @param {boolean} doPin True means set the pin 'down', False means 'up'
+ */
+, syncPinBtns: function (inst, pane, doPin) {
+ // REAL METHOD IS _INSIDE_ LAYOUT - THIS IS HERE JUST FOR REFERENCE
+ $.each(state[pane].pins, function (i, selector) {
+ $.layout.buttons.setPinState(inst, $(selector), pane, doPin);
+ });
+ }
+
+
+, _load: function (inst) {
+ // ADD Button methods to Layout Instance
+ $.extend( inst, {
+ bindButton: function (selector, action, pane) { return $.layout.buttons.bind(inst, selector, action, pane); }
+ // DEPRECATED METHODS...
+ , addToggleBtn: function (selector, pane, slide) { return $.layout.buttons.addToggle(inst, selector, pane, slide); }
+ , addOpenBtn: function (selector, pane, slide) { return $.layout.buttons.addOpen(inst, selector, pane, slide); }
+ , addCloseBtn: function (selector, pane) { return $.layout.buttons.addClose(inst, selector, pane); }
+ , addPinBtn: function (selector, pane) { return $.layout.buttons.addPin(inst, selector, pane); }
+ });
+
+ // init state array to hold pin-buttons
+ for (var i=0; i<4; i++) {
+ var pane = $.layout.buttons.config.borderPanes[i];
+ inst.state[pane].pins = [];
+ }
+
+ // auto-init buttons onLoad if option is enabled
+ if ( inst.options.autoBindCustomButtons )
+ $.layout.buttons.init(inst);
+ }
+
+, _unload: function (inst) {
+ // TODO: unbind all buttons???
+ }
+
+};
+
+// add initialization method to Layout's onLoad array of functions
+$.layout.onLoad.push( $.layout.buttons._load );
+//$.layout.onUnload.push( $.layout.buttons._unload );
+
+})( jQuery );
+
+
+
+
+/**
+ * jquery.layout.browserZoom 1.0
+ * $Date: 2011-12-29 08:00:00 (Thu, 29 Dec 2011) $
+ *
+ * Copyright (c) 2012
+ * Kevin Dalman (http://allpro.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * @requires: UI Layout 1.3.0.rc30.1 or higher
+ *
+ * @see: http://groups.google.com/group/jquery-ui-layout
+ *
+ * TODO: Extend logic to handle other problematic zooming in browsers
+ * TODO: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event
+ */
+(function ($) {
+
+// tell Layout that the plugin is available
+$.layout.plugins.browserZoom = true;
+
+$.layout.defaults.browserZoomCheckInterval = 1000;
+$.layout.optionsMap.layout.push("browserZoomCheckInterval");
+
+/*
+ * browserZoom methods
+ */
+$.layout.browserZoom = {
+
+ _init: function (inst) {
+ // abort if browser does not need this check
+ if ($.layout.browserZoom.ratio() !== false)
+ $.layout.browserZoom._setTimer(inst);
+ }
+
+, _setTimer: function (inst) {
+ // abort if layout destroyed or browser does not need this check
+ if (inst.destroyed) return;
+ var o = inst.options
+ , s = inst.state
+ // don't need check if inst has parentLayout, but check occassionally in case parent destroyed!
+ // MINIMUM 100ms interval, for performance
+ , ms = inst.hasParentLayout ? 5000 : Math.max( o.browserZoomCheckInterval, 100 )
+ ;
+ // set the timer
+ setTimeout(function(){
+ if (inst.destroyed || !o.resizeWithWindow) return;
+ var d = $.layout.browserZoom.ratio();
+ if (d !== s.browserZoom) {
+ s.browserZoom = d;
+ inst.resizeAll();
+ }
+ // set a NEW timeout
+ $.layout.browserZoom._setTimer(inst);
+ }
+ , ms );
+ }
+
+, ratio: function () {
+ var w = window
+ , s = screen
+ , d = document
+ , dE = d.documentElement || d.body
+ , b = $.layout.browser
+ , v = b.version
+ , r, sW, cW
+ ;
+ // we can ignore all browsers that fire window.resize event onZoom
+ if (!b.msie || v > 8)
+ return false; // don't need to track zoom
+ if (s.deviceXDPI && s.systemXDPI) // syntax compiler hack
+ return calc(s.deviceXDPI, s.systemXDPI);
+ // everything below is just for future reference!
+ if (b.webkit && (r = d.body.getBoundingClientRect))
+ return calc((r.left - r.right), d.body.offsetWidth);
+ if (b.webkit && (sW = w.outerWidth))
+ return calc(sW, w.innerWidth);
+ if ((sW = s.width) && (cW = dE.clientWidth))
+ return calc(sW, cW);
+ return false; // no match, so cannot - or don't need to - track zoom
+
+ function calc (x,y) { return (parseInt(x,10) / parseInt(y,10) * 100).toFixed(); }
+ }
+
+};
+// add initialization method to Layout's onLoad array of functions
+$.layout.onReady.push( $.layout.browserZoom._init );
+
+
+})( jQuery );
+
+
+
+
+/**
+ * UI Layout Plugin: Slide-Offscreen Animation
+ *
+ * Prevent panes from being 'hidden' so that an iframes/objects
+ * does not reload/refresh when pane 'opens' again.
+ * This plug-in adds a new animation called "slideOffscreen".
+ * It is identical to the normal "slide" effect, but avoids hiding the element
+ *
+ * Requires Layout 1.3.0.RC30.1 or later for Close offscreen
+ * Requires Layout 1.3.0.RC30.5 or later for Hide, initClosed & initHidden offscreen
+ *
+ * Version: 1.1 - 2012-11-18
+ * Author: Kevin Dalman (kevin@jquery-dev.com)
+ * @preserve jquery.layout.slideOffscreen-1.1.js
+ */
+;(function ($) {
+
+// Add a new "slideOffscreen" effect
+if ($.effects) {
+
+ // add an option so initClosed and initHidden will work
+ $.layout.defaults.panes.useOffscreenClose = false; // user must enable when needed
+ /* set the new animation as the default for all panes
+ $.layout.defaults.panes.fxName = "slideOffscreen";
+ */
+
+ if ($.layout.plugins)
+ $.layout.plugins.effects.slideOffscreen = true;
+
+ // dupe 'slide' effect defaults as new effect defaults
+ $.layout.effects.slideOffscreen = $.extend(true, {}, $.layout.effects.slide);
+
+ // add new effect to jQuery UI
+ $.effects.slideOffscreen = function(o) {
+ return this.queue(function(){
+
+ var fx = $.effects
+ , opt = o.options
+ , $el = $(this)
+ , pane = $el.data('layoutEdge')
+ , state = $el.data('parentLayout').state
+ , dist = state[pane].size
+ , s = this.style
+ , props = ['top','bottom','left','right']
+ // Set options
+ , mode = fx.setMode($el, opt.mode || 'show') // Set Mode
+ , show = (mode == 'show')
+ , dir = opt.direction || 'left' // Default Direction
+ , ref = (dir == 'up' || dir == 'down') ? 'top' : 'left'
+ , pos = (dir == 'up' || dir == 'left')
+ , offscrn = $.layout.config.offscreenCSS || {}
+ , keyLR = $.layout.config.offscreenReset
+ , keyTB = 'offscreenResetTop' // only used internally
+ , animation = {}
+ ;
+ // Animation settings
+ animation[ref] = (show ? (pos ? '+=' : '-=') : (pos ? '-=' : '+=')) + dist;
+
+ if (show) { // show() animation, so save top/bottom but retain left/right set when 'hidden'
+ $el.data(keyTB, { top: s.top, bottom: s.bottom });
+
+ // set the top or left offset in preparation for animation
+ // Note: ALL animations work by shifting the top or left edges
+ if (pos) { // top (north) or left (west)
+ $el.css(ref, isNaN(dist) ? "-" + dist : -dist); // Shift outside the left/top edge
+ }
+ else { // bottom (south) or right (east) - shift all the way across container
+ if (dir === 'right')
+ $el.css({ left: state.container.layoutWidth, right: 'auto' });
+ else // dir === bottom
+ $el.css({ top: state.container.layoutHeight, bottom: 'auto' });
+ }
+ // restore the left/right setting if is a top/bottom animation
+ if (ref === 'top')
+ $el.css( $el.data( keyLR ) || {} );
+ }
+ else { // hide() animation, so save ALL CSS
+ $el.data(keyTB, { top: s.top, bottom: s.bottom });
+ $el.data(keyLR, { left: s.left, right: s.right });
+ }
+
+ // Animate
+ $el.show().animate(animation, { queue: false, duration: o.duration, easing: opt.easing, complete: function(){
+ // Restore top/bottom
+ if ($el.data( keyTB ))
+ $el.css($el.data( keyTB )).removeData( keyTB );
+ if (show) // Restore left/right too
+ $el.css($el.data( keyLR ) || {}).removeData( keyLR );
+ else // Move the pane off-screen (left: -99999, right: 'auto')
+ $el.css( offscrn );
+
+ if (o.callback) o.callback.apply(this, arguments); // Callback
+ $el.dequeue();
+ }});
+
+ });
+ };
+
+}
+
+})( jQuery );
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/default/zTreeStyle.css b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/default/zTreeStyle.css
index 8a9115aa7..17078a37b 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/default/zTreeStyle.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/default/zTreeStyle.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*-------------------------------------
zTree Style
@@ -100,3 +101,107 @@ ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height
padding:0;
background:none;
}*/
+=======
+/*-------------------------------------
+zTree Style
+
+version: 3.4
+author: Hunter.z
+email: hunter.z@263.net
+website: http://code.google.com/p/jquerytree/
+
+-------------------------------------*/
+
+.ztree * {padding:0; margin:0; font-size:12px;}
+.ztree {margin:0; padding:2px; color:#333}
+.ztree li{padding:0; margin:0; list-style:none; line-height:18px; text-align:left; white-space:nowrap; outline:0}
+.ztree li ul{ margin:0; padding:0 0 0 18px}
+.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
+
+.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; /* height:17px; */ color:#333; background-color: transparent;
+ text-decoration:none; vertical-align:top; display: inline-block}
+.ztree li a:hover {text-decoration:underline}
+/*.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}*/
+.ztree li a.curSelectedNode {padding-top:0px; background-color:#F6F6F6; color:#0663A2; border:1px #DDDDDD solid; opacity:0.8;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+/*.ztree li a.curSelectedNode {padding-top:0px; color:#0663a2; font-weight:bold; height:16px; opacity:0.8;}*/
+.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
+.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid;
+ opacity:0.8; filter:alpha(opacity=80)}
+.ztree li a.tmpTargetNode_prev {}
+.ztree li a.tmpTargetNode_next {}
+.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
+ font-size:12px; border:1px #7EC4CC solid; *border:0px}
+.ztree li span {line-height:16px; margin-right:2px}
+.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;
+ border:0 none; cursor: pointer;outline:none;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
+
+/* IE7 fix */
+.ztree li span.button.level0 {*margin-left:-15px;}
+
+.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto}
+.ztree li span.button.chk.checkbox_false_full {background-position:0 0}
+.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px}
+.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px}
+.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px}
+.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px}
+.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0}
+.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px}
+.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px}
+.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px}
+.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px}
+.ztree li span.button.chk.radio_false_full {background-position:-28px 0}
+.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px}
+.ztree li span.button.chk.radio_false_part {background-position:-28px -28px}
+.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px}
+.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px}
+.ztree li span.button.chk.radio_true_full {background-position:-42px 0}
+.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px}
+.ztree li span.button.chk.radio_true_part {background-position:-42px -28px}
+.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px}
+.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px}
+
+.ztree li span.button.switch {width:18px; height:18px}
+.ztree li span.button.root_open{background-position:-92px -54px}
+.ztree li span.button.root_close{background-position:-74px -54px}
+.ztree li span.button.roots_open{background-position:-92px 0}
+.ztree li span.button.roots_close{background-position:-74px 0}
+.ztree li span.button.center_open{background-position:-92px -18px}
+.ztree li span.button.center_close{background-position:-74px -18px}
+.ztree li span.button.bottom_open{background-position:-92px -36px}
+.ztree li span.button.bottom_close{background-position:-74px -36px}
+.ztree li span.button.noline_open{background-position:-92px -72px}
+.ztree li span.button.noline_close{background-position:-74px -72px}
+.ztree li span.button.root_docu{ background:none;}
+.ztree li span.button.roots_docu{background-position:-56px 0}
+.ztree li span.button.center_docu{background-position:-56px -18px}
+.ztree li span.button.bottom_docu{background-position:-56px -36px}
+.ztree li span.button.noline_docu{ background:none;}
+
+.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; /* vertical-align:top; * */vertical-align:middle}
+.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle}
+
+.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
+
+ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
+
+span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
+
+ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
+.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
+
+/* level style*/
+/*.ztree li span.button.level0 {
+ display:none;
+}
+.ztree li ul.level0 {
+ padding:0;
+ background:none;
+}*/
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css
index bddc10240..147789bb5 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*-------------------------------------
zTree Style
@@ -105,3 +106,112 @@ ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height
.treeExpandCollapse {float:right;margin:6px 5px;padding:5px;font-size:12px;color:#333;position:relative;z-index:2;background:#fff;}
.treeExpandCollapse a {text-decoration:none;color:#333}
.treeselect.ztree {padding:10px 20px;}
+=======
+/*-------------------------------------
+zTree Style
+
+version: 3.4
+author: Hunter.z
+email: hunter.z@263.net
+website: http://code.google.com/p/jquerytree/
+
+-------------------------------------*/
+
+.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
+.ztree {margin:0; padding:5px; color:#333}
+.ztree li{padding:0; margin:0; list-style:none; line-height:21px; text-align:left; white-space:nowrap; outline:0}
+.ztree li ul{ margin:0; padding:0 0 0 18px}
+.ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;}
+
+.ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; display: inline-block}
+.ztree li a:hover {text-decoration:underline}
+.ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:22px; -webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:22px; border:1px #666 solid; -webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid;
+ opacity:0.8; filter:alpha(opacity=80)}
+.ztree li a.tmpTargetNode_prev {}
+.ztree li a.tmpTargetNode_next {}
+.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
+ font-size:12px; border:1px #7EC4CC solid; *border:0px}
+.ztree li span {line-height:21px; margin-right:2px}
+.ztree li span.button {line-height:0; margin:0; width:21px; height:21px; display: inline-block; vertical-align:middle;
+ border:0 none; cursor: pointer;outline:none;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
+
+.ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto}
+.ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;}
+.ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;}
+.ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;}
+.ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;}
+.ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;}
+.ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;}
+.ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;}
+.ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;}
+.ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;}
+.ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;}
+.ztree li span.button.chk.radio_false_full {background-position: -47px -5px;}
+.ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;}
+.ztree li span.button.chk.radio_false_part {background-position: -47px -47px;}
+.ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;}
+.ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;}
+.ztree li span.button.chk.radio_true_full {background-position: -68px -5px;}
+.ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;}
+.ztree li span.button.chk.radio_true_part {background-position: -68px -47px;}
+.ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;}
+.ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;}
+
+.ztree li span.button.switch {width:21px; height:21px}
+.ztree li span.button.root_open{background-position:-105px -85px}
+.ztree li span.button.root_close{background-position:-126px -85px}
+.ztree li span.button.roots_open{background-position: -105px 0;}
+.ztree li span.button.roots_close{background-position: -126px 0;}
+.ztree li span.button.center_open{background-position: -105px -21px;}
+.ztree li span.button.center_close{background-position: -126px -21px;}
+.ztree li span.button.bottom_open{background-position: -105px -42px;}
+.ztree li span.button.bottom_close{background-position: -126px -42px;}
+.ztree li span.button.noline_open{background-position: -126px -84px;}
+.ztree li span.button.noline_close{background-position: -105px -84px;}
+.ztree li span.button.root_docu{ background:none;}
+.ztree li span.button.roots_docu{background-position: -84px 0;}
+.ztree li span.button.center_docu{background-position: -84px -21px;}
+.ztree li span.button.bottom_docu{background-position: -84px -42px;}
+.ztree li span.button.noline_docu{ background:none;}
+
+.ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.edit:hover {
+ background-position: -168px -21px;
+}
+.ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.remove:hover {
+ background-position: -168px -42px;
+}
+.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.add:hover {
+ background-position: -168px 0;
+}
+.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
+
+ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
+
+span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
+
+ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
+.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
+
+/* 树搜索相关 */
+.treeSearchInput {padding:13px 0 0 20px;}
+.treeSearchInput label {padding:5px 0 3px 0;font-size:13px;font-weight:normal;vertical-align:middle;}
+.treeSearchInput input {width:145px;vertical-align:middle;line-height:24px;height:26px;border:1px solid #bbb;padding:0 4px;}
+.treeSearchInput button {border:1px solid #bbb;vertical-align:middle;height:26px;height:26px\9;font-size:13px;background:#efefef;padding:0 8px;}
+.treeShowHideButton {position:absolute;right:8px;top:2px;font-size:12px;color:#333;z-index:3;}
+.treeShowHideButton label {cursor:pointer;}
+.treeExpandCollapse {float:right;margin:6px 5px;padding:5px;font-size:12px;color:#333;position:relative;z-index:2;background:#fff;}
+.treeExpandCollapse a {text-decoration:none;color:#333}
+.treeselect.ztree {padding:10px 20px;}
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/simple/zTreeStyle.css b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/simple/zTreeStyle.css
index 5bdcd76f0..632358397 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/simple/zTreeStyle.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/css/simple/zTreeStyle.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*-------------------------------------
zTree Style
@@ -116,3 +117,123 @@ ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height
.ztree li span.button.noline_close {background-position: -18px 0;}
.ztree li span.button.noline_open.level0 {background-position: 0 -17px;}
.ztree li span.button.noline_close.level0 {background-position: -18px -17px;}
+=======
+/*-------------------------------------
+zTree Style
+
+version: 3.4
+author: Hunter.z
+email: hunter.z@263.net
+website: http://code.google.com/p/jquerytree/
+
+-------------------------------------*/
+
+.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
+.ztree {margin:0; padding:5px; color:#333}
+.ztree li{padding:0; margin:0; list-style:none; line-height:21px; text-align:left; white-space:nowrap; outline:0}
+.ztree li ul{ margin:0; padding:0 0 0 18px}
+.ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;}
+
+.ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; display: inline-block}
+.ztree li a:hover {text-decoration:underline}
+.ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; opacity:0.8;}
+.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; border:1px #666 solid; opacity:0.8;}
+.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid;
+ opacity:0.8; filter:alpha(opacity=80)}
+.ztree li a.tmpTargetNode_prev {}
+.ztree li a.tmpTargetNode_next {}
+.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
+ font-size:12px; border:1px #7EC4CC solid; *border:0px}
+.ztree li span {line-height:21px; margin-right:2px}
+.ztree li span.button {line-height:0; margin:0; width:21px; height:21px; display: inline-block; vertical-align:middle;
+ border:0 none; cursor: pointer;outline:none;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
+
+.ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto}
+.ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;}
+.ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;}
+.ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;}
+.ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;}
+.ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;}
+.ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;}
+.ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;}
+.ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;}
+.ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;}
+.ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;}
+.ztree li span.button.chk.radio_false_full {background-position: -47px -5px;}
+.ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;}
+.ztree li span.button.chk.radio_false_part {background-position: -47px -47px;}
+.ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;}
+.ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;}
+.ztree li span.button.chk.radio_true_full {background-position: -68px -5px;}
+.ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;}
+.ztree li span.button.chk.radio_true_part {background-position: -68px -47px;}
+.ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;}
+.ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;}
+
+.ztree li span.button.switch {width:21px; height:21px}
+.ztree li span.button.root_open{background-position:-92px -54px}
+.ztree li span.button.root_close{background-position:-74px -54px}
+.ztree li span.button.roots_open{background-position: -105px 0;}
+.ztree li span.button.roots_close{background-position: -126px 0;}
+.ztree li span.button.center_open{background-position: -105px -21px;}
+.ztree li span.button.center_close{background-position: -126px -21px;}
+.ztree li span.button.bottom_open{background-position: -105px -42px;}
+.ztree li span.button.bottom_close{background-position: -126px -42px;}
+.ztree li span.button.noline_open{background-position: -126px -84px;}
+.ztree li span.button.noline_close{background-position: -105px -84px;}
+.ztree li span.button.root_docu{ background:none;}
+.ztree li span.button.roots_docu{background-position: -84px 0;}
+.ztree li span.button.center_docu{background-position: -84px -21px;}
+.ztree li span.button.bottom_docu{background-position: -84px -42px;}
+.ztree li span.button.noline_docu{ background:none;}
+
+.ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.edit:hover {
+ background-position: -168px -21px;
+}
+.ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.remove:hover {
+ background-position: -168px -42px;
+}
+.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle}
+.ztree li span.button.add:hover {
+ background-position: -168px 0;
+}
+.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
+
+ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
+
+span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
+ background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+ background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
+
+ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
+.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
+
+/* simple */
+
+.ztree * {font-size:14px;font-family:"Microsoft Yahei",Verdana,Simsun,"Segoe UI Web Light","Segoe UI Light","Segoe UI Web Regular","Segoe UI","Segoe UI Symbol","Helvetica Neue",Arial;}
+.ztree li ul{ margin:0; padding:0}
+.ztree li {line-height:28px;}
+.ztree li a {width:100%;height:28px;padding-top: 0px;}
+.ztree li a:hover {text-decoration:none; background-color: #E7E7E7;}
+.ztree11 li a span.button.switch {visibility:hidden}
+.ztree11.showIcon li a span.button.switch {visibility:visible}
+.ztree li a.curSelectedNode {background-color:#D4D4D4;border:0;height:28px;}
+.ztree li span {line-height:26px;margin-right:0px;}
+.ztree li span.button {margin-top: -7px;}
+.ztree li span.button.switch {width:16px;height: 16px;}
+.ztree li a.level0 span {font-size:15px;font-weight:bold;}
+.ztree li span.button {background-image:url("img/left_menu.png"); *background-image:url("./left_menu.gif")}
+.ztree li span.button.switch.level0 {width: 20px; height:20px}
+.ztree li span.button.switch.level1 {width: 20px; height:20px}
+.ztree li span.button.noline_open {background-position: 0 0;}
+.ztree li span.button.noline_close {background-position: -18px 0;}
+.ztree li span.button.noline_open.level0 {background-position: 0 -17px;}
+.ztree li span.button.noline_close.level0 {background-position: -18px -17px;}
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js
index d71caf869..3d9c1310e 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*
* JQuery zTree core 3.5.12
@@ -3817,4 +3818,3825 @@
_repairParentChkClassWithSelf.apply(view, arguments);
}
}
+=======
+
+/*
+ * JQuery zTree core 3.5.12
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2013-03-11
+ */
+(function($){
+ var settings = {}, roots = {}, caches = {},
+ //default consts of core
+ _consts = {
+ className: {
+ BUTTON: "button",
+ LEVEL: "level",
+ ICO_LOADING: "ico_loading",
+ SWITCH: "switch"
+ },
+ event: {
+ NODECREATED: "ztree_nodeCreated",
+ CLICK: "ztree_click",
+ EXPAND: "ztree_expand",
+ COLLAPSE: "ztree_collapse",
+ ASYNC_SUCCESS: "ztree_async_success",
+ ASYNC_ERROR: "ztree_async_error"
+ },
+ id: {
+ A: "_a",
+ ICON: "_ico",
+ SPAN: "_span",
+ SWITCH: "_switch",
+ UL: "_ul"
+ },
+ line: {
+ ROOT: "root",
+ ROOTS: "roots",
+ CENTER: "center",
+ BOTTOM: "bottom",
+ NOLINE: "noline",
+ LINE: "line"
+ },
+ folder: {
+ OPEN: "open",
+ CLOSE: "close",
+ DOCU: "docu"
+ },
+ node: {
+ CURSELECTED: "curSelectedNode"
+ }
+ },
+ //default setting of core
+ _setting = {
+ treeId: "",
+ treeObj: null,
+ view: {
+ addDiyDom: null,
+ autoCancelSelected: true,
+ dblClickExpand: true,
+ expandSpeed: "fast",
+ fontCss: {},
+ nameIsHTML: false,
+ selectedMulti: true,
+ showIcon: true,
+ showLine: true,
+ showTitle: true
+ },
+ data: {
+ key: {
+ children: "children",
+ name: "name",
+ title: "",
+ url: "url"
+ },
+ simpleData: {
+ enable: false,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: null
+ },
+ keep: {
+ parent: false,
+ leaf: false
+ }
+ },
+ async: {
+ enable: false,
+ contentType: "application/x-www-form-urlencoded",
+ type: "post",
+ dataType: "text",
+ url: "",
+ autoParam: [],
+ otherParam: [],
+ dataFilter: null
+ },
+ callback: {
+ beforeAsync:null,
+ beforeClick:null,
+ beforeDblClick:null,
+ beforeRightClick:null,
+ beforeMouseDown:null,
+ beforeMouseUp:null,
+ beforeExpand:null,
+ beforeCollapse:null,
+ beforeRemove:null,
+
+ onAsyncError:null,
+ onAsyncSuccess:null,
+ onNodeCreated:null,
+ onClick:null,
+ onDblClick:null,
+ onRightClick:null,
+ onMouseDown:null,
+ onMouseUp:null,
+ onExpand:null,
+ onCollapse:null,
+ onRemove:null
+ }
+ },
+ //default root of core
+ //zTree use root to save full data
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ if (!r) {
+ r = {};
+ data.setRoot(setting, r);
+ }
+ r[setting.data.key.children] = [];
+ r.expandTriggerFlag = false;
+ r.curSelectedList = [];
+ r.noSelection = true;
+ r.createdNodes = [];
+ r.zId = 0;
+ r._ver = (new Date()).getTime();
+ },
+ //default cache of core
+ _initCache = function(setting) {
+ var c = data.getCache(setting);
+ if (!c) {
+ c = {};
+ data.setCache(setting, c);
+ }
+ c.nodes = [];
+ c.doms = [];
+ },
+ //default bindEvent of core
+ _bindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.bind(c.NODECREATED, function (event, treeId, node) {
+ tools.apply(setting.callback.onNodeCreated, [event, treeId, node]);
+ });
+
+ o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {
+ tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);
+ });
+
+ o.bind(c.EXPAND, function (event, treeId, node) {
+ tools.apply(setting.callback.onExpand, [event, treeId, node]);
+ });
+
+ o.bind(c.COLLAPSE, function (event, treeId, node) {
+ tools.apply(setting.callback.onCollapse, [event, treeId, node]);
+ });
+
+ o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {
+ tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);
+ });
+
+ o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
+ tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.unbind(c.NODECREATED)
+ .unbind(c.CLICK)
+ .unbind(c.EXPAND)
+ .unbind(c.COLLAPSE)
+ .unbind(c.ASYNC_SUCCESS)
+ .unbind(c.ASYNC_ERROR);
+ },
+ //default event proxy of core
+ _eventProxy = function(event) {
+ var target = event.target,
+ setting = data.getSetting(event.data.treeId),
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null,
+ tmp = null;
+
+ if (tools.eqs(event.type, "mousedown")) {
+ treeEventType = "mousedown";
+ } else if (tools.eqs(event.type, "mouseup")) {
+ treeEventType = "mouseup";
+ } else if (tools.eqs(event.type, "contextmenu")) {
+ treeEventType = "contextmenu";
+ } else if (tools.eqs(event.type, "click")) {
+ if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) {
+ tId = ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0)).id;
+ nodeEventType = "switchNode";
+ } else {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = ($(tmp).parent("li").get(0) || $(tmp).parentsUntil("li").parent().get(0)).id;
+ nodeEventType = "clickNode";
+ }
+ }
+ } else if (tools.eqs(event.type, "dblclick")) {
+ treeEventType = "dblclick";
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = ($(tmp).parent("li").get(0) || $(tmp).parentsUntil("li").parent().get(0)).id;
+ nodeEventType = "switchNode";
+ }
+ }
+ if (treeEventType.length > 0 && tId.length == 0) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {tId = ($(tmp).parent("li").get(0) || $(tmp).parentsUntil("li").parent().get(0)).id;}
+ }
+ // event to node
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "switchNode" :
+ if (!node.isParent) {
+ nodeEventType = "";
+ } else if (tools.eqs(event.type, "click")
+ || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {
+ nodeEventCallback = handler.onSwitchNode;
+ } else {
+ nodeEventType = "";
+ }
+ break;
+ case "clickNode" :
+ nodeEventCallback = handler.onClickNode;
+ break;
+ }
+ }
+ // event to zTree
+ switch (treeEventType) {
+ case "mousedown" :
+ treeEventCallback = handler.onZTreeMousedown;
+ break;
+ case "mouseup" :
+ treeEventCallback = handler.onZTreeMouseup;
+ break;
+ case "dblclick" :
+ treeEventCallback = handler.onZTreeDblclick;
+ break;
+ case "contextmenu" :
+ treeEventCallback = handler.onZTreeContextmenu;
+ break;
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of core
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ var r = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ n.level = level;
+ n.tId = setting.treeId + "_" + (++r.zId);
+ n.parentTId = parentNode ? parentNode.tId : null;
+ if (n[childKey] && n[childKey].length > 0) {
+ if (typeof n.open == "string") n.open = tools.eqs(n.open, "true");
+ n.open = !!n.open;
+ n.isParent = true;
+ n.zAsync = true;
+ } else {
+ n.open = false;
+ if (typeof n.isParent == "string") n.isParent = tools.eqs(n.isParent, "true");
+ n.isParent = !!n.isParent;
+ n.zAsync = !n.isParent;
+ }
+ n.isFirstNode = isFirstNode;
+ n.isLastNode = isLastNode;
+ n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};
+ n.getPreNode = function() {return data.getPreNode(setting, n);};
+ n.getNextNode = function() {return data.getNextNode(setting, n);};
+ n.isAjaxing = false;
+ data.fixPIdKeyValue(setting, n);
+ },
+ _init = {
+ bind: [_bindEvent],
+ unbind: [_unbindEvent],
+ caches: [_initCache],
+ nodes: [_initNode],
+ proxys: [_eventProxy],
+ roots: [_initRoot],
+ beforeA: [],
+ afterA: [],
+ innerBeforeA: [],
+ innerAfterA: [],
+ zTreeTools: []
+ },
+ //method of operate data
+ data = {
+ addNodeCache: function(setting, node) {
+ data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node;
+ },
+ getNodeCacheId: function(tId) {
+ return tId.substring(tId.lastIndexOf("_")+1);
+ },
+ addAfterA: function(afterA) {
+ _init.afterA.push(afterA);
+ },
+ addBeforeA: function(beforeA) {
+ _init.beforeA.push(beforeA);
+ },
+ addInnerAfterA: function(innerAfterA) {
+ _init.innerAfterA.push(innerAfterA);
+ },
+ addInnerBeforeA: function(innerBeforeA) {
+ _init.innerBeforeA.push(innerBeforeA);
+ },
+ addInitBind: function(bindEvent) {
+ _init.bind.push(bindEvent);
+ },
+ addInitUnBind: function(unbindEvent) {
+ _init.unbind.push(unbindEvent);
+ },
+ addInitCache: function(initCache) {
+ _init.caches.push(initCache);
+ },
+ addInitNode: function(initNode) {
+ _init.nodes.push(initNode);
+ },
+ addInitProxy: function(initProxy) {
+ _init.proxys.push(initProxy);
+ },
+ addInitRoot: function(initRoot) {
+ _init.roots.push(initRoot);
+ },
+ addNodesData: function(setting, parentNode, nodes) {
+ var childKey = setting.data.key.children;
+ if (!parentNode[childKey]) parentNode[childKey] = [];
+ if (parentNode[childKey].length > 0) {
+ parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;
+ view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);
+ }
+ parentNode.isParent = true;
+ parentNode[childKey] = parentNode[childKey].concat(nodes);
+ },
+ addSelectedNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ if (!data.isSelectedNode(setting, node)) {
+ root.curSelectedList.push(node);
+ }
+ },
+ addCreatedNode: function(setting, node) {
+ if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+ var root = data.getRoot(setting);
+ root.createdNodes.push(node);
+ }
+ },
+ addZTreeTools: function(zTreeTools) {
+ _init.zTreeTools.push(zTreeTools);
+ },
+ exSetting: function(s) {
+ $.extend(true, _setting, s);
+ },
+ fixPIdKeyValue: function(setting, node) {
+ if (setting.data.simpleData.enable) {
+ node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;
+ }
+ },
+ getAfterA: function(setting, node, array) {
+ for (var i=0, j=_init.afterA.length; i-1) {
+ result.push(nodes[i]);
+ }
+ result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));
+ }
+ return result;
+ },
+ getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) {
+ if (!nodes) return (isSingle ? null : []);
+ var childKey = setting.data.key.children,
+ result = isSingle ? null : [];
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (tools.apply(filter, [nodes[i], invokeParam], false)) {
+ if (isSingle) {return nodes[i];}
+ result.push(nodes[i]);
+ }
+ var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam);
+ if (isSingle && !!tmpResult) {return tmpResult;}
+ result = isSingle ? tmpResult : result.concat(tmpResult);
+ }
+ return result;
+ },
+ getPreNode: function(setting, node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
+ for (var i=0, l=p[childKey].length; i 0)));
+ },
+ clone: function (obj){
+ if (obj === null) return null;
+ var o = obj.constructor === Array ? [] : {};
+ for(var i in obj){
+ o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]);
+ }
+ return o;
+ },
+ eqs: function(str1, str2) {
+ return str1.toLowerCase() === str2.toLowerCase();
+ },
+ isArray: function(arr) {
+ return Object.prototype.toString.apply(arr) === "[object Array]";
+ },
+ getMDom: function (setting, curDom, targetExpr) {
+ if (!curDom) return null;
+ while (curDom && curDom.id !== setting.treeId) {
+ for (var i=0, l=targetExpr.length; curDom.tagName && i 0) {
+ //make child html first, because checkType
+ childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);
+ }
+ if (openFlag) {
+
+ view.makeDOMNodeMainBefore(html, setting, node);
+ view.makeDOMNodeLine(html, setting, node);
+ data.getBeforeA(setting, node, html);
+ view.makeDOMNodeNameBefore(html, setting, node);
+ data.getInnerBeforeA(setting, node, html);
+ view.makeDOMNodeIcon(html, setting, node);
+ data.getInnerAfterA(setting, node, html);
+ view.makeDOMNodeNameAfter(html, setting, node);
+ data.getAfterA(setting, node, html);
+ if (node.isParent && node.open) {
+ view.makeUlHtml(setting, node, html, childHtml.join(''));
+ }
+ view.makeDOMNodeMainAfter(html, setting, node);
+ data.addCreatedNode(setting, node);
+ }
+ }
+ return html;
+ },
+ appendParentULDom: function(setting, node) {
+ var html = [],
+ nObj = $("#" + node.tId),
+ ulObj = $("#" + node.tId + consts.id.UL),
+ childKey = setting.data.key.children,
+ childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);
+ view.makeUlHtml(setting, node, html, childHtml.join(''));
+ if (!nObj.get(0) && !!node.parentTId) {
+ view.appendParentULDom(setting, node.getParentNode());
+ nObj = $("#" + node.tId);
+ }
+ if (ulObj.get(0)) {
+ ulObj.remove();
+ }
+ nObj.append(html.join(''));
+ },
+ asyncNode: function(setting, node, isSilent, callback) {
+ var i, l;
+ if (node && !node.isParent) {
+ tools.apply(callback);
+ return false;
+ } else if (node && node.isAjaxing) {
+ return false;
+ } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {
+ tools.apply(callback);
+ return false;
+ }
+ if (node) {
+ node.isAjaxing = true;
+ var icoObj = $("#" + node.tId + consts.id.ICON);
+ icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING});
+ }
+
+ var tmpParam = {};
+ for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {
+ var pKey = setting.async.autoParam[i].split("="), spKey = pKey;
+ if (pKey.length>1) {
+ spKey = pKey[1];
+ pKey = pKey[0];
+ }
+ tmpParam[spKey] = node[pKey];
+ }
+ if (tools.isArray(setting.async.otherParam)) {
+ for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {
+ tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1];
+ }
+ } else {
+ for (var p in setting.async.otherParam) {
+ tmpParam[p] = setting.async.otherParam[p];
+ }
+ }
+
+ var _tmpV = data.getRoot(setting)._ver;
+ $.ajax({
+ contentType: setting.async.contentType,
+ type: setting.async.type,
+ url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),
+ data: tmpParam,
+ dataType: setting.async.dataType,
+ success: function(msg) {
+ if (_tmpV != data.getRoot(setting)._ver) {
+ return;
+ }
+ var newNodes = [];
+ try {
+ if (!msg || msg.length == 0) {
+ newNodes = [];
+ } else if (typeof msg == "string") {
+ newNodes = eval("(" + msg + ")");
+ } else {
+ newNodes = msg;
+ }
+ } catch(err) {
+ newNodes = msg;
+ }
+
+ if (node) {
+ node.isAjaxing = null;
+ node.zAsync = true;
+ }
+ view.setNodeLineIcos(setting, node);
+ if (newNodes && newNodes !== "") {
+ newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);
+ view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);
+ } else {
+ view.addNodes(setting, node, [], !!isSilent);
+ }
+ setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);
+ tools.apply(callback);
+ },
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
+ if (_tmpV != data.getRoot(setting)._ver) {
+ return;
+ }
+ if (node) node.isAjaxing = null;
+ view.setNodeLineIcos(setting, node);
+ setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+ }
+ });
+ return true;
+ },
+ cancelPreSelectedNode: function (setting, node) {
+ var list = data.getRoot(setting).curSelectedList;
+ for (var i=0, j=list.length-1; j>=i; j--) {
+ if (!node || node === list[j]) {
+ $("#" + list[j].tId + consts.id.A).removeClass(consts.node.CURSELECTED);
+ if (node) {
+ data.removeSelectedNode(setting, node);
+ break;
+ }
+ }
+ }
+ if (!node) data.getRoot(setting).curSelectedList = [];
+ },
+ createNodeCallback: function(setting) {
+ if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+ var root = data.getRoot(setting);
+ while (root.createdNodes.length>0) {
+ var node = root.createdNodes.shift();
+ tools.apply(setting.view.addDiyDom, [setting.treeId, node]);
+ if (!!setting.callback.onNodeCreated) {
+ setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);
+ }
+ }
+ }
+ },
+ createNodes: function(setting, level, nodes, parentNode) {
+ if (!nodes || nodes.length == 0) return;
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ openFlag = !parentNode || parentNode.open || !!$("#" + parentNode[childKey][0].tId).get(0);
+ root.createdNodes = [];
+ var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);
+ if (!parentNode) {
+ setting.treeObj.append(zTreeHtml.join(''));
+ } else {
+ var ulObj = $("#" + parentNode.tId + consts.id.UL);
+ if (ulObj.get(0)) {
+ ulObj.append(zTreeHtml.join(''));
+ }
+ }
+ view.createNodeCallback(setting);
+ },
+ destroy: function(setting) {
+ if (!setting) return;
+ data.initCache(setting);
+ data.initRoot(setting);
+ event.unbindTree(setting);
+ event.unbindEvent(setting);
+ setting.treeObj.empty();
+ },
+ expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ if (!node) {
+ tools.apply(callback, []);
+ return;
+ }
+ if (root.expandTriggerFlag) {
+ var _callback = callback;
+ callback = function(){
+ if (_callback) _callback();
+ if (node.open) {
+ setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);
+ } else {
+ setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);
+ }
+ };
+ root.expandTriggerFlag = false;
+ }
+ if (!node.open && node.isParent && ((!$("#" + node.tId + consts.id.UL).get(0)) || (node[childKey] && node[childKey].length>0 && !$("#" + node[childKey][0].tId).get(0)))) {
+ view.appendParentULDom(setting, node);
+ view.createNodeCallback(setting);
+ }
+ if (node.open == expandFlag) {
+ tools.apply(callback, []);
+ return;
+ }
+ var ulObj = $("#" + node.tId + consts.id.UL),
+ switchObj = $("#" + node.tId + consts.id.SWITCH),
+ icoObj = $("#" + node.tId + consts.id.ICON);
+
+ if (node.isParent) {
+ node.open = !node.open;
+ if (node.iconOpen && node.iconClose) {
+ icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+ }
+
+ if (node.open) {
+ view.replaceSwitchClass(node, switchObj, consts.folder.OPEN);
+ view.replaceIcoClass(node, icoObj, consts.folder.OPEN);
+ if (animateFlag == false || setting.view.expandSpeed == "") {
+ ulObj.show();
+ tools.apply(callback, []);
+ } else {
+ if (node[childKey] && node[childKey].length > 0) {
+ ulObj.slideDown(setting.view.expandSpeed, callback);
+ } else {
+ ulObj.show();
+ tools.apply(callback, []);
+ }
+ }
+ } else {
+ view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);
+ view.replaceIcoClass(node, icoObj, consts.folder.CLOSE);
+ if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) {
+ ulObj.hide();
+ tools.apply(callback, []);
+ } else {
+ ulObj.slideUp(setting.view.expandSpeed, callback);
+ }
+ }
+ } else {
+ tools.apply(callback, []);
+ }
+ },
+ expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {
+ if (!node) return;
+ if (!node.parentTId) {
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);
+ return;
+ } else {
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag);
+ }
+ if (node.parentTId) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);
+ }
+ },
+ expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ treeNodes = (node) ? node[childKey]: root[childKey],
+ selfAnimateSign = (node) ? false : animateFlag,
+ expandTriggerFlag = data.getRoot(setting).expandTriggerFlag;
+ data.getRoot(setting).expandTriggerFlag = false;
+ if (treeNodes) {
+ for (var i = 0, l = treeNodes.length; i < l; i++) {
+ if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);
+ }
+ }
+ data.getRoot(setting).expandTriggerFlag = expandTriggerFlag;
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );
+ },
+ makeDOMNodeIcon: function(html, setting, node) {
+ var nameStr = data.getNodeName(setting, node),
+ name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&').replace(//g,'>');
+ html.push("",name," ");
+ },
+ makeDOMNodeLine: function(html, setting, node) {
+ html.push(" ");
+ },
+ makeDOMNodeMainAfter: function(html, setting, node) {
+ html.push("");
+ },
+ makeDOMNodeMainBefore: function(html, setting, node) {
+ html.push("");
+ },
+ makeDOMNodeNameAfter: function(html, setting, node) {
+ html.push("");
+ },
+ makeDOMNodeNameBefore: function(html, setting, node) {
+ var title = data.getNodeTitle(setting, node),
+ url = view.makeNodeUrl(setting, node),
+ fontcss = view.makeNodeFontCss(setting, node),
+ fontStyle = [];
+ for (var f in fontcss) {
+ fontStyle.push(f, ":", fontcss[f], ";");
+ }
+ html.push(" 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''),
+ "'");
+ if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"'").replace(//g,'>'),"'");}
+ html.push(">");
+ },
+ makeNodeFontCss: function(setting, node) {
+ var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);
+ return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {};
+ },
+ makeNodeIcoClass: function(setting, node) {
+ var icoCss = ["ico"];
+ if (!node.isAjaxing) {
+ icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0];
+ if (node.isParent) {
+ icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+ } else {
+ icoCss.push(consts.folder.DOCU);
+ }
+ }
+ return consts.className.BUTTON + " " + icoCss.join('_');
+ },
+ makeNodeIcoStyle: function(setting, node) {
+ var icoStyle = [];
+ if (!node.isAjaxing) {
+ var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;
+ if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;");
+ if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {
+ icoStyle.push("width:0px;height:0px;");
+ }
+ }
+ return icoStyle.join('');
+ },
+ makeNodeLineClass: function(setting, node) {
+ var lineClass = [];
+ if (setting.view.showLine) {
+ if (node.level == 0 && node.isFirstNode && node.isLastNode) {
+ lineClass.push(consts.line.ROOT);
+ } else if (node.level == 0 && node.isFirstNode) {
+ lineClass.push(consts.line.ROOTS);
+ } else if (node.isLastNode) {
+ lineClass.push(consts.line.BOTTOM);
+ } else {
+ lineClass.push(consts.line.CENTER);
+ }
+ } else {
+ lineClass.push(consts.line.NOLINE);
+ }
+ if (node.isParent) {
+ lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+ } else {
+ lineClass.push(consts.folder.DOCU);
+ }
+ return view.makeNodeLineClassEx(node) + lineClass.join('_');
+ },
+ makeNodeLineClassEx: function(node) {
+ return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " ";
+ },
+ makeNodeTarget: function(node) {
+ return (node.target || "_blank");
+ },
+ makeNodeUrl: function(setting, node) {
+ var urlKey = setting.data.key.url;
+ return node[urlKey] ? node[urlKey] : null;
+ },
+ makeUlHtml: function(setting, node, html, content) {
+ html.push("");
+ html.push(content);
+ html.push(" ");
+ },
+ makeUlLineClass: function(setting, node) {
+ return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : "");
+ },
+ removeChildNodes: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ nodes = node[childKey];
+ if (!nodes) return;
+
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ data.removeNodeCache(setting, nodes[i]);
+ }
+ data.removeSelectedNode(setting);
+ delete node[childKey];
+
+ if (!setting.data.keep.parent) {
+ node.isParent = false;
+ node.open = false;
+ var tmp_switchObj = $("#" + node.tId + consts.id.SWITCH),
+ tmp_icoObj = $("#" + node.tId + consts.id.ICON);
+ view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);
+ $("#" + node.tId + consts.id.UL).remove();
+ } else {
+ $("#" + node.tId + consts.id.UL).empty();
+ }
+ },
+ setFirstNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if ( childLength > 0) {
+ parentNode[childKey][0].isFirstNode = true;
+ }
+ },
+ setLastNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if ( childLength > 0) {
+ parentNode[childKey][childLength - 1].isLastNode = true;
+ }
+ },
+ removeNode: function(setting, node) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ parentNode = (node.parentTId) ? node.getParentNode() : root;
+
+ node.isFirstNode = false;
+ node.isLastNode = false;
+ node.getPreNode = function() {return null;};
+ node.getNextNode = function() {return null;};
+
+ if (!data.getNodeCache(setting, node.tId)) {
+ return;
+ }
+
+ $("#" + node.tId).remove();
+ data.removeNodeCache(setting, node);
+ data.removeSelectedNode(setting, node);
+
+ for (var i = 0, l = parentNode[childKey].length; i < l; i++) {
+ if (parentNode[childKey][i].tId == node.tId) {
+ parentNode[childKey].splice(i, 1);
+ break;
+ }
+ }
+ view.setFirstNode(setting, parentNode);
+ view.setLastNode(setting, parentNode);
+
+ var tmp_ulObj,tmp_switchObj,tmp_icoObj,
+ childLength = parentNode[childKey].length;
+
+ //repair nodes old parent
+ if (!setting.data.keep.parent && childLength == 0) {
+ //old parentNode has no child nodes
+ parentNode.isParent = false;
+ parentNode.open = false;
+ tmp_ulObj = $("#" + parentNode.tId + consts.id.UL);
+ tmp_switchObj = $("#" + parentNode.tId + consts.id.SWITCH);
+ tmp_icoObj = $("#" + parentNode.tId + consts.id.ICON);
+ view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);
+ tmp_ulObj.css("display", "none");
+
+ } else if (setting.view.showLine && childLength > 0) {
+ //old parentNode has child nodes
+ var newLast = parentNode[childKey][childLength - 1];
+ tmp_ulObj = $("#" + newLast.tId + consts.id.UL);
+ tmp_switchObj = $("#" + newLast.tId + consts.id.SWITCH);
+ tmp_icoObj = $("#" + newLast.tId + consts.id.ICON);
+ if (parentNode == root) {
+ if (parentNode[childKey].length == 1) {
+ //node was root, and ztree has only one root after move node
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);
+ } else {
+ var tmp_first_switchObj = $("#" + parentNode[childKey][0].tId + consts.id.SWITCH);
+ view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+ }
+ } else {
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+ }
+ tmp_ulObj.removeClass(consts.line.LINE);
+ }
+ },
+ replaceIcoClass: function(node, obj, newName) {
+ if (!obj || node.isAjaxing) return;
+ var tmpName = obj.attr("class");
+ if (tmpName == undefined) return;
+ var tmpList = tmpName.split("_");
+ switch (newName) {
+ case consts.folder.OPEN:
+ case consts.folder.CLOSE:
+ case consts.folder.DOCU:
+ tmpList[tmpList.length-1] = newName;
+ break;
+ }
+ obj.attr("class", tmpList.join("_"));
+ },
+ replaceSwitchClass: function(node, obj, newName) {
+ if (!obj) return;
+ var tmpName = obj.attr("class");
+ if (tmpName == undefined) return;
+ var tmpList = tmpName.split("_");
+ switch (newName) {
+ case consts.line.ROOT:
+ case consts.line.ROOTS:
+ case consts.line.CENTER:
+ case consts.line.BOTTOM:
+ case consts.line.NOLINE:
+ tmpList[0] = view.makeNodeLineClassEx(node) + newName;
+ break;
+ case consts.folder.OPEN:
+ case consts.folder.CLOSE:
+ case consts.folder.DOCU:
+ tmpList[1] = newName;
+ break;
+ }
+ obj.attr("class", tmpList.join("_"));
+ if (newName !== consts.folder.DOCU) {
+ obj.removeAttr("disabled");
+ } else {
+ obj.attr("disabled", "disabled");
+ }
+ },
+ selectNode: function(setting, node, addFlag) {
+ if (!addFlag) {
+ view.cancelPreSelectedNode(setting);
+ }
+ $("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED);
+ data.addSelectedNode(setting, node);
+ },
+ setNodeFontCss: function(setting, treeNode) {
+ var aObj = $("#" + treeNode.tId + consts.id.A),
+ fontCss = view.makeNodeFontCss(setting, treeNode);
+ if (fontCss) {
+ aObj.css(fontCss);
+ }
+ },
+ setNodeLineIcos: function(setting, node) {
+ if (!node) return;
+ var switchObj = $("#" + node.tId + consts.id.SWITCH),
+ ulObj = $("#" + node.tId + consts.id.UL),
+ icoObj = $("#" + node.tId + consts.id.ICON),
+ ulLine = view.makeUlLineClass(setting, node);
+ if (ulLine.length==0) {
+ ulObj.removeClass(consts.line.LINE);
+ } else {
+ ulObj.addClass(ulLine);
+ }
+ switchObj.attr("class", view.makeNodeLineClass(setting, node));
+ if (node.isParent) {
+ switchObj.removeAttr("disabled");
+ } else {
+ switchObj.attr("disabled", "disabled");
+ }
+ icoObj.removeAttr("style");
+ icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+ icoObj.attr("class", view.makeNodeIcoClass(setting, node));
+ },
+ setNodeName: function(setting, node) {
+ var title = data.getNodeTitle(setting, node),
+ nObj = $("#" + node.tId + consts.id.SPAN);
+ nObj.empty();
+ if (setting.view.nameIsHTML) {
+ nObj.html(data.getNodeName(setting, node));
+ } else {
+ nObj.text(data.getNodeName(setting, node));
+ }
+ if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) {
+ var aObj = $("#" + node.tId + consts.id.A);
+ aObj.attr("title", !title ? "" : title);
+ }
+ },
+ setNodeTarget: function(node) {
+ var aObj = $("#" + node.tId + consts.id.A);
+ aObj.attr("target", view.makeNodeTarget(node));
+ },
+ setNodeUrl: function(setting, node) {
+ var aObj = $("#" + node.tId + consts.id.A),
+ url = view.makeNodeUrl(setting, node);
+ if (url == null || url.length == 0) {
+ aObj.removeAttr("href");
+ } else {
+ aObj.attr("href", url);
+ }
+ },
+ switchNode: function(setting, node) {
+ if (node.open || !tools.canAsync(setting, node)) {
+ view.expandCollapseNode(setting, node, !node.open);
+ } else if (setting.async.enable) {
+ if (!view.asyncNode(setting, node)) {
+ view.expandCollapseNode(setting, node, !node.open);
+ return;
+ }
+ } else if (node) {
+ view.expandCollapseNode(setting, node, !node.open);
+ }
+ }
+ };
+ // zTree defind
+ $.fn.zTree = {
+ consts : _consts,
+ _z : {
+ tools: tools,
+ view: view,
+ event: event,
+ data: data
+ },
+ getZTreeObj: function(treeId) {
+ var o = data.getZTreeTools(treeId);
+ return o ? o : null;
+ },
+ destroy: function(treeId) {
+ if (!!treeId && treeId.length > 0) {
+ view.destroy(data.getSetting(treeId));
+ } else {
+ for(var s in settings) {
+ view.destroy(settings[s]);
+ }
+ }
+ },
+ init: function(obj, zSetting, zNodes) {
+ var setting = tools.clone(_setting);
+ $.extend(true, setting, zSetting);
+ setting.treeId = obj.attr("id");
+ setting.treeObj = obj;
+ setting.treeObj.empty();
+ settings[setting.treeId] = setting;
+ //For some older browser,(e.g., ie6)
+ if(typeof document.body.style.maxHeight === "undefined") {
+ setting.view.expandSpeed = "";
+ }
+ data.initRoot(setting);
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];
+ if (setting.data.simpleData.enable) {
+ root[childKey] = data.transformTozTreeFormat(setting, zNodes);
+ } else {
+ root[childKey] = zNodes;
+ }
+
+ data.initCache(setting);
+ event.unbindTree(setting);
+ event.bindTree(setting);
+ event.unbindEvent(setting);
+ event.bindEvent(setting);
+
+ var zTreeTools = {
+ setting : setting,
+ addNodes : function(parentNode, newNodes, isSilent) {
+ if (!newNodes) return null;
+ if (!parentNode) parentNode = null;
+ if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;
+ var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);
+ function addCallback() {
+ view.addNodes(setting, parentNode, xNewNodes, (isSilent==true));
+ }
+
+ if (tools.canAsync(setting, parentNode)) {
+ view.asyncNode(setting, parentNode, isSilent, addCallback);
+ } else {
+ addCallback();
+ }
+ return xNewNodes;
+ },
+ cancelSelectedNode : function(node) {
+ view.cancelPreSelectedNode(this.setting, node);
+ },
+ destroy : function() {
+ view.destroy(this.setting);
+ },
+ expandAll : function(expandFlag) {
+ expandFlag = !!expandFlag;
+ view.expandCollapseSonNode(this.setting, null, expandFlag, true);
+ return expandFlag;
+ },
+ expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {
+ if (!node || !node.isParent) return null;
+ if (expandFlag !== true && expandFlag !== false) {
+ expandFlag = !node.open;
+ }
+ callbackFlag = !!callbackFlag;
+
+ if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {
+ return null;
+ } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {
+ return null;
+ }
+ if (expandFlag && node.parentTId) {
+ view.expandCollapseParentNode(this.setting, node.getParentNode(), expandFlag, false);
+ }
+ if (expandFlag === node.open && !sonSign) {
+ return null;
+ }
+
+ data.getRoot(setting).expandTriggerFlag = callbackFlag;
+ if (sonSign) {
+ view.expandCollapseSonNode(this.setting, node, expandFlag, true, function() {
+ if (focus !== false) {try{$("#" + node.tId).focus().blur();}catch(e){}}
+ });
+ } else {
+ node.open = !expandFlag;
+ view.switchNode(this.setting, node);
+ if (focus !== false) {try{$("#" + node.tId).focus().blur();}catch(e){}}
+ }
+ return expandFlag;
+ },
+ getNodes : function() {
+ return data.getNodes(this.setting);
+ },
+ getNodeByParam : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodeByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
+ },
+ getNodeByTId : function(tId) {
+ return data.getNodeCache(this.setting, tId);
+ },
+ getNodesByParam : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodesByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
+ },
+ getNodesByParamFuzzy : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodesByParamFuzzy(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
+ },
+ getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) {
+ isSingle = !!isSingle;
+ if (!filter || (typeof filter != "function")) return (isSingle ? null : []);
+ return data.getNodesByFilter(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), filter, isSingle, invokeParam);
+ },
+ getNodeIndex : function(node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(this.setting);
+ for (var i=0, l = parentNode[childKey].length; i < l; i++) {
+ if (parentNode[childKey][i] == node) return i;
+ }
+ return -1;
+ },
+ getSelectedNodes : function() {
+ var r = [], list = data.getRoot(this.setting).curSelectedList;
+ for (var i=0, l=list.length; i 0) {
+ view.createNodes(setting, 0, root[childKey]);
+ } else if (setting.async.enable && setting.async.url && setting.async.url !== '') {
+ view.asyncNode(setting);
+ }
+ return zTreeTools;
+ }
+ };
+
+ var zt = $.fn.zTree,
+ consts = zt.consts;
+})(jQuery);
+/*
+ * JQuery zTree excheck 3.5.12
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2013-03-11
+ */
+(function($){
+ //default consts of excheck
+ var _consts = {
+ event: {
+ CHECK: "ztree_check"
+ },
+ id: {
+ CHECK: "_check"
+ },
+ checkbox: {
+ STYLE: "checkbox",
+ DEFAULT: "chk",
+ DISABLED: "disable",
+ FALSE: "false",
+ TRUE: "true",
+ FULL: "full",
+ PART: "part",
+ FOCUS: "focus"
+ },
+ radio: {
+ STYLE: "radio",
+ TYPE_ALL: "all",
+ TYPE_LEVEL: "level"
+ }
+ },
+ //default setting of excheck
+ _setting = {
+ check: {
+ enable: false,
+ autoCheckTrigger: false,
+ chkStyle: _consts.checkbox.STYLE,
+ nocheckInherit: false,
+ chkDisabledInherit: false,
+ radioType: _consts.radio.TYPE_LEVEL,
+ chkboxType: {
+ "Y": "ps",
+ "N": "ps"
+ }
+ },
+ data: {
+ key: {
+ checked: "checked"
+ }
+ },
+ callback: {
+ beforeCheck:null,
+ onCheck:null
+ }
+ },
+ //default root of excheck
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ r.radioCheckedList = [];
+ },
+ //default cache of excheck
+ _initCache = function(treeId) {},
+ //default bind event of excheck
+ _bindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.bind(c.CHECK, function (event, srcEvent, treeId, node) {
+ tools.apply(setting.callback.onCheck, [!!srcEvent?srcEvent : event, treeId, node]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.unbind(c.CHECK);
+ },
+ //default event proxy of excheck
+ _eventProxy = function(e) {
+ var target = e.target,
+ setting = data.getSetting(e.data.treeId),
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null;
+
+ if (tools.eqs(e.type, "mouseover")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = target.parentNode.id;
+ nodeEventType = "mouseoverCheck";
+ }
+ } else if (tools.eqs(e.type, "mouseout")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = target.parentNode.id;
+ nodeEventType = "mouseoutCheck";
+ }
+ } else if (tools.eqs(e.type, "click")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = target.parentNode.id;
+ nodeEventType = "checkNode";
+ }
+ }
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "checkNode" :
+ nodeEventCallback = _handler.onCheckNode;
+ break;
+ case "mouseoverCheck" :
+ nodeEventCallback = _handler.onMouseoverCheck;
+ break;
+ case "mouseoutCheck" :
+ nodeEventCallback = _handler.onMouseoutCheck;
+ break;
+ }
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of excheck
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ var checkedKey = setting.data.key.checked;
+ if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
+ n[checkedKey] = !!n[checkedKey];
+ n.checkedOld = n[checkedKey];
+ if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true");
+ n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
+ if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true");
+ n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);
+ if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
+ n.halfCheck = !!n.halfCheck;
+ n.check_Child_State = -1;
+ n.check_Focus = false;
+ n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
+ },
+ //add dom for check
+ _beforeA = function(setting, node, html) {
+ var checkedKey = setting.data.key.checked;
+ if (setting.check.enable) {
+ data.makeChkFlag(setting, node);
+ if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && node[checkedKey] ) {
+ var r = data.getRoot(setting);
+ r.radioCheckedList.push(node);
+ }
+ html.push(" ");
+ }
+ },
+ //update zTreeObj, add method of check
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
+ var checkedKey = this.setting.data.key.checked;
+ if (node.chkDisabled === true) return;
+ if (checked !== true && checked !== false) {
+ checked = !node[checkedKey];
+ }
+ callbackFlag = !!callbackFlag;
+
+ if (node[checkedKey] === checked && !checkTypeFlag) {
+ return;
+ } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
+ return;
+ }
+ if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
+ node[checkedKey] = checked;
+ var checkObj = $("#" + node.tId + consts.id.CHECK);
+ if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+ view.setChkClass(this.setting, checkObj, node);
+ view.repairParentChkClassWithSelf(this.setting, node);
+ if (callbackFlag) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+ }
+
+ zTreeTools.checkAllNodes = function(checked) {
+ view.repairAllChk(this.setting, !!checked);
+ }
+
+ zTreeTools.getCheckedNodes = function(checked) {
+ var childKey = this.setting.data.key.children;
+ checked = (checked !== false);
+ return data.getTreeCheckedNodes(this.setting, data.getRoot(setting)[childKey], checked);
+ }
+
+ zTreeTools.getChangeCheckedNodes = function() {
+ var childKey = this.setting.data.key.children;
+ return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(setting)[childKey]);
+ }
+
+ zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {
+ disabled = !!disabled;
+ inheritParent = !!inheritParent;
+ inheritChildren = !!inheritChildren;
+ view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);
+ view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);
+ }
+
+ var _updateNode = zTreeTools.updateNode;
+ zTreeTools.updateNode = function(node, checkTypeFlag) {
+ if (_updateNode) _updateNode.apply(zTreeTools, arguments);
+ if (!node || !this.setting.check.enable) return;
+ var nObj = $("#" + node.tId);
+ if (nObj.get(0) && tools.uCanDo(this.setting)) {
+ var checkObj = $("#" + node.tId + consts.id.CHECK);
+ if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+ view.setChkClass(this.setting, checkObj, node);
+ view.repairParentChkClassWithSelf(this.setting, node);
+ }
+ }
+ },
+ //method of operate data
+ _data = {
+ getRadioCheckedList: function(setting) {
+ var checkedList = data.getRoot(setting).radioCheckedList;
+ for (var i=0, j=checkedList.length; i -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
+ };
+ return r;
+ },
+ getTreeCheckedNodes: function(setting, nodes, checked, results) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);
+ results = !results ? [] : results;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) {
+ results.push(nodes[i]);
+ if(onlyOne) {
+ break;
+ }
+ }
+ data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
+ if(onlyOne && results.length > 0) {
+ break;
+ }
+ }
+ return results;
+ },
+ getTreeChangeCheckedNodes: function(setting, nodes, results) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked;
+ results = !results ? [] : results;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
+ results.push(nodes[i]);
+ }
+ data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
+ }
+ return results;
+ },
+ makeChkFlag: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ chkFlag = -1;
+ if (node[childKey]) {
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ var cNode = node[childKey][i];
+ var tmp = -1;
+ if (setting.check.chkStyle == consts.radio.STYLE) {
+ if (cNode.nocheck === true || cNode.chkDisabled === true) {
+ tmp = cNode.check_Child_State;
+ } else if (cNode.halfCheck === true) {
+ tmp = 2;
+ } else if (cNode[checkedKey]) {
+ tmp = 2;
+ } else {
+ tmp = cNode.check_Child_State > 0 ? 2:0;
+ }
+ if (tmp == 2) {
+ chkFlag = 2; break;
+ } else if (tmp == 0){
+ chkFlag = 0;
+ }
+ } else if (setting.check.chkStyle == consts.checkbox.STYLE) {
+ if (cNode.nocheck === true || cNode.chkDisabled === true) {
+ tmp = cNode.check_Child_State;
+ } else if (cNode.halfCheck === true) {
+ tmp = 1;
+ } else if (cNode[checkedKey] ) {
+ tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
+ } else {
+ tmp = (cNode.check_Child_State > 0) ? 1 : 0;
+ }
+ if (tmp === 1) {
+ chkFlag = 1; break;
+ } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {
+ chkFlag = 1; break;
+ } else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
+ chkFlag = 1; break;
+ } else if (tmp > -1) {
+ chkFlag = tmp;
+ }
+ }
+ }
+ }
+ node.check_Child_State = chkFlag;
+ }
+ },
+ //method of event proxy
+ _event = {
+
+ },
+ //method of event handler
+ _handler = {
+ onCheckNode: function (event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkedKey = setting.data.key.checked;
+ if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
+ node[checkedKey] = !node[checkedKey];
+ view.checkNodeRelation(setting, node);
+ var checkObj = $("#" + node.tId + consts.id.CHECK);
+ view.setChkClass(setting, checkObj, node);
+ view.repairParentChkClassWithSelf(setting, node);
+ setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);
+ return true;
+ },
+ onMouseoverCheck: function(event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkObj = $("#" + node.tId + consts.id.CHECK);
+ node.check_Focus = true;
+ view.setChkClass(setting, checkObj, node);
+ return true;
+ },
+ onMouseoutCheck: function(event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkObj = $("#" + node.tId + consts.id.CHECK);
+ node.check_Focus = false;
+ view.setChkClass(setting, checkObj, node);
+ return true;
+ }
+ },
+ //method of tools for zTree
+ _tools = {
+
+ },
+ //method of operate ztree dom
+ _view = {
+ checkNodeRelation: function(setting, node) {
+ var pNode, i, l,
+ childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ r = consts.radio;
+ if (setting.check.chkStyle == r.STYLE) {
+ var checkedList = data.getRadioCheckedList(setting);
+ if (node[checkedKey]) {
+ if (setting.check.radioType == r.TYPE_ALL) {
+ for (i = checkedList.length-1; i >= 0; i--) {
+ pNode = checkedList[i];
+ pNode[checkedKey] = false;
+ checkedList.splice(i, 1);
+
+ view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
+ if (pNode.parentTId != node.parentTId) {
+ view.repairParentChkClassWithSelf(setting, pNode);
+ }
+ }
+ checkedList.push(node);
+ } else {
+ var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
+ for (i = 0, l = parentNode[childKey].length; i < l; i++) {
+ pNode = parentNode[childKey][i];
+ if (pNode[checkedKey] && pNode != node) {
+ pNode[checkedKey] = false;
+ view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
+ }
+ }
+ }
+ } else if (setting.check.radioType == r.TYPE_ALL) {
+ for (i = 0, l = checkedList.length; i < l; i++) {
+ if (node == checkedList[i]) {
+ checkedList.splice(i, 1);
+ break;
+ }
+ }
+ }
+
+ } else {
+ if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
+ view.setSonNodeCheckBox(setting, node, true);
+ }
+ if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
+ view.setSonNodeCheckBox(setting, node, false);
+ }
+ if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
+ view.setParentNodeCheckBox(setting, node, true);
+ }
+ if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
+ view.setParentNodeCheckBox(setting, node, false);
+ }
+ }
+ },
+ makeChkClass: function(setting, node) {
+ var checkedKey = setting.data.key.checked,
+ c = consts.checkbox, r = consts.radio,
+ fullStyle = "";
+ if (node.chkDisabled === true) {
+ fullStyle = c.DISABLED;
+ } else if (node.halfCheck) {
+ fullStyle = c.PART;
+ } else if (setting.check.chkStyle == r.STYLE) {
+ fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
+ } else {
+ fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
+ }
+ var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
+ chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
+ return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName;
+ },
+ repairAllChk: function(setting, checked) {
+ if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
+ var checkedKey = setting.data.key.checked,
+ childKey = setting.data.key.children,
+ root = data.getRoot(setting);
+ for (var i = 0, l = root[childKey].length; i 0) {
+ view.repairParentChkClass(setting, node[childKey][0]);
+ } else {
+ view.repairParentChkClass(setting, node);
+ }
+ },
+ repairSonChkDisabled: function(setting, node, chkDisabled, inherit) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ if (node.chkDisabled != chkDisabled) {
+ node.chkDisabled = chkDisabled;
+ }
+ view.repairChkClass(setting, node);
+ if (node[childKey] && inherit) {
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ var sNode = node[childKey][i];
+ view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit);
+ }
+ }
+ },
+ repairParentChkDisabled: function(setting, node, chkDisabled, inherit) {
+ if (!node) return;
+ if (node.chkDisabled != chkDisabled && inherit) {
+ node.chkDisabled = chkDisabled;
+ }
+ view.repairChkClass(setting, node);
+ view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);
+ },
+ setChkClass: function(setting, obj, node) {
+ if (!obj) return;
+ if (node.nocheck === true) {
+ obj.hide();
+ } else {
+ obj.show();
+ }
+ obj.removeClass();
+ obj.addClass(view.makeChkClass(setting, node));
+ },
+ setParentNodeCheckBox: function(setting, node, value, srcNode) {
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ checkObj = $("#" + node.tId + consts.id.CHECK);
+ if (!srcNode) srcNode = node;
+ data.makeChkFlag(setting, node);
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = value;
+ view.setChkClass(setting, checkObj, node);
+ if (setting.check.autoCheckTrigger && node != srcNode) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+ if (node.parentTId) {
+ var pSign = true;
+ if (!value) {
+ var pNodes = node.getParentNode()[childKey];
+ for (var i = 0, l = pNodes.length; i < l; i++) {
+ if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey])
+ || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) {
+ pSign = false;
+ break;
+ }
+ }
+ }
+ if (pSign) {
+ view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
+ }
+ }
+ },
+ setSonNodeCheckBox: function(setting, node, value, srcNode) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ checkObj = $("#" + node.tId + consts.id.CHECK);
+ if (!srcNode) srcNode = node;
+
+ var hasDisable = false;
+ if (node[childKey]) {
+ for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
+ var sNode = node[childKey][i];
+ view.setSonNodeCheckBox(setting, sNode, value, srcNode);
+ if (sNode.chkDisabled === true) hasDisable = true;
+ }
+ }
+
+ if (node != data.getRoot(setting) && node.chkDisabled !== true) {
+ if (hasDisable && node.nocheck !== true) {
+ data.makeChkFlag(setting, node);
+ }
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = value;
+ if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
+ } else {
+ node.check_Child_State = -1;
+ }
+ view.setChkClass(setting, checkObj, node);
+ if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+
+ }
+ },
+
+ _z = {
+ tools: _tools,
+ view: _view,
+ event: _event,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree.consts, _consts);
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event;
+
+ data.exSetting(_setting);
+ data.addInitBind(_bindEvent);
+ data.addInitUnBind(_unbindEvent);
+ data.addInitCache(_initCache);
+ data.addInitNode(_initNode);
+ data.addInitProxy(_eventProxy);
+ data.addInitRoot(_initRoot);
+ data.addBeforeA(_beforeA);
+ data.addZTreeTools(_zTreeTools);
+
+ var _createNodes = view.createNodes;
+ view.createNodes = function(setting, level, nodes, parentNode) {
+ if (_createNodes) _createNodes.apply(view, arguments);
+ if (!nodes) return;
+ view.repairParentChkClassWithSelf(setting, parentNode);
+ }
+ var _removeNode = view.removeNode;
+ view.removeNode = function(setting, node) {
+ var parentNode = node.getParentNode();
+ if (_removeNode) _removeNode.apply(view, arguments);
+ if (!node || !parentNode) return;
+ view.repairChkClass(setting, parentNode);
+ view.repairParentChkClass(setting, parentNode);
+ }
+
+ var _appendNodes = view.appendNodes;
+ view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {
+ var html = "";
+ if (_appendNodes) {
+ html = _appendNodes.apply(view, arguments);
+ }
+ if (parentNode) {
+ data.makeChkFlag(setting, parentNode);
+ }
+ return html;
+ }
+})(jQuery);
+/*
+ * JQuery zTree exedit 3.5.12
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2013-03-11
+ */
+(function($){
+ //default consts of exedit
+ var _consts = {
+ event: {
+ DRAG: "ztree_drag",
+ DROP: "ztree_drop",
+ REMOVE: "ztree_remove",
+ RENAME: "ztree_rename"
+ },
+ id: {
+ EDIT: "_edit",
+ INPUT: "_input",
+ REMOVE: "_remove"
+ },
+ move: {
+ TYPE_INNER: "inner",
+ TYPE_PREV: "prev",
+ TYPE_NEXT: "next"
+ },
+ node: {
+ CURSELECTED_EDIT: "curSelectedNode_Edit",
+ TMPTARGET_TREE: "tmpTargetzTree",
+ TMPTARGET_NODE: "tmpTargetNode"
+ }
+ },
+ //default setting of exedit
+ _setting = {
+ edit: {
+ enable: false,
+ editNameSelectAll: false,
+ showRemoveBtn: true,
+ showRenameBtn: true,
+ removeTitle: "remove",
+ renameTitle: "rename",
+ drag: {
+ autoExpandTrigger: false,
+ isCopy: true,
+ isMove: true,
+ prev: true,
+ next: true,
+ inner: true,
+ minMoveSize: 5,
+ borderMax: 10,
+ borderMin: -5,
+ maxShowNodeNum: 5,
+ autoOpenTime: 500
+ }
+ },
+ view: {
+ addHoverDom: null,
+ removeHoverDom: null
+ },
+ callback: {
+ beforeDrag:null,
+ beforeDragOpen:null,
+ beforeDrop:null,
+ beforeEditName:null,
+ beforeRename:null,
+ onDrag:null,
+ onDrop:null,
+ onRename:null
+ }
+ },
+ //default root of exedit
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ r.curEditNode = null;
+ r.curEditInput = null;
+ r.curHoverNode = null;
+ r.dragFlag = 0;
+ r.dragNodeShowBefore = [];
+ r.dragMaskList = new Array();
+ r.showHoverDom = true;
+ },
+ //default cache of exedit
+ _initCache = function(treeId) {},
+ //default bind event of exedit
+ _bindEvent = function(setting) {
+ var o = setting.treeObj;
+ var c = consts.event;
+ o.bind(c.RENAME, function (event, treeId, treeNode) {
+ tools.apply(setting.callback.onRename, [event, treeId, treeNode]);
+ });
+
+ o.bind(c.REMOVE, function (event, treeId, treeNode) {
+ tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
+ });
+
+ o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) {
+ tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
+ });
+
+ o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) {
+ tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj;
+ var c = consts.event;
+ o.unbind(c.RENAME);
+ o.unbind(c.REMOVE);
+ o.unbind(c.DRAG);
+ o.unbind(c.DROP);
+ },
+ //default event proxy of exedit
+ _eventProxy = function(e) {
+ var target = e.target,
+ setting = data.getSetting(e.data.treeId),
+ relatedTarget = e.relatedTarget,
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null,
+ tmp = null;
+
+ if (tools.eqs(e.type, "mouseover")) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tmp.parentNode.id;
+ nodeEventType = "hoverOverNode";
+ }
+ } else if (tools.eqs(e.type, "mouseout")) {
+ tmp = tools.getMDom(setting, relatedTarget, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (!tmp) {
+ tId = "remove";
+ nodeEventType = "hoverOutNode";
+ }
+ } else if (tools.eqs(e.type, "mousedown")) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tmp.parentNode.id;
+ nodeEventType = "mousedownNode";
+ }
+ }
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "mousedownNode" :
+ nodeEventCallback = _handler.onMousedownNode;
+ break;
+ case "hoverOverNode" :
+ nodeEventCallback = _handler.onHoverOverNode;
+ break;
+ case "hoverOutNode" :
+ nodeEventCallback = _handler.onHoverOutNode;
+ break;
+ }
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of exedit
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ n.isHover = false;
+ n.editNameFlag = false;
+ },
+ //update zTreeObj, add method of edit
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.cancelEditName = function(newName) {
+ var root = data.getRoot(setting),
+ nameKey = setting.data.key.name,
+ node = root.curEditNode;
+ if (!root.curEditNode) return;
+ view.cancelCurEditNode(setting, newName?newName:node[nameKey]);
+ }
+ zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) {
+ if (!node) return null;
+ if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null;
+ var newNode = tools.clone(node);
+ if (!targetNode) {
+ targetNode = null;
+ moveType = consts.move.TYPE_INNER;
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ function copyCallback() {
+ view.addNodes(setting, targetNode, [newNode], isSilent);
+ }
+
+ if (tools.canAsync(setting, targetNode)) {
+ view.asyncNode(setting, targetNode, isSilent, copyCallback);
+ } else {
+ copyCallback();
+ }
+ } else {
+ view.addNodes(setting, targetNode.parentNode, [newNode], isSilent);
+ view.moveNode(setting, targetNode, newNode, moveType, false, isSilent);
+ }
+ return newNode;
+ }
+ zTreeTools.editName = function(node) {
+ if (!node || !node.tId || node !== data.getNodeCache(setting, node.tId)) return;
+ if (node.parentTId) view.expandCollapseParentNode(setting, node.getParentNode(), true);
+ view.editNode(setting, node)
+ }
+ zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) {
+ if (!node) return node;
+ if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) {
+ return null;
+ } else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $("#" + node.tId).find("#" + targetNode.tId).length > 0)) {
+ return null;
+ } else if (!targetNode) {
+ targetNode = null;
+ }
+ function moveCallback() {
+ view.moveNode(setting, targetNode, node, moveType, false, isSilent);
+ }
+ if (tools.canAsync(setting, targetNode) && moveType === consts.move.TYPE_INNER) {
+ view.asyncNode(setting, targetNode, isSilent, moveCallback);
+ } else {
+ moveCallback();
+ }
+ return node;
+ }
+ zTreeTools.setEditable = function(editable) {
+ setting.edit.enable = editable;
+ return this.refresh();
+ }
+ },
+ //method of operate data
+ _data = {
+ setSonNodeLevel: function(setting, parentNode, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ node.level = (parentNode)? parentNode.level + 1 : 0;
+ if (!node[childKey]) return;
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]);
+ }
+ }
+ },
+ //method of event proxy
+ _event = {
+
+ },
+ //method of event handler
+ _handler = {
+ onHoverOverNode: function(event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ root = data.getRoot(setting);
+ if (root.curHoverNode != node) {
+ _handler.onHoverOutNode(event);
+ }
+ root.curHoverNode = node;
+ view.addHoverDom(setting, node);
+ },
+ onHoverOutNode: function(event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ root = data.getRoot(setting);
+ if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) {
+ view.removeTreeDom(setting, root.curHoverNode);
+ root.curHoverNode = null;
+ }
+ },
+ onMousedownNode: function(eventMouseDown, _node) {
+ var i,l,
+ setting = data.getSetting(eventMouseDown.data.treeId),
+ root = data.getRoot(setting);
+ //right click can't drag & drop
+ if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true;
+
+ //input of edit node name can't drag & drop
+ var target = eventMouseDown.target,
+ _nodes = data.getRoot(setting).curSelectedList,
+ nodes = [];
+ if (!data.isSelectedNode(setting, _node)) {
+ nodes = [_node];
+ } else {
+ for (i=0, l=_nodes.length; i1) {
+ var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting);
+ tmpNodes = [];
+ for (i=0, l=pNodes.length; i -1 && (lastIndex+1) !== i) {
+ isOrder = false;
+ }
+ tmpNodes.push(pNodes[i]);
+ lastIndex = i;
+ }
+ if (nodes.length === tmpNodes.length) {
+ nodes = tmpNodes;
+ break;
+ }
+ }
+ }
+ if (isOrder) {
+ preNode = nodes[0].getPreNode();
+ nextNode = nodes[nodes.length-1].getNextNode();
+ }
+
+ //set node in selected
+ curNode = $("");
+ for (i=0, l=nodes.length; i0);
+ view.removeTreeDom(setting, tmpNode);
+
+ tmpDom = $(" ");
+ tmpDom.append($("#" + tmpNode.tId + consts.id.A).clone());
+ tmpDom.css("padding", "0");
+ tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED);
+ curNode.append(tmpDom);
+ if (i == setting.edit.drag.maxShowNodeNum-1) {
+ tmpDom = $(" ... ");
+ curNode.append(tmpDom);
+ break;
+ }
+ }
+ curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp");
+ curNode.addClass(setting.treeObj.attr("class"));
+ curNode.appendTo("body");
+
+ tmpArrow = $(" ");
+ tmpArrow.attr("id", "zTreeMove_arrow_tmp");
+ tmpArrow.appendTo("body");
+
+ setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]);
+ }
+
+ if (root.dragFlag == 1) {
+ if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) {
+ var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget);
+ event.target = (xT.length > 0) ? xT.get(0) : event.target;
+ } else if (tmpTarget) {
+ tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
+ if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
+ .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
+ }
+ tmpTarget = null;
+ tmpTargetNodeId = null;
+
+ //judge drag & drop in multi ztree
+ isOtherTree = false;
+ targetSetting = setting;
+ var settings = data.getSettings();
+ for (var s in settings) {
+ if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId
+ && (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) {
+ isOtherTree = true;
+ targetSetting = settings[s];
+ }
+ }
+
+ var docScrollTop = doc.scrollTop(),
+ docScrollLeft = doc.scrollLeft(),
+ treeOffset = targetSetting.treeObj.offset(),
+ scrollHeight = targetSetting.treeObj.get(0).scrollHeight,
+ scrollWidth = targetSetting.treeObj.get(0).scrollWidth,
+ dTop = (event.clientY + docScrollTop - treeOffset.top),
+ dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop),
+ dLeft = (event.clientX + docScrollLeft - treeOffset.left),
+ dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft),
+ isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin),
+ isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin),
+ isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin),
+ isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin),
+ isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin,
+ isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0),
+ isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight),
+ isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0),
+ isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth);
+
+ if (event.target.id && targetSetting.treeObj.find("#" + event.target.id).length > 0) {
+ //get node dom
+ var targetObj = event.target;
+ while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) {
+ targetObj = targetObj.parentNode;
+ }
+
+ var canMove = true;
+ //don't move to self or children of self
+ for (i=0, l=nodes.length; i 0) {
+ canMove = false;
+ break;
+ }
+ }
+ if (canMove) {
+ if (event.target.id &&
+ (event.target.id == (targetObj.id + consts.id.A) || $(event.target).parents("#" + targetObj.id + consts.id.A).length > 0)) {
+ tmpTarget = $(targetObj);
+ tmpTargetNodeId = targetObj.id;
+ }
+ }
+ }
+
+ //the mouse must be in zTree
+ tmpNode = nodes[0];
+ if (isTreeInner && (event.target.id == targetSetting.treeId || $(event.target).parents("#" + targetSetting.treeId).length>0)) {
+ //judge mouse move in root of ztree
+ if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) {
+ tmpTarget = targetSetting.treeObj;
+ }
+ //auto scroll top
+ if (isTop) {
+ targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10);
+ } else if (isBottom) {
+ targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10);
+ }
+ if (isLeft) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10);
+ } else if (isRight) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10);
+ }
+ //auto scroll left
+ if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left);
+ }
+ }
+
+ curNode.css({
+ "top": (event.clientY + docScrollTop + 3) + "px",
+ "left": (event.clientX + docScrollLeft + 3) + "px"
+ });
+
+ var dX = 0;
+ var dY = 0;
+ if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) {
+ var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId),
+ isCopy = (event.ctrlKey && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy),
+ isPrev = !!(preNode && tmpTargetNodeId === preNode.tId),
+ isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId),
+ isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId),
+ canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev),
+ canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next),
+ canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner);
+ if (!canPrev && !canNext && !canInner) {
+ tmpTarget = null;
+ tmpTargetNodeId = "";
+ moveType = consts.move.TYPE_INNER;
+ tmpArrow.css({
+ "display":"none"
+ });
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null
+ }
+ } else {
+ var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget),
+ tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()),
+ tmpTop = tmpTargetA.offset().top,
+ tmpLeft = tmpTargetA.offset().left,
+ prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1,
+ nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1,
+ dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height();
+ if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) {
+ dX = 1 - tmpArrow.width();
+ dY = tmpTop - tmpArrow.height()/2;
+ moveType = consts.move.TYPE_PREV;
+ } else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) {
+ dX = 1 - tmpArrow.width();
+ dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2);
+ moveType = consts.move.TYPE_NEXT;
+ }else {
+ dX = 5 - tmpArrow.width();
+ dY = tmpTop;
+ moveType = consts.move.TYPE_INNER;
+ }
+ tmpArrow.css({
+ "display":"block",
+ "top": dY + "px",
+ "left": (tmpLeft + dX) + "px"
+ });
+ tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType);
+
+ if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) {
+ startTime = (new Date()).getTime();
+ }
+ if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) {
+ var startTimer = true;
+ if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ } else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) {
+ startTimer = false;
+ }
+ if (startTimer) {
+ window.zTreeMoveTimer = setTimeout(function() {
+ if (moveType != consts.move.TYPE_INNER) return;
+ if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime
+ && tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) {
+ view.switchNode(targetSetting, tmpTargetNode);
+ if (targetSetting.edit.drag.autoExpandTrigger) {
+ targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]);
+ }
+ }
+ }, targetSetting.edit.drag.autoOpenTime+50);
+ window.zTreeMoveTargetNodeTId = tmpTargetNode.tId;
+ }
+ }
+ }
+ } else {
+ moveType = consts.move.TYPE_INNER;
+ if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) {
+ tmpTarget.addClass(consts.node.TMPTARGET_TREE);
+ } else {
+ tmpTarget = null;
+ }
+ tmpArrow.css({
+ "display":"none"
+ });
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }
+ }
+ preTmpTargetNodeId = tmpTargetNodeId;
+ preTmpMoveType = moveType;
+ }
+ return false;
+ }
+
+ doc.bind("mouseup", _docMouseUp);
+ function _docMouseUp(event) {
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }
+ preTmpTargetNodeId = null;
+ preTmpMoveType = null;
+ doc.unbind("mousemove", _docMouseMove);
+ doc.unbind("mouseup", _docMouseUp);
+ doc.unbind("selectstart", _docSelect);
+ $("body").css("cursor", "auto");
+ if (tmpTarget) {
+ tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
+ if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
+ .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
+ }
+ tools.showIfameMask(setting, false);
+
+ root.showHoverDom = true;
+ if (root.dragFlag == 0) return;
+ root.dragFlag = 0;
+
+ var i, l, tmpNode;
+ for (i=0, l=nodes.length; i0);
+ }
+ $("#" + newNodes[0].tId).focus().blur();
+
+ setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]);
+ }
+
+ if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) {
+ view.asyncNode(targetSetting, dragTargetNode, false, dropCallback);
+ } else {
+ dropCallback();
+ }
+
+ } else {
+ for (i=0, l=nodes.length; i0);
+ }
+ setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]);
+ }
+ }
+
+ doc.bind("selectstart", _docSelect);
+ function _docSelect() {
+ return false;
+ }
+
+ //Avoid FireFox's Bug
+ //If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error.
+ if(eventMouseDown.preventDefault) {
+ eventMouseDown.preventDefault();
+ }
+ return true;
+ }
+ },
+ //method of tools for zTree
+ _tools = {
+ getAbs: function (obj) {
+ var oRect = obj.getBoundingClientRect();
+ return [oRect.left,oRect.top]
+ },
+ inputFocus: function(inputObj) {
+ if (inputObj.get(0)) {
+ inputObj.focus();
+ tools.setCursorPosition(inputObj.get(0), inputObj.val().length);
+ }
+ },
+ inputSelect: function(inputObj) {
+ if (inputObj.get(0)) {
+ inputObj.focus();
+ inputObj.select();
+ }
+ },
+ setCursorPosition: function(obj, pos){
+ if(obj.setSelectionRange) {
+ obj.focus();
+ obj.setSelectionRange(pos,pos);
+ } else if (obj.createTextRange) {
+ var range = obj.createTextRange();
+ range.collapse(true);
+ range.moveEnd('character', pos);
+ range.moveStart('character', pos);
+ range.select();
+ }
+ },
+ showIfameMask: function(setting, showSign) {
+ var root = data.getRoot(setting);
+ //clear full mask
+ while (root.dragMaskList.length > 0) {
+ root.dragMaskList[0].remove();
+ root.dragMaskList.shift();
+ }
+ if (showSign) {
+ //show mask
+ var iframeList = $("iframe");
+ for (var i = 0, l = iframeList.length; i < l; i++) {
+ var obj = iframeList.get(i),
+ r = tools.getAbs(obj),
+ dragMask = $("
");
+ dragMask.appendTo("body");
+ root.dragMaskList.push(dragMask);
+ }
+ }
+ }
+ },
+ //method of operate ztree dom
+ _view = {
+ addEditBtn: function(setting, node) {
+ if (node.editNameFlag || $("#" + node.tId + consts.id.EDIT).length > 0) {
+ return;
+ }
+ if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) {
+ return;
+ }
+ var aObj = $("#" + node.tId + consts.id.A),
+ editStr = " ";
+ aObj.append(editStr);
+
+ $("#" + node.tId + consts.id.EDIT).bind('click',
+ function() {
+ if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false;
+ view.editNode(setting, node);
+ return false;
+ }
+ ).show();
+ },
+ addRemoveBtn: function(setting, node) {
+ if (node.editNameFlag || $("#" + node.tId + consts.id.REMOVE).length > 0) {
+ return;
+ }
+ if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) {
+ return;
+ }
+ var aObj = $("#" + node.tId + consts.id.A),
+ removeStr = " ";
+ aObj.append(removeStr);
+
+ $("#" + node.tId + consts.id.REMOVE).bind('click',
+ function() {
+ if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false;
+ view.removeNode(setting, node);
+ setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
+ return false;
+ }
+ ).bind('mousedown',
+ function(eventMouseDown) {
+ return true;
+ }
+ ).show();
+ },
+ addHoverDom: function(setting, node) {
+ if (data.getRoot(setting).showHoverDom) {
+ node.isHover = true;
+ if (setting.edit.enable) {
+ view.addEditBtn(setting, node);
+ view.addRemoveBtn(setting, node);
+ }
+ tools.apply(setting.view.addHoverDom, [setting.treeId, node]);
+ }
+ },
+ cancelCurEditNode: function (setting, forceName) {
+ var root = data.getRoot(setting),
+ nameKey = setting.data.key.name,
+ node = root.curEditNode;
+
+ if (node) {
+ var inputObj = root.curEditInput;
+ var newName = forceName ? forceName:inputObj.val();
+ if (!forceName && tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName], true) === false) {
+ return false;
+ } else {
+ node[nameKey] = newName ? newName:inputObj.val();
+ if (!forceName) {
+ setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node]);
+ }
+ }
+ var aObj = $("#" + node.tId + consts.id.A);
+ aObj.removeClass(consts.node.CURSELECTED_EDIT);
+ inputObj.unbind();
+ view.setNodeName(setting, node);
+ node.editNameFlag = false;
+ root.curEditNode = null;
+ root.curEditInput = null;
+ view.selectNode(setting, node, false);
+ }
+ root.noSelection = true;
+ return true;
+ },
+ editNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ view.editNodeBlur = false;
+ if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
+ setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0);
+ return;
+ }
+ var nameKey = setting.data.key.name;
+ node.editNameFlag = true;
+ view.removeTreeDom(setting, node);
+ view.cancelCurEditNode(setting);
+ view.selectNode(setting, node, false);
+ $("#" + node.tId + consts.id.SPAN).html(" ");
+ var inputObj = $("#" + node.tId + consts.id.INPUT);
+ inputObj.attr("value", node[nameKey]);
+ if (setting.edit.editNameSelectAll) {
+ tools.inputSelect(inputObj);
+ } else {
+ tools.inputFocus(inputObj);
+ }
+
+ inputObj.bind('blur', function(event) {
+ if (!view.editNodeBlur) {
+ view.cancelCurEditNode(setting);
+ }
+ }).bind('keydown', function(event) {
+ if (event.keyCode=="13") {
+ view.editNodeBlur = true;
+ view.cancelCurEditNode(setting, null, true);
+ } else if (event.keyCode=="27") {
+ view.cancelCurEditNode(setting, node[nameKey]);
+ }
+ }).bind('click', function(event) {
+ return false;
+ }).bind('dblclick', function(event) {
+ return false;
+ });
+
+ $("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED_EDIT);
+ root.curEditInput = inputObj;
+ root.noSelection = false;
+ root.curEditNode = node;
+ },
+ moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ if (targetNode == node) return;
+ if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return;
+ var oldParentNode = (node.parentTId ? node.getParentNode(): root),
+ targetNodeIsRoot = (targetNode === null || targetNode == root);
+ if (targetNodeIsRoot && targetNode === null) targetNode = root;
+ if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER;
+ var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root);
+
+ if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) {
+ moveType = consts.move.TYPE_INNER;
+ }
+
+ if (moveType == consts.move.TYPE_INNER) {
+ if (targetNodeIsRoot) {
+ //parentTId of root node is null
+ node.parentTId = null;
+ } else {
+ if (!targetNode.isParent) {
+ targetNode.isParent = true;
+ targetNode.open = !!targetNode.open;
+ view.setNodeLineIcos(setting, targetNode);
+ }
+ node.parentTId = targetNode.tId;
+ }
+ }
+
+ //move node Dom
+ var targetObj, target_ulObj;
+ if (targetNodeIsRoot) {
+ targetObj = setting.treeObj;
+ target_ulObj = targetObj;
+ } else {
+ if (!isSilent && moveType == consts.move.TYPE_INNER) {
+ view.expandCollapseNode(setting, targetNode, true, false);
+ } else if (!isSilent) {
+ view.expandCollapseNode(setting, targetNode.getParentNode(), true, false);
+ }
+ targetObj = $("#" + targetNode.tId);
+ target_ulObj = $("#" + targetNode.tId + consts.id.UL);
+ if (!!targetObj.get(0) && !target_ulObj.get(0)) {
+ var ulstr = [];
+ view.makeUlHtml(setting, targetNode, ulstr, '');
+ targetObj.append(ulstr.join(''));
+ }
+ target_ulObj = $("#" + targetNode.tId + consts.id.UL);
+ }
+ var nodeDom = $("#" + node.tId);
+ if (!nodeDom.get(0)) {
+ nodeDom = view.appendNodes(setting, node.level, [node], null, false, true).join('');
+ } else if (!targetObj.get(0)) {
+ nodeDom.remove();
+ }
+ if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) {
+ target_ulObj.append(nodeDom);
+ } else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) {
+ targetObj.before(nodeDom);
+ } else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) {
+ targetObj.after(nodeDom);
+ }
+
+ //repair the data after move
+ var i,l,
+ tmpSrcIndex = -1,
+ tmpTargetIndex = 0,
+ oldNeighbor = null,
+ newNeighbor = null,
+ oldLevel = node.level;
+ if (node.isFirstNode) {
+ tmpSrcIndex = 0;
+ if (oldParentNode[childKey].length > 1 ) {
+ oldNeighbor = oldParentNode[childKey][1];
+ oldNeighbor.isFirstNode = true;
+ }
+ } else if (node.isLastNode) {
+ tmpSrcIndex = oldParentNode[childKey].length -1;
+ oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1];
+ oldNeighbor.isLastNode = true;
+ } else {
+ for (i = 0, l = oldParentNode[childKey].length; i < l; i++) {
+ if (oldParentNode[childKey][i].tId == node.tId) {
+ tmpSrcIndex = i;
+ break;
+ }
+ }
+ }
+ if (tmpSrcIndex >= 0) {
+ oldParentNode[childKey].splice(tmpSrcIndex, 1);
+ }
+ if (moveType != consts.move.TYPE_INNER) {
+ for (i = 0, l = targetParentNode[childKey].length; i < l; i++) {
+ if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i;
+ }
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ if (!targetNode[childKey]) targetNode[childKey] = new Array();
+ if (targetNode[childKey].length > 0) {
+ newNeighbor = targetNode[childKey][targetNode[childKey].length - 1];
+ newNeighbor.isLastNode = false;
+ }
+ targetNode[childKey].splice(targetNode[childKey].length, 0, node);
+ node.isLastNode = true;
+ node.isFirstNode = (targetNode[childKey].length == 1);
+ } else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) {
+ targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
+ newNeighbor = targetNode;
+ newNeighbor.isFirstNode = false;
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = true;
+ node.isLastNode = false;
+
+ } else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) {
+ targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
+ newNeighbor = targetNode;
+ newNeighbor.isLastNode = false;
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = false;
+ node.isLastNode = true;
+
+ } else {
+ if (moveType == consts.move.TYPE_PREV) {
+ targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
+ } else {
+ targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
+ }
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = false;
+ node.isLastNode = false;
+ }
+ data.fixPIdKeyValue(setting, node);
+ data.setSonNodeLevel(setting, node.getParentNode(), node);
+
+ //repair node what been moved
+ view.setNodeLineIcos(setting, node);
+ view.repairNodeLevelClass(setting, node, oldLevel)
+
+ //repair node's old parentNode dom
+ if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) {
+ //old parentNode has no child nodes
+ oldParentNode.isParent = false;
+ oldParentNode.open = false;
+ var tmp_ulObj = $("#" + oldParentNode.tId + consts.id.UL),
+ tmp_switchObj = $("#" + oldParentNode.tId + consts.id.SWITCH),
+ tmp_icoObj = $("#" + oldParentNode.tId + consts.id.ICON);
+ view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU);
+ tmp_ulObj.css("display", "none");
+
+ } else if (oldNeighbor) {
+ //old neigbor node
+ view.setNodeLineIcos(setting, oldNeighbor);
+ }
+
+ //new neigbor node
+ if (newNeighbor) {
+ view.setNodeLineIcos(setting, newNeighbor);
+ }
+
+ //repair checkbox / radio
+ if (!!setting.check && setting.check.enable && view.repairChkClass) {
+ view.repairChkClass(setting, oldParentNode);
+ view.repairParentChkClassWithSelf(setting, oldParentNode);
+ if (oldParentNode != node.parent)
+ view.repairParentChkClassWithSelf(setting, node);
+ }
+
+ //expand parents after move
+ if (!isSilent) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag);
+ }
+ },
+ removeEditBtn: function(node) {
+ $("#" + node.tId + consts.id.EDIT).unbind().remove();
+ },
+ removeRemoveBtn: function(node) {
+ $("#" + node.tId + consts.id.REMOVE).unbind().remove();
+ },
+ removeTreeDom: function(setting, node) {
+ node.isHover = false;
+ view.removeEditBtn(node);
+ view.removeRemoveBtn(node);
+ tools.apply(setting.view.removeHoverDom, [setting.treeId, node]);
+ },
+ repairNodeLevelClass: function(setting, node, oldLevel) {
+ if (oldLevel === node.level) return;
+ var liObj = $("#" + node.tId),
+ aObj = $("#" + node.tId + consts.id.A),
+ ulObj = $("#" + node.tId + consts.id.UL),
+ oldClass = consts.className.LEVEL + oldLevel,
+ newClass = consts.className.LEVEL + node.level;
+ liObj.removeClass(oldClass);
+ liObj.addClass(newClass);
+ aObj.removeClass(oldClass);
+ aObj.addClass(newClass);
+ ulObj.removeClass(oldClass);
+ ulObj.addClass(newClass);
+ }
+ },
+
+ _z = {
+ tools: _tools,
+ view: _view,
+ event: _event,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree.consts, _consts);
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event;
+
+ data.exSetting(_setting);
+ data.addInitBind(_bindEvent);
+ data.addInitUnBind(_unbindEvent);
+ data.addInitCache(_initCache);
+ data.addInitNode(_initNode);
+ data.addInitProxy(_eventProxy);
+ data.addInitRoot(_initRoot);
+ data.addZTreeTools(_zTreeTools);
+
+ var _cancelPreSelectedNode = view.cancelPreSelectedNode;
+ view.cancelPreSelectedNode = function (setting, node) {
+ var list = data.getRoot(setting).curSelectedList;
+ for (var i=0, j=list.length; i");
+ },
+ showNode: function(setting, node, options) {
+ node.isHidden = false;
+ data.initShowForExCheck(setting, node);
+ $("#" + node.tId).show();
+ },
+ showNodes: function(setting, nodes, options) {
+ if (!nodes || nodes.length == 0) {
+ return;
+ }
+ var pList = {}, i, j;
+ for (i=0, j=nodes.length; i 0 && !parentNode[childKey][0].isHidden) {
+ parentNode[childKey][0].isFirstNode = true;
+ } else if (childLength > 0) {
+ view.setFirstNodeForHide(setting, parentNode[childKey]);
+ }
+ },
+ setLastNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if (childLength > 0 && !parentNode[childKey][0].isHidden) {
+ parentNode[childKey][childLength - 1].isLastNode = true;
+ } else if (childLength > 0) {
+ view.setLastNodeForHide(setting, parentNode[childKey]);
+ }
+ },
+ setFirstNodeForHide: function(setting, nodes) {
+ var n,i,j;
+ for (i=0, j=nodes.length; i=0; i--) {
+ n = nodes[i];
+ if (n.isLastNode) {
+ break;
+ }
+ if (!n.isHidden && !n.isLastNode) {
+ n.isLastNode = true;
+ view.setNodeLineIcos(setting, n);
+ break;
+ } else {
+ n = null;
+ }
+ }
+ return n;
+ },
+ setLastNodeForShow: function(setting, nodes) {
+ var n,i,j, last, old;
+ for (i=nodes.length-1; i>=0; i--) {
+ n = nodes[i];
+ if (!last && !n.isHidden && n.isLastNode) {
+ last = n;
+ break;
+ } else if (!last && !n.isHidden && !n.isLastNode) {
+ n.isLastNode = true;
+ last = n;
+ view.setNodeLineIcos(setting, n);
+ } else if (last && n.isLastNode) {
+ n.isLastNode = false;
+ old = n;
+ view.setNodeLineIcos(setting, n);
+ break;
+ } else {
+ n = null;
+ }
+ }
+ return {"new":last, "old":old};
+ }
+ },
+
+ _z = {
+ view: _view,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event;
+
+ data.addInitNode(_initNode);
+ data.addBeforeA(_beforeA);
+ data.addZTreeTools(_zTreeTools);
+
+// Override method in core
+ var _dInitNode = data.initNode;
+ data.tmpHideParent = -1;
+ data.initNode = function(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (data.tmpHideParent !== parentNode) {
+ data.tmpHideParent = parentNode;
+ var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
+ children = tmpPNode[setting.data.key.children];
+ data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children);
+ data.tmpHideLastNode = view.setLastNodeForHide(setting, children);
+ view.setNodeLineIcos(setting, data.tmpHideFirstNode);
+ view.setNodeLineIcos(setting, data.tmpHideLastNode);
+ }
+ isFirstNode = (data.tmpHideFirstNode === node);
+ isLastNode = (data.tmpHideLastNode === node);
+ if (_dInitNode) _dInitNode.apply(data, arguments);
+ if (isLastNode) {
+ view.clearOldLastNode(setting, node);
+ }
+ }
+
+ var _makeChkFlag = data.makeChkFlag;
+ if (!!_makeChkFlag) {
+ data.makeChkFlag = function(setting, node) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _makeChkFlag.apply(data, arguments);
+ }
+ }
+
+ var _getTreeCheckedNodes = data.getTreeCheckedNodes;
+ if (!!_getTreeCheckedNodes) {
+ data.getTreeCheckedNodes = function(setting, nodes, checked, results) {
+ if (!!nodes && nodes.length > 0) {
+ var p = nodes[0].getParentNode();
+ if (!!p && !!p.isHidden) {
+ return [];
+ }
+ }
+ return _getTreeCheckedNodes.apply(data, arguments);
+ }
+ }
+
+ var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes;
+ if (!!_getTreeChangeCheckedNodes) {
+ data.getTreeChangeCheckedNodes = function(setting, nodes, results) {
+ if (!!nodes && nodes.length > 0) {
+ var p = nodes[0].getParentNode();
+ if (!!p && !!p.isHidden) {
+ return [];
+ }
+ }
+ return _getTreeChangeCheckedNodes.apply(data, arguments);
+ }
+ }
+
+ var _expandCollapseSonNode = view.expandCollapseSonNode;
+ if (!!_expandCollapseSonNode) {
+ view.expandCollapseSonNode = function(setting, node, expandFlag, animateFlag, callback) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _expandCollapseSonNode.apply(view, arguments);
+ }
+ }
+
+ var _setSonNodeCheckBox = view.setSonNodeCheckBox;
+ if (!!_setSonNodeCheckBox) {
+ view.setSonNodeCheckBox = function(setting, node, value, srcNode) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _setSonNodeCheckBox.apply(view, arguments);
+ }
+ }
+
+ var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf;
+ if (!!_repairParentChkClassWithSelf) {
+ view.repairParentChkClassWithSelf = function(setting, node) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _repairParentChkClassWithSelf.apply(view, arguments);
+ }
+ }
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
})(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.core-3.5.js b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.core-3.5.js
index d8bc64f26..0f5dad2ad 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.core-3.5.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.core-3.5.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*
* JQuery zTree core 3.5.12
* http://zTree.me/
@@ -1647,4 +1648,1655 @@
var zt = $.fn.zTree,
consts = zt.consts;
+=======
+/*
+ * JQuery zTree core 3.5.12
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2013-03-11
+ */
+(function($){
+ var settings = {}, roots = {}, caches = {},
+ //default consts of core
+ _consts = {
+ className: {
+ BUTTON: "button",
+ LEVEL: "level",
+ ICO_LOADING: "ico_loading",
+ SWITCH: "switch"
+ },
+ event: {
+ NODECREATED: "ztree_nodeCreated",
+ CLICK: "ztree_click",
+ EXPAND: "ztree_expand",
+ COLLAPSE: "ztree_collapse",
+ ASYNC_SUCCESS: "ztree_async_success",
+ ASYNC_ERROR: "ztree_async_error"
+ },
+ id: {
+ A: "_a",
+ ICON: "_ico",
+ SPAN: "_span",
+ SWITCH: "_switch",
+ UL: "_ul"
+ },
+ line: {
+ ROOT: "root",
+ ROOTS: "roots",
+ CENTER: "center",
+ BOTTOM: "bottom",
+ NOLINE: "noline",
+ LINE: "line"
+ },
+ folder: {
+ OPEN: "open",
+ CLOSE: "close",
+ DOCU: "docu"
+ },
+ node: {
+ CURSELECTED: "curSelectedNode"
+ }
+ },
+ //default setting of core
+ _setting = {
+ treeId: "",
+ treeObj: null,
+ view: {
+ addDiyDom: null,
+ autoCancelSelected: true,
+ dblClickExpand: true,
+ expandSpeed: "fast",
+ fontCss: {},
+ nameIsHTML: false,
+ selectedMulti: true,
+ showIcon: true,
+ showLine: true,
+ showTitle: true
+ },
+ data: {
+ key: {
+ children: "children",
+ name: "name",
+ title: "",
+ url: "url"
+ },
+ simpleData: {
+ enable: false,
+ idKey: "id",
+ pIdKey: "pId",
+ rootPId: null
+ },
+ keep: {
+ parent: false,
+ leaf: false
+ }
+ },
+ async: {
+ enable: false,
+ contentType: "application/x-www-form-urlencoded",
+ type: "post",
+ dataType: "text",
+ url: "",
+ autoParam: [],
+ otherParam: [],
+ dataFilter: null
+ },
+ callback: {
+ beforeAsync:null,
+ beforeClick:null,
+ beforeDblClick:null,
+ beforeRightClick:null,
+ beforeMouseDown:null,
+ beforeMouseUp:null,
+ beforeExpand:null,
+ beforeCollapse:null,
+ beforeRemove:null,
+
+ onAsyncError:null,
+ onAsyncSuccess:null,
+ onNodeCreated:null,
+ onClick:null,
+ onDblClick:null,
+ onRightClick:null,
+ onMouseDown:null,
+ onMouseUp:null,
+ onExpand:null,
+ onCollapse:null,
+ onRemove:null
+ }
+ },
+ //default root of core
+ //zTree use root to save full data
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ if (!r) {
+ r = {};
+ data.setRoot(setting, r);
+ }
+ r[setting.data.key.children] = [];
+ r.expandTriggerFlag = false;
+ r.curSelectedList = [];
+ r.noSelection = true;
+ r.createdNodes = [];
+ r.zId = 0;
+ r._ver = (new Date()).getTime();
+ },
+ //default cache of core
+ _initCache = function(setting) {
+ var c = data.getCache(setting);
+ if (!c) {
+ c = {};
+ data.setCache(setting, c);
+ }
+ c.nodes = [];
+ c.doms = [];
+ },
+ //default bindEvent of core
+ _bindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.bind(c.NODECREATED, function (event, treeId, node) {
+ tools.apply(setting.callback.onNodeCreated, [event, treeId, node]);
+ });
+
+ o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {
+ tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);
+ });
+
+ o.bind(c.EXPAND, function (event, treeId, node) {
+ tools.apply(setting.callback.onExpand, [event, treeId, node]);
+ });
+
+ o.bind(c.COLLAPSE, function (event, treeId, node) {
+ tools.apply(setting.callback.onCollapse, [event, treeId, node]);
+ });
+
+ o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {
+ tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);
+ });
+
+ o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
+ tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.unbind(c.NODECREATED)
+ .unbind(c.CLICK)
+ .unbind(c.EXPAND)
+ .unbind(c.COLLAPSE)
+ .unbind(c.ASYNC_SUCCESS)
+ .unbind(c.ASYNC_ERROR);
+ },
+ //default event proxy of core
+ _eventProxy = function(event) {
+ var target = event.target,
+ setting = data.getSetting(event.data.treeId),
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null,
+ tmp = null;
+
+ if (tools.eqs(event.type, "mousedown")) {
+ treeEventType = "mousedown";
+ } else if (tools.eqs(event.type, "mouseup")) {
+ treeEventType = "mouseup";
+ } else if (tools.eqs(event.type, "contextmenu")) {
+ treeEventType = "contextmenu";
+ } else if (tools.eqs(event.type, "click")) {
+ if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) {
+ tId = ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0)).id;
+ nodeEventType = "switchNode";
+ } else {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = ($(tmp).parent("li").get(0) || $(tmp).parentsUntil("li").parent().get(0)).id;
+ nodeEventType = "clickNode";
+ }
+ }
+ } else if (tools.eqs(event.type, "dblclick")) {
+ treeEventType = "dblclick";
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = ($(tmp).parent("li").get(0) || $(tmp).parentsUntil("li").parent().get(0)).id;
+ nodeEventType = "switchNode";
+ }
+ }
+ if (treeEventType.length > 0 && tId.length == 0) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {tId = ($(tmp).parent("li").get(0) || $(tmp).parentsUntil("li").parent().get(0)).id;}
+ }
+ // event to node
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "switchNode" :
+ if (!node.isParent) {
+ nodeEventType = "";
+ } else if (tools.eqs(event.type, "click")
+ || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {
+ nodeEventCallback = handler.onSwitchNode;
+ } else {
+ nodeEventType = "";
+ }
+ break;
+ case "clickNode" :
+ nodeEventCallback = handler.onClickNode;
+ break;
+ }
+ }
+ // event to zTree
+ switch (treeEventType) {
+ case "mousedown" :
+ treeEventCallback = handler.onZTreeMousedown;
+ break;
+ case "mouseup" :
+ treeEventCallback = handler.onZTreeMouseup;
+ break;
+ case "dblclick" :
+ treeEventCallback = handler.onZTreeDblclick;
+ break;
+ case "contextmenu" :
+ treeEventCallback = handler.onZTreeContextmenu;
+ break;
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of core
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ var r = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ n.level = level;
+ n.tId = setting.treeId + "_" + (++r.zId);
+ n.parentTId = parentNode ? parentNode.tId : null;
+ if (n[childKey] && n[childKey].length > 0) {
+ if (typeof n.open == "string") n.open = tools.eqs(n.open, "true");
+ n.open = !!n.open;
+ n.isParent = true;
+ n.zAsync = true;
+ } else {
+ n.open = false;
+ if (typeof n.isParent == "string") n.isParent = tools.eqs(n.isParent, "true");
+ n.isParent = !!n.isParent;
+ n.zAsync = !n.isParent;
+ }
+ n.isFirstNode = isFirstNode;
+ n.isLastNode = isLastNode;
+ n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};
+ n.getPreNode = function() {return data.getPreNode(setting, n);};
+ n.getNextNode = function() {return data.getNextNode(setting, n);};
+ n.isAjaxing = false;
+ data.fixPIdKeyValue(setting, n);
+ },
+ _init = {
+ bind: [_bindEvent],
+ unbind: [_unbindEvent],
+ caches: [_initCache],
+ nodes: [_initNode],
+ proxys: [_eventProxy],
+ roots: [_initRoot],
+ beforeA: [],
+ afterA: [],
+ innerBeforeA: [],
+ innerAfterA: [],
+ zTreeTools: []
+ },
+ //method of operate data
+ data = {
+ addNodeCache: function(setting, node) {
+ data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node;
+ },
+ getNodeCacheId: function(tId) {
+ return tId.substring(tId.lastIndexOf("_")+1);
+ },
+ addAfterA: function(afterA) {
+ _init.afterA.push(afterA);
+ },
+ addBeforeA: function(beforeA) {
+ _init.beforeA.push(beforeA);
+ },
+ addInnerAfterA: function(innerAfterA) {
+ _init.innerAfterA.push(innerAfterA);
+ },
+ addInnerBeforeA: function(innerBeforeA) {
+ _init.innerBeforeA.push(innerBeforeA);
+ },
+ addInitBind: function(bindEvent) {
+ _init.bind.push(bindEvent);
+ },
+ addInitUnBind: function(unbindEvent) {
+ _init.unbind.push(unbindEvent);
+ },
+ addInitCache: function(initCache) {
+ _init.caches.push(initCache);
+ },
+ addInitNode: function(initNode) {
+ _init.nodes.push(initNode);
+ },
+ addInitProxy: function(initProxy) {
+ _init.proxys.push(initProxy);
+ },
+ addInitRoot: function(initRoot) {
+ _init.roots.push(initRoot);
+ },
+ addNodesData: function(setting, parentNode, nodes) {
+ var childKey = setting.data.key.children;
+ if (!parentNode[childKey]) parentNode[childKey] = [];
+ if (parentNode[childKey].length > 0) {
+ parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;
+ view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);
+ }
+ parentNode.isParent = true;
+ parentNode[childKey] = parentNode[childKey].concat(nodes);
+ },
+ addSelectedNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ if (!data.isSelectedNode(setting, node)) {
+ root.curSelectedList.push(node);
+ }
+ },
+ addCreatedNode: function(setting, node) {
+ if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+ var root = data.getRoot(setting);
+ root.createdNodes.push(node);
+ }
+ },
+ addZTreeTools: function(zTreeTools) {
+ _init.zTreeTools.push(zTreeTools);
+ },
+ exSetting: function(s) {
+ $.extend(true, _setting, s);
+ },
+ fixPIdKeyValue: function(setting, node) {
+ if (setting.data.simpleData.enable) {
+ node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;
+ }
+ },
+ getAfterA: function(setting, node, array) {
+ for (var i=0, j=_init.afterA.length; i-1) {
+ result.push(nodes[i]);
+ }
+ result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));
+ }
+ return result;
+ },
+ getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) {
+ if (!nodes) return (isSingle ? null : []);
+ var childKey = setting.data.key.children,
+ result = isSingle ? null : [];
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (tools.apply(filter, [nodes[i], invokeParam], false)) {
+ if (isSingle) {return nodes[i];}
+ result.push(nodes[i]);
+ }
+ var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam);
+ if (isSingle && !!tmpResult) {return tmpResult;}
+ result = isSingle ? tmpResult : result.concat(tmpResult);
+ }
+ return result;
+ },
+ getPreNode: function(setting, node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
+ for (var i=0, l=p[childKey].length; i 0)));
+ },
+ clone: function (obj){
+ if (obj === null) return null;
+ var o = obj.constructor === Array ? [] : {};
+ for(var i in obj){
+ o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]);
+ }
+ return o;
+ },
+ eqs: function(str1, str2) {
+ return str1.toLowerCase() === str2.toLowerCase();
+ },
+ isArray: function(arr) {
+ return Object.prototype.toString.apply(arr) === "[object Array]";
+ },
+ getMDom: function (setting, curDom, targetExpr) {
+ if (!curDom) return null;
+ while (curDom && curDom.id !== setting.treeId) {
+ for (var i=0, l=targetExpr.length; curDom.tagName && i 0) {
+ //make child html first, because checkType
+ childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);
+ }
+ if (openFlag) {
+
+ view.makeDOMNodeMainBefore(html, setting, node);
+ view.makeDOMNodeLine(html, setting, node);
+ data.getBeforeA(setting, node, html);
+ view.makeDOMNodeNameBefore(html, setting, node);
+ data.getInnerBeforeA(setting, node, html);
+ view.makeDOMNodeIcon(html, setting, node);
+ data.getInnerAfterA(setting, node, html);
+ view.makeDOMNodeNameAfter(html, setting, node);
+ data.getAfterA(setting, node, html);
+ if (node.isParent && node.open) {
+ view.makeUlHtml(setting, node, html, childHtml.join(''));
+ }
+ view.makeDOMNodeMainAfter(html, setting, node);
+ data.addCreatedNode(setting, node);
+ }
+ }
+ return html;
+ },
+ appendParentULDom: function(setting, node) {
+ var html = [],
+ nObj = $("#" + node.tId),
+ ulObj = $("#" + node.tId + consts.id.UL),
+ childKey = setting.data.key.children,
+ childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);
+ view.makeUlHtml(setting, node, html, childHtml.join(''));
+ if (!nObj.get(0) && !!node.parentTId) {
+ view.appendParentULDom(setting, node.getParentNode());
+ nObj = $("#" + node.tId);
+ }
+ if (ulObj.get(0)) {
+ ulObj.remove();
+ }
+ nObj.append(html.join(''));
+ },
+ asyncNode: function(setting, node, isSilent, callback) {
+ var i, l;
+ if (node && !node.isParent) {
+ tools.apply(callback);
+ return false;
+ } else if (node && node.isAjaxing) {
+ return false;
+ } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {
+ tools.apply(callback);
+ return false;
+ }
+ if (node) {
+ node.isAjaxing = true;
+ var icoObj = $("#" + node.tId + consts.id.ICON);
+ icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING});
+ }
+
+ var tmpParam = {};
+ for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {
+ var pKey = setting.async.autoParam[i].split("="), spKey = pKey;
+ if (pKey.length>1) {
+ spKey = pKey[1];
+ pKey = pKey[0];
+ }
+ tmpParam[spKey] = node[pKey];
+ }
+ if (tools.isArray(setting.async.otherParam)) {
+ for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {
+ tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1];
+ }
+ } else {
+ for (var p in setting.async.otherParam) {
+ tmpParam[p] = setting.async.otherParam[p];
+ }
+ }
+
+ var _tmpV = data.getRoot(setting)._ver;
+ $.ajax({
+ contentType: setting.async.contentType,
+ type: setting.async.type,
+ url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),
+ data: tmpParam,
+ dataType: setting.async.dataType,
+ success: function(msg) {
+ if (_tmpV != data.getRoot(setting)._ver) {
+ return;
+ }
+ var newNodes = [];
+ try {
+ if (!msg || msg.length == 0) {
+ newNodes = [];
+ } else if (typeof msg == "string") {
+ newNodes = eval("(" + msg + ")");
+ } else {
+ newNodes = msg;
+ }
+ } catch(err) {
+ newNodes = msg;
+ }
+
+ if (node) {
+ node.isAjaxing = null;
+ node.zAsync = true;
+ }
+ view.setNodeLineIcos(setting, node);
+ if (newNodes && newNodes !== "") {
+ newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);
+ view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);
+ } else {
+ view.addNodes(setting, node, [], !!isSilent);
+ }
+ setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);
+ tools.apply(callback);
+ },
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
+ if (_tmpV != data.getRoot(setting)._ver) {
+ return;
+ }
+ if (node) node.isAjaxing = null;
+ view.setNodeLineIcos(setting, node);
+ setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+ }
+ });
+ return true;
+ },
+ cancelPreSelectedNode: function (setting, node) {
+ var list = data.getRoot(setting).curSelectedList;
+ for (var i=0, j=list.length-1; j>=i; j--) {
+ if (!node || node === list[j]) {
+ $("#" + list[j].tId + consts.id.A).removeClass(consts.node.CURSELECTED);
+ if (node) {
+ data.removeSelectedNode(setting, node);
+ break;
+ }
+ }
+ }
+ if (!node) data.getRoot(setting).curSelectedList = [];
+ },
+ createNodeCallback: function(setting) {
+ if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+ var root = data.getRoot(setting);
+ while (root.createdNodes.length>0) {
+ var node = root.createdNodes.shift();
+ tools.apply(setting.view.addDiyDom, [setting.treeId, node]);
+ if (!!setting.callback.onNodeCreated) {
+ setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);
+ }
+ }
+ }
+ },
+ createNodes: function(setting, level, nodes, parentNode) {
+ if (!nodes || nodes.length == 0) return;
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ openFlag = !parentNode || parentNode.open || !!$("#" + parentNode[childKey][0].tId).get(0);
+ root.createdNodes = [];
+ var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);
+ if (!parentNode) {
+ setting.treeObj.append(zTreeHtml.join(''));
+ } else {
+ var ulObj = $("#" + parentNode.tId + consts.id.UL);
+ if (ulObj.get(0)) {
+ ulObj.append(zTreeHtml.join(''));
+ }
+ }
+ view.createNodeCallback(setting);
+ },
+ destroy: function(setting) {
+ if (!setting) return;
+ data.initCache(setting);
+ data.initRoot(setting);
+ event.unbindTree(setting);
+ event.unbindEvent(setting);
+ setting.treeObj.empty();
+ },
+ expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ if (!node) {
+ tools.apply(callback, []);
+ return;
+ }
+ if (root.expandTriggerFlag) {
+ var _callback = callback;
+ callback = function(){
+ if (_callback) _callback();
+ if (node.open) {
+ setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);
+ } else {
+ setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);
+ }
+ };
+ root.expandTriggerFlag = false;
+ }
+ if (!node.open && node.isParent && ((!$("#" + node.tId + consts.id.UL).get(0)) || (node[childKey] && node[childKey].length>0 && !$("#" + node[childKey][0].tId).get(0)))) {
+ view.appendParentULDom(setting, node);
+ view.createNodeCallback(setting);
+ }
+ if (node.open == expandFlag) {
+ tools.apply(callback, []);
+ return;
+ }
+ var ulObj = $("#" + node.tId + consts.id.UL),
+ switchObj = $("#" + node.tId + consts.id.SWITCH),
+ icoObj = $("#" + node.tId + consts.id.ICON);
+
+ if (node.isParent) {
+ node.open = !node.open;
+ if (node.iconOpen && node.iconClose) {
+ icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+ }
+
+ if (node.open) {
+ view.replaceSwitchClass(node, switchObj, consts.folder.OPEN);
+ view.replaceIcoClass(node, icoObj, consts.folder.OPEN);
+ if (animateFlag == false || setting.view.expandSpeed == "") {
+ ulObj.show();
+ tools.apply(callback, []);
+ } else {
+ if (node[childKey] && node[childKey].length > 0) {
+ ulObj.slideDown(setting.view.expandSpeed, callback);
+ } else {
+ ulObj.show();
+ tools.apply(callback, []);
+ }
+ }
+ } else {
+ view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);
+ view.replaceIcoClass(node, icoObj, consts.folder.CLOSE);
+ if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) {
+ ulObj.hide();
+ tools.apply(callback, []);
+ } else {
+ ulObj.slideUp(setting.view.expandSpeed, callback);
+ }
+ }
+ } else {
+ tools.apply(callback, []);
+ }
+ },
+ expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {
+ if (!node) return;
+ if (!node.parentTId) {
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);
+ return;
+ } else {
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag);
+ }
+ if (node.parentTId) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);
+ }
+ },
+ expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ treeNodes = (node) ? node[childKey]: root[childKey],
+ selfAnimateSign = (node) ? false : animateFlag,
+ expandTriggerFlag = data.getRoot(setting).expandTriggerFlag;
+ data.getRoot(setting).expandTriggerFlag = false;
+ if (treeNodes) {
+ for (var i = 0, l = treeNodes.length; i < l; i++) {
+ if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);
+ }
+ }
+ data.getRoot(setting).expandTriggerFlag = expandTriggerFlag;
+ view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );
+ },
+ makeDOMNodeIcon: function(html, setting, node) {
+ var nameStr = data.getNodeName(setting, node),
+ name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&').replace(//g,'>');
+ html.push("",name," ");
+ },
+ makeDOMNodeLine: function(html, setting, node) {
+ html.push(" ");
+ },
+ makeDOMNodeMainAfter: function(html, setting, node) {
+ html.push(" ");
+ },
+ makeDOMNodeMainBefore: function(html, setting, node) {
+ html.push("");
+ },
+ makeDOMNodeNameAfter: function(html, setting, node) {
+ html.push(" ");
+ },
+ makeDOMNodeNameBefore: function(html, setting, node) {
+ var title = data.getNodeTitle(setting, node),
+ url = view.makeNodeUrl(setting, node),
+ fontcss = view.makeNodeFontCss(setting, node),
+ fontStyle = [];
+ for (var f in fontcss) {
+ fontStyle.push(f, ":", fontcss[f], ";");
+ }
+ html.push(" 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''),
+ "'");
+ if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"'").replace(//g,'>'),"'");}
+ html.push(">");
+ },
+ makeNodeFontCss: function(setting, node) {
+ var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);
+ return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {};
+ },
+ makeNodeIcoClass: function(setting, node) {
+ var icoCss = ["ico"];
+ if (!node.isAjaxing) {
+ icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0];
+ if (node.isParent) {
+ icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+ } else {
+ icoCss.push(consts.folder.DOCU);
+ }
+ }
+ return consts.className.BUTTON + " " + icoCss.join('_');
+ },
+ makeNodeIcoStyle: function(setting, node) {
+ var icoStyle = [];
+ if (!node.isAjaxing) {
+ var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;
+ if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;");
+ if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {
+ icoStyle.push("width:0px;height:0px;");
+ }
+ }
+ return icoStyle.join('');
+ },
+ makeNodeLineClass: function(setting, node) {
+ var lineClass = [];
+ if (setting.view.showLine) {
+ if (node.level == 0 && node.isFirstNode && node.isLastNode) {
+ lineClass.push(consts.line.ROOT);
+ } else if (node.level == 0 && node.isFirstNode) {
+ lineClass.push(consts.line.ROOTS);
+ } else if (node.isLastNode) {
+ lineClass.push(consts.line.BOTTOM);
+ } else {
+ lineClass.push(consts.line.CENTER);
+ }
+ } else {
+ lineClass.push(consts.line.NOLINE);
+ }
+ if (node.isParent) {
+ lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+ } else {
+ lineClass.push(consts.folder.DOCU);
+ }
+ return view.makeNodeLineClassEx(node) + lineClass.join('_');
+ },
+ makeNodeLineClassEx: function(node) {
+ return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " ";
+ },
+ makeNodeTarget: function(node) {
+ return (node.target || "_blank");
+ },
+ makeNodeUrl: function(setting, node) {
+ var urlKey = setting.data.key.url;
+ return node[urlKey] ? node[urlKey] : null;
+ },
+ makeUlHtml: function(setting, node, html, content) {
+ html.push("");
+ html.push(content);
+ html.push(" ");
+ },
+ makeUlLineClass: function(setting, node) {
+ return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : "");
+ },
+ removeChildNodes: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ nodes = node[childKey];
+ if (!nodes) return;
+
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ data.removeNodeCache(setting, nodes[i]);
+ }
+ data.removeSelectedNode(setting);
+ delete node[childKey];
+
+ if (!setting.data.keep.parent) {
+ node.isParent = false;
+ node.open = false;
+ var tmp_switchObj = $("#" + node.tId + consts.id.SWITCH),
+ tmp_icoObj = $("#" + node.tId + consts.id.ICON);
+ view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);
+ $("#" + node.tId + consts.id.UL).remove();
+ } else {
+ $("#" + node.tId + consts.id.UL).empty();
+ }
+ },
+ setFirstNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if ( childLength > 0) {
+ parentNode[childKey][0].isFirstNode = true;
+ }
+ },
+ setLastNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if ( childLength > 0) {
+ parentNode[childKey][childLength - 1].isLastNode = true;
+ }
+ },
+ removeNode: function(setting, node) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children,
+ parentNode = (node.parentTId) ? node.getParentNode() : root;
+
+ node.isFirstNode = false;
+ node.isLastNode = false;
+ node.getPreNode = function() {return null;};
+ node.getNextNode = function() {return null;};
+
+ if (!data.getNodeCache(setting, node.tId)) {
+ return;
+ }
+
+ $("#" + node.tId).remove();
+ data.removeNodeCache(setting, node);
+ data.removeSelectedNode(setting, node);
+
+ for (var i = 0, l = parentNode[childKey].length; i < l; i++) {
+ if (parentNode[childKey][i].tId == node.tId) {
+ parentNode[childKey].splice(i, 1);
+ break;
+ }
+ }
+ view.setFirstNode(setting, parentNode);
+ view.setLastNode(setting, parentNode);
+
+ var tmp_ulObj,tmp_switchObj,tmp_icoObj,
+ childLength = parentNode[childKey].length;
+
+ //repair nodes old parent
+ if (!setting.data.keep.parent && childLength == 0) {
+ //old parentNode has no child nodes
+ parentNode.isParent = false;
+ parentNode.open = false;
+ tmp_ulObj = $("#" + parentNode.tId + consts.id.UL);
+ tmp_switchObj = $("#" + parentNode.tId + consts.id.SWITCH);
+ tmp_icoObj = $("#" + parentNode.tId + consts.id.ICON);
+ view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);
+ tmp_ulObj.css("display", "none");
+
+ } else if (setting.view.showLine && childLength > 0) {
+ //old parentNode has child nodes
+ var newLast = parentNode[childKey][childLength - 1];
+ tmp_ulObj = $("#" + newLast.tId + consts.id.UL);
+ tmp_switchObj = $("#" + newLast.tId + consts.id.SWITCH);
+ tmp_icoObj = $("#" + newLast.tId + consts.id.ICON);
+ if (parentNode == root) {
+ if (parentNode[childKey].length == 1) {
+ //node was root, and ztree has only one root after move node
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);
+ } else {
+ var tmp_first_switchObj = $("#" + parentNode[childKey][0].tId + consts.id.SWITCH);
+ view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+ }
+ } else {
+ view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+ }
+ tmp_ulObj.removeClass(consts.line.LINE);
+ }
+ },
+ replaceIcoClass: function(node, obj, newName) {
+ if (!obj || node.isAjaxing) return;
+ var tmpName = obj.attr("class");
+ if (tmpName == undefined) return;
+ var tmpList = tmpName.split("_");
+ switch (newName) {
+ case consts.folder.OPEN:
+ case consts.folder.CLOSE:
+ case consts.folder.DOCU:
+ tmpList[tmpList.length-1] = newName;
+ break;
+ }
+ obj.attr("class", tmpList.join("_"));
+ },
+ replaceSwitchClass: function(node, obj, newName) {
+ if (!obj) return;
+ var tmpName = obj.attr("class");
+ if (tmpName == undefined) return;
+ var tmpList = tmpName.split("_");
+ switch (newName) {
+ case consts.line.ROOT:
+ case consts.line.ROOTS:
+ case consts.line.CENTER:
+ case consts.line.BOTTOM:
+ case consts.line.NOLINE:
+ tmpList[0] = view.makeNodeLineClassEx(node) + newName;
+ break;
+ case consts.folder.OPEN:
+ case consts.folder.CLOSE:
+ case consts.folder.DOCU:
+ tmpList[1] = newName;
+ break;
+ }
+ obj.attr("class", tmpList.join("_"));
+ if (newName !== consts.folder.DOCU) {
+ obj.removeAttr("disabled");
+ } else {
+ obj.attr("disabled", "disabled");
+ }
+ },
+ selectNode: function(setting, node, addFlag) {
+ if (!addFlag) {
+ view.cancelPreSelectedNode(setting);
+ }
+ $("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED);
+ data.addSelectedNode(setting, node);
+ },
+ setNodeFontCss: function(setting, treeNode) {
+ var aObj = $("#" + treeNode.tId + consts.id.A),
+ fontCss = view.makeNodeFontCss(setting, treeNode);
+ if (fontCss) {
+ aObj.css(fontCss);
+ }
+ },
+ setNodeLineIcos: function(setting, node) {
+ if (!node) return;
+ var switchObj = $("#" + node.tId + consts.id.SWITCH),
+ ulObj = $("#" + node.tId + consts.id.UL),
+ icoObj = $("#" + node.tId + consts.id.ICON),
+ ulLine = view.makeUlLineClass(setting, node);
+ if (ulLine.length==0) {
+ ulObj.removeClass(consts.line.LINE);
+ } else {
+ ulObj.addClass(ulLine);
+ }
+ switchObj.attr("class", view.makeNodeLineClass(setting, node));
+ if (node.isParent) {
+ switchObj.removeAttr("disabled");
+ } else {
+ switchObj.attr("disabled", "disabled");
+ }
+ icoObj.removeAttr("style");
+ icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+ icoObj.attr("class", view.makeNodeIcoClass(setting, node));
+ },
+ setNodeName: function(setting, node) {
+ var title = data.getNodeTitle(setting, node),
+ nObj = $("#" + node.tId + consts.id.SPAN);
+ nObj.empty();
+ if (setting.view.nameIsHTML) {
+ nObj.html(data.getNodeName(setting, node));
+ } else {
+ nObj.text(data.getNodeName(setting, node));
+ }
+ if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) {
+ var aObj = $("#" + node.tId + consts.id.A);
+ aObj.attr("title", !title ? "" : title);
+ }
+ },
+ setNodeTarget: function(node) {
+ var aObj = $("#" + node.tId + consts.id.A);
+ aObj.attr("target", view.makeNodeTarget(node));
+ },
+ setNodeUrl: function(setting, node) {
+ var aObj = $("#" + node.tId + consts.id.A),
+ url = view.makeNodeUrl(setting, node);
+ if (url == null || url.length == 0) {
+ aObj.removeAttr("href");
+ } else {
+ aObj.attr("href", url);
+ }
+ },
+ switchNode: function(setting, node) {
+ if (node.open || !tools.canAsync(setting, node)) {
+ view.expandCollapseNode(setting, node, !node.open);
+ } else if (setting.async.enable) {
+ if (!view.asyncNode(setting, node)) {
+ view.expandCollapseNode(setting, node, !node.open);
+ return;
+ }
+ } else if (node) {
+ view.expandCollapseNode(setting, node, !node.open);
+ }
+ }
+ };
+ // zTree defind
+ $.fn.zTree = {
+ consts : _consts,
+ _z : {
+ tools: tools,
+ view: view,
+ event: event,
+ data: data
+ },
+ getZTreeObj: function(treeId) {
+ var o = data.getZTreeTools(treeId);
+ return o ? o : null;
+ },
+ destroy: function(treeId) {
+ if (!!treeId && treeId.length > 0) {
+ view.destroy(data.getSetting(treeId));
+ } else {
+ for(var s in settings) {
+ view.destroy(settings[s]);
+ }
+ }
+ },
+ init: function(obj, zSetting, zNodes) {
+ var setting = tools.clone(_setting);
+ $.extend(true, setting, zSetting);
+ setting.treeId = obj.attr("id");
+ setting.treeObj = obj;
+ setting.treeObj.empty();
+ settings[setting.treeId] = setting;
+ //For some older browser,(e.g., ie6)
+ if(typeof document.body.style.maxHeight === "undefined") {
+ setting.view.expandSpeed = "";
+ }
+ data.initRoot(setting);
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];
+ if (setting.data.simpleData.enable) {
+ root[childKey] = data.transformTozTreeFormat(setting, zNodes);
+ } else {
+ root[childKey] = zNodes;
+ }
+
+ data.initCache(setting);
+ event.unbindTree(setting);
+ event.bindTree(setting);
+ event.unbindEvent(setting);
+ event.bindEvent(setting);
+
+ var zTreeTools = {
+ setting : setting,
+ addNodes : function(parentNode, newNodes, isSilent) {
+ if (!newNodes) return null;
+ if (!parentNode) parentNode = null;
+ if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;
+ var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);
+ function addCallback() {
+ view.addNodes(setting, parentNode, xNewNodes, (isSilent==true));
+ }
+
+ if (tools.canAsync(setting, parentNode)) {
+ view.asyncNode(setting, parentNode, isSilent, addCallback);
+ } else {
+ addCallback();
+ }
+ return xNewNodes;
+ },
+ cancelSelectedNode : function(node) {
+ view.cancelPreSelectedNode(this.setting, node);
+ },
+ destroy : function() {
+ view.destroy(this.setting);
+ },
+ expandAll : function(expandFlag) {
+ expandFlag = !!expandFlag;
+ view.expandCollapseSonNode(this.setting, null, expandFlag, true);
+ return expandFlag;
+ },
+ expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {
+ if (!node || !node.isParent) return null;
+ if (expandFlag !== true && expandFlag !== false) {
+ expandFlag = !node.open;
+ }
+ callbackFlag = !!callbackFlag;
+
+ if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {
+ return null;
+ } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {
+ return null;
+ }
+ if (expandFlag && node.parentTId) {
+ view.expandCollapseParentNode(this.setting, node.getParentNode(), expandFlag, false);
+ }
+ if (expandFlag === node.open && !sonSign) {
+ return null;
+ }
+
+ data.getRoot(setting).expandTriggerFlag = callbackFlag;
+ if (sonSign) {
+ view.expandCollapseSonNode(this.setting, node, expandFlag, true, function() {
+ if (focus !== false) {try{$("#" + node.tId).focus().blur();}catch(e){}}
+ });
+ } else {
+ node.open = !expandFlag;
+ view.switchNode(this.setting, node);
+ if (focus !== false) {try{$("#" + node.tId).focus().blur();}catch(e){}}
+ }
+ return expandFlag;
+ },
+ getNodes : function() {
+ return data.getNodes(this.setting);
+ },
+ getNodeByParam : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodeByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
+ },
+ getNodeByTId : function(tId) {
+ return data.getNodeCache(this.setting, tId);
+ },
+ getNodesByParam : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodesByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
+ },
+ getNodesByParamFuzzy : function(key, value, parentNode) {
+ if (!key) return null;
+ return data.getNodesByParamFuzzy(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
+ },
+ getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) {
+ isSingle = !!isSingle;
+ if (!filter || (typeof filter != "function")) return (isSingle ? null : []);
+ return data.getNodesByFilter(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), filter, isSingle, invokeParam);
+ },
+ getNodeIndex : function(node) {
+ if (!node) return null;
+ var childKey = setting.data.key.children,
+ parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(this.setting);
+ for (var i=0, l = parentNode[childKey].length; i < l; i++) {
+ if (parentNode[childKey][i] == node) return i;
+ }
+ return -1;
+ },
+ getSelectedNodes : function() {
+ var r = [], list = data.getRoot(this.setting).curSelectedList;
+ for (var i=0, l=list.length; i 0) {
+ view.createNodes(setting, 0, root[childKey]);
+ } else if (setting.async.enable && setting.async.url && setting.async.url !== '') {
+ view.asyncNode(setting);
+ }
+ return zTreeTools;
+ }
+ };
+
+ var zt = $.fn.zTree,
+ consts = zt.consts;
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
})(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.excheck-3.5.js b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.excheck-3.5.js
index 2605badd3..db9639dd8 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.excheck-3.5.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.excheck-3.5.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*
* JQuery zTree excheck 3.5.12
* http://zTree.me/
@@ -621,4 +622,629 @@
}
return html;
}
+=======
+/*
+ * JQuery zTree excheck 3.5.12
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2013-03-11
+ */
+(function($){
+ //default consts of excheck
+ var _consts = {
+ event: {
+ CHECK: "ztree_check"
+ },
+ id: {
+ CHECK: "_check"
+ },
+ checkbox: {
+ STYLE: "checkbox",
+ DEFAULT: "chk",
+ DISABLED: "disable",
+ FALSE: "false",
+ TRUE: "true",
+ FULL: "full",
+ PART: "part",
+ FOCUS: "focus"
+ },
+ radio: {
+ STYLE: "radio",
+ TYPE_ALL: "all",
+ TYPE_LEVEL: "level"
+ }
+ },
+ //default setting of excheck
+ _setting = {
+ check: {
+ enable: false,
+ autoCheckTrigger: false,
+ chkStyle: _consts.checkbox.STYLE,
+ nocheckInherit: false,
+ chkDisabledInherit: false,
+ radioType: _consts.radio.TYPE_LEVEL,
+ chkboxType: {
+ "Y": "ps",
+ "N": "ps"
+ }
+ },
+ data: {
+ key: {
+ checked: "checked"
+ }
+ },
+ callback: {
+ beforeCheck:null,
+ onCheck:null
+ }
+ },
+ //default root of excheck
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ r.radioCheckedList = [];
+ },
+ //default cache of excheck
+ _initCache = function(treeId) {},
+ //default bind event of excheck
+ _bindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.bind(c.CHECK, function (event, srcEvent, treeId, node) {
+ tools.apply(setting.callback.onCheck, [!!srcEvent?srcEvent : event, treeId, node]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj,
+ c = consts.event;
+ o.unbind(c.CHECK);
+ },
+ //default event proxy of excheck
+ _eventProxy = function(e) {
+ var target = e.target,
+ setting = data.getSetting(e.data.treeId),
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null;
+
+ if (tools.eqs(e.type, "mouseover")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = target.parentNode.id;
+ nodeEventType = "mouseoverCheck";
+ }
+ } else if (tools.eqs(e.type, "mouseout")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = target.parentNode.id;
+ nodeEventType = "mouseoutCheck";
+ }
+ } else if (tools.eqs(e.type, "click")) {
+ if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+ tId = target.parentNode.id;
+ nodeEventType = "checkNode";
+ }
+ }
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "checkNode" :
+ nodeEventCallback = _handler.onCheckNode;
+ break;
+ case "mouseoverCheck" :
+ nodeEventCallback = _handler.onMouseoverCheck;
+ break;
+ case "mouseoutCheck" :
+ nodeEventCallback = _handler.onMouseoutCheck;
+ break;
+ }
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of excheck
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ var checkedKey = setting.data.key.checked;
+ if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
+ n[checkedKey] = !!n[checkedKey];
+ n.checkedOld = n[checkedKey];
+ if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true");
+ n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
+ if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true");
+ n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);
+ if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
+ n.halfCheck = !!n.halfCheck;
+ n.check_Child_State = -1;
+ n.check_Focus = false;
+ n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
+ },
+ //add dom for check
+ _beforeA = function(setting, node, html) {
+ var checkedKey = setting.data.key.checked;
+ if (setting.check.enable) {
+ data.makeChkFlag(setting, node);
+ if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && node[checkedKey] ) {
+ var r = data.getRoot(setting);
+ r.radioCheckedList.push(node);
+ }
+ html.push(" ");
+ }
+ },
+ //update zTreeObj, add method of check
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
+ var checkedKey = this.setting.data.key.checked;
+ if (node.chkDisabled === true) return;
+ if (checked !== true && checked !== false) {
+ checked = !node[checkedKey];
+ }
+ callbackFlag = !!callbackFlag;
+
+ if (node[checkedKey] === checked && !checkTypeFlag) {
+ return;
+ } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
+ return;
+ }
+ if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
+ node[checkedKey] = checked;
+ var checkObj = $("#" + node.tId + consts.id.CHECK);
+ if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+ view.setChkClass(this.setting, checkObj, node);
+ view.repairParentChkClassWithSelf(this.setting, node);
+ if (callbackFlag) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+ }
+
+ zTreeTools.checkAllNodes = function(checked) {
+ view.repairAllChk(this.setting, !!checked);
+ }
+
+ zTreeTools.getCheckedNodes = function(checked) {
+ var childKey = this.setting.data.key.children;
+ checked = (checked !== false);
+ return data.getTreeCheckedNodes(this.setting, data.getRoot(setting)[childKey], checked);
+ }
+
+ zTreeTools.getChangeCheckedNodes = function() {
+ var childKey = this.setting.data.key.children;
+ return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(setting)[childKey]);
+ }
+
+ zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {
+ disabled = !!disabled;
+ inheritParent = !!inheritParent;
+ inheritChildren = !!inheritChildren;
+ view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);
+ view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);
+ }
+
+ var _updateNode = zTreeTools.updateNode;
+ zTreeTools.updateNode = function(node, checkTypeFlag) {
+ if (_updateNode) _updateNode.apply(zTreeTools, arguments);
+ if (!node || !this.setting.check.enable) return;
+ var nObj = $("#" + node.tId);
+ if (nObj.get(0) && tools.uCanDo(this.setting)) {
+ var checkObj = $("#" + node.tId + consts.id.CHECK);
+ if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+ view.setChkClass(this.setting, checkObj, node);
+ view.repairParentChkClassWithSelf(this.setting, node);
+ }
+ }
+ },
+ //method of operate data
+ _data = {
+ getRadioCheckedList: function(setting) {
+ var checkedList = data.getRoot(setting).radioCheckedList;
+ for (var i=0, j=checkedList.length; i -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
+ };
+ return r;
+ },
+ getTreeCheckedNodes: function(setting, nodes, checked, results) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);
+ results = !results ? [] : results;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) {
+ results.push(nodes[i]);
+ if(onlyOne) {
+ break;
+ }
+ }
+ data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
+ if(onlyOne && results.length > 0) {
+ break;
+ }
+ }
+ return results;
+ },
+ getTreeChangeCheckedNodes: function(setting, nodes, results) {
+ if (!nodes) return [];
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked;
+ results = !results ? [] : results;
+ for (var i = 0, l = nodes.length; i < l; i++) {
+ if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
+ results.push(nodes[i]);
+ }
+ data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
+ }
+ return results;
+ },
+ makeChkFlag: function(setting, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ chkFlag = -1;
+ if (node[childKey]) {
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ var cNode = node[childKey][i];
+ var tmp = -1;
+ if (setting.check.chkStyle == consts.radio.STYLE) {
+ if (cNode.nocheck === true || cNode.chkDisabled === true) {
+ tmp = cNode.check_Child_State;
+ } else if (cNode.halfCheck === true) {
+ tmp = 2;
+ } else if (cNode[checkedKey]) {
+ tmp = 2;
+ } else {
+ tmp = cNode.check_Child_State > 0 ? 2:0;
+ }
+ if (tmp == 2) {
+ chkFlag = 2; break;
+ } else if (tmp == 0){
+ chkFlag = 0;
+ }
+ } else if (setting.check.chkStyle == consts.checkbox.STYLE) {
+ if (cNode.nocheck === true || cNode.chkDisabled === true) {
+ tmp = cNode.check_Child_State;
+ } else if (cNode.halfCheck === true) {
+ tmp = 1;
+ } else if (cNode[checkedKey] ) {
+ tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
+ } else {
+ tmp = (cNode.check_Child_State > 0) ? 1 : 0;
+ }
+ if (tmp === 1) {
+ chkFlag = 1; break;
+ } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {
+ chkFlag = 1; break;
+ } else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
+ chkFlag = 1; break;
+ } else if (tmp > -1) {
+ chkFlag = tmp;
+ }
+ }
+ }
+ }
+ node.check_Child_State = chkFlag;
+ }
+ },
+ //method of event proxy
+ _event = {
+
+ },
+ //method of event handler
+ _handler = {
+ onCheckNode: function (event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkedKey = setting.data.key.checked;
+ if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
+ node[checkedKey] = !node[checkedKey];
+ view.checkNodeRelation(setting, node);
+ var checkObj = $("#" + node.tId + consts.id.CHECK);
+ view.setChkClass(setting, checkObj, node);
+ view.repairParentChkClassWithSelf(setting, node);
+ setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);
+ return true;
+ },
+ onMouseoverCheck: function(event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkObj = $("#" + node.tId + consts.id.CHECK);
+ node.check_Focus = true;
+ view.setChkClass(setting, checkObj, node);
+ return true;
+ },
+ onMouseoutCheck: function(event, node) {
+ if (node.chkDisabled === true) return false;
+ var setting = data.getSetting(event.data.treeId),
+ checkObj = $("#" + node.tId + consts.id.CHECK);
+ node.check_Focus = false;
+ view.setChkClass(setting, checkObj, node);
+ return true;
+ }
+ },
+ //method of tools for zTree
+ _tools = {
+
+ },
+ //method of operate ztree dom
+ _view = {
+ checkNodeRelation: function(setting, node) {
+ var pNode, i, l,
+ childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ r = consts.radio;
+ if (setting.check.chkStyle == r.STYLE) {
+ var checkedList = data.getRadioCheckedList(setting);
+ if (node[checkedKey]) {
+ if (setting.check.radioType == r.TYPE_ALL) {
+ for (i = checkedList.length-1; i >= 0; i--) {
+ pNode = checkedList[i];
+ pNode[checkedKey] = false;
+ checkedList.splice(i, 1);
+
+ view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
+ if (pNode.parentTId != node.parentTId) {
+ view.repairParentChkClassWithSelf(setting, pNode);
+ }
+ }
+ checkedList.push(node);
+ } else {
+ var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
+ for (i = 0, l = parentNode[childKey].length; i < l; i++) {
+ pNode = parentNode[childKey][i];
+ if (pNode[checkedKey] && pNode != node) {
+ pNode[checkedKey] = false;
+ view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
+ }
+ }
+ }
+ } else if (setting.check.radioType == r.TYPE_ALL) {
+ for (i = 0, l = checkedList.length; i < l; i++) {
+ if (node == checkedList[i]) {
+ checkedList.splice(i, 1);
+ break;
+ }
+ }
+ }
+
+ } else {
+ if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
+ view.setSonNodeCheckBox(setting, node, true);
+ }
+ if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
+ view.setSonNodeCheckBox(setting, node, false);
+ }
+ if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
+ view.setParentNodeCheckBox(setting, node, true);
+ }
+ if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
+ view.setParentNodeCheckBox(setting, node, false);
+ }
+ }
+ },
+ makeChkClass: function(setting, node) {
+ var checkedKey = setting.data.key.checked,
+ c = consts.checkbox, r = consts.radio,
+ fullStyle = "";
+ if (node.chkDisabled === true) {
+ fullStyle = c.DISABLED;
+ } else if (node.halfCheck) {
+ fullStyle = c.PART;
+ } else if (setting.check.chkStyle == r.STYLE) {
+ fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
+ } else {
+ fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
+ }
+ var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
+ chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
+ return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName;
+ },
+ repairAllChk: function(setting, checked) {
+ if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
+ var checkedKey = setting.data.key.checked,
+ childKey = setting.data.key.children,
+ root = data.getRoot(setting);
+ for (var i = 0, l = root[childKey].length; i 0) {
+ view.repairParentChkClass(setting, node[childKey][0]);
+ } else {
+ view.repairParentChkClass(setting, node);
+ }
+ },
+ repairSonChkDisabled: function(setting, node, chkDisabled, inherit) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ if (node.chkDisabled != chkDisabled) {
+ node.chkDisabled = chkDisabled;
+ }
+ view.repairChkClass(setting, node);
+ if (node[childKey] && inherit) {
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ var sNode = node[childKey][i];
+ view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit);
+ }
+ }
+ },
+ repairParentChkDisabled: function(setting, node, chkDisabled, inherit) {
+ if (!node) return;
+ if (node.chkDisabled != chkDisabled && inherit) {
+ node.chkDisabled = chkDisabled;
+ }
+ view.repairChkClass(setting, node);
+ view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);
+ },
+ setChkClass: function(setting, obj, node) {
+ if (!obj) return;
+ if (node.nocheck === true) {
+ obj.hide();
+ } else {
+ obj.show();
+ }
+ obj.removeClass();
+ obj.addClass(view.makeChkClass(setting, node));
+ },
+ setParentNodeCheckBox: function(setting, node, value, srcNode) {
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ checkObj = $("#" + node.tId + consts.id.CHECK);
+ if (!srcNode) srcNode = node;
+ data.makeChkFlag(setting, node);
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = value;
+ view.setChkClass(setting, checkObj, node);
+ if (setting.check.autoCheckTrigger && node != srcNode) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+ if (node.parentTId) {
+ var pSign = true;
+ if (!value) {
+ var pNodes = node.getParentNode()[childKey];
+ for (var i = 0, l = pNodes.length; i < l; i++) {
+ if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey])
+ || ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) {
+ pSign = false;
+ break;
+ }
+ }
+ }
+ if (pSign) {
+ view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
+ }
+ }
+ },
+ setSonNodeCheckBox: function(setting, node, value, srcNode) {
+ if (!node) return;
+ var childKey = setting.data.key.children,
+ checkedKey = setting.data.key.checked,
+ checkObj = $("#" + node.tId + consts.id.CHECK);
+ if (!srcNode) srcNode = node;
+
+ var hasDisable = false;
+ if (node[childKey]) {
+ for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
+ var sNode = node[childKey][i];
+ view.setSonNodeCheckBox(setting, sNode, value, srcNode);
+ if (sNode.chkDisabled === true) hasDisable = true;
+ }
+ }
+
+ if (node != data.getRoot(setting) && node.chkDisabled !== true) {
+ if (hasDisable && node.nocheck !== true) {
+ data.makeChkFlag(setting, node);
+ }
+ if (node.nocheck !== true && node.chkDisabled !== true) {
+ node[checkedKey] = value;
+ if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
+ } else {
+ node.check_Child_State = -1;
+ }
+ view.setChkClass(setting, checkObj, node);
+ if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) {
+ setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+ }
+ }
+
+ }
+ },
+
+ _z = {
+ tools: _tools,
+ view: _view,
+ event: _event,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree.consts, _consts);
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event;
+
+ data.exSetting(_setting);
+ data.addInitBind(_bindEvent);
+ data.addInitUnBind(_unbindEvent);
+ data.addInitCache(_initCache);
+ data.addInitNode(_initNode);
+ data.addInitProxy(_eventProxy);
+ data.addInitRoot(_initRoot);
+ data.addBeforeA(_beforeA);
+ data.addZTreeTools(_zTreeTools);
+
+ var _createNodes = view.createNodes;
+ view.createNodes = function(setting, level, nodes, parentNode) {
+ if (_createNodes) _createNodes.apply(view, arguments);
+ if (!nodes) return;
+ view.repairParentChkClassWithSelf(setting, parentNode);
+ }
+ var _removeNode = view.removeNode;
+ view.removeNode = function(setting, node) {
+ var parentNode = node.getParentNode();
+ if (_removeNode) _removeNode.apply(view, arguments);
+ if (!node || !parentNode) return;
+ view.repairChkClass(setting, parentNode);
+ view.repairParentChkClass(setting, parentNode);
+ }
+
+ var _appendNodes = view.appendNodes;
+ view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {
+ var html = "";
+ if (_appendNodes) {
+ html = _appendNodes.apply(view, arguments);
+ }
+ if (parentNode) {
+ data.makeChkFlag(setting, parentNode);
+ }
+ return html;
+ }
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
})(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.exedit-3.5.js b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.exedit-3.5.js
index c6ec3fcda..0a279789e 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.exedit-3.5.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.exedit-3.5.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*
* JQuery zTree exedit 3.5.12
* http://zTree.me/
@@ -1175,4 +1176,1183 @@
}
return (!root.curEditNode) && (_uCanDo ? _uCanDo.apply(view, arguments) : true);
}
+=======
+/*
+ * JQuery zTree exedit 3.5.12
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2013-03-11
+ */
+(function($){
+ //default consts of exedit
+ var _consts = {
+ event: {
+ DRAG: "ztree_drag",
+ DROP: "ztree_drop",
+ REMOVE: "ztree_remove",
+ RENAME: "ztree_rename"
+ },
+ id: {
+ EDIT: "_edit",
+ INPUT: "_input",
+ REMOVE: "_remove"
+ },
+ move: {
+ TYPE_INNER: "inner",
+ TYPE_PREV: "prev",
+ TYPE_NEXT: "next"
+ },
+ node: {
+ CURSELECTED_EDIT: "curSelectedNode_Edit",
+ TMPTARGET_TREE: "tmpTargetzTree",
+ TMPTARGET_NODE: "tmpTargetNode"
+ }
+ },
+ //default setting of exedit
+ _setting = {
+ edit: {
+ enable: false,
+ editNameSelectAll: false,
+ showRemoveBtn: true,
+ showRenameBtn: true,
+ removeTitle: "remove",
+ renameTitle: "rename",
+ drag: {
+ autoExpandTrigger: false,
+ isCopy: true,
+ isMove: true,
+ prev: true,
+ next: true,
+ inner: true,
+ minMoveSize: 5,
+ borderMax: 10,
+ borderMin: -5,
+ maxShowNodeNum: 5,
+ autoOpenTime: 500
+ }
+ },
+ view: {
+ addHoverDom: null,
+ removeHoverDom: null
+ },
+ callback: {
+ beforeDrag:null,
+ beforeDragOpen:null,
+ beforeDrop:null,
+ beforeEditName:null,
+ beforeRename:null,
+ onDrag:null,
+ onDrop:null,
+ onRename:null
+ }
+ },
+ //default root of exedit
+ _initRoot = function (setting) {
+ var r = data.getRoot(setting);
+ r.curEditNode = null;
+ r.curEditInput = null;
+ r.curHoverNode = null;
+ r.dragFlag = 0;
+ r.dragNodeShowBefore = [];
+ r.dragMaskList = new Array();
+ r.showHoverDom = true;
+ },
+ //default cache of exedit
+ _initCache = function(treeId) {},
+ //default bind event of exedit
+ _bindEvent = function(setting) {
+ var o = setting.treeObj;
+ var c = consts.event;
+ o.bind(c.RENAME, function (event, treeId, treeNode) {
+ tools.apply(setting.callback.onRename, [event, treeId, treeNode]);
+ });
+
+ o.bind(c.REMOVE, function (event, treeId, treeNode) {
+ tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
+ });
+
+ o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) {
+ tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
+ });
+
+ o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) {
+ tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]);
+ });
+ },
+ _unbindEvent = function(setting) {
+ var o = setting.treeObj;
+ var c = consts.event;
+ o.unbind(c.RENAME);
+ o.unbind(c.REMOVE);
+ o.unbind(c.DRAG);
+ o.unbind(c.DROP);
+ },
+ //default event proxy of exedit
+ _eventProxy = function(e) {
+ var target = e.target,
+ setting = data.getSetting(e.data.treeId),
+ relatedTarget = e.relatedTarget,
+ tId = "", node = null,
+ nodeEventType = "", treeEventType = "",
+ nodeEventCallback = null, treeEventCallback = null,
+ tmp = null;
+
+ if (tools.eqs(e.type, "mouseover")) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tmp.parentNode.id;
+ nodeEventType = "hoverOverNode";
+ }
+ } else if (tools.eqs(e.type, "mouseout")) {
+ tmp = tools.getMDom(setting, relatedTarget, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (!tmp) {
+ tId = "remove";
+ nodeEventType = "hoverOutNode";
+ }
+ } else if (tools.eqs(e.type, "mousedown")) {
+ tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+ if (tmp) {
+ tId = tmp.parentNode.id;
+ nodeEventType = "mousedownNode";
+ }
+ }
+ if (tId.length>0) {
+ node = data.getNodeCache(setting, tId);
+ switch (nodeEventType) {
+ case "mousedownNode" :
+ nodeEventCallback = _handler.onMousedownNode;
+ break;
+ case "hoverOverNode" :
+ nodeEventCallback = _handler.onHoverOverNode;
+ break;
+ case "hoverOutNode" :
+ nodeEventCallback = _handler.onHoverOutNode;
+ break;
+ }
+ }
+ var proxyResult = {
+ stop: false,
+ node: node,
+ nodeEventType: nodeEventType,
+ nodeEventCallback: nodeEventCallback,
+ treeEventType: treeEventType,
+ treeEventCallback: treeEventCallback
+ };
+ return proxyResult
+ },
+ //default init node of exedit
+ _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (!n) return;
+ n.isHover = false;
+ n.editNameFlag = false;
+ },
+ //update zTreeObj, add method of edit
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.cancelEditName = function(newName) {
+ var root = data.getRoot(setting),
+ nameKey = setting.data.key.name,
+ node = root.curEditNode;
+ if (!root.curEditNode) return;
+ view.cancelCurEditNode(setting, newName?newName:node[nameKey]);
+ }
+ zTreeTools.copyNode = function(targetNode, node, moveType, isSilent) {
+ if (!node) return null;
+ if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null;
+ var newNode = tools.clone(node);
+ if (!targetNode) {
+ targetNode = null;
+ moveType = consts.move.TYPE_INNER;
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ function copyCallback() {
+ view.addNodes(setting, targetNode, [newNode], isSilent);
+ }
+
+ if (tools.canAsync(setting, targetNode)) {
+ view.asyncNode(setting, targetNode, isSilent, copyCallback);
+ } else {
+ copyCallback();
+ }
+ } else {
+ view.addNodes(setting, targetNode.parentNode, [newNode], isSilent);
+ view.moveNode(setting, targetNode, newNode, moveType, false, isSilent);
+ }
+ return newNode;
+ }
+ zTreeTools.editName = function(node) {
+ if (!node || !node.tId || node !== data.getNodeCache(setting, node.tId)) return;
+ if (node.parentTId) view.expandCollapseParentNode(setting, node.getParentNode(), true);
+ view.editNode(setting, node)
+ }
+ zTreeTools.moveNode = function(targetNode, node, moveType, isSilent) {
+ if (!node) return node;
+ if (targetNode && !targetNode.isParent && setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) {
+ return null;
+ } else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $("#" + node.tId).find("#" + targetNode.tId).length > 0)) {
+ return null;
+ } else if (!targetNode) {
+ targetNode = null;
+ }
+ function moveCallback() {
+ view.moveNode(setting, targetNode, node, moveType, false, isSilent);
+ }
+ if (tools.canAsync(setting, targetNode) && moveType === consts.move.TYPE_INNER) {
+ view.asyncNode(setting, targetNode, isSilent, moveCallback);
+ } else {
+ moveCallback();
+ }
+ return node;
+ }
+ zTreeTools.setEditable = function(editable) {
+ setting.edit.enable = editable;
+ return this.refresh();
+ }
+ },
+ //method of operate data
+ _data = {
+ setSonNodeLevel: function(setting, parentNode, node) {
+ if (!node) return;
+ var childKey = setting.data.key.children;
+ node.level = (parentNode)? parentNode.level + 1 : 0;
+ if (!node[childKey]) return;
+ for (var i = 0, l = node[childKey].length; i < l; i++) {
+ if (node[childKey][i]) data.setSonNodeLevel(setting, node, node[childKey][i]);
+ }
+ }
+ },
+ //method of event proxy
+ _event = {
+
+ },
+ //method of event handler
+ _handler = {
+ onHoverOverNode: function(event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ root = data.getRoot(setting);
+ if (root.curHoverNode != node) {
+ _handler.onHoverOutNode(event);
+ }
+ root.curHoverNode = node;
+ view.addHoverDom(setting, node);
+ },
+ onHoverOutNode: function(event, node) {
+ var setting = data.getSetting(event.data.treeId),
+ root = data.getRoot(setting);
+ if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) {
+ view.removeTreeDom(setting, root.curHoverNode);
+ root.curHoverNode = null;
+ }
+ },
+ onMousedownNode: function(eventMouseDown, _node) {
+ var i,l,
+ setting = data.getSetting(eventMouseDown.data.treeId),
+ root = data.getRoot(setting);
+ //right click can't drag & drop
+ if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true;
+
+ //input of edit node name can't drag & drop
+ var target = eventMouseDown.target,
+ _nodes = data.getRoot(setting).curSelectedList,
+ nodes = [];
+ if (!data.isSelectedNode(setting, _node)) {
+ nodes = [_node];
+ } else {
+ for (i=0, l=_nodes.length; i1) {
+ var pNodes = nodes[0].parentTId ? nodes[0].getParentNode()[childKey] : data.getNodes(setting);
+ tmpNodes = [];
+ for (i=0, l=pNodes.length; i -1 && (lastIndex+1) !== i) {
+ isOrder = false;
+ }
+ tmpNodes.push(pNodes[i]);
+ lastIndex = i;
+ }
+ if (nodes.length === tmpNodes.length) {
+ nodes = tmpNodes;
+ break;
+ }
+ }
+ }
+ if (isOrder) {
+ preNode = nodes[0].getPreNode();
+ nextNode = nodes[nodes.length-1].getNextNode();
+ }
+
+ //set node in selected
+ curNode = $("");
+ for (i=0, l=nodes.length; i0);
+ view.removeTreeDom(setting, tmpNode);
+
+ tmpDom = $(" ");
+ tmpDom.append($("#" + tmpNode.tId + consts.id.A).clone());
+ tmpDom.css("padding", "0");
+ tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED);
+ curNode.append(tmpDom);
+ if (i == setting.edit.drag.maxShowNodeNum-1) {
+ tmpDom = $(" ... ");
+ curNode.append(tmpDom);
+ break;
+ }
+ }
+ curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp");
+ curNode.addClass(setting.treeObj.attr("class"));
+ curNode.appendTo("body");
+
+ tmpArrow = $(" ");
+ tmpArrow.attr("id", "zTreeMove_arrow_tmp");
+ tmpArrow.appendTo("body");
+
+ setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]);
+ }
+
+ if (root.dragFlag == 1) {
+ if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft()+2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) {
+ var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget);
+ event.target = (xT.length > 0) ? xT.get(0) : event.target;
+ } else if (tmpTarget) {
+ tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
+ if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
+ .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
+ }
+ tmpTarget = null;
+ tmpTargetNodeId = null;
+
+ //judge drag & drop in multi ztree
+ isOtherTree = false;
+ targetSetting = setting;
+ var settings = data.getSettings();
+ for (var s in settings) {
+ if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId
+ && (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length>0)) {
+ isOtherTree = true;
+ targetSetting = settings[s];
+ }
+ }
+
+ var docScrollTop = doc.scrollTop(),
+ docScrollLeft = doc.scrollLeft(),
+ treeOffset = targetSetting.treeObj.offset(),
+ scrollHeight = targetSetting.treeObj.get(0).scrollHeight,
+ scrollWidth = targetSetting.treeObj.get(0).scrollWidth,
+ dTop = (event.clientY + docScrollTop - treeOffset.top),
+ dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop),
+ dLeft = (event.clientX + docScrollLeft - treeOffset.left),
+ dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft),
+ isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin),
+ isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin),
+ isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin),
+ isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin),
+ isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin,
+ isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0),
+ isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height()+10) >= scrollHeight),
+ isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0),
+ isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width()+10) >= scrollWidth);
+
+ if (event.target.id && targetSetting.treeObj.find("#" + event.target.id).length > 0) {
+ //get node dom
+ var targetObj = event.target;
+ while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) {
+ targetObj = targetObj.parentNode;
+ }
+
+ var canMove = true;
+ //don't move to self or children of self
+ for (i=0, l=nodes.length; i 0) {
+ canMove = false;
+ break;
+ }
+ }
+ if (canMove) {
+ if (event.target.id &&
+ (event.target.id == (targetObj.id + consts.id.A) || $(event.target).parents("#" + targetObj.id + consts.id.A).length > 0)) {
+ tmpTarget = $(targetObj);
+ tmpTargetNodeId = targetObj.id;
+ }
+ }
+ }
+
+ //the mouse must be in zTree
+ tmpNode = nodes[0];
+ if (isTreeInner && (event.target.id == targetSetting.treeId || $(event.target).parents("#" + targetSetting.treeId).length>0)) {
+ //judge mouse move in root of ztree
+ if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) {
+ tmpTarget = targetSetting.treeObj;
+ }
+ //auto scroll top
+ if (isTop) {
+ targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()-10);
+ } else if (isBottom) {
+ targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop()+10);
+ }
+ if (isLeft) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()-10);
+ } else if (isRight) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+10);
+ }
+ //auto scroll left
+ if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) {
+ targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft()+ tmpTarget.offset().left - targetSetting.treeObj.offset().left);
+ }
+ }
+
+ curNode.css({
+ "top": (event.clientY + docScrollTop + 3) + "px",
+ "left": (event.clientX + docScrollLeft + 3) + "px"
+ });
+
+ var dX = 0;
+ var dY = 0;
+ if (tmpTarget && tmpTarget.attr("id")!=targetSetting.treeId) {
+ var tmpTargetNode = tmpTargetNodeId == null ? null: data.getNodeCache(targetSetting, tmpTargetNodeId),
+ isCopy = (event.ctrlKey && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy),
+ isPrev = !!(preNode && tmpTargetNodeId === preNode.tId),
+ isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId),
+ isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId),
+ canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev),
+ canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next),
+ canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !tmpTargetNode.isParent) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner);
+ if (!canPrev && !canNext && !canInner) {
+ tmpTarget = null;
+ tmpTargetNodeId = "";
+ moveType = consts.move.TYPE_INNER;
+ tmpArrow.css({
+ "display":"none"
+ });
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null
+ }
+ } else {
+ var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget),
+ tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()),
+ tmpTop = tmpTargetA.offset().top,
+ tmpLeft = tmpTargetA.offset().left,
+ prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1) ) : -1,
+ nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0) ) : -1,
+ dY_percent = (event.clientY + docScrollTop - tmpTop)/tmpTargetA.height();
+ if ((prevPercent==1 ||dY_percent<=prevPercent && dY_percent>=-.2) && canPrev) {
+ dX = 1 - tmpArrow.width();
+ dY = tmpTop - tmpArrow.height()/2;
+ moveType = consts.move.TYPE_PREV;
+ } else if ((nextPercent==0 || dY_percent>=nextPercent && dY_percent<=1.2) && canNext) {
+ dX = 1 - tmpArrow.width();
+ dY = (tmpNextA == null || (tmpTargetNode.isParent && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height()/2) : (tmpNextA.offset().top - tmpArrow.height()/2);
+ moveType = consts.move.TYPE_NEXT;
+ }else {
+ dX = 5 - tmpArrow.width();
+ dY = tmpTop;
+ moveType = consts.move.TYPE_INNER;
+ }
+ tmpArrow.css({
+ "display":"block",
+ "top": dY + "px",
+ "left": (tmpLeft + dX) + "px"
+ });
+ tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType);
+
+ if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) {
+ startTime = (new Date()).getTime();
+ }
+ if (tmpTargetNode && tmpTargetNode.isParent && moveType == consts.move.TYPE_INNER) {
+ var startTimer = true;
+ if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ } else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) {
+ startTimer = false;
+ }
+ if (startTimer) {
+ window.zTreeMoveTimer = setTimeout(function() {
+ if (moveType != consts.move.TYPE_INNER) return;
+ if (tmpTargetNode && tmpTargetNode.isParent && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime
+ && tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) {
+ view.switchNode(targetSetting, tmpTargetNode);
+ if (targetSetting.edit.drag.autoExpandTrigger) {
+ targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]);
+ }
+ }
+ }, targetSetting.edit.drag.autoOpenTime+50);
+ window.zTreeMoveTargetNodeTId = tmpTargetNode.tId;
+ }
+ }
+ }
+ } else {
+ moveType = consts.move.TYPE_INNER;
+ if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) {
+ tmpTarget.addClass(consts.node.TMPTARGET_TREE);
+ } else {
+ tmpTarget = null;
+ }
+ tmpArrow.css({
+ "display":"none"
+ });
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }
+ }
+ preTmpTargetNodeId = tmpTargetNodeId;
+ preTmpMoveType = moveType;
+ }
+ return false;
+ }
+
+ doc.bind("mouseup", _docMouseUp);
+ function _docMouseUp(event) {
+ if (window.zTreeMoveTimer) {
+ clearTimeout(window.zTreeMoveTimer);
+ window.zTreeMoveTargetNodeTId = null;
+ }
+ preTmpTargetNodeId = null;
+ preTmpMoveType = null;
+ doc.unbind("mousemove", _docMouseMove);
+ doc.unbind("mouseup", _docMouseUp);
+ doc.unbind("selectstart", _docSelect);
+ $("body").css("cursor", "auto");
+ if (tmpTarget) {
+ tmpTarget.removeClass(consts.node.TMPTARGET_TREE);
+ if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV)
+ .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER);
+ }
+ tools.showIfameMask(setting, false);
+
+ root.showHoverDom = true;
+ if (root.dragFlag == 0) return;
+ root.dragFlag = 0;
+
+ var i, l, tmpNode;
+ for (i=0, l=nodes.length; i0);
+ }
+ $("#" + newNodes[0].tId).focus().blur();
+
+ setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]);
+ }
+
+ if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) {
+ view.asyncNode(targetSetting, dragTargetNode, false, dropCallback);
+ } else {
+ dropCallback();
+ }
+
+ } else {
+ for (i=0, l=nodes.length; i0);
+ }
+ setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]);
+ }
+ }
+
+ doc.bind("selectstart", _docSelect);
+ function _docSelect() {
+ return false;
+ }
+
+ //Avoid FireFox's Bug
+ //If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error.
+ if(eventMouseDown.preventDefault) {
+ eventMouseDown.preventDefault();
+ }
+ return true;
+ }
+ },
+ //method of tools for zTree
+ _tools = {
+ getAbs: function (obj) {
+ var oRect = obj.getBoundingClientRect();
+ return [oRect.left,oRect.top]
+ },
+ inputFocus: function(inputObj) {
+ if (inputObj.get(0)) {
+ inputObj.focus();
+ tools.setCursorPosition(inputObj.get(0), inputObj.val().length);
+ }
+ },
+ inputSelect: function(inputObj) {
+ if (inputObj.get(0)) {
+ inputObj.focus();
+ inputObj.select();
+ }
+ },
+ setCursorPosition: function(obj, pos){
+ if(obj.setSelectionRange) {
+ obj.focus();
+ obj.setSelectionRange(pos,pos);
+ } else if (obj.createTextRange) {
+ var range = obj.createTextRange();
+ range.collapse(true);
+ range.moveEnd('character', pos);
+ range.moveStart('character', pos);
+ range.select();
+ }
+ },
+ showIfameMask: function(setting, showSign) {
+ var root = data.getRoot(setting);
+ //clear full mask
+ while (root.dragMaskList.length > 0) {
+ root.dragMaskList[0].remove();
+ root.dragMaskList.shift();
+ }
+ if (showSign) {
+ //show mask
+ var iframeList = $("iframe");
+ for (var i = 0, l = iframeList.length; i < l; i++) {
+ var obj = iframeList.get(i),
+ r = tools.getAbs(obj),
+ dragMask = $("
");
+ dragMask.appendTo("body");
+ root.dragMaskList.push(dragMask);
+ }
+ }
+ }
+ },
+ //method of operate ztree dom
+ _view = {
+ addEditBtn: function(setting, node) {
+ if (node.editNameFlag || $("#" + node.tId + consts.id.EDIT).length > 0) {
+ return;
+ }
+ if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) {
+ return;
+ }
+ var aObj = $("#" + node.tId + consts.id.A),
+ editStr = " ";
+ aObj.append(editStr);
+
+ $("#" + node.tId + consts.id.EDIT).bind('click',
+ function() {
+ if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false;
+ view.editNode(setting, node);
+ return false;
+ }
+ ).show();
+ },
+ addRemoveBtn: function(setting, node) {
+ if (node.editNameFlag || $("#" + node.tId + consts.id.REMOVE).length > 0) {
+ return;
+ }
+ if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) {
+ return;
+ }
+ var aObj = $("#" + node.tId + consts.id.A),
+ removeStr = " ";
+ aObj.append(removeStr);
+
+ $("#" + node.tId + consts.id.REMOVE).bind('click',
+ function() {
+ if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false;
+ view.removeNode(setting, node);
+ setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
+ return false;
+ }
+ ).bind('mousedown',
+ function(eventMouseDown) {
+ return true;
+ }
+ ).show();
+ },
+ addHoverDom: function(setting, node) {
+ if (data.getRoot(setting).showHoverDom) {
+ node.isHover = true;
+ if (setting.edit.enable) {
+ view.addEditBtn(setting, node);
+ view.addRemoveBtn(setting, node);
+ }
+ tools.apply(setting.view.addHoverDom, [setting.treeId, node]);
+ }
+ },
+ cancelCurEditNode: function (setting, forceName) {
+ var root = data.getRoot(setting),
+ nameKey = setting.data.key.name,
+ node = root.curEditNode;
+
+ if (node) {
+ var inputObj = root.curEditInput;
+ var newName = forceName ? forceName:inputObj.val();
+ if (!forceName && tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName], true) === false) {
+ return false;
+ } else {
+ node[nameKey] = newName ? newName:inputObj.val();
+ if (!forceName) {
+ setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node]);
+ }
+ }
+ var aObj = $("#" + node.tId + consts.id.A);
+ aObj.removeClass(consts.node.CURSELECTED_EDIT);
+ inputObj.unbind();
+ view.setNodeName(setting, node);
+ node.editNameFlag = false;
+ root.curEditNode = null;
+ root.curEditInput = null;
+ view.selectNode(setting, node, false);
+ }
+ root.noSelection = true;
+ return true;
+ },
+ editNode: function(setting, node) {
+ var root = data.getRoot(setting);
+ view.editNodeBlur = false;
+ if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) {
+ setTimeout(function() {tools.inputFocus(root.curEditInput);}, 0);
+ return;
+ }
+ var nameKey = setting.data.key.name;
+ node.editNameFlag = true;
+ view.removeTreeDom(setting, node);
+ view.cancelCurEditNode(setting);
+ view.selectNode(setting, node, false);
+ $("#" + node.tId + consts.id.SPAN).html(" ");
+ var inputObj = $("#" + node.tId + consts.id.INPUT);
+ inputObj.attr("value", node[nameKey]);
+ if (setting.edit.editNameSelectAll) {
+ tools.inputSelect(inputObj);
+ } else {
+ tools.inputFocus(inputObj);
+ }
+
+ inputObj.bind('blur', function(event) {
+ if (!view.editNodeBlur) {
+ view.cancelCurEditNode(setting);
+ }
+ }).bind('keydown', function(event) {
+ if (event.keyCode=="13") {
+ view.editNodeBlur = true;
+ view.cancelCurEditNode(setting, null, true);
+ } else if (event.keyCode=="27") {
+ view.cancelCurEditNode(setting, node[nameKey]);
+ }
+ }).bind('click', function(event) {
+ return false;
+ }).bind('dblclick', function(event) {
+ return false;
+ });
+
+ $("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED_EDIT);
+ root.curEditInput = inputObj;
+ root.noSelection = false;
+ root.curEditNode = node;
+ },
+ moveNode: function(setting, targetNode, node, moveType, animateFlag, isSilent) {
+ var root = data.getRoot(setting),
+ childKey = setting.data.key.children;
+ if (targetNode == node) return;
+ if (setting.data.keep.leaf && targetNode && !targetNode.isParent && moveType == consts.move.TYPE_INNER) return;
+ var oldParentNode = (node.parentTId ? node.getParentNode(): root),
+ targetNodeIsRoot = (targetNode === null || targetNode == root);
+ if (targetNodeIsRoot && targetNode === null) targetNode = root;
+ if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER;
+ var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root);
+
+ if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) {
+ moveType = consts.move.TYPE_INNER;
+ }
+
+ if (moveType == consts.move.TYPE_INNER) {
+ if (targetNodeIsRoot) {
+ //parentTId of root node is null
+ node.parentTId = null;
+ } else {
+ if (!targetNode.isParent) {
+ targetNode.isParent = true;
+ targetNode.open = !!targetNode.open;
+ view.setNodeLineIcos(setting, targetNode);
+ }
+ node.parentTId = targetNode.tId;
+ }
+ }
+
+ //move node Dom
+ var targetObj, target_ulObj;
+ if (targetNodeIsRoot) {
+ targetObj = setting.treeObj;
+ target_ulObj = targetObj;
+ } else {
+ if (!isSilent && moveType == consts.move.TYPE_INNER) {
+ view.expandCollapseNode(setting, targetNode, true, false);
+ } else if (!isSilent) {
+ view.expandCollapseNode(setting, targetNode.getParentNode(), true, false);
+ }
+ targetObj = $("#" + targetNode.tId);
+ target_ulObj = $("#" + targetNode.tId + consts.id.UL);
+ if (!!targetObj.get(0) && !target_ulObj.get(0)) {
+ var ulstr = [];
+ view.makeUlHtml(setting, targetNode, ulstr, '');
+ targetObj.append(ulstr.join(''));
+ }
+ target_ulObj = $("#" + targetNode.tId + consts.id.UL);
+ }
+ var nodeDom = $("#" + node.tId);
+ if (!nodeDom.get(0)) {
+ nodeDom = view.appendNodes(setting, node.level, [node], null, false, true).join('');
+ } else if (!targetObj.get(0)) {
+ nodeDom.remove();
+ }
+ if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) {
+ target_ulObj.append(nodeDom);
+ } else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) {
+ targetObj.before(nodeDom);
+ } else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) {
+ targetObj.after(nodeDom);
+ }
+
+ //repair the data after move
+ var i,l,
+ tmpSrcIndex = -1,
+ tmpTargetIndex = 0,
+ oldNeighbor = null,
+ newNeighbor = null,
+ oldLevel = node.level;
+ if (node.isFirstNode) {
+ tmpSrcIndex = 0;
+ if (oldParentNode[childKey].length > 1 ) {
+ oldNeighbor = oldParentNode[childKey][1];
+ oldNeighbor.isFirstNode = true;
+ }
+ } else if (node.isLastNode) {
+ tmpSrcIndex = oldParentNode[childKey].length -1;
+ oldNeighbor = oldParentNode[childKey][tmpSrcIndex - 1];
+ oldNeighbor.isLastNode = true;
+ } else {
+ for (i = 0, l = oldParentNode[childKey].length; i < l; i++) {
+ if (oldParentNode[childKey][i].tId == node.tId) {
+ tmpSrcIndex = i;
+ break;
+ }
+ }
+ }
+ if (tmpSrcIndex >= 0) {
+ oldParentNode[childKey].splice(tmpSrcIndex, 1);
+ }
+ if (moveType != consts.move.TYPE_INNER) {
+ for (i = 0, l = targetParentNode[childKey].length; i < l; i++) {
+ if (targetParentNode[childKey][i].tId == targetNode.tId) tmpTargetIndex = i;
+ }
+ }
+ if (moveType == consts.move.TYPE_INNER) {
+ if (!targetNode[childKey]) targetNode[childKey] = new Array();
+ if (targetNode[childKey].length > 0) {
+ newNeighbor = targetNode[childKey][targetNode[childKey].length - 1];
+ newNeighbor.isLastNode = false;
+ }
+ targetNode[childKey].splice(targetNode[childKey].length, 0, node);
+ node.isLastNode = true;
+ node.isFirstNode = (targetNode[childKey].length == 1);
+ } else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) {
+ targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
+ newNeighbor = targetNode;
+ newNeighbor.isFirstNode = false;
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = true;
+ node.isLastNode = false;
+
+ } else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) {
+ targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
+ newNeighbor = targetNode;
+ newNeighbor.isLastNode = false;
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = false;
+ node.isLastNode = true;
+
+ } else {
+ if (moveType == consts.move.TYPE_PREV) {
+ targetParentNode[childKey].splice(tmpTargetIndex, 0, node);
+ } else {
+ targetParentNode[childKey].splice(tmpTargetIndex + 1, 0, node);
+ }
+ node.parentTId = targetNode.parentTId;
+ node.isFirstNode = false;
+ node.isLastNode = false;
+ }
+ data.fixPIdKeyValue(setting, node);
+ data.setSonNodeLevel(setting, node.getParentNode(), node);
+
+ //repair node what been moved
+ view.setNodeLineIcos(setting, node);
+ view.repairNodeLevelClass(setting, node, oldLevel)
+
+ //repair node's old parentNode dom
+ if (!setting.data.keep.parent && oldParentNode[childKey].length < 1) {
+ //old parentNode has no child nodes
+ oldParentNode.isParent = false;
+ oldParentNode.open = false;
+ var tmp_ulObj = $("#" + oldParentNode.tId + consts.id.UL),
+ tmp_switchObj = $("#" + oldParentNode.tId + consts.id.SWITCH),
+ tmp_icoObj = $("#" + oldParentNode.tId + consts.id.ICON);
+ view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU);
+ view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU);
+ tmp_ulObj.css("display", "none");
+
+ } else if (oldNeighbor) {
+ //old neigbor node
+ view.setNodeLineIcos(setting, oldNeighbor);
+ }
+
+ //new neigbor node
+ if (newNeighbor) {
+ view.setNodeLineIcos(setting, newNeighbor);
+ }
+
+ //repair checkbox / radio
+ if (!!setting.check && setting.check.enable && view.repairChkClass) {
+ view.repairChkClass(setting, oldParentNode);
+ view.repairParentChkClassWithSelf(setting, oldParentNode);
+ if (oldParentNode != node.parent)
+ view.repairParentChkClassWithSelf(setting, node);
+ }
+
+ //expand parents after move
+ if (!isSilent) {
+ view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag);
+ }
+ },
+ removeEditBtn: function(node) {
+ $("#" + node.tId + consts.id.EDIT).unbind().remove();
+ },
+ removeRemoveBtn: function(node) {
+ $("#" + node.tId + consts.id.REMOVE).unbind().remove();
+ },
+ removeTreeDom: function(setting, node) {
+ node.isHover = false;
+ view.removeEditBtn(node);
+ view.removeRemoveBtn(node);
+ tools.apply(setting.view.removeHoverDom, [setting.treeId, node]);
+ },
+ repairNodeLevelClass: function(setting, node, oldLevel) {
+ if (oldLevel === node.level) return;
+ var liObj = $("#" + node.tId),
+ aObj = $("#" + node.tId + consts.id.A),
+ ulObj = $("#" + node.tId + consts.id.UL),
+ oldClass = consts.className.LEVEL + oldLevel,
+ newClass = consts.className.LEVEL + node.level;
+ liObj.removeClass(oldClass);
+ liObj.addClass(newClass);
+ aObj.removeClass(oldClass);
+ aObj.addClass(newClass);
+ ulObj.removeClass(oldClass);
+ ulObj.addClass(newClass);
+ }
+ },
+
+ _z = {
+ tools: _tools,
+ view: _view,
+ event: _event,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree.consts, _consts);
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event;
+
+ data.exSetting(_setting);
+ data.addInitBind(_bindEvent);
+ data.addInitUnBind(_unbindEvent);
+ data.addInitCache(_initCache);
+ data.addInitNode(_initNode);
+ data.addInitProxy(_eventProxy);
+ data.addInitRoot(_initRoot);
+ data.addZTreeTools(_zTreeTools);
+
+ var _cancelPreSelectedNode = view.cancelPreSelectedNode;
+ view.cancelPreSelectedNode = function (setting, node) {
+ var list = data.getRoot(setting).curSelectedList;
+ for (var i=0, j=list.length; i>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
})(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.exhide-3.5.js b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.exhide-3.5.js
index 98c2d97c2..147979706 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.exhide-3.5.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.exhide-3.5.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/*
* JQuery zTree exHideNodes 3.5.12
* http://zTree.me/
@@ -363,4 +364,371 @@
_repairParentChkClassWithSelf.apply(view, arguments);
}
}
+=======
+/*
+ * JQuery zTree exHideNodes 3.5.12
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2013-03-11
+ */
+(function($){
+ //default init node of exLib
+ var _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (typeof n.isHidden == "string") n.isHidden = tools.eqs(n.isHidden, "true");
+ n.isHidden = !!n.isHidden;
+ data.initHideForExCheck(setting, n);
+ },
+ //add dom for check
+ _beforeA = function(setting, node, html) {},
+ //update zTreeObj, add method of exLib
+ _zTreeTools = function(setting, zTreeTools) {
+ zTreeTools.showNodes = function(nodes, options) {
+ view.showNodes(setting, nodes, options);
+ }
+ zTreeTools.showNode = function(node, options) {
+ if (!node) {
+ return;
+ }
+ view.showNodes(setting, [node], options);
+ }
+ zTreeTools.hideNodes = function(nodes, options) {
+ view.hideNodes(setting, nodes, options);
+ }
+ zTreeTools.hideNode = function(node, options) {
+ if (!node) {
+ return;
+ }
+ view.hideNodes(setting, [node], options);
+ }
+
+ var _checkNode = zTreeTools.checkNode;
+ if (_checkNode) {
+ zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _checkNode.apply(zTreeTools, arguments);
+ }
+ }
+ },
+ //method of operate data
+ _data = {
+ initHideForExCheck: function(setting, n) {
+ if (n.isHidden && setting.check && setting.check.enable) {
+ if(typeof n._nocheck == "undefined") {
+ n._nocheck = !!n.nocheck
+ n.nocheck = true;
+ }
+ n.check_Child_State = -1;
+ if (view.repairParentChkClassWithSelf) {
+ view.repairParentChkClassWithSelf(setting, n);
+ }
+ }
+ },
+ initShowForExCheck: function(setting, n) {
+ if (!n.isHidden && setting.check && setting.check.enable) {
+ if(typeof n._nocheck != "undefined") {
+ n.nocheck = n._nocheck;
+ delete n._nocheck;
+ }
+ if (view.setChkClass) {
+ var checkObj = $("#" + n.tId + consts.id.CHECK);
+ view.setChkClass(setting, checkObj, n);
+ }
+ if (view.repairParentChkClassWithSelf) {
+ view.repairParentChkClassWithSelf(setting, n);
+ }
+ }
+ }
+ },
+ //method of operate ztree dom
+ _view = {
+ clearOldFirstNode: function(setting, node) {
+ var n = node.getNextNode();
+ while(!!n){
+ if (n.isFirstNode) {
+ n.isFirstNode = false;
+ view.setNodeLineIcos(setting, n);
+ break;
+ }
+ if (n.isLastNode) {
+ break;
+ }
+ n = n.getNextNode();
+ }
+ },
+ clearOldLastNode: function(setting, node) {
+ var n = node.getPreNode();
+ while(!!n){
+ if (n.isLastNode) {
+ n.isLastNode = false;
+ view.setNodeLineIcos(setting, n);
+ break;
+ }
+ if (n.isFirstNode) {
+ break;
+ }
+ n = n.getPreNode();
+ }
+ },
+ makeDOMNodeMainBefore: function(html, setting, node) {
+ html.push("");
+ },
+ showNode: function(setting, node, options) {
+ node.isHidden = false;
+ data.initShowForExCheck(setting, node);
+ $("#" + node.tId).show();
+ },
+ showNodes: function(setting, nodes, options) {
+ if (!nodes || nodes.length == 0) {
+ return;
+ }
+ var pList = {}, i, j;
+ for (i=0, j=nodes.length; i 0 && !parentNode[childKey][0].isHidden) {
+ parentNode[childKey][0].isFirstNode = true;
+ } else if (childLength > 0) {
+ view.setFirstNodeForHide(setting, parentNode[childKey]);
+ }
+ },
+ setLastNode: function(setting, parentNode) {
+ var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+ if (childLength > 0 && !parentNode[childKey][0].isHidden) {
+ parentNode[childKey][childLength - 1].isLastNode = true;
+ } else if (childLength > 0) {
+ view.setLastNodeForHide(setting, parentNode[childKey]);
+ }
+ },
+ setFirstNodeForHide: function(setting, nodes) {
+ var n,i,j;
+ for (i=0, j=nodes.length; i=0; i--) {
+ n = nodes[i];
+ if (n.isLastNode) {
+ break;
+ }
+ if (!n.isHidden && !n.isLastNode) {
+ n.isLastNode = true;
+ view.setNodeLineIcos(setting, n);
+ break;
+ } else {
+ n = null;
+ }
+ }
+ return n;
+ },
+ setLastNodeForShow: function(setting, nodes) {
+ var n,i,j, last, old;
+ for (i=nodes.length-1; i>=0; i--) {
+ n = nodes[i];
+ if (!last && !n.isHidden && n.isLastNode) {
+ last = n;
+ break;
+ } else if (!last && !n.isHidden && !n.isLastNode) {
+ n.isLastNode = true;
+ last = n;
+ view.setNodeLineIcos(setting, n);
+ } else if (last && n.isLastNode) {
+ n.isLastNode = false;
+ old = n;
+ view.setNodeLineIcos(setting, n);
+ break;
+ } else {
+ n = null;
+ }
+ }
+ return {"new":last, "old":old};
+ }
+ },
+
+ _z = {
+ view: _view,
+ data: _data
+ };
+ $.extend(true, $.fn.zTree._z, _z);
+
+ var zt = $.fn.zTree,
+ tools = zt._z.tools,
+ consts = zt.consts,
+ view = zt._z.view,
+ data = zt._z.data,
+ event = zt._z.event;
+
+ data.addInitNode(_initNode);
+ data.addBeforeA(_beforeA);
+ data.addZTreeTools(_zTreeTools);
+
+// Override method in core
+ var _dInitNode = data.initNode;
+ data.tmpHideParent = -1;
+ data.initNode = function(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) {
+ if (data.tmpHideParent !== parentNode) {
+ data.tmpHideParent = parentNode;
+ var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
+ children = tmpPNode[setting.data.key.children];
+ data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children);
+ data.tmpHideLastNode = view.setLastNodeForHide(setting, children);
+ view.setNodeLineIcos(setting, data.tmpHideFirstNode);
+ view.setNodeLineIcos(setting, data.tmpHideLastNode);
+ }
+ isFirstNode = (data.tmpHideFirstNode === node);
+ isLastNode = (data.tmpHideLastNode === node);
+ if (_dInitNode) _dInitNode.apply(data, arguments);
+ if (isLastNode) {
+ view.clearOldLastNode(setting, node);
+ }
+ }
+
+ var _makeChkFlag = data.makeChkFlag;
+ if (!!_makeChkFlag) {
+ data.makeChkFlag = function(setting, node) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _makeChkFlag.apply(data, arguments);
+ }
+ }
+
+ var _getTreeCheckedNodes = data.getTreeCheckedNodes;
+ if (!!_getTreeCheckedNodes) {
+ data.getTreeCheckedNodes = function(setting, nodes, checked, results) {
+ if (!!nodes && nodes.length > 0) {
+ var p = nodes[0].getParentNode();
+ if (!!p && !!p.isHidden) {
+ return [];
+ }
+ }
+ return _getTreeCheckedNodes.apply(data, arguments);
+ }
+ }
+
+ var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes;
+ if (!!_getTreeChangeCheckedNodes) {
+ data.getTreeChangeCheckedNodes = function(setting, nodes, results) {
+ if (!!nodes && nodes.length > 0) {
+ var p = nodes[0].getParentNode();
+ if (!!p && !!p.isHidden) {
+ return [];
+ }
+ }
+ return _getTreeChangeCheckedNodes.apply(data, arguments);
+ }
+ }
+
+ var _expandCollapseSonNode = view.expandCollapseSonNode;
+ if (!!_expandCollapseSonNode) {
+ view.expandCollapseSonNode = function(setting, node, expandFlag, animateFlag, callback) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _expandCollapseSonNode.apply(view, arguments);
+ }
+ }
+
+ var _setSonNodeCheckBox = view.setSonNodeCheckBox;
+ if (!!_setSonNodeCheckBox) {
+ view.setSonNodeCheckBox = function(setting, node, value, srcNode) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _setSonNodeCheckBox.apply(view, arguments);
+ }
+ }
+
+ var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf;
+ if (!!_repairParentChkClassWithSelf) {
+ view.repairParentChkClassWithSelf = function(setting, node) {
+ if (!!node && !!node.isHidden) {
+ return;
+ }
+ _repairParentChkClassWithSelf.apply(view, arguments);
+ }
+ }
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
})(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/log v3.x.txt b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/log v3.x.txt
index 371542cc4..85edb69d5 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/log v3.x.txt
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jquery-ztree/3.5/log v3.x.txt
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
=ZTree v3.x (JQuery Tree插件) 更新日志=
为了更好的优化及扩展zTree, 因此决定升级为v3.x,并且对之前的v2.x不兼容,会有很多结构上的修改,对此深感无奈与抱歉,请大家谅解。
@@ -168,3 +169,175 @@
* 【修正】treeNode 节点数据的属性更加合理,并且增加了一些方法
* 【修正】拖拽操作更加灵活方便,更容易制定自己的规则
* 【修正】其他若干修改,详细对比请参考 url:[http://www.ztree.me/v3/faq.php#_101 zTree v3.0 常见问题]
+=======
+=ZTree v3.x (JQuery Tree插件) 更新日志=
+
+为了更好的优化及扩展zTree, 因此决定升级为v3.x,并且对之前的v2.x不兼容,会有很多结构上的修改,对此深感无奈与抱歉,请大家谅解。
+
+
+具体修改内容可参考:
+
+ * [http://www.ztree.me/v3/api.php zTree v3.0 API 文档]
+
+ * [http://www.ztree.me/v3/demo.php#_101 zTree v3.0 Demo 演示]
+
+ * [http://www.ztree.me/v3/faq.php#_101 zTree v3.0 常见问题]
+
+
+
+
+*2013.03.11* v3.5.12
+ * 【修改】由于 jquery 1.9 中移除 event.srcElement 导致的 js 报错的bug。
+ * 【修改】在异步加载模式下,使用 moveNode 方法,且 moveType != "inner" 时,也会导致 targetNode 自动加载子节点的 bug
+ * 【修改】对已经显示的节点(nochecked=true)使用 showNodes 或 showNode 方法后,导致勾选框出现的bug。
+ * 【修改】对已经隐藏的节点(nochecked=false)使用 hideNodes 或 hideNode 方法后,导致勾选框消失的bug。
+ * 【修改】getNodesByParamFuzzy 支持 大小写模糊。
+ * 【修改】className 结构,提取 _consts.className.BUTTON / LEVEL / ICO_LOADING / SWITCH,便于快速修改 css 冲突。
+ 例如:与 WordPress 产生冲突后,直接修改 core 中的 "button" 和 "level" 即可。 Issue: https://github.com/zTree/zTree_v3/issues/2
+
+*2013.01.28* v3.5.02
+ * 【增加】setting.check.chkDisabledInherit 属性,用于设置 chkDisabled 在初始化时子节点是否可以继承父节点的 chkDisabled 属性
+ * 【删除】内部 noSel 方法,使用 selectstart事件 和 "-moz-user-select"样式 处理禁止 节点文字被选择的功能
+ * 【修改】不兼容 jQuery 1.9 的bug
+ * 【修改】onDrop 的触发规则,保证异步加载模式下,可以在延迟加载结束后触发,避免 onDrop 中被拖拽的节点是已经更新后的数据。
+ * 【修改】setChkDisabled 方法,增加 inheritParent, inheritChildren 参数设置是否让父子节点继承 disabled
+ * 【修改】异步加载时 拼接参数的方法,由 string 修改为 json 对象
+ * 【修正】1-2-3 3级节点时,如果 2级节点 全部设置为 nocheck 或 chkDisabled后,勾选3级节点时,1级节点的半勾选状态错误的 bug
+ * 【修改】Demo: checkbox_nocheck.html & checkbox_chkDisabled.html;
+ * 【修改】Demo: edit_super.html,增加 showRenameBtn & showRemoveBtn 的演示
+ * 【修改】Demo: asyncForAll, 将 post 修改为 get;为了避免由于 IE10 的 bug 造成的客户端 以及 服务端崩溃
+ IE10 ajax Post 无法提交参数的bug (http://bugs.jquery.com/ticket/12790)
+
+*2012.12.21* v3.5.01
+ * 【优化】clone 方法
+ * 【修正】对于初始化无 children 属性的父节点进行 reAsyncChildNodes 操作时出错的 bug
+ * 【修正】beforeRename 回调中使用 cancelEditName 方法后,再 return false 导致无法重新进行编辑的 bug
+ * 【修正】exedit 扩展包让 setting.data.key.url 失效的 bug
+ * 【修正】setting.check.autoCheckTrigger 设置为 true 时,onCheck 回调缺少 event 参数的 bug
+ * 【修正】singlepath.html Demo 中的 bug
+
+*2012.11.20* v3.5
+ * 【优化】原先的 clone 方法 (特别感谢:愚人码头)
+ * 【修改】隐藏父节点后,使用 expandAll 方法导致 父节点展开的 bug
+ * 【修改】使用 jQuery v1.7 以上时,设置 zTree 容器 ul 隐藏(visibility: hidden;)后, 调用 selectNode 导致 IE 浏览器报错 Can't move focus 的 bug
+ * 【修改】正在异步加载时,执行 destory 或 init 方法后,异步加载的节点影响新树的 bug
+ * 【修改】方法 reAsyncChildNodes 在 refresh 的时候未清空内部 cache 导致内存泄露 的 bug
+ * 【修改】批量节点拖拽到其他父节点内(inner)时,导致顺序反转 的 bug
+ * 【修改】对于 使用 html格式的 节点无法触发 双击事件 的 bug
+ * 【修改】onCheck 回调中的 event ,保证与触发事件中的 event 一致
+ * 【修改】异步加载时,在 onNodeCreated 中执行 selectNode 后,导致节点折叠的 bug
+ * 【修改】API 中 dataFilter 的参数名称 childNodes -> responseData
+ * 【修改】API 中 iconSkin 的 举例内容
+ * 【修改】API 中 chkDisabled 的说明
+ * 【修改】Demo 中 index.html 内的 loadReady 重复绑定问题
+
+*2012.09.03* v3.4
+ * 【增加】 Demo —— OutLook 样式的左侧菜单
+ * 【增加】清空 zTree 的方法 $.fn.zTree.destory(treeId) & zTree.destory()
+
+ * 【修改】core核心文件内 _eventProxy 方法中获取 tId 的方法,提高 DOM 的灵活性
+ * 【修改】初始化时 多层父节点的 checkbox 半选状态计算错误的 bug
+ * 【修改】同时选中父、子节点后,利用 getSelectedNodes 获取选中节点并利用 removeNode 删除时报错的 bug
+ * 【修改】treeNode.chkDisabled / nocheck 属性,支持字符串格式的 "false"/"true"
+ * 【修改】异步加载模式下无法利用 server 返回 xml 并且 在 dataFilter 中继续处理的 bug
+ * 【修改】title 只允许设置为 string 类型值的问题。 修正后允许设置为 number 类型的值
+ * 【修改】zId 计数规则 & Cache 保存,减少 IE9 的 bug 造成的内存泄漏
+ * 【修改】API 页面搜索功能导致 IE 崩溃的 bug
+
+*2012.07.16* v3.3
+ * 【增加】扩展库 exhide -- 节点隐藏功能
+
+ * 【修改】getNodesByFilter 方法,添加 invokeParam 自定义参数
+ * 【修改】拖拽中测试代码未删除,导致出现黄颜色的 iframe 遮罩层的 bug
+ * 【修改】延迟加载方法 对于使用 expandAll 进行全部展开时,导致 onNodeCreated 回调 和 addDiyDom 方法触发过早的 bug
+ * 【修改】使用 moveNode 移动尚未生成 DOM 的节点时,视图会出现异常的 bug
+ * 【修改】删除节点后,相关节点的 isFirstNode 属性未重置的 bug
+ * 【修改】getPreNode(),getNextNode() 方法在对于特殊情况时计算错误的 bug
+ * 【修改】设置 title 之后,如果重新将 title 内容设置为空后,会导致无法更新 title 的 bug
+ * 【修改】针对 setting.check.chkStyle=="radio" && setting.check.radioType=="all" 的情况时,getTreeCheckedNodes方法优化,找到一个结果就 break
+ * 【修改】zTreeObj.getCheckedNodes(false) 在 radioType = "all" 时计算错误的 bug
+ * 【修改】完善 API 中 beforeDrop / onDrop 的关于 treeId 的说明
+
+*2012.05.13* v3.2
+ * 【增加】setting.data.key.url 允许修改 treeNode.url 属性
+ * 【增加】getNodesByFilter(filter, isSingle) 方法
+ * 【增加】"与其他 DOM 拖拽互动" 的 Demo (http://www.ztree.me/v3/demo.php#_511)
+ * 【增加】"异步加载模式下全部展开" 的 Demo (http://www.ztree.me/v3/demo.php#_512)
+
+ * 【修改】代码结构,将 addNodes、removeNode、removeChildNodes 方法 和 beforeRemove、onRemove 回调 转移到 core 内
+ * 【修改】IE7的环境下无子节点的父节点反复展开出现多余空行的 bug
+ * 【修改】异步加载时,如果出现网络异常等,会导致 图标显示错误的 bug
+ * 【修改】dataFilter中 return null 导致异常 的 bug
+ * 【修改】removeChildNodes 方法清空子节点后,无法正常添加节点的 bug
+ * 【修改】moveNode 后节点中的自定义元素的事件丢失的 bug
+ * 【修改】moveNode 方法中设置 isSilent = true 时,如果移动到已展开的 父节点后,出现异常的 bug
+ * 【修改】onClick/onDrag/onDrop 回调中 event 不是原始 event 的 bug
+ * 【修改】onDrop 回调中 当拖拽无效时,无法获得 treeNodes 的 bug
+ * 【修改】onDrop 无法判断拖拽是 移动还是复制的问题
+ * 【修改】未开启异步加载模式时,拖拽节点到子节点为空的父节点内时 出现异常 的 bug
+ * 【修改】拖拽过程中,反复在 父节点图标上划动时,会出现停顿的 bug
+ (需要css 结构—— button -> span.button)
+
+ * 【修改】拖拽操作时箭头 与 targetNode 背景之间的细节现实问题,便于用户拖拽时更容易区分 prev、next 和 inner 操作
+ * 【修改】拖拽操作时IE6/7 下 在 节点 右侧 10px 内会导致 targetNode = root 的 bug
+ * 【修改】编辑模式下 默认的编辑按钮、删除按钮点击后,如果相应的 before 回调 return false 时会触发 onClick 回调的 bug
+
+*2012.02.14* v3.1
+ * 【增加】ajax 的参数 setting.async.contentType ,让提交参数适用于 json 数据提交 (主要适用于 .Net 的开发)。
+ * 【增加】setting.edit.editNameSelectAll, 用于设定编辑节点名称时初次显示 input 后 text 内容为全选
+ * 【修改】异步加载 规则,不再仅仅依靠父节点的子节点数来判定,增加内部属性 zAsync,保证默认状态下父节点及时无子节点也只能异步加载一次,除非使用 reAsyncChildNodes 方法强行控制异步加载。
+ * 【修改】放大浏览器后导致 界面出现多余连接线的bug (需要更新:icon 图标和 css )
+ * 【修改】在编辑状态,如果节点名超过编辑框宽度,左右键在框内不起作用的bug(IE 6 7 8 出现)
+ CSS 中 filter:alpha(opacity=80) 造成的,应该是 ie 的 bug,需要更新 css 文件
+ * 【修改】title 设置后,如果属性不存在,则默认为 title 为空,便于数据容错和用户灵活使用
+ * 【修改】editName 方法如果针对尚未展开的 父节点,会导致该父节点自动展开的 bug
+ * 【修改】title 中存在标签时导致 title 显示异常的bug(例如:蓝色字22%"'` `)
+
+*2012.01.10* v3.0
+ * 【增加】setting.check.autoCheckTrigger 默认值 false,可以设置联动选中时是否触发事件回调函数
+ * 【增加】setting.callback.beforeEditName 回调函数,以保证用户可以捕获点击编辑按钮的事件
+ * 【增加】treeNode.chkDisabled 属性,显示 checkbox 但是用户无法修改 checkbox 状态,并且该 checkbox 会影响父节点的 checkbox 的半选状态
+ * 【增加】setting.check.nocheckInherit 属性,用户设置子节点继承 nocheck 属性,用于批量初始化节点,不适用于已经显示的节点
+ * 【增加】setting.edit.drag.autoExpandTrigger 默认值 false,可以设置自动展开、折叠操作时是否触发事件回调函数
+ * 【增加】setting.view.nameIsHTML 默认值 false,允许用户对 name 设置 DOM 对象
+ * 【增加】treeNode.click 属性的说明文档
+ * 【增加】treeObj.setChkDisabled 方法用于设置 checkbox / radio disabled 状态
+ * 【增加】treeNode.halfCheck 属性,用于强制设定节点的半选状态
+
+ * 【修改】异步加载 & 编辑功能 共存时,拖拽节点 或 增加节点 导致 ie 上报错的 bug (apply 方法引起)
+ * 【修改】zTreeStyle 样式冲突
+ * 【修改】setting.data.key.title 默认值设置为 "",初始化时自动赋值为 setting.data.key.name 这样可避免希望 title 与 name 一致的用户反复设置参数
+ * 【修改】点击叶子节点的连接线会触发 expand 事件的 bug
+ * 【修改】IE 下 点击叶子节点连线会出现虚线框的 bug
+ * 【修改】updateNode 导致 checkbox 半选状态错误的 bug
+ * 【修改】checkNode 方法实现 toggle 操作, 取消 expandAll 方法的 toggle 操作
+ * 【修改】zTree 内鼠标移动会抢页面上 input 内的焦点的 bug
+ * 【修改】beforeRename / onRename 的触发方式——即使名称内容未改变也会触发,便于用户配合 beforeEditName 捕获编辑状态的结束,赋予用户更多调整规则的权利
+ * 【修改】与 easyUI 共存时无法拖拽的bug
+ * 【修改】beforeRename 在 Firefox 下如果利用 alert,会触发两次的 bug
+ * 【修改】checkNode/expandNode/removeNode 方法,默认不触发回调函数,恢复 v2.6 的默认状态,同时增加 callbackFlag 参数,设置为 true 时,可以触发回调函数
+ * 【修改】IE9下“根据参数查找节点”的Demo 报错:行14 重新声明常量属性(Demo 自身的问题,定义了history变量)
+ * 【修改】初始化 zTree 时 onNodeCreated 事件回调函数中无法 用 getZTreeObj 获取 zTree 对象的 bug
+ * 【修改】setting.edit.drag.prev / next / inner 参数,增加被拖拽的节点集合
+ * 【修改】异步加载模式下,otherParam 使用Array数组会出错的 bug。例如: ["id", "1", "name", "test"]
+ * 【修改】FireFox 下多棵树拖拽异常的 bug
+ * 【修改】exedit 中调用 excheck库的方法时没有进行容错处理,导致如果只加入 exedit 而没有 excheck的时候,会出现 js 错误
+ * 【修改】显示 checkbox 的 zTree 在编辑模式下,移动节点不会更新父节点半选状态的 bug
+ * 【修改】treeNode.childs --> children; treeObject.removeChilds --> removeChildNodes; setting.data.key.childs --> children(英文不好惹的祸!抱歉了!)
+ * 【修改】onRemove 回调中得到的 treeNode 还可以查找 preNode、nextNode 的bug。 修正后,getPreNode 和 getNextNode 都返回 null; 为了便于查找父节点,getParentNode 仍保留
+ * 【修改】简单数据模式下,如果 id 与 pId 的值相同会导致该节点无法正常加载的 bug
+ * 【修改】移动或删除中间节点会导致最后一个节点连接线图标变小的 bug
+
+*2011.09.05* v3.0 beta
+ * 【修改】zTree 的 js 代码架构全面修改,并且拆分
+ * 【修改】zTree 的 css 样式全面修改,对浏览器可以更好地兼容,同时解决了以前1个像素差的问题
+ * 【优化】采用延迟加载技术,一次性加载大数据量的节点性能飞速提升
+ * 【增加】支持多节点同时选中、拖拽
+ * 【增加】checkNode、checkAllNodes 等多种方法
+ * 【增加】IE6 自动取消动画展开、折叠的功能
+ * 【修正】异步加载 & 编辑模式 能够更完美的共存
+ * 【修正】setting 配置更加合理,并且增加了若干项配置参数
+ * 【修正】treeNode 节点数据的属性更加合理,并且增加了一些方法
+ * 【修正】拖拽操作更加灵活方便,更容易制定自己的规则
+ * 【修正】其他若干修改,详细对比请参考 url:[http://www.ztree.me/v3/faq.php#_101 zTree v3.0 常见问题]
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/layer/layer.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/layer/layer.min.js
index 12cb6b5c0..71f2ede49 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/layer/layer.min.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/layer/layer.min.js
@@ -1,2 +1,6 @@
+<<<<<<< HEAD
/*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
+=======
+/*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?''+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'
':"",''+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?' ':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?' ':"";return r.closeBtn&&(e+=' '),e}()+" "+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t
'+r.btn[t]+"";return' '+e+"
"}():"")+(r.resize?' ':"")+" "],u,i('
')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+' ',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return' '}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+" ";i"+t[i].title+"";return a}(),content:''+function(){var e=t.length,i=1,a="";if(e>0)for(a=''+(t[0].content||"no content")+" ";i'+(t[i].content||"no content")+" ";return a}()+"",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0] ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常 是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/css/modules/laydate/default/font/iconfont.svg b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/css/modules/laydate/default/font/iconfont.svg
index 1e04218fe..74e4e2b7c 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/css/modules/laydate/default/font/iconfont.svg
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/css/modules/laydate/default/font/iconfont.svg
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
+
+
+Created by iconfont
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/css/modules/laydate/default/laydate.css b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/css/modules/laydate/default/laydate.css
index c7e15086b..035bb5ea1 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/css/modules/laydate/default/laydate.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/css/modules/laydate/default/laydate.css
@@ -1,2 +1,6 @@
+<<<<<<< HEAD
/*! laydate-v5.0.9 日期与时间组件 MIT License http://www.layui.com/laydate/ By 贤心 */
+=======
+/*! laydate-v5.0.9 日期与时间组件 MIT License http://www.layui.com/laydate/ By 贤心 */
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
.laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px}@font-face{font-family:laydate-icon;src:url(font/iconfont.eot);src:url(font/iconfont.eot#iefix) format('embedded-opentype'),url(font/iconfont.svg#iconfont) format('svg'),url(font/iconfont.woff) format('woff'),url(font/iconfont.ttf) format('truetype')}.laydate-icon{font-family:laydate-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/laydate.js b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/laydate.js
index cbf203d11..607fe59a9 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/laydate.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/laydate.js
@@ -1,2 +1,7 @@
+<<<<<<< HEAD
/** layui-v5.0.9 日期与时间组件 MIT License By https://www.layui.com */
;!function(){"use strict";var e=window.layui&&layui.define,t={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,n=t.length-1,a=n;a>0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期 建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push(''+n.timeTips+" "),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push(''+o+" "))}),e.push('"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3)},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length必须遵循下述格式: "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+" 已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html(''+n+" "),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.nowl.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.yeard[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e=t&&e=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=[""+r.time[e]+"
"];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+" ")}),a.innerHTML=i.join("")+" ",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期 建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push(''+n.timeTips+" "),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push(''+o+" "))}),e.push('"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3)},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length必须遵循下述格式: "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+" 已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html(''+n+" "),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.nowl.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.yeard[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e=t&&e=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=[""+r.time[e]+"
"];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+" ")}),a.innerHTML=i.join("")+" ",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/layer.js b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/layer.js
index 12cb6b5c0..71f2ede49 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/layer.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/layer.js
@@ -1,2 +1,6 @@
+<<<<<<< HEAD
/*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
+=======
+/*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?''+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'
':"",''+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?' ':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?' ':"";return r.closeBtn&&(e+=' '),e}()+" "+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t
'+r.btn[t]+"";return' '+e+"
"}():"")+(r.resize?' ':"")+" "],u,i('
')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+' ',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return' '}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+" ";i"+t[i].title+"";return a}(),content:''+function(){var e=t.length,i=1,a="";if(e>0)for(a=''+(t[0].content||"no content")+" ";i'+(t[i].content||"no content")+"";return a}()+" ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0] ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常 是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/layui.js b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/layui.js
index 248777f6b..a5c54b998 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/layui.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/layui.js
@@ -1,2 +1,6 @@
+<<<<<<< HEAD
/** layui-v2.3.0-rc1 MIT License By https://www.layui.com */
+=======
+/** layui-v2.3.0-rc1 MIT License By https://www.layui.com */
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
;!function(e){"use strict";var t=document,n={modules:{},status:{},timeout:10,event:{}},o=function(){this.v="2.3.0-rc1"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,n=t.scripts,o=n.length-1,r=o;r>0;r--)if("interactive"===n[r].readyState){e=n[r].src;break}return e||n[o].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),a=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},i="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};o.prototype.cache=n,o.prototype.define=function(e,t){var o=this,r="function"==typeof e,a=function(){var e=function(e,t){layui[e]=t,n.status[e]=!0};return"function"==typeof t&&t(function(o,r){e(o,r),n.callback[o]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?a.call(o):(o.use(e,a),o)},o.prototype.use=function(e,o,l){function s(e,t){var o="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||o.test((e.currentTarget||e.srcElement).readyState))&&(n.modules[d]=t,f.removeChild(v),function r(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void(n.status[d]?c():setTimeout(r,4))}())}function c(){l.push(layui[d]),e.length>1?y.use(e.slice(1),o,l):"function"==typeof o&&o.apply(layui,l)}var y=this,p=n.dir=n.dir?n.dir:r,f=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var d=e[0],m=0;if(l=l||[],n.host=n.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[d]||!layui["layui.all"]&&layui["layui.mobile"]&&u[d])return c(),y;if(n.modules[d])!function g(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void("string"==typeof n.modules[d]&&n.status[d]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[d]?p+"lay/":/^\{\/\}/.test(y.modules[d])?"":n.base||"")+(y.modules[d]||d)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=n.version===!0?n.v||(new Date).getTime():n.version||"";return e?"?v="+e:""}(),f.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||i?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),n.modules[d]=h}return y},o.prototype.getStyle=function(t,n){var o=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return o[o.getPropertyValue?"getPropertyValue":"getAttribute"](n)},o.prototype.link=function(e,o,r){var i=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof o&&(r=o);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(n.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof o?i:(function p(){return++y>1e3*n.timeout/100?a(e+" timeout"):void(1989===parseInt(i.getStyle(t.getElementById(c),"width"))?function(){o()}():setTimeout(p,100))}(),i)},n.callback={},o.prototype.factory=function(e){if(layui[e])return"function"==typeof n.callback[e]?n.callback[e]:null},o.prototype.addcss=function(e,t,o){return layui.link(n.dir+"css/"+e,t,o)},o.prototype.img=function(e,t,n){var o=new Image;return o.src=e,o.complete?t(o):(o.onload=function(){o.onload=null,"function"==typeof t&&t(o)},void(o.onerror=function(e){o.onerror=null,"function"==typeof n&&n(e)}))},o.prototype.config=function(e){e=e||{};for(var t in e)n[t]=e[t];return this},o.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),o.prototype.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?a("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},o.prototype.router=function(e){var t=this,e=e||location.hash,n={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),n.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),n.search[t[0]]=t[1]}():n.path.push(t)}),n):n},o.prototype.data=function(t,n,o){if(t=t||"layui",o=o||localStorage,e.JSON&&e.JSON.parse){if(null===n)return delete o[t];n="object"==typeof n?n:{key:n};try{var r=JSON.parse(o[t])}catch(a){var r={}}return"value"in n&&(r[n.key]=n.value),n.remove&&delete r[n.key],o[t]=JSON.stringify(r),n.key?r[n.key]:r}},o.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},o.prototype.device=function(t){var n=navigator.userAgent.toLowerCase(),o=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(n.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(n)?"windows":/linux/.test(n)?"linux":/iphone|ipod|ipad|ios/.test(n)?"ios":/mac/.test(n)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((n.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:o("micromessenger")};return t&&!r[t]&&(r[t]=o(t)),r.android=/android/.test(n),r.ios="ios"===r.os,r},o.prototype.hint=function(){return{error:a}},o.prototype.each=function(e,t){var n,o=this;if("function"!=typeof t)return o;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;na?1:r0){E.splice(L-1,2);L-=2}}}}}E=E.join("/")}else{if(E.indexOf("./")===0){E=E.substring(2)}}}if((O||B)&&D){M=E.split("/");for(L=M.length;L>0;L-=1){I=M.slice(0,L).join("/");if(O){for(K=O.length;K>0;K-=1){G=D[O.slice(0,K).join("/")];if(G){G=G[I];if(G){J=G;F=L;break}}}}if(J){break}if(!P&&B&&B[I]){P=B[I];Q=L}}if(!J&&P){J=P;F=Q}if(J){M.splice(0,F,J);E=M.join("/")}}return E}function y(B,C){return function(){var D=p.call(arguments,0);if(typeof D[0]!=="string"&&D.length===1){D.push(null)}return h.apply(l,D.concat([B,C]))}}function v(B){return function(C){return u(C,B)}}function m(B){return function(C){k[B]=C}}function n(C){if(A(j,C)){var B=j[C];delete j[C];w[C]=true;o.apply(l,B)}if(!A(k,C)&&!A(w,C)){throw new Error("No "+C)}return k[C]}function x(C){var D,B=C?C.indexOf("!"):-1;if(B>-1){D=C.substring(0,B);C=C.substring(B+1,C.length)}return[D,C]}s=function(C,B){var D,F=x(C),E=F[0];C=F[1];if(E){E=u(E,B);D=n(E)}if(E){if(D&&D.normalize){C=D.normalize(C,v(B))}else{C=u(C,B)}}else{C=u(C,B);F=x(C);E=F[0];C=F[1];if(E){D=n(E)}}return{f:E?E+"!"+C:C,n:C,pr:E,p:D}};function i(B){return function(){return(z&&z.config&&z.config[B])||{}}}t={require:function(B){return y(B)},exports:function(B){var C=k[B];if(typeof C!=="undefined"){return C}else{return(k[B]={})}},module:function(B){return{id:B,uri:"",exports:k[B],config:i(B)}}};o=function(C,M,L,K){var F,J,G,B,E,H=[],D=typeof L,I;K=K||C;if(D==="undefined"||D==="function"){M=!M.length&&L.length?["require","exports","module"]:M;for(E=0;E0){u.call(arguments,q.prototype.constructor);m=p.prototype.constructor}m.apply(this,arguments)}p.displayName=q.displayName;function i(){this.constructor=t}t.prototype=new i();for(var l=0;l":">",'"':""","'":"'","/":"/"};if(typeof i!=="string"){return i}return String(i).replace(/[&<>"'\/\\]/g,function(k){return j[k]})};g.appendMany=function(i,k){if(h.fn.jquery.substr(0,3)==="1.7"){var j=h();h.map(k,function(l){j=j.add(l)});k=j}i.append(k)};return g});d.define("select2/results",["jquery","./utils"],function(g,f){function e(h,i,j){this.$element=h;this.data=j;this.options=i;e.__super__.constructor.call(this)}f.Extend(e,f.Observable);e.prototype.render=function(){var h=g('');if(this.options.get("multiple")){h.attr("aria-multiselectable","true")}this.$results=h;return h};e.prototype.clear=function(){this.$results.empty()};e.prototype.displayMessage=function(k){var h=this.options.get("escapeMarkup");this.clear();this.hideLoading();var i=g(' ');var j=this.options.get("translations").get(k.message);i.append(h(j(k.args)));i[0].className+=" select2-results__message";this.$results.append(i)};e.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()};e.prototype.append=function(j){this.hideLoading();var h=[];if(j.results==null||j.results.length===0){if(this.$results.children().length===0){this.trigger("results:message",{message:"noResults"})}return}j.results=this.sort(j.results);for(var l=0;l0){i.first().trigger("mouseenter")}else{h.first().trigger("mouseenter")}this.ensureHighlightVisible()};e.prototype.setClasses=function(){var h=this;this.data.current(function(k){var j=g.map(k,function(l){return l.id.toString()});var i=h.$results.find(".select2-results__option[aria-selected]");i.each(function(){var m=g(this);var l=g.data(this,"data");var n=""+l.id;if((l.element!=null&&l.element.selected)||(l.element==null&&g.inArray(n,j)>-1)){m.attr("aria-selected","true")}else{m.attr("aria-selected","false")}})})};e.prototype.showLoading=function(j){this.hideLoading();var i=this.options.get("translations").get("searching");var k={disabled:true,loading:true,text:i(j)};var h=this.option(k);h.className+=" loading-results";this.$results.prepend(h)};e.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()};e.prototype.option=function(l){var m=document.createElement("li");m.className="select2-results__option";var t={role:"treeitem","aria-selected":"false"};if(l.disabled){delete t["aria-selected"];t["aria-disabled"]="true"}if(l.id==null){delete t["aria-selected"]}if(l._resultId!=null){m.id=l._resultId}if(l.title){m.title=l.title}if(l.children){t.role="group";t["aria-label"]=l.text;delete t["aria-selected"]}for(var n in t){var k=t[n];m.setAttribute(n,k)}if(l.children){var h=g(m);var r=document.createElement("strong");r.className="select2-results__group";var q=g(r);this.template(l,r);var s=[];for(var p=0;p",{"class":"select2-results__options select2-results__options--nested"});o.append(s);h.append(r);h.append(o)}else{this.template(l,m)}g.data(m,"data",l);return m};e.prototype.bind=function(h,j){var i=this;var k=h.id+"-results";this.$results.attr("id",k);h.on("results:all",function(l){i.clear();i.append(l.data);if(h.isOpen()){i.setClasses();i.highlightFirstItem()}});h.on("results:append",function(l){i.append(l.data);if(h.isOpen()){i.setClasses()}});h.on("query",function(l){i.hideMessages();i.showLoading(l)});h.on("select",function(){if(!h.isOpen()){return}i.setClasses();i.highlightFirstItem()});h.on("unselect",function(){if(!h.isOpen()){return}i.setClasses();i.highlightFirstItem()});h.on("open",function(){i.$results.attr("aria-expanded","true");i.$results.attr("aria-hidden","false");i.setClasses();i.ensureHighlightVisible()});h.on("close",function(){i.$results.attr("aria-expanded","false");i.$results.attr("aria-hidden","true");i.$results.removeAttr("aria-activedescendant")});h.on("results:toggle",function(){var l=i.getHighlightedResults();if(l.length===0){return}l.trigger("mouseup")});h.on("results:select",function(){var l=i.getHighlightedResults();if(l.length===0){return}var m=l.data("data");if(l.attr("aria-selected")=="true"){i.trigger("close",{})}else{i.trigger("select",{data:m})}});h.on("results:previous",function(){var n=i.getHighlightedResults();var m=i.$results.find("[aria-selected]");var p=m.index(n);if(p===0){return}var l=p-1;if(n.length===0){l=0}var o=m.eq(l);o.trigger("mouseenter");var s=i.$results.offset().top;var r=o.offset().top;var q=i.$results.scrollTop()+(r-s);if(l===0){i.$results.scrollTop(0)}else{if(r-s<0){i.$results.scrollTop(q)}}});h.on("results:next",function(){var n=i.getHighlightedResults();var m=i.$results.find("[aria-selected]");var p=m.index(n);var l=p+1;if(l>=m.length){return}var o=m.eq(l);o.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(false);var r=o.offset().top+o.outerHeight(false);var q=i.$results.scrollTop()+r-s;if(l===0){i.$results.scrollTop(0)}else{if(r>s){i.$results.scrollTop(q)}}});h.on("results:focus",function(l){l.element.addClass("select2-results__option--highlighted")});h.on("results:message",function(l){i.displayMessage(l)});if(g.fn.mousewheel){this.$results.on("mousewheel",function(o){var n=i.$results.scrollTop();var l=i.$results.get(0).scrollHeight-n+o.deltaY;var p=o.deltaY>0&&n-o.deltaY<=0;var m=o.deltaY<0&&l<=i.$results.height();if(p){i.$results.scrollTop(0);o.preventDefault();o.stopPropagation()}else{if(m){i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height());o.preventDefault();o.stopPropagation()}}})}this.$results.on("mouseup",".select2-results__option[aria-selected]",function(l){var n=g(this);var m=n.data("data");if(n.attr("aria-selected")==="true"){if(i.options.get("multiple")){i.trigger("unselect",{originalEvent:l,data:m})}else{i.trigger("close",{})}return}i.trigger("select",{originalEvent:l,data:m})});this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(l){var m=g(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted");i.trigger("results:focus",{data:m,element:g(this)})})};e.prototype.getHighlightedResults=function(){var h=this.$results.find(".select2-results__option--highlighted");return h};e.prototype.destroy=function(){this.$results.remove()};e.prototype.ensureHighlightVisible=function(){var i=this.getHighlightedResults();if(i.length===0){return}var h=this.$results.find("[aria-selected]");var j=h.index(i);var m=this.$results.offset().top;var l=i.offset().top;var k=this.$results.scrollTop()+(l-m);var n=l-m;k-=i.outerHeight(false)*2;if(j<=2){this.$results.scrollTop(0)}else{if(n>this.$results.outerHeight()||n<0){this.$results.scrollTop(k)}}};e.prototype.template=function(i,j){var k=this.options.get("templateResult");var h=this.options.get("escapeMarkup");var l=k(i,j);if(l==null){j.style.display="none"}else{if(typeof l==="string"){j.innerHTML=h(l)}else{g(j).append(l)}}};return e});d.define("select2/keys",[],function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return e});d.define("select2/selection/base",["jquery","../utils","../keys"],function(h,g,e){function f(i,j){this.$element=i;this.options=j;f.__super__.constructor.call(this)}g.Extend(f,g.Observable);f.prototype.render=function(){var i=h(' ');this._tabindex=0;if(this.$element.data("old-tabindex")!=null){this._tabindex=this.$element.data("old-tabindex")}else{if(this.$element.attr("tabindex")!=null){this._tabindex=this.$element.attr("tabindex")}}i.attr("title",this.$element.attr("title"));i.attr("tabindex",this._tabindex);this.$selection=i;return i};f.prototype.bind=function(i,l){var k=this;var m=i.id+"-container";var j=i.id+"-results";this.container=i;this.$selection.on("focus",function(n){k.trigger("focus",n)});this.$selection.on("blur",function(n){k._handleBlur(n)});this.$selection.on("keydown",function(n){k.trigger("keypress",n);if(n.which===e.SPACE){n.preventDefault()}});i.on("results:focus",function(n){k.$selection.attr("aria-activedescendant",n.data._resultId)});i.on("selection:update",function(n){k.update(n.data)});i.on("open",function(){k.$selection.attr("aria-expanded","true");k.$selection.attr("aria-owns",j);k._attachCloseHandler(i)});i.on("close",function(){k.$selection.attr("aria-expanded","false");k.$selection.removeAttr("aria-activedescendant");k.$selection.removeAttr("aria-owns");k.$selection.focus();k._detachCloseHandler(i)});i.on("enable",function(){k.$selection.attr("tabindex",k._tabindex)});i.on("disable",function(){k.$selection.attr("tabindex","-1")})};f.prototype._handleBlur=function(i){var j=this;window.setTimeout(function(){if((document.activeElement==j.$selection[0])||(h.contains(j.$selection[0],document.activeElement))){return}j.trigger("blur",i)},1)};f.prototype._attachCloseHandler=function(i){var j=this;h(document.body).on("mousedown.select2."+i.id,function(n){var k=h(n.target);var l=k.closest(".select2");var m=h(".select2.select2-container--open");m.each(function(){var p=h(this);if(this==l[0]){return}var o=p.data("element");o.select2("close")})})};f.prototype._detachCloseHandler=function(i){h(document.body).off("mousedown.select2."+i.id)};f.prototype.position=function(i,k){var j=k.find(".selection");j.append(i)};f.prototype.destroy=function(){this._detachCloseHandler(this.container)};f.prototype.update=function(i){throw new Error("The `update` method must be defined in child classes.")};return f});d.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(h,f,g,e){function i(){i.__super__.constructor.apply(this,arguments)}g.Extend(i,f);i.prototype.render=function(){var j=i.__super__.render.call(this);j.addClass("select2-selection--single");j.html(' ');return j};i.prototype.bind=function(j,l){var k=this;i.__super__.bind.apply(this,arguments);var m=j.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",m);this.$selection.attr("aria-labelledby",m);this.$selection.on("mousedown",function(n){if(n.which!==1){return}k.trigger("toggle",{originalEvent:n})});this.$selection.on("focus",function(n){});this.$selection.on("blur",function(n){});j.on("focus",function(n){if(!j.isOpen()){k.$selection.focus()}});j.on("selection:update",function(n){k.update(n.data)})};i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()};i.prototype.display=function(m,k){var l=this.options.get("templateSelection");var j=this.options.get("escapeMarkup");return j(l(m,k))};i.prototype.selectionContainer=function(){return h(" ")};i.prototype.update=function(l){if(l.length===0){this.clear();return}var j=l[0];var m=this.$selection.find(".select2-selection__rendered");var k=this.display(j,m);m.empty().append(k);m.prop("title",j.title||j.text)};return i});d.define("select2/selection/multiple",["jquery","./base","../utils"],function(h,e,g){function f(i,j){f.__super__.constructor.apply(this,arguments)}g.Extend(f,e);f.prototype.render=function(){var i=f.__super__.render.call(this);i.addClass("select2-selection--multiple");i.html('');return i};f.prototype.bind=function(i,k){var j=this;f.__super__.bind.apply(this,arguments);this.$selection.on("click",function(l){j.trigger("toggle",{originalEvent:l})});this.$selection.on("click",".select2-selection__choice__remove",function(m){if(j.options.get("disabled")){return}var n=h(this);var l=n.parent();var o=l.data("data");j.trigger("unselect",{originalEvent:m,data:o})})};f.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()};f.prototype.display=function(l,j){var k=this.options.get("templateSelection");var i=this.options.get("escapeMarkup");return i(k(l,j))};f.prototype.selectionContainer=function(){var i=h('× ');return i};f.prototype.update=function(m){this.clear();if(m.length===0){return}var j=[];for(var o=0;o1;if(i||h){return k.call(this,j)}this.clear();var g=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(g)};return e});d.define("select2/selection/allowClear",["jquery","../keys"],function(f,e){function g(){}g.prototype.bind=function(j,h,k){var i=this;j.call(this,h,k);if(this.placeholder==null){if(this.options.get("debug")&&window.console&&console.error){console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option.")}}this.$selection.on("mousedown",".select2-selection__clear",function(l){i._handleClear(l)});h.on("keypress",function(l){i._handleKeyboardClear(l,h)})};g.prototype._handleClear=function(i,h){if(this.options.get("disabled")){return}var l=this.$selection.find(".select2-selection__clear");if(l.length===0){return}h.stopPropagation();var k=l.data("data");for(var m=0;m0||i.length===0){return}var h=f('× ');h.data("data",i);this.$selection.find(".select2-selection__rendered").prepend(h)};return g});d.define("select2/selection/search",["jquery","../utils","../keys"],function(h,g,e){function f(k,i,j){k.call(this,i,j)}f.prototype.render=function(j){var i=h(' ');this.$searchContainer=i;this.$search=i.find("input");var k=j.call(this);this._transferTabIndex();return k};f.prototype.bind=function(m,j,n){var k=this;m.call(this,j,n);j.on("open",function(){k.$search.trigger("focus")});j.on("close",function(){k.$search.val("");k.$search.removeAttr("aria-activedescendant");k.$search.trigger("focus")});j.on("enable",function(){k.$search.prop("disabled",false);k._transferTabIndex()});j.on("disable",function(){k.$search.prop("disabled",true)});j.on("focus",function(o){k.$search.trigger("focus")});j.on("results:focus",function(o){k.$search.attr("aria-activedescendant",o.id)});this.$selection.on("focusin",".select2-search--inline",function(o){k.trigger("focus",o)});this.$selection.on("focusout",".select2-search--inline",function(o){k._handleBlur(o)});this.$selection.on("keydown",".select2-search--inline",function(o){o.stopPropagation();k.trigger("keypress",o);k._keyUpPrevented=o.isDefaultPrevented();var q=o.which;if(q===e.BACKSPACE&&k.$search.val()===""){var p=k.$searchContainer.prev(".select2-selection__choice");if(p.length>0){var r=p.data("data");k.searchRemoveChoice(r);o.preventDefault()}}});var l=document.documentMode;var i=l&&l<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(o){if(i){k.$selection.off("input.search input.searchcheck");return}k.$selection.off("keyup.search")});this.$selection.on("keyup.search input.search",".select2-search--inline",function(o){if(i&&o.type==="input"){k.$selection.off("input.search input.searchcheck");return}var p=o.which;if(p==e.SHIFT||p==e.CTRL||p==e.ALT){return}if(p==e.TAB){return}k.handleSearch(o)})};f.prototype._transferTabIndex=function(i){this.$search.attr("tabindex",this.$selection.attr("tabindex"));this.$selection.attr("tabindex","-1")};f.prototype.createPlaceholder=function(i,j){this.$search.attr("placeholder",j.text)};f.prototype.update=function(k,j){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder","");k.call(this,j);this.$selection.find(".select2-selection__rendered").append(this.$searchContainer);this.resizeSearch();if(i){this.$search.focus()}};f.prototype.handleSearch=function(){this.resizeSearch();if(!this._keyUpPrevented){var i=this.$search.val();this.trigger("query",{term:i})}this._keyUpPrevented=false};f.prototype.searchRemoveChoice=function(j,i){this.trigger("unselect",{data:i});this.$search.val(i.text);this.handleSearch()};f.prototype.resizeSearch=function(){this.$search.css("width","25px");var i="";if(this.$search.attr("placeholder")!==""){i=this.$selection.find(".select2-selection__rendered").innerWidth()}else{var j=this.$search.val().length+1;i=(j*0.75)+"em"}this.$search.css("width",i)};return f});d.define("select2/selection/eventRelay",["jquery"],function(e){function f(){}f.prototype.bind=function(k,g,l){var h=this;var i=["open","opening","close","closing","select","selecting","unselect","unselecting"];var j=["opening","closing","selecting","unselecting"];k.call(this,g,l);g.on("*",function(n,o){if(e.inArray(n,i)===-1){return}o=o||{};var m=e.Event("select2:"+n,{params:o});h.$element.trigger(m);if(e.inArray(n,j)===-1){return}o.prevented=m.isDefaultPrevented()})};return f});d.define("select2/translation",["jquery","require"],function(g,f){function e(h){this.dict=h||{}}e.prototype.all=function(){return this.dict};e.prototype.get=function(h){return this.dict[h]};e.prototype.extend=function(h){this.dict=g.extend({},h.all(),this.dict)};e._cache={};e.loadPath=function(i){if(!(i in e._cache)){var h=f(i);e._cache[i]=h}return new e(e._cache[i])};return e});d.define("select2/diacritics",[],function(){var e={"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u00C7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\u00C8":"E","\u00C9":"E","\u00CA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\u00CB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\u00CC":"I","\u00CD":"I","\u00CE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\u00CF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\u00D1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\u00D2":"O","\u00D3":"O","\u00D4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\u00D5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\u00D6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\u00D8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\u00D9":"U","\u00DA":"U","\u00DB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\u00DC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\u00DD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\u00E0":"a","\u00E1":"a","\u00E2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\u00E3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\u00E4":"a","\u01DF":"a","\u1EA3":"a","\u00E5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\u00E6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u00E7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\u00E8":"e","\u00E9":"e","\u00EA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\u00EB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\u00EC":"i","\u00ED":"i","\u00EE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\u00EF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\u00F1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\u00F2":"o","\u00F3":"o","\u00F4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\u00F5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\u00F6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\u00F8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\u00DF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\u00F9":"u","\u00FA":"u","\u00FB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\u00FC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\u00FD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\u00FF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038A":"\u0399","\u03AA":"\u0399","\u038C":"\u039F","\u038E":"\u03A5","\u03AB":"\u03A5","\u038F":"\u03A9","\u03AC":"\u03B1","\u03AD":"\u03B5","\u03AE":"\u03B7","\u03AF":"\u03B9","\u03CA":"\u03B9","\u0390":"\u03B9","\u03CC":"\u03BF","\u03CD":"\u03C5","\u03CB":"\u03C5","\u03B0":"\u03C5","\u03C9":"\u03C9","\u03C2":"\u03C3"};
return e});d.define("select2/data/base",["../utils"],function(f){function e(g,h){e.__super__.constructor.call(this)}f.Extend(e,f.Observable);e.prototype.current=function(g){throw new Error("The `current` method must be defined in child classes.")};e.prototype.query=function(g,h){throw new Error("The `query` method must be defined in child classes.")};e.prototype.bind=function(g,h){};e.prototype.destroy=function(){};e.prototype.generateResultId=function(g,h){var i=g.id+"-result-";i+=f.generateChars(4);if(h.id!=null){i+="-"+h.id.toString()}else{i+="-"+f.generateChars(4)}return i};return e});d.define("select2/data/select",["./base","../utils","jquery"],function(e,h,g){function f(i,j){this.$element=i;this.options=j;f.__super__.constructor.call(this)}h.Extend(f,e);f.prototype.current=function(k){var j=[];var i=this;this.$element.find(":selected").each(function(){var m=g(this);var l=i.item(m);j.push(l)});k(j)};f.prototype.select=function(j){var i=this;j.selected=true;if(g(j.element).is("option")){j.element.selected=true;this.$element.trigger("change");return}if(this.$element.prop("multiple")){this.current(function(l){var n=[];j=[j];j.push.apply(j,l);for(var m=0;m=0){var o=n.filter(r(t));var p=this.item(o);var v=f.extend(true,{},t,p);var l=this.option(v);o.replaceWith(l);continue}var i=this.option(t);if(t.children){var s=this.convertToOptions(t.children);g.appendMany(i,s)}m.push(i)}return m};return h});d.define("select2/data/ajax",["./array","../utils","jquery"],function(h,g,f){function e(i,j){this.ajaxOptions=this._applyDefaults(j.get("ajax"));if(this.ajaxOptions.processResults!=null){this.processResults=this.ajaxOptions.processResults}e.__super__.constructor.call(this,i,j)}g.Extend(e,h);e.prototype._applyDefaults=function(i){var j={data:function(k){return f.extend({},k,{q:k.term})},transport:function(n,m,l){var k=f.ajax(n);k.then(m);k.fail(l);return k}};return f.extend({},j,i,true)};e.prototype.processResults=function(i){return i};e.prototype.query=function(m,n){var l=[];var i=this;if(this._request!=null){if(f.isFunction(this._request.abort)){this._request.abort()}this._request=null}var j=f.extend({type:"GET"},this.ajaxOptions);if(typeof j.url==="function"){j.url=j.url.call(this.$element,m)}if(typeof j.data==="function"){j.data=j.data.call(this.$element,m)}function k(){var o=j.transport(j,function(q){var p=i.processResults(q,m);if(i.options.get("debug")&&window.console&&console.error){if(!p||!p.results||!f.isArray(p.results)){console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")}}n(p)},function(){if(o.status&&o.status==="0"){return}i.trigger("results:message",{message:"errorLoading"})});i._request=o}if(this.ajaxOptions.delay&&m.term!=null){if(this._queryTimeout){window.clearTimeout(this._queryTimeout)}this._queryTimeout=window.setTimeout(k,this.ajaxOptions.delay)}else{k()}};return e});d.define("select2/data/tags",["jquery"],function(f){function e(h,k,n){var o=n.get("tags");var i=n.get("createTag");if(i!==undefined){this.createTag=i}var j=n.get("insertTag");if(j!==undefined){this.insertTag=j}h.call(this,k,n);if(f.isArray(o)){for(var m=0;m0&&g.term.length>this.maximumInputLength){this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:g.term,params:g}});return}f.call(this,g,h)};return e});d.define("select2/data/maximumSelectionLength",[],function(){function e(h,g,f){this.maximumSelectionLength=f.get("maximumSelectionLength");h.call(this,g,f)}e.prototype.query=function(g,h,i){var f=this;this.current(function(j){var k=j!=null?j.length:0;if(f.maximumSelectionLength>0&&k>=f.maximumSelectionLength){f.trigger("results:message",{message:"maximumSelected",args:{maximum:f.maximumSelectionLength}});return}g.call(f,h,i)})};return e});d.define("select2/dropdown",["jquery","./utils"],function(g,f){function e(h,i){this.$element=h;this.options=i;e.__super__.constructor.call(this)}f.Extend(e,f.Observable);e.prototype.render=function(){var h=g(' ');h.attr("dir",this.options.get("dir"));this.$dropdown=h;return h};e.prototype.bind=function(){};e.prototype.position=function(h,i){};e.prototype.destroy=function(){this.$dropdown.remove()};return e});d.define("select2/dropdown/search",["jquery","../utils"],function(g,f){function e(){}e.prototype.render=function(i){var j=i.call(this);var h=g(' ');this.$searchContainer=h;this.$search=h.find("input");j.prepend(h);return j};e.prototype.bind=function(j,h,k){var i=this;j.call(this,h,k);this.$search.on("keydown",function(l){i.trigger("keypress",l);i._keyUpPrevented=l.isDefaultPrevented()});this.$search.on("input",function(l){g(this).off("keyup")});this.$search.on("keyup input",function(l){i.handleSearch(l)});h.on("open",function(){i.$search.attr("tabindex",0);i.$search.focus();window.setTimeout(function(){i.$search.focus()},0)});h.on("close",function(){i.$search.attr("tabindex",-1);i.$search.val("")});h.on("focus",function(){if(h.isOpen()){i.$search.focus()}});h.on("results:all",function(m){if(m.query.term==null||m.query.term===""){var l=i.showSearch(m);if(l){i.$searchContainer.removeClass("select2-search--hide")}else{i.$searchContainer.addClass("select2-search--hide")}}})};e.prototype.handleSearch=function(h){if(!this._keyUpPrevented){var i=this.$search.val();this.trigger("query",{term:i})}this._keyUpPrevented=false};e.prototype.showSearch=function(h,i){return true};return e});d.define("select2/dropdown/hidePlaceholder",[],function(){function e(h,f,g,i){this.placeholder=this.normalizePlaceholder(g.get("placeholder"));h.call(this,f,g,i)}e.prototype.append=function(g,f){f.results=this.removePlaceholder(f.results);g.call(this,f)};e.prototype.normalizePlaceholder=function(f,g){if(typeof g==="string"){g={id:"",text:g}}return g};e.prototype.removePlaceholder=function(f,i){var h=i.slice(0);for(var j=i.length-1;j>=0;j--){var g=i[j];if(this.placeholder.id===g.id){h.splice(j,1)}}return h};return e});d.define("select2/dropdown/infiniteScroll",["jquery"],function(f){function e(i,g,h,j){this.lastParams={};i.call(this,g,h,j);this.$loadingMore=this.createLoadingMore();this.loading=false}e.prototype.append=function(h,g){this.$loadingMore.remove();this.loading=false;h.call(this,g);if(this.showLoadingMore(g)){this.$results.append(this.$loadingMore)}};e.prototype.bind=function(i,g,j){var h=this;i.call(this,g,j);g.on("query",function(k){h.lastParams=k;h.loading=true});g.on("query:append",function(k){h.lastParams=k;h.loading=true});this.$results.on("scroll",function(){var m=f.contains(document.documentElement,h.$loadingMore[0]);if(h.loading||!m){return}var l=h.$results.offset().top+h.$results.outerHeight(false);var k=h.$loadingMore.offset().top+h.$loadingMore.outerHeight(false);if(l+50>=k){h.loadMore()}})};e.prototype.loadMore=function(){this.loading=true;var g=f.extend({},{page:1},this.lastParams);g.page++;this.trigger("query:append",g)};e.prototype.showLoadingMore=function(g,h){return h.pagination&&h.pagination.more};e.prototype.createLoadingMore=function(){var h=f(' ');var g=this.options.get("translations").get("loadingMore");h.html(g(this.lastParams));return h};return e});d.define("select2/dropdown/attachBody",["jquery","../utils"],function(g,f){function e(j,h,i){this.$dropdownParent=i.get("dropdownParent")||g(document.body);j.call(this,h,i)}e.prototype.bind=function(k,h,l){var j=this;var i=false;k.call(this,h,l);h.on("open",function(){j._showDropdown();j._attachPositioningHandler(h);if(!i){i=true;h.on("results:all",function(){j._positionDropdown();j._resizeDropdown()});h.on("results:append",function(){j._positionDropdown();j._resizeDropdown()})}});h.on("close",function(){j._hideDropdown();j._detachPositioningHandler(h)});this.$dropdownContainer.on("mousedown",function(m){m.stopPropagation()})};e.prototype.destroy=function(h){h.call(this);this.$dropdownContainer.remove()};e.prototype.position=function(h,i,j){i.attr("class",j.attr("class"));i.removeClass("select2");i.addClass("select2-container--open");i.css({position:"absolute",top:-999999});this.$container=j};e.prototype.render=function(h){var j=g(" ");var i=h.call(this);j.append(i);this.$dropdownContainer=j;return j};e.prototype._hideDropdown=function(h){this.$dropdownContainer.detach()};e.prototype._attachPositioningHandler=function(n,h){var i=this;var k="scroll.select2."+h.id;var m="resize.select2."+h.id;var l="orientationchange.select2."+h.id;var j=this.$container.parents().filter(f.hasScroll);j.each(function(){g(this).data("select2-scroll-position",{x:g(this).scrollLeft(),y:g(this).scrollTop()})});j.on(k,function(p){var o=g(this).data("select2-scroll-position");g(this).scrollTop(o.y)});g(window).on(k+" "+m+" "+l,function(o){i._positionDropdown();i._resizeDropdown()})};e.prototype._detachPositioningHandler=function(m,h){var j="scroll.select2."+h.id;var l="resize.select2."+h.id;var k="orientationchange.select2."+h.id;var i=this.$container.parents().filter(f.hasScroll);i.off(j);g(window).off(j+" "+l+" "+k)};e.prototype._positionDropdown=function(){var k=g(window);var t=this.$dropdown.hasClass("select2-dropdown--above");var j=this.$dropdown.hasClass("select2-dropdown--below");var q=null;var l=this.$container.offset();l.bottom=l.top+this.$container.outerHeight(false);var i={height:this.$container.outerHeight(false)};i.top=l.top;i.bottom=l.top+i.height;var s={height:this.$dropdown.outerHeight(false)};var o={top:k.scrollTop(),bottom:k.scrollTop()+k.height()};var n=o.top<(l.top-s.height);var p=o.bottom>(l.bottom+s.height);var m={left:l.left,top:i.bottom};var r=this.$dropdownParent;if(r.css("position")==="static"){r=r.offsetParent()}var h=r.offset();m.top-=h.top;m.left-=h.left;if(!t&&!j){q="below"}if(!p&&n&&!t){q="above"}else{if(!n&&p&&t){q="below"}}if(q=="above"||(t&&q!=="below")){m.top=i.top-h.top-s.height}if(q!=null){this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+q);this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+q)}this.$dropdownContainer.css(m)};e.prototype._resizeDropdown=function(){var h={width:this.$container.outerWidth(false)+"px"};if(this.options.get("dropdownAutoWidth")){h.minWidth=h.width;h.position="relative";h.width="auto"}this.$dropdown.css(h)};e.prototype._showDropdown=function(h){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()};return e});d.define("select2/dropdown/minimumResultsForSearch",[],function(){function f(i){var h=0;for(var j=0;j0){Z.dataAdapter=e.Decorate(Z.dataAdapter,D)}if(Z.maximumInputLength>0){Z.dataAdapter=e.Decorate(Z.dataAdapter,H)}if(Z.maximumSelectionLength>0){Z.dataAdapter=e.Decorate(Z.dataAdapter,w)}if(Z.tags){Z.dataAdapter=e.Decorate(Z.dataAdapter,x)}if(Z.tokenSeparators!=null||Z.tokenizer!=null){Z.dataAdapter=e.Decorate(Z.dataAdapter,h)}if(Z.query!=null){var R=k(Z.amdBase+"compat/query");Z.dataAdapter=e.Decorate(Z.dataAdapter,R)}if(Z.initSelection!=null){var Y=k(Z.amdBase+"compat/initSelection");Z.dataAdapter=e.Decorate(Z.dataAdapter,Y)}}if(Z.resultsAdapter==null){Z.resultsAdapter=E;if(Z.ajax!=null){Z.resultsAdapter=e.Decorate(Z.resultsAdapter,z)}if(Z.placeholder!=null){Z.resultsAdapter=e.Decorate(Z.resultsAdapter,q)}if(Z.selectOnClose){Z.resultsAdapter=e.Decorate(Z.resultsAdapter,l)}}if(Z.dropdownAdapter==null){if(Z.multiple){Z.dropdownAdapter=A}else{var L=e.Decorate(A,m);Z.dropdownAdapter=L}if(Z.minimumResultsForSearch!==0){Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,v)}if(Z.closeOnSelect){Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,i)}if(Z.dropdownCssClass!=null||Z.dropdownCss!=null||Z.adaptDropdownCssClass!=null){var K=k(Z.amdBase+"compat/dropdownCss");Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,K)}Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,r)}if(Z.selectionAdapter==null){if(Z.multiple){Z.selectionAdapter=t}else{Z.selectionAdapter=o}if(Z.placeholder!=null){Z.selectionAdapter=e.Decorate(Z.selectionAdapter,G)}if(Z.allowClear){Z.selectionAdapter=e.Decorate(Z.selectionAdapter,j)}if(Z.multiple){Z.selectionAdapter=e.Decorate(Z.selectionAdapter,C)}if(Z.containerCssClass!=null||Z.containerCss!=null||Z.adaptContainerCssClass!=null){var T=k(Z.amdBase+"compat/containerCss");Z.selectionAdapter=e.Decorate(Z.selectionAdapter,T)}Z.selectionAdapter=e.Decorate(Z.selectionAdapter,F)}if(typeof Z.language==="string"){if(Z.language.indexOf("-")>0){var O=Z.language.split("-");var Q=O[0];Z.language=[Z.language,Q]}else{Z.language=[Z.language]}}if(g.isArray(Z.language)){var N=new u();Z.language.push("en");var W=Z.language;for(var M=0;M0){var L=g.extend(true,{},P);for(var S=P.children.length-1;S>=0;S--){var R=P.children[S];var O=J(Q,R);if(O==null){L.children.splice(S,1)}}if(L.children.length>0){return L}return J(Q,L)}var N=K(P.text).toUpperCase();var M=K(Q.term).toUpperCase();if(N.indexOf(M)>-1){return P}return null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:true,debug:false,dropdownAutoWidth:false,escapeMarkup:e.escapeMarkup,language:y,matcher:J,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:false,sorter:function(L){return L},templateResult:function(L){return L.text},templateSelection:function(L){return L.text},theme:"default",width:"100%"}};p.prototype.set=function(K,M){var J=g.camelCase(K);var L={};L[J]=M;var N=e._convertData(L);g.extend(this.defaults,N)};var n=new p();return n});d.define("select2/options",["require","jquery","./defaults","./utils"],function(f,h,i,g){function e(l,j){this.options=l;if(j!=null){this.fromElement(j)}this.options=i.apply(this.options);if(j&&j.is("input")){var k=f(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=g.Decorate(this.options.dataAdapter,k)}}e.prototype.fromElement=function(j){var l=["select2"];if(this.options.multiple==null){this.options.multiple=j.prop("multiple")}if(this.options.disabled==null){this.options.disabled=j.prop("disabled")}if(this.options.language==null){if(j.prop("lang")){this.options.language=j.prop("lang").toLowerCase()}else{if(j.closest("[lang]").prop("lang")){this.options.language=j.closest("[lang]").prop("lang")}}}if(this.options.dir==null){if(j.prop("dir")){this.options.dir=j.prop("dir")}else{if(j.closest("[dir]").prop("dir")){this.options.dir=j.closest("[dir]").prop("dir")}else{this.options.dir="ltr"}}}j.prop("disabled",this.options.disabled);j.prop("multiple",this.options.multiple);if(j.data("select2Tags")){if(this.options.debug&&window.console&&console.warn){console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.')}j.data("data",j.data("select2Tags"));j.data("tags",true)}if(j.data("ajaxUrl")){if(this.options.debug&&window.console&&console.warn){console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2.")}j.attr("ajax--url",j.data("ajaxUrl"));j.data("ajax--url",j.data("ajaxUrl"))}var n={};if(h.fn.jquery&&h.fn.jquery.substr(0,2)=="1."&&j[0].dataset){n=h.extend(true,{},j[0].dataset,j.data())}else{n=j.data()}var m=h.extend(true,{},n);m=g._convertData(m);for(var k in m){if(h.inArray(k,l)>-1){continue}if(h.isPlainObject(this.options[k])){h.extend(this.options[k],m[k])}else{this.options[k]=m[k]}}return this};e.prototype.get=function(j){return this.options[j]};e.prototype.set=function(j,k){this.options[j]=k};return e});d.define("select2/core",["jquery","./options","./utils","./keys"],function(i,g,h,e){var f=function(o,r){if(o.data("select2")!=null){o.data("select2").destroy()}this.$element=o;this.id=this._generateId(o);r=r||{};this.options=new g(r,o);f.__super__.constructor.call(this);var m=o.attr("tabindex")||0;o.data("old-tabindex",m);o.attr("tabindex","-1");var l=this.options.get("dataAdapter");this.dataAdapter=new l(o,this.options);var q=this.render();this._placeContainer(q);var n=this.options.get("selectionAdapter");this.selection=new n(o,this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,q);var j=this.options.get("dropdownAdapter");this.dropdown=new j(o,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,q);var k=this.options.get("resultsAdapter");this.results=new k(o,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);var p=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(s){p.trigger("selection:update",{data:s})});o.addClass("select2-hidden-accessible");o.attr("aria-hidden","true");this._syncAttributes();o.data("select2",this)};h.Extend(f,h.Observable);f.prototype._generateId=function(j){var k="";if(j.attr("id")!=null){k=j.attr("id")}else{if(j.attr("name")!=null){k=j.attr("name")+"-"+h.generateChars(2)}else{k=h.generateChars(4)}}k=k.replace(/(:|\.|\[|\]|,)/g,"");k="select2-"+k;return k};f.prototype._placeContainer=function(k){k.insertAfter(this.$element);var j=this._resolveWidth(this.$element,this.options.get("width"));if(j!=null){k.css("width",j)}};f.prototype._resolveWidth=function(u,j){var s=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(j=="resolve"){var n=this._resolveWidth(u,"style");if(n!=null){return n}return this._resolveWidth(u,"element")}if(j=="element"){var r=u.outerWidth(false);if(r<=0){return"auto"}return r+"px"}if(j=="style"){var k=u.attr("style");if(typeof(k)!=="string"){return null}var t=k.split(";");for(var o=0,m=t.length;o=1){return p[1]}}return null}return j};f.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container)};f.prototype._registerDomEvents=function(){var k=this;this.$element.on("change.select2",function(){k.dataAdapter.current(function(l){k.trigger("selection:update",{data:l})})});this.$element.on("focus.select2",function(l){k.trigger("focus",l)});this._syncA=h.bind(this._syncAttributes,this);this._syncS=h.bind(this._syncSubtree,this);if(this.$element[0].attachEvent){this.$element[0].attachEvent("onpropertychange",this._syncA)}var j=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(j!=null){this._observer=new j(function(l){i.each(l,k._syncA);i.each(l,k._syncS)});this._observer.observe(this.$element[0],{attributes:true,childList:true,subtree:false})}else{if(this.$element[0].addEventListener){this.$element[0].addEventListener("DOMAttrModified",k._syncA,false);this.$element[0].addEventListener("DOMNodeInserted",k._syncS,false);this.$element[0].addEventListener("DOMNodeRemoved",k._syncS,false)}}};f.prototype._registerDataEvents=function(){var j=this;this.dataAdapter.on("*",function(k,l){j.trigger(k,l)})};f.prototype._registerSelectionEvents=function(){var j=this;var k=["toggle","focus"];this.selection.on("toggle",function(){j.toggleDropdown()});this.selection.on("focus",function(l){j.focus(l)});this.selection.on("*",function(l,m){if(i.inArray(l,k)!==-1){return}j.trigger(l,m)})};f.prototype._registerDropdownEvents=function(){var j=this;this.dropdown.on("*",function(k,l){j.trigger(k,l)})};f.prototype._registerResultsEvents=function(){var j=this;this.results.on("*",function(k,l){j.trigger(k,l)})};f.prototype._registerEvents=function(){var j=this;this.on("open",function(){j.$container.addClass("select2-container--open")});this.on("close",function(){j.$container.removeClass("select2-container--open");j.$selection.focus()});this.on("enable",function(){j.$container.removeClass("select2-container--disabled")});this.on("disable",function(){j.$container.addClass("select2-container--disabled")});this.on("blur",function(){j.$container.removeClass("select2-container--focus")});this.on("query",function(k){if(!j.isOpen()){j.trigger("open",{})}this.dataAdapter.query(k,function(l){j.trigger("results:all",{data:l,query:k})})});this.on("query:append",function(k){this.dataAdapter.query(k,function(l){j.trigger("results:append",{data:l,query:k})})});this.on("keypress",function(k){var l=k.which;
+=======
+/*!
+ * Select2 4.0.3
+ * https://select2.github.io
+ *
+ * Released under the MIT license
+ * https://github.com/select2/select2/blob/master/LICENSE.md
+ */
+(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof exports==="object"){a(require("jquery"))}else{a(jQuery)}}}(function(c){var b=(function(){if(c&&c.fn&&c.fn.select2&&c.fn.select2.amd){var d=c.fn.select2.amd}var d;(function(){if(!d||!d.requirejs){if(!d){d={}}else{e=d}var f,e,g;(function(l){var o,h,s,t,k={},j={},z={},w={},r=Object.prototype.hasOwnProperty,p=[].slice,q=/\.js$/;function A(B,C){return r.call(B,C)}function u(E,C){var M,I,G,J,N,F,P,Q,L,K,H,O=C&&C.split("/"),D=z.map,B=(D&&D["*"])||{};if(E&&E.charAt(0)==="."){if(C){E=E.split("/");N=E.length-1;if(z.nodeIdCompat&&q.test(E[N])){E[N]=E[N].replace(q,"")}E=O.slice(0,O.length-1).concat(E);for(L=0;L0){E.splice(L-1,2);L-=2}}}}}E=E.join("/")}else{if(E.indexOf("./")===0){E=E.substring(2)}}}if((O||B)&&D){M=E.split("/");for(L=M.length;L>0;L-=1){I=M.slice(0,L).join("/");if(O){for(K=O.length;K>0;K-=1){G=D[O.slice(0,K).join("/")];if(G){G=G[I];if(G){J=G;F=L;break}}}}if(J){break}if(!P&&B&&B[I]){P=B[I];Q=L}}if(!J&&P){J=P;F=Q}if(J){M.splice(0,F,J);E=M.join("/")}}return E}function y(B,C){return function(){var D=p.call(arguments,0);if(typeof D[0]!=="string"&&D.length===1){D.push(null)}return h.apply(l,D.concat([B,C]))}}function v(B){return function(C){return u(C,B)}}function m(B){return function(C){k[B]=C}}function n(C){if(A(j,C)){var B=j[C];delete j[C];w[C]=true;o.apply(l,B)}if(!A(k,C)&&!A(w,C)){throw new Error("No "+C)}return k[C]}function x(C){var D,B=C?C.indexOf("!"):-1;if(B>-1){D=C.substring(0,B);C=C.substring(B+1,C.length)}return[D,C]}s=function(C,B){var D,F=x(C),E=F[0];C=F[1];if(E){E=u(E,B);D=n(E)}if(E){if(D&&D.normalize){C=D.normalize(C,v(B))}else{C=u(C,B)}}else{C=u(C,B);F=x(C);E=F[0];C=F[1];if(E){D=n(E)}}return{f:E?E+"!"+C:C,n:C,pr:E,p:D}};function i(B){return function(){return(z&&z.config&&z.config[B])||{}}}t={require:function(B){return y(B)},exports:function(B){var C=k[B];if(typeof C!=="undefined"){return C}else{return(k[B]={})}},module:function(B){return{id:B,uri:"",exports:k[B],config:i(B)}}};o=function(C,M,L,K){var F,J,G,B,E,H=[],D=typeof L,I;K=K||C;if(D==="undefined"||D==="function"){M=!M.length&&L.length?["require","exports","module"]:M;for(E=0;E0){u.call(arguments,q.prototype.constructor);m=p.prototype.constructor}m.apply(this,arguments)}p.displayName=q.displayName;function i(){this.constructor=t}t.prototype=new i();for(var l=0;l":">",'"':""","'":"'","/":"/"};if(typeof i!=="string"){return i}return String(i).replace(/[&<>"'\/\\]/g,function(k){return j[k]})};g.appendMany=function(i,k){if(h.fn.jquery.substr(0,3)==="1.7"){var j=h();h.map(k,function(l){j=j.add(l)});k=j}i.append(k)};return g});d.define("select2/results",["jquery","./utils"],function(g,f){function e(h,i,j){this.$element=h;this.data=j;this.options=i;e.__super__.constructor.call(this)}f.Extend(e,f.Observable);e.prototype.render=function(){var h=g('');if(this.options.get("multiple")){h.attr("aria-multiselectable","true")}this.$results=h;return h};e.prototype.clear=function(){this.$results.empty()};e.prototype.displayMessage=function(k){var h=this.options.get("escapeMarkup");this.clear();this.hideLoading();var i=g(' ');var j=this.options.get("translations").get(k.message);i.append(h(j(k.args)));i[0].className+=" select2-results__message";this.$results.append(i)};e.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()};e.prototype.append=function(j){this.hideLoading();var h=[];if(j.results==null||j.results.length===0){if(this.$results.children().length===0){this.trigger("results:message",{message:"noResults"})}return}j.results=this.sort(j.results);for(var l=0;l0){i.first().trigger("mouseenter")}else{h.first().trigger("mouseenter")}this.ensureHighlightVisible()};e.prototype.setClasses=function(){var h=this;this.data.current(function(k){var j=g.map(k,function(l){return l.id.toString()});var i=h.$results.find(".select2-results__option[aria-selected]");i.each(function(){var m=g(this);var l=g.data(this,"data");var n=""+l.id;if((l.element!=null&&l.element.selected)||(l.element==null&&g.inArray(n,j)>-1)){m.attr("aria-selected","true")}else{m.attr("aria-selected","false")}})})};e.prototype.showLoading=function(j){this.hideLoading();var i=this.options.get("translations").get("searching");var k={disabled:true,loading:true,text:i(j)};var h=this.option(k);h.className+=" loading-results";this.$results.prepend(h)};e.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()};e.prototype.option=function(l){var m=document.createElement("li");m.className="select2-results__option";var t={role:"treeitem","aria-selected":"false"};if(l.disabled){delete t["aria-selected"];t["aria-disabled"]="true"}if(l.id==null){delete t["aria-selected"]}if(l._resultId!=null){m.id=l._resultId}if(l.title){m.title=l.title}if(l.children){t.role="group";t["aria-label"]=l.text;delete t["aria-selected"]}for(var n in t){var k=t[n];m.setAttribute(n,k)}if(l.children){var h=g(m);var r=document.createElement("strong");r.className="select2-results__group";var q=g(r);this.template(l,r);var s=[];for(var p=0;p",{"class":"select2-results__options select2-results__options--nested"});o.append(s);h.append(r);h.append(o)}else{this.template(l,m)}g.data(m,"data",l);return m};e.prototype.bind=function(h,j){var i=this;var k=h.id+"-results";this.$results.attr("id",k);h.on("results:all",function(l){i.clear();i.append(l.data);if(h.isOpen()){i.setClasses();i.highlightFirstItem()}});h.on("results:append",function(l){i.append(l.data);if(h.isOpen()){i.setClasses()}});h.on("query",function(l){i.hideMessages();i.showLoading(l)});h.on("select",function(){if(!h.isOpen()){return}i.setClasses();i.highlightFirstItem()});h.on("unselect",function(){if(!h.isOpen()){return}i.setClasses();i.highlightFirstItem()});h.on("open",function(){i.$results.attr("aria-expanded","true");i.$results.attr("aria-hidden","false");i.setClasses();i.ensureHighlightVisible()});h.on("close",function(){i.$results.attr("aria-expanded","false");i.$results.attr("aria-hidden","true");i.$results.removeAttr("aria-activedescendant")});h.on("results:toggle",function(){var l=i.getHighlightedResults();if(l.length===0){return}l.trigger("mouseup")});h.on("results:select",function(){var l=i.getHighlightedResults();if(l.length===0){return}var m=l.data("data");if(l.attr("aria-selected")=="true"){i.trigger("close",{})}else{i.trigger("select",{data:m})}});h.on("results:previous",function(){var n=i.getHighlightedResults();var m=i.$results.find("[aria-selected]");var p=m.index(n);if(p===0){return}var l=p-1;if(n.length===0){l=0}var o=m.eq(l);o.trigger("mouseenter");var s=i.$results.offset().top;var r=o.offset().top;var q=i.$results.scrollTop()+(r-s);if(l===0){i.$results.scrollTop(0)}else{if(r-s<0){i.$results.scrollTop(q)}}});h.on("results:next",function(){var n=i.getHighlightedResults();var m=i.$results.find("[aria-selected]");var p=m.index(n);var l=p+1;if(l>=m.length){return}var o=m.eq(l);o.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(false);var r=o.offset().top+o.outerHeight(false);var q=i.$results.scrollTop()+r-s;if(l===0){i.$results.scrollTop(0)}else{if(r>s){i.$results.scrollTop(q)}}});h.on("results:focus",function(l){l.element.addClass("select2-results__option--highlighted")});h.on("results:message",function(l){i.displayMessage(l)});if(g.fn.mousewheel){this.$results.on("mousewheel",function(o){var n=i.$results.scrollTop();var l=i.$results.get(0).scrollHeight-n+o.deltaY;var p=o.deltaY>0&&n-o.deltaY<=0;var m=o.deltaY<0&&l<=i.$results.height();if(p){i.$results.scrollTop(0);o.preventDefault();o.stopPropagation()}else{if(m){i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height());o.preventDefault();o.stopPropagation()}}})}this.$results.on("mouseup",".select2-results__option[aria-selected]",function(l){var n=g(this);var m=n.data("data");if(n.attr("aria-selected")==="true"){if(i.options.get("multiple")){i.trigger("unselect",{originalEvent:l,data:m})}else{i.trigger("close",{})}return}i.trigger("select",{originalEvent:l,data:m})});this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(l){var m=g(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted");i.trigger("results:focus",{data:m,element:g(this)})})};e.prototype.getHighlightedResults=function(){var h=this.$results.find(".select2-results__option--highlighted");return h};e.prototype.destroy=function(){this.$results.remove()};e.prototype.ensureHighlightVisible=function(){var i=this.getHighlightedResults();if(i.length===0){return}var h=this.$results.find("[aria-selected]");var j=h.index(i);var m=this.$results.offset().top;var l=i.offset().top;var k=this.$results.scrollTop()+(l-m);var n=l-m;k-=i.outerHeight(false)*2;if(j<=2){this.$results.scrollTop(0)}else{if(n>this.$results.outerHeight()||n<0){this.$results.scrollTop(k)}}};e.prototype.template=function(i,j){var k=this.options.get("templateResult");var h=this.options.get("escapeMarkup");var l=k(i,j);if(l==null){j.style.display="none"}else{if(typeof l==="string"){j.innerHTML=h(l)}else{g(j).append(l)}}};return e});d.define("select2/keys",[],function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return e});d.define("select2/selection/base",["jquery","../utils","../keys"],function(h,g,e){function f(i,j){this.$element=i;this.options=j;f.__super__.constructor.call(this)}g.Extend(f,g.Observable);f.prototype.render=function(){var i=h(' ');this._tabindex=0;if(this.$element.data("old-tabindex")!=null){this._tabindex=this.$element.data("old-tabindex")}else{if(this.$element.attr("tabindex")!=null){this._tabindex=this.$element.attr("tabindex")}}i.attr("title",this.$element.attr("title"));i.attr("tabindex",this._tabindex);this.$selection=i;return i};f.prototype.bind=function(i,l){var k=this;var m=i.id+"-container";var j=i.id+"-results";this.container=i;this.$selection.on("focus",function(n){k.trigger("focus",n)});this.$selection.on("blur",function(n){k._handleBlur(n)});this.$selection.on("keydown",function(n){k.trigger("keypress",n);if(n.which===e.SPACE){n.preventDefault()}});i.on("results:focus",function(n){k.$selection.attr("aria-activedescendant",n.data._resultId)});i.on("selection:update",function(n){k.update(n.data)});i.on("open",function(){k.$selection.attr("aria-expanded","true");k.$selection.attr("aria-owns",j);k._attachCloseHandler(i)});i.on("close",function(){k.$selection.attr("aria-expanded","false");k.$selection.removeAttr("aria-activedescendant");k.$selection.removeAttr("aria-owns");k.$selection.focus();k._detachCloseHandler(i)});i.on("enable",function(){k.$selection.attr("tabindex",k._tabindex)});i.on("disable",function(){k.$selection.attr("tabindex","-1")})};f.prototype._handleBlur=function(i){var j=this;window.setTimeout(function(){if((document.activeElement==j.$selection[0])||(h.contains(j.$selection[0],document.activeElement))){return}j.trigger("blur",i)},1)};f.prototype._attachCloseHandler=function(i){var j=this;h(document.body).on("mousedown.select2."+i.id,function(n){var k=h(n.target);var l=k.closest(".select2");var m=h(".select2.select2-container--open");m.each(function(){var p=h(this);if(this==l[0]){return}var o=p.data("element");o.select2("close")})})};f.prototype._detachCloseHandler=function(i){h(document.body).off("mousedown.select2."+i.id)};f.prototype.position=function(i,k){var j=k.find(".selection");j.append(i)};f.prototype.destroy=function(){this._detachCloseHandler(this.container)};f.prototype.update=function(i){throw new Error("The `update` method must be defined in child classes.")};return f});d.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(h,f,g,e){function i(){i.__super__.constructor.apply(this,arguments)}g.Extend(i,f);i.prototype.render=function(){var j=i.__super__.render.call(this);j.addClass("select2-selection--single");j.html(' ');return j};i.prototype.bind=function(j,l){var k=this;i.__super__.bind.apply(this,arguments);var m=j.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",m);this.$selection.attr("aria-labelledby",m);this.$selection.on("mousedown",function(n){if(n.which!==1){return}k.trigger("toggle",{originalEvent:n})});this.$selection.on("focus",function(n){});this.$selection.on("blur",function(n){});j.on("focus",function(n){if(!j.isOpen()){k.$selection.focus()}});j.on("selection:update",function(n){k.update(n.data)})};i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()};i.prototype.display=function(m,k){var l=this.options.get("templateSelection");var j=this.options.get("escapeMarkup");return j(l(m,k))};i.prototype.selectionContainer=function(){return h(" ")};i.prototype.update=function(l){if(l.length===0){this.clear();return}var j=l[0];var m=this.$selection.find(".select2-selection__rendered");var k=this.display(j,m);m.empty().append(k);m.prop("title",j.title||j.text)};return i});d.define("select2/selection/multiple",["jquery","./base","../utils"],function(h,e,g){function f(i,j){f.__super__.constructor.apply(this,arguments)}g.Extend(f,e);f.prototype.render=function(){var i=f.__super__.render.call(this);i.addClass("select2-selection--multiple");i.html('');return i};f.prototype.bind=function(i,k){var j=this;f.__super__.bind.apply(this,arguments);this.$selection.on("click",function(l){j.trigger("toggle",{originalEvent:l})});this.$selection.on("click",".select2-selection__choice__remove",function(m){if(j.options.get("disabled")){return}var n=h(this);var l=n.parent();var o=l.data("data");j.trigger("unselect",{originalEvent:m,data:o})})};f.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()};f.prototype.display=function(l,j){var k=this.options.get("templateSelection");var i=this.options.get("escapeMarkup");return i(k(l,j))};f.prototype.selectionContainer=function(){var i=h('× ');return i};f.prototype.update=function(m){this.clear();if(m.length===0){return}var j=[];for(var o=0;o1;if(i||h){return k.call(this,j)}this.clear();var g=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(g)};return e});d.define("select2/selection/allowClear",["jquery","../keys"],function(f,e){function g(){}g.prototype.bind=function(j,h,k){var i=this;j.call(this,h,k);if(this.placeholder==null){if(this.options.get("debug")&&window.console&&console.error){console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option.")}}this.$selection.on("mousedown",".select2-selection__clear",function(l){i._handleClear(l)});h.on("keypress",function(l){i._handleKeyboardClear(l,h)})};g.prototype._handleClear=function(i,h){if(this.options.get("disabled")){return}var l=this.$selection.find(".select2-selection__clear");if(l.length===0){return}h.stopPropagation();var k=l.data("data");for(var m=0;m0||i.length===0){return}var h=f('× ');h.data("data",i);this.$selection.find(".select2-selection__rendered").prepend(h)};return g});d.define("select2/selection/search",["jquery","../utils","../keys"],function(h,g,e){function f(k,i,j){k.call(this,i,j)}f.prototype.render=function(j){var i=h(' ');this.$searchContainer=i;this.$search=i.find("input");var k=j.call(this);this._transferTabIndex();return k};f.prototype.bind=function(m,j,n){var k=this;m.call(this,j,n);j.on("open",function(){k.$search.trigger("focus")});j.on("close",function(){k.$search.val("");k.$search.removeAttr("aria-activedescendant");k.$search.trigger("focus")});j.on("enable",function(){k.$search.prop("disabled",false);k._transferTabIndex()});j.on("disable",function(){k.$search.prop("disabled",true)});j.on("focus",function(o){k.$search.trigger("focus")});j.on("results:focus",function(o){k.$search.attr("aria-activedescendant",o.id)});this.$selection.on("focusin",".select2-search--inline",function(o){k.trigger("focus",o)});this.$selection.on("focusout",".select2-search--inline",function(o){k._handleBlur(o)});this.$selection.on("keydown",".select2-search--inline",function(o){o.stopPropagation();k.trigger("keypress",o);k._keyUpPrevented=o.isDefaultPrevented();var q=o.which;if(q===e.BACKSPACE&&k.$search.val()===""){var p=k.$searchContainer.prev(".select2-selection__choice");if(p.length>0){var r=p.data("data");k.searchRemoveChoice(r);o.preventDefault()}}});var l=document.documentMode;var i=l&&l<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(o){if(i){k.$selection.off("input.search input.searchcheck");return}k.$selection.off("keyup.search")});this.$selection.on("keyup.search input.search",".select2-search--inline",function(o){if(i&&o.type==="input"){k.$selection.off("input.search input.searchcheck");return}var p=o.which;if(p==e.SHIFT||p==e.CTRL||p==e.ALT){return}if(p==e.TAB){return}k.handleSearch(o)})};f.prototype._transferTabIndex=function(i){this.$search.attr("tabindex",this.$selection.attr("tabindex"));this.$selection.attr("tabindex","-1")};f.prototype.createPlaceholder=function(i,j){this.$search.attr("placeholder",j.text)};f.prototype.update=function(k,j){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder","");k.call(this,j);this.$selection.find(".select2-selection__rendered").append(this.$searchContainer);this.resizeSearch();if(i){this.$search.focus()}};f.prototype.handleSearch=function(){this.resizeSearch();if(!this._keyUpPrevented){var i=this.$search.val();this.trigger("query",{term:i})}this._keyUpPrevented=false};f.prototype.searchRemoveChoice=function(j,i){this.trigger("unselect",{data:i});this.$search.val(i.text);this.handleSearch()};f.prototype.resizeSearch=function(){this.$search.css("width","25px");var i="";if(this.$search.attr("placeholder")!==""){i=this.$selection.find(".select2-selection__rendered").innerWidth()}else{var j=this.$search.val().length+1;i=(j*0.75)+"em"}this.$search.css("width",i)};return f});d.define("select2/selection/eventRelay",["jquery"],function(e){function f(){}f.prototype.bind=function(k,g,l){var h=this;var i=["open","opening","close","closing","select","selecting","unselect","unselecting"];var j=["opening","closing","selecting","unselecting"];k.call(this,g,l);g.on("*",function(n,o){if(e.inArray(n,i)===-1){return}o=o||{};var m=e.Event("select2:"+n,{params:o});h.$element.trigger(m);if(e.inArray(n,j)===-1){return}o.prevented=m.isDefaultPrevented()})};return f});d.define("select2/translation",["jquery","require"],function(g,f){function e(h){this.dict=h||{}}e.prototype.all=function(){return this.dict};e.prototype.get=function(h){return this.dict[h]};e.prototype.extend=function(h){this.dict=g.extend({},h.all(),this.dict)};e._cache={};e.loadPath=function(i){if(!(i in e._cache)){var h=f(i);e._cache[i]=h}return new e(e._cache[i])};return e});d.define("select2/diacritics",[],function(){var e={"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u00C7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\u00C8":"E","\u00C9":"E","\u00CA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\u00CB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\u00CC":"I","\u00CD":"I","\u00CE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\u00CF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\u00D1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\u00D2":"O","\u00D3":"O","\u00D4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\u00D5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\u00D6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\u00D8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\u00D9":"U","\u00DA":"U","\u00DB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\u00DC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\u00DD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\u00E0":"a","\u00E1":"a","\u00E2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\u00E3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\u00E4":"a","\u01DF":"a","\u1EA3":"a","\u00E5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\u00E6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u00E7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\u00E8":"e","\u00E9":"e","\u00EA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\u00EB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\u00EC":"i","\u00ED":"i","\u00EE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\u00EF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\u00F1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\u00F2":"o","\u00F3":"o","\u00F4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\u00F5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\u00F6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\u00F8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\u00DF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\u00F9":"u","\u00FA":"u","\u00FB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\u00FC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\u00FD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\u00FF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038A":"\u0399","\u03AA":"\u0399","\u038C":"\u039F","\u038E":"\u03A5","\u03AB":"\u03A5","\u038F":"\u03A9","\u03AC":"\u03B1","\u03AD":"\u03B5","\u03AE":"\u03B7","\u03AF":"\u03B9","\u03CA":"\u03B9","\u0390":"\u03B9","\u03CC":"\u03BF","\u03CD":"\u03C5","\u03CB":"\u03C5","\u03B0":"\u03C5","\u03C9":"\u03C9","\u03C2":"\u03C3"};
+return e});d.define("select2/data/base",["../utils"],function(f){function e(g,h){e.__super__.constructor.call(this)}f.Extend(e,f.Observable);e.prototype.current=function(g){throw new Error("The `current` method must be defined in child classes.")};e.prototype.query=function(g,h){throw new Error("The `query` method must be defined in child classes.")};e.prototype.bind=function(g,h){};e.prototype.destroy=function(){};e.prototype.generateResultId=function(g,h){var i=g.id+"-result-";i+=f.generateChars(4);if(h.id!=null){i+="-"+h.id.toString()}else{i+="-"+f.generateChars(4)}return i};return e});d.define("select2/data/select",["./base","../utils","jquery"],function(e,h,g){function f(i,j){this.$element=i;this.options=j;f.__super__.constructor.call(this)}h.Extend(f,e);f.prototype.current=function(k){var j=[];var i=this;this.$element.find(":selected").each(function(){var m=g(this);var l=i.item(m);j.push(l)});k(j)};f.prototype.select=function(j){var i=this;j.selected=true;if(g(j.element).is("option")){j.element.selected=true;this.$element.trigger("change");return}if(this.$element.prop("multiple")){this.current(function(l){var n=[];j=[j];j.push.apply(j,l);for(var m=0;m=0){var o=n.filter(r(t));var p=this.item(o);var v=f.extend(true,{},t,p);var l=this.option(v);o.replaceWith(l);continue}var i=this.option(t);if(t.children){var s=this.convertToOptions(t.children);g.appendMany(i,s)}m.push(i)}return m};return h});d.define("select2/data/ajax",["./array","../utils","jquery"],function(h,g,f){function e(i,j){this.ajaxOptions=this._applyDefaults(j.get("ajax"));if(this.ajaxOptions.processResults!=null){this.processResults=this.ajaxOptions.processResults}e.__super__.constructor.call(this,i,j)}g.Extend(e,h);e.prototype._applyDefaults=function(i){var j={data:function(k){return f.extend({},k,{q:k.term})},transport:function(n,m,l){var k=f.ajax(n);k.then(m);k.fail(l);return k}};return f.extend({},j,i,true)};e.prototype.processResults=function(i){return i};e.prototype.query=function(m,n){var l=[];var i=this;if(this._request!=null){if(f.isFunction(this._request.abort)){this._request.abort()}this._request=null}var j=f.extend({type:"GET"},this.ajaxOptions);if(typeof j.url==="function"){j.url=j.url.call(this.$element,m)}if(typeof j.data==="function"){j.data=j.data.call(this.$element,m)}function k(){var o=j.transport(j,function(q){var p=i.processResults(q,m);if(i.options.get("debug")&&window.console&&console.error){if(!p||!p.results||!f.isArray(p.results)){console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")}}n(p)},function(){if(o.status&&o.status==="0"){return}i.trigger("results:message",{message:"errorLoading"})});i._request=o}if(this.ajaxOptions.delay&&m.term!=null){if(this._queryTimeout){window.clearTimeout(this._queryTimeout)}this._queryTimeout=window.setTimeout(k,this.ajaxOptions.delay)}else{k()}};return e});d.define("select2/data/tags",["jquery"],function(f){function e(h,k,n){var o=n.get("tags");var i=n.get("createTag");if(i!==undefined){this.createTag=i}var j=n.get("insertTag");if(j!==undefined){this.insertTag=j}h.call(this,k,n);if(f.isArray(o)){for(var m=0;m0&&g.term.length>this.maximumInputLength){this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:g.term,params:g}});return}f.call(this,g,h)};return e});d.define("select2/data/maximumSelectionLength",[],function(){function e(h,g,f){this.maximumSelectionLength=f.get("maximumSelectionLength");h.call(this,g,f)}e.prototype.query=function(g,h,i){var f=this;this.current(function(j){var k=j!=null?j.length:0;if(f.maximumSelectionLength>0&&k>=f.maximumSelectionLength){f.trigger("results:message",{message:"maximumSelected",args:{maximum:f.maximumSelectionLength}});return}g.call(f,h,i)})};return e});d.define("select2/dropdown",["jquery","./utils"],function(g,f){function e(h,i){this.$element=h;this.options=i;e.__super__.constructor.call(this)}f.Extend(e,f.Observable);e.prototype.render=function(){var h=g(' ');h.attr("dir",this.options.get("dir"));this.$dropdown=h;return h};e.prototype.bind=function(){};e.prototype.position=function(h,i){};e.prototype.destroy=function(){this.$dropdown.remove()};return e});d.define("select2/dropdown/search",["jquery","../utils"],function(g,f){function e(){}e.prototype.render=function(i){var j=i.call(this);var h=g(' ');this.$searchContainer=h;this.$search=h.find("input");j.prepend(h);return j};e.prototype.bind=function(j,h,k){var i=this;j.call(this,h,k);this.$search.on("keydown",function(l){i.trigger("keypress",l);i._keyUpPrevented=l.isDefaultPrevented()});this.$search.on("input",function(l){g(this).off("keyup")});this.$search.on("keyup input",function(l){i.handleSearch(l)});h.on("open",function(){i.$search.attr("tabindex",0);i.$search.focus();window.setTimeout(function(){i.$search.focus()},0)});h.on("close",function(){i.$search.attr("tabindex",-1);i.$search.val("")});h.on("focus",function(){if(h.isOpen()){i.$search.focus()}});h.on("results:all",function(m){if(m.query.term==null||m.query.term===""){var l=i.showSearch(m);if(l){i.$searchContainer.removeClass("select2-search--hide")}else{i.$searchContainer.addClass("select2-search--hide")}}})};e.prototype.handleSearch=function(h){if(!this._keyUpPrevented){var i=this.$search.val();this.trigger("query",{term:i})}this._keyUpPrevented=false};e.prototype.showSearch=function(h,i){return true};return e});d.define("select2/dropdown/hidePlaceholder",[],function(){function e(h,f,g,i){this.placeholder=this.normalizePlaceholder(g.get("placeholder"));h.call(this,f,g,i)}e.prototype.append=function(g,f){f.results=this.removePlaceholder(f.results);g.call(this,f)};e.prototype.normalizePlaceholder=function(f,g){if(typeof g==="string"){g={id:"",text:g}}return g};e.prototype.removePlaceholder=function(f,i){var h=i.slice(0);for(var j=i.length-1;j>=0;j--){var g=i[j];if(this.placeholder.id===g.id){h.splice(j,1)}}return h};return e});d.define("select2/dropdown/infiniteScroll",["jquery"],function(f){function e(i,g,h,j){this.lastParams={};i.call(this,g,h,j);this.$loadingMore=this.createLoadingMore();this.loading=false}e.prototype.append=function(h,g){this.$loadingMore.remove();this.loading=false;h.call(this,g);if(this.showLoadingMore(g)){this.$results.append(this.$loadingMore)}};e.prototype.bind=function(i,g,j){var h=this;i.call(this,g,j);g.on("query",function(k){h.lastParams=k;h.loading=true});g.on("query:append",function(k){h.lastParams=k;h.loading=true});this.$results.on("scroll",function(){var m=f.contains(document.documentElement,h.$loadingMore[0]);if(h.loading||!m){return}var l=h.$results.offset().top+h.$results.outerHeight(false);var k=h.$loadingMore.offset().top+h.$loadingMore.outerHeight(false);if(l+50>=k){h.loadMore()}})};e.prototype.loadMore=function(){this.loading=true;var g=f.extend({},{page:1},this.lastParams);g.page++;this.trigger("query:append",g)};e.prototype.showLoadingMore=function(g,h){return h.pagination&&h.pagination.more};e.prototype.createLoadingMore=function(){var h=f(' ');var g=this.options.get("translations").get("loadingMore");h.html(g(this.lastParams));return h};return e});d.define("select2/dropdown/attachBody",["jquery","../utils"],function(g,f){function e(j,h,i){this.$dropdownParent=i.get("dropdownParent")||g(document.body);j.call(this,h,i)}e.prototype.bind=function(k,h,l){var j=this;var i=false;k.call(this,h,l);h.on("open",function(){j._showDropdown();j._attachPositioningHandler(h);if(!i){i=true;h.on("results:all",function(){j._positionDropdown();j._resizeDropdown()});h.on("results:append",function(){j._positionDropdown();j._resizeDropdown()})}});h.on("close",function(){j._hideDropdown();j._detachPositioningHandler(h)});this.$dropdownContainer.on("mousedown",function(m){m.stopPropagation()})};e.prototype.destroy=function(h){h.call(this);this.$dropdownContainer.remove()};e.prototype.position=function(h,i,j){i.attr("class",j.attr("class"));i.removeClass("select2");i.addClass("select2-container--open");i.css({position:"absolute",top:-999999});this.$container=j};e.prototype.render=function(h){var j=g(" ");var i=h.call(this);j.append(i);this.$dropdownContainer=j;return j};e.prototype._hideDropdown=function(h){this.$dropdownContainer.detach()};e.prototype._attachPositioningHandler=function(n,h){var i=this;var k="scroll.select2."+h.id;var m="resize.select2."+h.id;var l="orientationchange.select2."+h.id;var j=this.$container.parents().filter(f.hasScroll);j.each(function(){g(this).data("select2-scroll-position",{x:g(this).scrollLeft(),y:g(this).scrollTop()})});j.on(k,function(p){var o=g(this).data("select2-scroll-position");g(this).scrollTop(o.y)});g(window).on(k+" "+m+" "+l,function(o){i._positionDropdown();i._resizeDropdown()})};e.prototype._detachPositioningHandler=function(m,h){var j="scroll.select2."+h.id;var l="resize.select2."+h.id;var k="orientationchange.select2."+h.id;var i=this.$container.parents().filter(f.hasScroll);i.off(j);g(window).off(j+" "+l+" "+k)};e.prototype._positionDropdown=function(){var k=g(window);var t=this.$dropdown.hasClass("select2-dropdown--above");var j=this.$dropdown.hasClass("select2-dropdown--below");var q=null;var l=this.$container.offset();l.bottom=l.top+this.$container.outerHeight(false);var i={height:this.$container.outerHeight(false)};i.top=l.top;i.bottom=l.top+i.height;var s={height:this.$dropdown.outerHeight(false)};var o={top:k.scrollTop(),bottom:k.scrollTop()+k.height()};var n=o.top<(l.top-s.height);var p=o.bottom>(l.bottom+s.height);var m={left:l.left,top:i.bottom};var r=this.$dropdownParent;if(r.css("position")==="static"){r=r.offsetParent()}var h=r.offset();m.top-=h.top;m.left-=h.left;if(!t&&!j){q="below"}if(!p&&n&&!t){q="above"}else{if(!n&&p&&t){q="below"}}if(q=="above"||(t&&q!=="below")){m.top=i.top-h.top-s.height}if(q!=null){this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+q);this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+q)}this.$dropdownContainer.css(m)};e.prototype._resizeDropdown=function(){var h={width:this.$container.outerWidth(false)+"px"};if(this.options.get("dropdownAutoWidth")){h.minWidth=h.width;h.position="relative";h.width="auto"}this.$dropdown.css(h)};e.prototype._showDropdown=function(h){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()};return e});d.define("select2/dropdown/minimumResultsForSearch",[],function(){function f(i){var h=0;for(var j=0;j0){Z.dataAdapter=e.Decorate(Z.dataAdapter,D)}if(Z.maximumInputLength>0){Z.dataAdapter=e.Decorate(Z.dataAdapter,H)}if(Z.maximumSelectionLength>0){Z.dataAdapter=e.Decorate(Z.dataAdapter,w)}if(Z.tags){Z.dataAdapter=e.Decorate(Z.dataAdapter,x)}if(Z.tokenSeparators!=null||Z.tokenizer!=null){Z.dataAdapter=e.Decorate(Z.dataAdapter,h)}if(Z.query!=null){var R=k(Z.amdBase+"compat/query");Z.dataAdapter=e.Decorate(Z.dataAdapter,R)}if(Z.initSelection!=null){var Y=k(Z.amdBase+"compat/initSelection");Z.dataAdapter=e.Decorate(Z.dataAdapter,Y)}}if(Z.resultsAdapter==null){Z.resultsAdapter=E;if(Z.ajax!=null){Z.resultsAdapter=e.Decorate(Z.resultsAdapter,z)}if(Z.placeholder!=null){Z.resultsAdapter=e.Decorate(Z.resultsAdapter,q)}if(Z.selectOnClose){Z.resultsAdapter=e.Decorate(Z.resultsAdapter,l)}}if(Z.dropdownAdapter==null){if(Z.multiple){Z.dropdownAdapter=A}else{var L=e.Decorate(A,m);Z.dropdownAdapter=L}if(Z.minimumResultsForSearch!==0){Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,v)}if(Z.closeOnSelect){Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,i)}if(Z.dropdownCssClass!=null||Z.dropdownCss!=null||Z.adaptDropdownCssClass!=null){var K=k(Z.amdBase+"compat/dropdownCss");Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,K)}Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,r)}if(Z.selectionAdapter==null){if(Z.multiple){Z.selectionAdapter=t}else{Z.selectionAdapter=o}if(Z.placeholder!=null){Z.selectionAdapter=e.Decorate(Z.selectionAdapter,G)}if(Z.allowClear){Z.selectionAdapter=e.Decorate(Z.selectionAdapter,j)}if(Z.multiple){Z.selectionAdapter=e.Decorate(Z.selectionAdapter,C)}if(Z.containerCssClass!=null||Z.containerCss!=null||Z.adaptContainerCssClass!=null){var T=k(Z.amdBase+"compat/containerCss");Z.selectionAdapter=e.Decorate(Z.selectionAdapter,T)}Z.selectionAdapter=e.Decorate(Z.selectionAdapter,F)}if(typeof Z.language==="string"){if(Z.language.indexOf("-")>0){var O=Z.language.split("-");var Q=O[0];Z.language=[Z.language,Q]}else{Z.language=[Z.language]}}if(g.isArray(Z.language)){var N=new u();Z.language.push("en");var W=Z.language;for(var M=0;M0){var L=g.extend(true,{},P);for(var S=P.children.length-1;S>=0;S--){var R=P.children[S];var O=J(Q,R);if(O==null){L.children.splice(S,1)}}if(L.children.length>0){return L}return J(Q,L)}var N=K(P.text).toUpperCase();var M=K(Q.term).toUpperCase();if(N.indexOf(M)>-1){return P}return null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:true,debug:false,dropdownAutoWidth:false,escapeMarkup:e.escapeMarkup,language:y,matcher:J,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:false,sorter:function(L){return L},templateResult:function(L){return L.text},templateSelection:function(L){return L.text},theme:"default",width:"100%"}};p.prototype.set=function(K,M){var J=g.camelCase(K);var L={};L[J]=M;var N=e._convertData(L);g.extend(this.defaults,N)};var n=new p();return n});d.define("select2/options",["require","jquery","./defaults","./utils"],function(f,h,i,g){function e(l,j){this.options=l;if(j!=null){this.fromElement(j)}this.options=i.apply(this.options);if(j&&j.is("input")){var k=f(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=g.Decorate(this.options.dataAdapter,k)}}e.prototype.fromElement=function(j){var l=["select2"];if(this.options.multiple==null){this.options.multiple=j.prop("multiple")}if(this.options.disabled==null){this.options.disabled=j.prop("disabled")}if(this.options.language==null){if(j.prop("lang")){this.options.language=j.prop("lang").toLowerCase()}else{if(j.closest("[lang]").prop("lang")){this.options.language=j.closest("[lang]").prop("lang")}}}if(this.options.dir==null){if(j.prop("dir")){this.options.dir=j.prop("dir")}else{if(j.closest("[dir]").prop("dir")){this.options.dir=j.closest("[dir]").prop("dir")}else{this.options.dir="ltr"}}}j.prop("disabled",this.options.disabled);j.prop("multiple",this.options.multiple);if(j.data("select2Tags")){if(this.options.debug&&window.console&&console.warn){console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.')}j.data("data",j.data("select2Tags"));j.data("tags",true)}if(j.data("ajaxUrl")){if(this.options.debug&&window.console&&console.warn){console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2.")}j.attr("ajax--url",j.data("ajaxUrl"));j.data("ajax--url",j.data("ajaxUrl"))}var n={};if(h.fn.jquery&&h.fn.jquery.substr(0,2)=="1."&&j[0].dataset){n=h.extend(true,{},j[0].dataset,j.data())}else{n=j.data()}var m=h.extend(true,{},n);m=g._convertData(m);for(var k in m){if(h.inArray(k,l)>-1){continue}if(h.isPlainObject(this.options[k])){h.extend(this.options[k],m[k])}else{this.options[k]=m[k]}}return this};e.prototype.get=function(j){return this.options[j]};e.prototype.set=function(j,k){this.options[j]=k};return e});d.define("select2/core",["jquery","./options","./utils","./keys"],function(i,g,h,e){var f=function(o,r){if(o.data("select2")!=null){o.data("select2").destroy()}this.$element=o;this.id=this._generateId(o);r=r||{};this.options=new g(r,o);f.__super__.constructor.call(this);var m=o.attr("tabindex")||0;o.data("old-tabindex",m);o.attr("tabindex","-1");var l=this.options.get("dataAdapter");this.dataAdapter=new l(o,this.options);var q=this.render();this._placeContainer(q);var n=this.options.get("selectionAdapter");this.selection=new n(o,this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,q);var j=this.options.get("dropdownAdapter");this.dropdown=new j(o,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,q);var k=this.options.get("resultsAdapter");this.results=new k(o,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);var p=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(s){p.trigger("selection:update",{data:s})});o.addClass("select2-hidden-accessible");o.attr("aria-hidden","true");this._syncAttributes();o.data("select2",this)};h.Extend(f,h.Observable);f.prototype._generateId=function(j){var k="";if(j.attr("id")!=null){k=j.attr("id")}else{if(j.attr("name")!=null){k=j.attr("name")+"-"+h.generateChars(2)}else{k=h.generateChars(4)}}k=k.replace(/(:|\.|\[|\]|,)/g,"");k="select2-"+k;return k};f.prototype._placeContainer=function(k){k.insertAfter(this.$element);var j=this._resolveWidth(this.$element,this.options.get("width"));if(j!=null){k.css("width",j)}};f.prototype._resolveWidth=function(u,j){var s=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(j=="resolve"){var n=this._resolveWidth(u,"style");if(n!=null){return n}return this._resolveWidth(u,"element")}if(j=="element"){var r=u.outerWidth(false);if(r<=0){return"auto"}return r+"px"}if(j=="style"){var k=u.attr("style");if(typeof(k)!=="string"){return null}var t=k.split(";");for(var o=0,m=t.length;o=1){return p[1]}}return null}return j};f.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container)};f.prototype._registerDomEvents=function(){var k=this;this.$element.on("change.select2",function(){k.dataAdapter.current(function(l){k.trigger("selection:update",{data:l})})});this.$element.on("focus.select2",function(l){k.trigger("focus",l)});this._syncA=h.bind(this._syncAttributes,this);this._syncS=h.bind(this._syncSubtree,this);if(this.$element[0].attachEvent){this.$element[0].attachEvent("onpropertychange",this._syncA)}var j=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(j!=null){this._observer=new j(function(l){i.each(l,k._syncA);i.each(l,k._syncS)});this._observer.observe(this.$element[0],{attributes:true,childList:true,subtree:false})}else{if(this.$element[0].addEventListener){this.$element[0].addEventListener("DOMAttrModified",k._syncA,false);this.$element[0].addEventListener("DOMNodeInserted",k._syncS,false);this.$element[0].addEventListener("DOMNodeRemoved",k._syncS,false)}}};f.prototype._registerDataEvents=function(){var j=this;this.dataAdapter.on("*",function(k,l){j.trigger(k,l)})};f.prototype._registerSelectionEvents=function(){var j=this;var k=["toggle","focus"];this.selection.on("toggle",function(){j.toggleDropdown()});this.selection.on("focus",function(l){j.focus(l)});this.selection.on("*",function(l,m){if(i.inArray(l,k)!==-1){return}j.trigger(l,m)})};f.prototype._registerDropdownEvents=function(){var j=this;this.dropdown.on("*",function(k,l){j.trigger(k,l)})};f.prototype._registerResultsEvents=function(){var j=this;this.results.on("*",function(k,l){j.trigger(k,l)})};f.prototype._registerEvents=function(){var j=this;this.on("open",function(){j.$container.addClass("select2-container--open")});this.on("close",function(){j.$container.removeClass("select2-container--open");j.$selection.focus()});this.on("enable",function(){j.$container.removeClass("select2-container--disabled")});this.on("disable",function(){j.$container.addClass("select2-container--disabled")});this.on("blur",function(){j.$container.removeClass("select2-container--focus")});this.on("query",function(k){if(!j.isOpen()){j.trigger("open",{})}this.dataAdapter.query(k,function(l){j.trigger("results:all",{data:l,query:k})})});this.on("query:append",function(k){this.dataAdapter.query(k,function(l){j.trigger("results:append",{data:l,query:k})})});this.on("keypress",function(k){var l=k.which;
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
if(j.isOpen()){if(l===e.ESC||l===e.TAB||(l===e.UP&&k.altKey)){j.close();k.preventDefault()}else{if(l===e.ENTER){j.trigger("results:select",{});k.preventDefault()}else{if((l===e.SPACE&&k.ctrlKey)){j.trigger("results:toggle",{});k.preventDefault()}else{if(l===e.UP){j.trigger("results:previous",{});k.preventDefault()}else{if(l===e.DOWN){j.trigger("results:next",{});k.preventDefault()}}}}}}else{if(l===e.SPACE||(l===e.DOWN&&k.altKey)){j.open();k.preventDefault()}}})};f.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled"));if(this.options.get("disabled")){if(this.isOpen()){this.close()}this.trigger("disable",{})}else{this.trigger("enable",{})}};f.prototype._syncSubtree=function(k,j){var o=false;var l=this;if(k&&k.target&&(k.target.nodeName!=="OPTION"&&k.target.nodeName!=="OPTGROUP")){return}if(!j){o=true}else{if(j.addedNodes&&j.addedNodes.length>0){for(var p=0;p0){o=true}}}if(o){this.dataAdapter.current(function(n){l.trigger("selection:update",{data:n})})}};f.prototype.trigger=function(m,l){var n=f.__super__.trigger;var o={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(l===undefined){l={}}if(m in o){var k=o[m];var j={prevented:false,name:m,args:l};n.call(this,k,j);if(j.prevented){l.prevented=true;return}}n.call(this,m,l)};f.prototype.toggleDropdown=function(){if(this.options.get("disabled")){return}if(this.isOpen()){this.close()}else{this.open()}};f.prototype.open=function(){if(this.isOpen()){return}this.trigger("query",{})};f.prototype.close=function(){if(!this.isOpen()){return}this.trigger("close",{})};f.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")};f.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")};f.prototype.focus=function(j){if(this.hasFocus()){return}this.$container.addClass("select2-container--focus");this.trigger("focus",{})};f.prototype.enable=function(j){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.')}if(j==null||j.length===0){j=[true]}var k=!j[0];this.$element.prop("disabled",k)};f.prototype.data=function(){if(this.options.get("debug")&&arguments.length>0&&window.console&&console.warn){console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.')}var j=[];this.dataAdapter.current(function(k){j=k});return j};f.prototype.val=function(k){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.')}if(k==null||k.length===0){return this.$element.val()}var j=k[0];if(i.isArray(j)){j=i.map(j,function(l){return l.toString()})}this.$element.val(j).trigger("change")};f.prototype.destroy=function(){this.$container.remove();if(this.$element[0].detachEvent){this.$element[0].detachEvent("onpropertychange",this._syncA)}if(this._observer!=null){this._observer.disconnect();this._observer=null}else{if(this.$element[0].removeEventListener){this.$element[0].removeEventListener("DOMAttrModified",this._syncA,false);this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,false);this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,false)}}this._syncA=null;this._syncS=null;this.$element.off(".select2");this.$element.attr("tabindex",this.$element.data("old-tabindex"));this.$element.removeClass("select2-hidden-accessible");this.$element.attr("aria-hidden","false");this.$element.removeData("select2");this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null};f.prototype.render=function(){var j=i(' ');j.attr("dir",this.options.get("dir"));this.$container=j;this.$container.addClass("select2-container--"+this.options.get("theme"));j.data("element",this.$element);return j};return f});d.define("jquery-mousewheel",["jquery"],function(e){return e});d.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(h,g,e,i){if(h.fn.select2==null){var f=["open","close","destroy"];h.fn.select2=function(l){l=l||{};if(typeof l==="object"){this.each(function(){var n=h.extend(true,{},l);var m=new e(h(this),n)});return this}else{if(typeof l==="string"){var k;var j=Array.prototype.slice.call(arguments,1);this.each(function(){var m=h(this).data("select2");if(m==null&&window.console&&console.error){console.error("The select2('"+l+"') method was called on an element that is not using Select2.")}k=m[l].apply(m,j)});if(h.inArray(l,f)>-1){return this}return k}else{throw new Error("Invalid arguments for Select2: "+l)}}}}if(h.fn.select2.defaults==null){h.fn.select2.defaults=i}return e});return{define:d.define,require:d.require}}());var a=b.require("jquery.select2");c.fn.select2.amd=b;return a}));
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-bs3.css b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-bs3.css
index 27da4b340..838848c56 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-bs3.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-bs3.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
.note-editor {
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
@@ -5970,3 +5971,5977 @@ td.visible-print {
display: none !important;
}
}
+=======
+.note-editor {
+ /*! normalize.css v2.1.3 | MIT License | git.io/normalize */
+
+}
+.note-editor article,
+.note-editor aside,
+.note-editor details,
+.note-editor figcaption,
+.note-editor figure,
+.note-editor footer,
+.note-editor header,
+.note-editor hgroup,
+.note-editor main,
+.note-editor nav,
+.note-editor section,
+.note-editor summary {
+ display: block;
+}
+.note-editor audio,
+.note-editor canvas,
+.note-editor video {
+ display: inline-block;
+}
+.note-editor audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+.note-editor [hidden],
+.note-editor template {
+ display: none;
+}
+.note-editor html {
+ font-family: sans-serif;
+ -ms-text-size-adjust: 100%;
+ -webkit-text-size-adjust: 100%;
+}
+.note-editor body {
+ margin: 0;
+}
+.note-editor a {
+ background: transparent;
+}
+.note-editor a:focus {
+ outline: thin dotted;
+}
+.note-editor a:active,
+.note-editor a:hover {
+ outline: 0;
+}
+.note-editor h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+.note-editor abbr[title] {
+ border-bottom: 1px dotted;
+}
+.note-editor b,
+.note-editor strong {
+ font-weight: bold;
+}
+.note-editor dfn {
+ font-style: italic;
+}
+.note-editor hr {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0;
+}
+.note-editor mark {
+ background: #ff0;
+ color: #000;
+}
+.note-editor code,
+.note-editor kbd,
+.note-editor pre,
+.note-editor samp {
+ font-family: monospace, serif;
+ font-size: 1em;
+}
+.note-editor pre {
+ white-space: pre-wrap;
+}
+.note-editor q {
+ quotes: "\201C" "\201D" "\2018" "\2019";
+}
+.note-editor small {
+ font-size: 80%;
+}
+.note-editor sub,
+.note-editor sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+.note-editor sup {
+ top: -0.5em;
+}
+.note-editor sub {
+ bottom: -0.25em;
+}
+.note-editor img {
+ border: 0;
+}
+.note-editor svg:not(:root) {
+ overflow: hidden;
+}
+.note-editor figure {
+ margin: 0;
+}
+.note-editor fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+.note-editor legend {
+ border: 0;
+ padding: 0;
+}
+.note-editor button,
+.note-editor input,
+.note-editor select,
+.note-editor textarea {
+ font-family: inherit;
+ font-size: 100%;
+ margin: 0;
+}
+.note-editor button,
+.note-editor input {
+ line-height: normal;
+}
+.note-editor button,
+.note-editor select {
+ text-transform: none;
+}
+.note-editor button,
+.note-editor html input[type="button"],
+.note-editor input[type="reset"],
+.note-editor input[type="submit"] {
+ -webkit-appearance: button;
+ cursor: pointer;
+}
+.note-editor button[disabled],
+.note-editor html input[disabled] {
+ cursor: default;
+}
+.note-editor input[type="checkbox"],
+.note-editor input[type="radio"] {
+ box-sizing: border-box;
+ padding: 0;
+}
+.note-editor input[type="search"] {
+ -webkit-appearance: textfield;
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box;
+ box-sizing: content-box;
+}
+.note-editor input[type="search"]::-webkit-search-cancel-button,
+.note-editor input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+.note-editor button::-moz-focus-inner,
+.note-editor input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+.note-editor textarea {
+ overflow: auto;
+ vertical-align: top;
+}
+.note-editor table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+@media print {
+ .note-editor * {
+ text-shadow: none !important;
+ color: #000 !important;
+ background: transparent !important;
+ box-shadow: none !important;
+ }
+ .note-editor a,
+ .note-editor a:visited {
+ text-decoration: underline;
+ }
+ .note-editor a[href]:after {
+ content: " (" attr(href) ")";
+ }
+ .note-editor abbr[title]:after {
+ content: " (" attr(title) ")";
+ }
+ .note-editor .ir a:after,
+ .note-editor a[href^="javascript:"]:after,
+ .note-editor a[href^="#"]:after {
+ content: "";
+ }
+ .note-editor pre,
+ .note-editor blockquote {
+ border: 1px solid #999;
+ page-break-inside: avoid;
+ }
+ .note-editor thead {
+ display: table-header-group;
+ }
+ .note-editor tr,
+ .note-editor img {
+ page-break-inside: avoid;
+ }
+ .note-editor img {
+ max-width: 100% !important;
+ }
+ @page {
+ margin: 2cm .5cm;
+ }
+ .note-editor p,
+ .note-editor h2,
+ .note-editor h3 {
+ orphans: 3;
+ widows: 3;
+ }
+ .note-editor h2,
+ .note-editor h3 {
+ page-break-after: avoid;
+ }
+ .note-editor .navbar {
+ display: none;
+ }
+ .note-editor .table td,
+ .note-editor .table th {
+ background-color: #fff !important;
+ }
+ .note-editor .btn > .caret,
+ .note-editor .dropup > .btn > .caret {
+ border-top-color: #000 !important;
+ }
+ .note-editor .label {
+ border: 1px solid #000;
+ }
+ .note-editor .table {
+ border-collapse: collapse !important;
+ }
+ .note-editor .table-bordered th,
+ .note-editor .table-bordered td {
+ border: 1px solid #ddd !important;
+ }
+}
+.note-editor *,
+.note-editor *:before,
+.note-editor *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.note-editor html {
+ font-size: 62.5%;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+.note-editor body {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #333333;
+ background-color: #ffffff;
+}
+.note-editor input,
+.note-editor button,
+.note-editor select,
+.note-editor textarea {
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+.note-editor a {
+ color: #428bca;
+ text-decoration: none;
+}
+.note-editor a:hover,
+.note-editor a:focus {
+ color: #2a6496;
+ text-decoration: underline;
+}
+.note-editor a:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.note-editor img {
+ vertical-align: middle;
+}
+.note-editor .img-responsive {
+ display: block;
+ max-width: 100%;
+ height: auto;
+}
+.note-editor .img-rounded {
+ border-radius: 6px;
+}
+.note-editor .img-thumbnail {
+ padding: 4px;
+ line-height: 1.428571429;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-radius: 4px;
+ -webkit-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+ display: inline-block;
+ max-width: 100%;
+ height: auto;
+}
+.note-editor .img-circle {
+ border-radius: 50%;
+}
+.note-editor hr {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ border: 0;
+ border-top: 1px solid #eeeeee;
+}
+.note-editor .sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ margin: -1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+}
+.note-editor p {
+ margin: 0 0 10px;
+}
+.note-editor .lead {
+ margin-bottom: 20px;
+ font-size: 16px;
+ font-weight: 200;
+ line-height: 1.4;
+}
+@media (min-width: 768px) {
+ .note-editor .lead {
+ font-size: 21px;
+ }
+}
+.note-editor small,
+.note-editor .small {
+ font-size: 85%;
+}
+.note-editor cite {
+ font-style: normal;
+}
+.note-editor .text-muted {
+ color: #999999;
+}
+.note-editor .text-primary {
+ color: #428bca;
+}
+.note-editor .text-primary:hover {
+ color: #3071a9;
+}
+.note-editor .text-warning {
+ color: #c09853;
+}
+.note-editor .text-warning:hover {
+ color: #a47e3c;
+}
+.note-editor .text-danger {
+ color: #b94a48;
+}
+.note-editor .text-danger:hover {
+ color: #953b39;
+}
+.note-editor .text-success {
+ color: #468847;
+}
+.note-editor .text-success:hover {
+ color: #356635;
+}
+.note-editor .text-info {
+ color: #3a87ad;
+}
+.note-editor .text-info:hover {
+ color: #2d6987;
+}
+.note-editor .text-left {
+ text-align: left;
+}
+.note-editor .text-right {
+ text-align: right;
+}
+.note-editor .text-center {
+ text-align: center;
+}
+.note-editor h1,
+.note-editor h2,
+.note-editor h3,
+.note-editor h4,
+.note-editor h5,
+.note-editor h6,
+.note-editor .h1,
+.note-editor .h2,
+.note-editor .h3,
+.note-editor .h4,
+.note-editor .h5,
+.note-editor .h6 {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-weight: 500;
+ line-height: 1.1;
+ color: inherit;
+}
+.note-editor h1 small,
+.note-editor h2 small,
+.note-editor h3 small,
+.note-editor h4 small,
+.note-editor h5 small,
+.note-editor h6 small,
+.note-editor .h1 small,
+.note-editor .h2 small,
+.note-editor .h3 small,
+.note-editor .h4 small,
+.note-editor .h5 small,
+.note-editor .h6 small,
+.note-editor h1 .small,
+.note-editor h2 .small,
+.note-editor h3 .small,
+.note-editor h4 .small,
+.note-editor h5 .small,
+.note-editor h6 .small,
+.note-editor .h1 .small,
+.note-editor .h2 .small,
+.note-editor .h3 .small,
+.note-editor .h4 .small,
+.note-editor .h5 .small,
+.note-editor .h6 .small {
+ font-weight: normal;
+ line-height: 1;
+ color: #999999;
+}
+.note-editor h1,
+.note-editor h2,
+.note-editor h3 {
+ margin-top: 20px;
+ margin-bottom: 10px;
+}
+.note-editor h1 small,
+.note-editor h2 small,
+.note-editor h3 small,
+.note-editor h1 .small,
+.note-editor h2 .small,
+.note-editor h3 .small {
+ font-size: 65%;
+}
+.note-editor h4,
+.note-editor h5,
+.note-editor h6 {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+.note-editor h4 small,
+.note-editor h5 small,
+.note-editor h6 small,
+.note-editor h4 .small,
+.note-editor h5 .small,
+.note-editor h6 .small {
+ font-size: 75%;
+}
+.note-editor h1,
+.note-editor .h1 {
+ font-size: 36px;
+}
+.note-editor h2,
+.note-editor .h2 {
+ font-size: 30px;
+}
+.note-editor h3,
+.note-editor .h3 {
+ font-size: 24px;
+}
+.note-editor h4,
+.note-editor .h4 {
+ font-size: 18px;
+}
+.note-editor h5,
+.note-editor .h5 {
+ font-size: 14px;
+}
+.note-editor h6,
+.note-editor .h6 {
+ font-size: 12px;
+}
+.note-editor .page-header {
+ padding-bottom: 9px;
+ margin: 40px 0 20px;
+ border-bottom: 1px solid #eeeeee;
+}
+.note-editor ul,
+.note-editor ol {
+ margin-top: 0;
+ margin-bottom: 10px;
+}
+.note-editor ul ul,
+.note-editor ol ul,
+.note-editor ul ol,
+.note-editor ol ol {
+ margin-bottom: 0;
+}
+.note-editor .list-unstyled {
+ padding-left: 0;
+ list-style: none;
+}
+.note-editor .list-inline {
+ padding-left: 0;
+ list-style: none;
+}
+.note-editor .list-inline > li {
+ display: inline-block;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+.note-editor dl {
+ margin-bottom: 20px;
+}
+.note-editor dt,
+.note-editor dd {
+ line-height: 1.428571429;
+}
+.note-editor dt {
+ font-weight: bold;
+}
+.note-editor dd {
+ margin-left: 0;
+}
+@media (min-width: 768px) {
+ .note-editor .dl-horizontal dt {
+ float: left;
+ width: 160px;
+ clear: left;
+ text-align: right;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .note-editor .dl-horizontal dd {
+ margin-left: 180px;
+ }
+ .note-editor .dl-horizontal dd:before,
+ .note-editor .dl-horizontal dd:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+ }
+ .note-editor .dl-horizontal dd:after {
+ clear: both;
+ }
+ .note-editor .dl-horizontal dd:before,
+ .note-editor .dl-horizontal dd:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+ }
+ .note-editor .dl-horizontal dd:after {
+ clear: both;
+ }
+}
+.note-editor abbr[title],
+.note-editor abbr[data-original-title] {
+ cursor: help;
+ border-bottom: 1px dotted #999999;
+}
+.note-editor abbr.initialism {
+ font-size: 90%;
+ text-transform: uppercase;
+}
+.note-editor blockquote {
+ padding: 10px 20px;
+ margin: 0 0 20px;
+ border-left: 5px solid #eeeeee;
+}
+.note-editor blockquote p {
+ font-size: 17.5px;
+ font-weight: 300;
+ line-height: 1.25;
+}
+.note-editor blockquote p:last-child {
+ margin-bottom: 0;
+}
+.note-editor blockquote small {
+ display: block;
+ line-height: 1.428571429;
+ color: #999999;
+}
+.note-editor blockquote small:before {
+ content: '\2014 \00A0';
+}
+.note-editor blockquote.pull-right {
+ padding-right: 15px;
+ padding-left: 0;
+ border-right: 5px solid #eeeeee;
+ border-left: 0;
+}
+.note-editor blockquote.pull-right p,
+.note-editor blockquote.pull-right small,
+.note-editor blockquote.pull-right .small {
+ text-align: right;
+}
+.note-editor blockquote.pull-right small:before,
+.note-editor blockquote.pull-right .small:before {
+ content: '';
+}
+.note-editor blockquote.pull-right small:after,
+.note-editor blockquote.pull-right .small:after {
+ content: '\00A0 \2014';
+}
+.note-editor blockquote:before,
+.note-editor blockquote:after {
+ content: "";
+}
+.note-editor address {
+ margin-bottom: 20px;
+ font-style: normal;
+ line-height: 1.428571429;
+}
+.note-editor code,
+.note-editor kdb,
+.note-editor pre,
+.note-editor samp {
+ font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+}
+.note-editor code {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #c7254e;
+ background-color: #f9f2f4;
+ white-space: nowrap;
+ border-radius: 4px;
+}
+.note-editor pre {
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-size: 13px;
+ line-height: 1.428571429;
+ word-break: break-all;
+ word-wrap: break-word;
+ color: #333333;
+ background-color: #f5f5f5;
+ border: 1px solid #cccccc;
+ border-radius: 4px;
+}
+.note-editor pre code {
+ padding: 0;
+ font-size: inherit;
+ color: inherit;
+ white-space: pre-wrap;
+ background-color: transparent;
+ border-radius: 0;
+}
+.note-editor .pre-scrollable {
+ max-height: 340px;
+ overflow-y: scroll;
+}
+.note-editor .container {
+ margin-right: auto;
+ margin-left: auto;
+ padding-left: 15px;
+ padding-right: 15px;
+}
+.note-editor .container:before,
+.note-editor .container:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .container:after {
+ clear: both;
+}
+.note-editor .container:before,
+.note-editor .container:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .container:after {
+ clear: both;
+}
+.note-editor .row {
+ margin-left: -15px;
+ margin-right: -15px;
+}
+.note-editor .row:before,
+.note-editor .row:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .row:after {
+ clear: both;
+}
+.note-editor .row:before,
+.note-editor .row:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .row:after {
+ clear: both;
+}
+.note-editor .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+ position: relative;
+ min-height: 1px;
+ padding-left: 15px;
+ padding-right: 15px;
+}
+.note-editor .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11 {
+ float: left;
+}
+.note-editor .col-xs-12 {
+ width: 100%;
+}
+.note-editor .col-xs-11 {
+ width: 91.66666666666666%;
+}
+.note-editor .col-xs-10 {
+ width: 83.33333333333334%;
+}
+.note-editor .col-xs-9 {
+ width: 75%;
+}
+.note-editor .col-xs-8 {
+ width: 66.66666666666666%;
+}
+.note-editor .col-xs-7 {
+ width: 58.333333333333336%;
+}
+.note-editor .col-xs-6 {
+ width: 50%;
+}
+.note-editor .col-xs-5 {
+ width: 41.66666666666667%;
+}
+.note-editor .col-xs-4 {
+ width: 33.33333333333333%;
+}
+.note-editor .col-xs-3 {
+ width: 25%;
+}
+.note-editor .col-xs-2 {
+ width: 16.666666666666664%;
+}
+.note-editor .col-xs-1 {
+ width: 8.333333333333332%;
+}
+.note-editor .col-xs-pull-12 {
+ right: 100%;
+}
+.note-editor .col-xs-pull-11 {
+ right: 91.66666666666666%;
+}
+.note-editor .col-xs-pull-10 {
+ right: 83.33333333333334%;
+}
+.note-editor .col-xs-pull-9 {
+ right: 75%;
+}
+.note-editor .col-xs-pull-8 {
+ right: 66.66666666666666%;
+}
+.note-editor .col-xs-pull-7 {
+ right: 58.333333333333336%;
+}
+.note-editor .col-xs-pull-6 {
+ right: 50%;
+}
+.note-editor .col-xs-pull-5 {
+ right: 41.66666666666667%;
+}
+.note-editor .col-xs-pull-4 {
+ right: 33.33333333333333%;
+}
+.note-editor .col-xs-pull-3 {
+ right: 25%;
+}
+.note-editor .col-xs-pull-2 {
+ right: 16.666666666666664%;
+}
+.note-editor .col-xs-pull-1 {
+ right: 8.333333333333332%;
+}
+.note-editor .col-xs-push-12 {
+ left: 100%;
+}
+.note-editor .col-xs-push-11 {
+ left: 91.66666666666666%;
+}
+.note-editor .col-xs-push-10 {
+ left: 83.33333333333334%;
+}
+.note-editor .col-xs-push-9 {
+ left: 75%;
+}
+.note-editor .col-xs-push-8 {
+ left: 66.66666666666666%;
+}
+.note-editor .col-xs-push-7 {
+ left: 58.333333333333336%;
+}
+.note-editor .col-xs-push-6 {
+ left: 50%;
+}
+.note-editor .col-xs-push-5 {
+ left: 41.66666666666667%;
+}
+.note-editor .col-xs-push-4 {
+ left: 33.33333333333333%;
+}
+.note-editor .col-xs-push-3 {
+ left: 25%;
+}
+.note-editor .col-xs-push-2 {
+ left: 16.666666666666664%;
+}
+.note-editor .col-xs-push-1 {
+ left: 8.333333333333332%;
+}
+.note-editor .col-xs-offset-12 {
+ margin-left: 100%;
+}
+.note-editor .col-xs-offset-11 {
+ margin-left: 91.66666666666666%;
+}
+.note-editor .col-xs-offset-10 {
+ margin-left: 83.33333333333334%;
+}
+.note-editor .col-xs-offset-9 {
+ margin-left: 75%;
+}
+.note-editor .col-xs-offset-8 {
+ margin-left: 66.66666666666666%;
+}
+.note-editor .col-xs-offset-7 {
+ margin-left: 58.333333333333336%;
+}
+.note-editor .col-xs-offset-6 {
+ margin-left: 50%;
+}
+.note-editor .col-xs-offset-5 {
+ margin-left: 41.66666666666667%;
+}
+.note-editor .col-xs-offset-4 {
+ margin-left: 33.33333333333333%;
+}
+.note-editor .col-xs-offset-3 {
+ margin-left: 25%;
+}
+.note-editor .col-xs-offset-2 {
+ margin-left: 16.666666666666664%;
+}
+.note-editor .col-xs-offset-1 {
+ margin-left: 8.333333333333332%;
+}
+@media (min-width: 768px) {
+ .note-editor .container {
+ width: 750px;
+ }
+ .note-editor .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11 {
+ float: left;
+ }
+ .note-editor .col-sm-12 {
+ width: 100%;
+ }
+ .note-editor .col-sm-11 {
+ width: 91.66666666666666%;
+ }
+ .note-editor .col-sm-10 {
+ width: 83.33333333333334%;
+ }
+ .note-editor .col-sm-9 {
+ width: 75%;
+ }
+ .note-editor .col-sm-8 {
+ width: 66.66666666666666%;
+ }
+ .note-editor .col-sm-7 {
+ width: 58.333333333333336%;
+ }
+ .note-editor .col-sm-6 {
+ width: 50%;
+ }
+ .note-editor .col-sm-5 {
+ width: 41.66666666666667%;
+ }
+ .note-editor .col-sm-4 {
+ width: 33.33333333333333%;
+ }
+ .note-editor .col-sm-3 {
+ width: 25%;
+ }
+ .note-editor .col-sm-2 {
+ width: 16.666666666666664%;
+ }
+ .note-editor .col-sm-1 {
+ width: 8.333333333333332%;
+ }
+ .note-editor .col-sm-pull-12 {
+ right: 100%;
+ }
+ .note-editor .col-sm-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .note-editor .col-sm-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .note-editor .col-sm-pull-9 {
+ right: 75%;
+ }
+ .note-editor .col-sm-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .note-editor .col-sm-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .note-editor .col-sm-pull-6 {
+ right: 50%;
+ }
+ .note-editor .col-sm-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .note-editor .col-sm-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .note-editor .col-sm-pull-3 {
+ right: 25%;
+ }
+ .note-editor .col-sm-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .note-editor .col-sm-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .note-editor .col-sm-push-12 {
+ left: 100%;
+ }
+ .note-editor .col-sm-push-11 {
+ left: 91.66666666666666%;
+ }
+ .note-editor .col-sm-push-10 {
+ left: 83.33333333333334%;
+ }
+ .note-editor .col-sm-push-9 {
+ left: 75%;
+ }
+ .note-editor .col-sm-push-8 {
+ left: 66.66666666666666%;
+ }
+ .note-editor .col-sm-push-7 {
+ left: 58.333333333333336%;
+ }
+ .note-editor .col-sm-push-6 {
+ left: 50%;
+ }
+ .note-editor .col-sm-push-5 {
+ left: 41.66666666666667%;
+ }
+ .note-editor .col-sm-push-4 {
+ left: 33.33333333333333%;
+ }
+ .note-editor .col-sm-push-3 {
+ left: 25%;
+ }
+ .note-editor .col-sm-push-2 {
+ left: 16.666666666666664%;
+ }
+ .note-editor .col-sm-push-1 {
+ left: 8.333333333333332%;
+ }
+ .note-editor .col-sm-offset-12 {
+ margin-left: 100%;
+ }
+ .note-editor .col-sm-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+ .note-editor .col-sm-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .note-editor .col-sm-offset-9 {
+ margin-left: 75%;
+ }
+ .note-editor .col-sm-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .note-editor .col-sm-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .note-editor .col-sm-offset-6 {
+ margin-left: 50%;
+ }
+ .note-editor .col-sm-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .note-editor .col-sm-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .note-editor .col-sm-offset-3 {
+ margin-left: 25%;
+ }
+ .note-editor .col-sm-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .note-editor .col-sm-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+}
+@media (min-width: 992px) {
+ .note-editor .container {
+ width: 970px;
+ }
+ .note-editor .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11 {
+ float: left;
+ }
+ .note-editor .col-md-12 {
+ width: 100%;
+ }
+ .note-editor .col-md-11 {
+ width: 91.66666666666666%;
+ }
+ .note-editor .col-md-10 {
+ width: 83.33333333333334%;
+ }
+ .note-editor .col-md-9 {
+ width: 75%;
+ }
+ .note-editor .col-md-8 {
+ width: 66.66666666666666%;
+ }
+ .note-editor .col-md-7 {
+ width: 58.333333333333336%;
+ }
+ .note-editor .col-md-6 {
+ width: 50%;
+ }
+ .note-editor .col-md-5 {
+ width: 41.66666666666667%;
+ }
+ .note-editor .col-md-4 {
+ width: 33.33333333333333%;
+ }
+ .note-editor .col-md-3 {
+ width: 25%;
+ }
+ .note-editor .col-md-2 {
+ width: 16.666666666666664%;
+ }
+ .note-editor .col-md-1 {
+ width: 8.333333333333332%;
+ }
+ .note-editor .col-md-pull-12 {
+ right: 100%;
+ }
+ .note-editor .col-md-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .note-editor .col-md-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .note-editor .col-md-pull-9 {
+ right: 75%;
+ }
+ .note-editor .col-md-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .note-editor .col-md-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .note-editor .col-md-pull-6 {
+ right: 50%;
+ }
+ .note-editor .col-md-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .note-editor .col-md-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .note-editor .col-md-pull-3 {
+ right: 25%;
+ }
+ .note-editor .col-md-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .note-editor .col-md-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .note-editor .col-md-push-12 {
+ left: 100%;
+ }
+ .note-editor .col-md-push-11 {
+ left: 91.66666666666666%;
+ }
+ .note-editor .col-md-push-10 {
+ left: 83.33333333333334%;
+ }
+ .note-editor .col-md-push-9 {
+ left: 75%;
+ }
+ .note-editor .col-md-push-8 {
+ left: 66.66666666666666%;
+ }
+ .note-editor .col-md-push-7 {
+ left: 58.333333333333336%;
+ }
+ .note-editor .col-md-push-6 {
+ left: 50%;
+ }
+ .note-editor .col-md-push-5 {
+ left: 41.66666666666667%;
+ }
+ .note-editor .col-md-push-4 {
+ left: 33.33333333333333%;
+ }
+ .note-editor .col-md-push-3 {
+ left: 25%;
+ }
+ .note-editor .col-md-push-2 {
+ left: 16.666666666666664%;
+ }
+ .note-editor .col-md-push-1 {
+ left: 8.333333333333332%;
+ }
+ .note-editor .col-md-offset-12 {
+ margin-left: 100%;
+ }
+ .note-editor .col-md-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+ .note-editor .col-md-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .note-editor .col-md-offset-9 {
+ margin-left: 75%;
+ }
+ .note-editor .col-md-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .note-editor .col-md-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .note-editor .col-md-offset-6 {
+ margin-left: 50%;
+ }
+ .note-editor .col-md-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .note-editor .col-md-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .note-editor .col-md-offset-3 {
+ margin-left: 25%;
+ }
+ .note-editor .col-md-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .note-editor .col-md-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+}
+@media (min-width: 1200px) {
+ .note-editor .container {
+ width: 1170px;
+ }
+ .note-editor .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11 {
+ float: left;
+ }
+ .note-editor .col-lg-12 {
+ width: 100%;
+ }
+ .note-editor .col-lg-11 {
+ width: 91.66666666666666%;
+ }
+ .note-editor .col-lg-10 {
+ width: 83.33333333333334%;
+ }
+ .note-editor .col-lg-9 {
+ width: 75%;
+ }
+ .note-editor .col-lg-8 {
+ width: 66.66666666666666%;
+ }
+ .note-editor .col-lg-7 {
+ width: 58.333333333333336%;
+ }
+ .note-editor .col-lg-6 {
+ width: 50%;
+ }
+ .note-editor .col-lg-5 {
+ width: 41.66666666666667%;
+ }
+ .note-editor .col-lg-4 {
+ width: 33.33333333333333%;
+ }
+ .note-editor .col-lg-3 {
+ width: 25%;
+ }
+ .note-editor .col-lg-2 {
+ width: 16.666666666666664%;
+ }
+ .note-editor .col-lg-1 {
+ width: 8.333333333333332%;
+ }
+ .note-editor .col-lg-pull-12 {
+ right: 100%;
+ }
+ .note-editor .col-lg-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .note-editor .col-lg-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .note-editor .col-lg-pull-9 {
+ right: 75%;
+ }
+ .note-editor .col-lg-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .note-editor .col-lg-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .note-editor .col-lg-pull-6 {
+ right: 50%;
+ }
+ .note-editor .col-lg-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .note-editor .col-lg-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .note-editor .col-lg-pull-3 {
+ right: 25%;
+ }
+ .note-editor .col-lg-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .note-editor .col-lg-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .note-editor .col-lg-push-12 {
+ left: 100%;
+ }
+ .note-editor .col-lg-push-11 {
+ left: 91.66666666666666%;
+ }
+ .note-editor .col-lg-push-10 {
+ left: 83.33333333333334%;
+ }
+ .note-editor .col-lg-push-9 {
+ left: 75%;
+ }
+ .note-editor .col-lg-push-8 {
+ left: 66.66666666666666%;
+ }
+ .note-editor .col-lg-push-7 {
+ left: 58.333333333333336%;
+ }
+ .note-editor .col-lg-push-6 {
+ left: 50%;
+ }
+ .note-editor .col-lg-push-5 {
+ left: 41.66666666666667%;
+ }
+ .note-editor .col-lg-push-4 {
+ left: 33.33333333333333%;
+ }
+ .note-editor .col-lg-push-3 {
+ left: 25%;
+ }
+ .note-editor .col-lg-push-2 {
+ left: 16.666666666666664%;
+ }
+ .note-editor .col-lg-push-1 {
+ left: 8.333333333333332%;
+ }
+ .note-editor .col-lg-offset-12 {
+ margin-left: 100%;
+ }
+ .note-editor .col-lg-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+ .note-editor .col-lg-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .note-editor .col-lg-offset-9 {
+ margin-left: 75%;
+ }
+ .note-editor .col-lg-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .note-editor .col-lg-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .note-editor .col-lg-offset-6 {
+ margin-left: 50%;
+ }
+ .note-editor .col-lg-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .note-editor .col-lg-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .note-editor .col-lg-offset-3 {
+ margin-left: 25%;
+ }
+ .note-editor .col-lg-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .note-editor .col-lg-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+}
+.note-editor table {
+ max-width: 100%;
+ background-color: transparent;
+}
+.note-editor th {
+ text-align: left;
+}
+.note-editor .table {
+ width: 100%;
+ margin-bottom: 20px;
+}
+.note-editor .table > thead > tr > th,
+.note-editor .table > tbody > tr > th,
+.note-editor .table > tfoot > tr > th,
+.note-editor .table > thead > tr > td,
+.note-editor .table > tbody > tr > td,
+.note-editor .table > tfoot > tr > td {
+ padding: 8px;
+ line-height: 1.428571429;
+ vertical-align: top;
+ border-top: 1px solid #dddddd;
+}
+.note-editor .table > thead > tr > th {
+ vertical-align: bottom;
+ border-bottom: 2px solid #dddddd;
+}
+.note-editor .table > caption + thead > tr:first-child > th,
+.note-editor .table > colgroup + thead > tr:first-child > th,
+.note-editor .table > thead:first-child > tr:first-child > th,
+.note-editor .table > caption + thead > tr:first-child > td,
+.note-editor .table > colgroup + thead > tr:first-child > td,
+.note-editor .table > thead:first-child > tr:first-child > td {
+ border-top: 0;
+}
+.note-editor .table > tbody + tbody {
+ border-top: 2px solid #dddddd;
+}
+.note-editor .table .table {
+ background-color: #ffffff;
+}
+.note-editor .table-condensed > thead > tr > th,
+.note-editor .table-condensed > tbody > tr > th,
+.note-editor .table-condensed > tfoot > tr > th,
+.note-editor .table-condensed > thead > tr > td,
+.note-editor .table-condensed > tbody > tr > td,
+.note-editor .table-condensed > tfoot > tr > td {
+ padding: 5px;
+}
+.note-editor .table-bordered {
+ border: 1px solid #dddddd;
+}
+.note-editor .table-bordered > thead > tr > th,
+.note-editor .table-bordered > tbody > tr > th,
+.note-editor .table-bordered > tfoot > tr > th,
+.note-editor .table-bordered > thead > tr > td,
+.note-editor .table-bordered > tbody > tr > td,
+.note-editor .table-bordered > tfoot > tr > td {
+ border: 1px solid #dddddd;
+}
+.note-editor .table-bordered > thead > tr > th,
+.note-editor .table-bordered > thead > tr > td {
+ border-bottom-width: 2px;
+}
+.note-editor .table-striped > tbody > tr:nth-child(odd) > td,
+.note-editor .table-striped > tbody > tr:nth-child(odd) > th {
+ background-color: #f9f9f9;
+}
+.note-editor .table-hover > tbody > tr:hover > td,
+.note-editor .table-hover > tbody > tr:hover > th {
+ background-color: #f5f5f5;
+}
+.note-editor table col[class*="col-"] {
+ float: none;
+ display: table-column;
+}
+.note-editor table td[class*="col-"],
+.note-editor table th[class*="col-"] {
+ float: none;
+ display: table-cell;
+}
+.note-editor .table > thead > tr > td.active,
+.note-editor .table > tbody > tr > td.active,
+.note-editor .table > tfoot > tr > td.active,
+.note-editor .table > thead > tr > th.active,
+.note-editor .table > tbody > tr > th.active,
+.note-editor .table > tfoot > tr > th.active,
+.note-editor .table > thead > tr.active > td,
+.note-editor .table > tbody > tr.active > td,
+.note-editor .table > tfoot > tr.active > td,
+.note-editor .table > thead > tr.active > th,
+.note-editor .table > tbody > tr.active > th,
+.note-editor .table > tfoot > tr.active > th {
+ background-color: #f5f5f5;
+}
+.note-editor .table > thead > tr > td.success,
+.note-editor .table > tbody > tr > td.success,
+.note-editor .table > tfoot > tr > td.success,
+.note-editor .table > thead > tr > th.success,
+.note-editor .table > tbody > tr > th.success,
+.note-editor .table > tfoot > tr > th.success,
+.note-editor .table > thead > tr.success > td,
+.note-editor .table > tbody > tr.success > td,
+.note-editor .table > tfoot > tr.success > td,
+.note-editor .table > thead > tr.success > th,
+.note-editor .table > tbody > tr.success > th,
+.note-editor .table > tfoot > tr.success > th {
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.note-editor .table-hover > tbody > tr > td.success:hover,
+.note-editor .table-hover > tbody > tr > th.success:hover,
+.note-editor .table-hover > tbody > tr.success:hover > td,
+.note-editor .table-hover > tbody > tr.success:hover > th {
+ background-color: #d0e9c6;
+ border-color: #c9e2b3;
+}
+.note-editor .table > thead > tr > td.danger,
+.note-editor .table > tbody > tr > td.danger,
+.note-editor .table > tfoot > tr > td.danger,
+.note-editor .table > thead > tr > th.danger,
+.note-editor .table > tbody > tr > th.danger,
+.note-editor .table > tfoot > tr > th.danger,
+.note-editor .table > thead > tr.danger > td,
+.note-editor .table > tbody > tr.danger > td,
+.note-editor .table > tfoot > tr.danger > td,
+.note-editor .table > thead > tr.danger > th,
+.note-editor .table > tbody > tr.danger > th,
+.note-editor .table > tfoot > tr.danger > th {
+ background-color: #f2dede;
+ border-color: #ebccd1;
+}
+.note-editor .table-hover > tbody > tr > td.danger:hover,
+.note-editor .table-hover > tbody > tr > th.danger:hover,
+.note-editor .table-hover > tbody > tr.danger:hover > td,
+.note-editor .table-hover > tbody > tr.danger:hover > th {
+ background-color: #ebcccc;
+ border-color: #e4b9c0;
+}
+.note-editor .table > thead > tr > td.warning,
+.note-editor .table > tbody > tr > td.warning,
+.note-editor .table > tfoot > tr > td.warning,
+.note-editor .table > thead > tr > th.warning,
+.note-editor .table > tbody > tr > th.warning,
+.note-editor .table > tfoot > tr > th.warning,
+.note-editor .table > thead > tr.warning > td,
+.note-editor .table > tbody > tr.warning > td,
+.note-editor .table > tfoot > tr.warning > td,
+.note-editor .table > thead > tr.warning > th,
+.note-editor .table > tbody > tr.warning > th,
+.note-editor .table > tfoot > tr.warning > th {
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+}
+.note-editor .table-hover > tbody > tr > td.warning:hover,
+.note-editor .table-hover > tbody > tr > th.warning:hover,
+.note-editor .table-hover > tbody > tr.warning:hover > td,
+.note-editor .table-hover > tbody > tr.warning:hover > th {
+ background-color: #faf2cc;
+ border-color: #f7e1b5;
+}
+@media (max-width: 767px) {
+ .note-editor .table-responsive {
+ width: 100%;
+ margin-bottom: 15px;
+ overflow-y: hidden;
+ overflow-x: scroll;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+ border: 1px solid #dddddd;
+ -webkit-overflow-scrolling: touch;
+ }
+ .note-editor .table-responsive > .table {
+ margin-bottom: 0;
+ }
+ .note-editor .table-responsive > .table > thead > tr > th,
+ .note-editor .table-responsive > .table > tbody > tr > th,
+ .note-editor .table-responsive > .table > tfoot > tr > th,
+ .note-editor .table-responsive > .table > thead > tr > td,
+ .note-editor .table-responsive > .table > tbody > tr > td,
+ .note-editor .table-responsive > .table > tfoot > tr > td {
+ white-space: nowrap;
+ }
+ .note-editor .table-responsive > .table-bordered {
+ border: 0;
+ }
+ .note-editor .table-responsive > .table-bordered > thead > tr > th:first-child,
+ .note-editor .table-responsive > .table-bordered > tbody > tr > th:first-child,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+ .note-editor .table-responsive > .table-bordered > thead > tr > td:first-child,
+ .note-editor .table-responsive > .table-bordered > tbody > tr > td:first-child,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+ }
+ .note-editor .table-responsive > .table-bordered > thead > tr > th:last-child,
+ .note-editor .table-responsive > .table-bordered > tbody > tr > th:last-child,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+ .note-editor .table-responsive > .table-bordered > thead > tr > td:last-child,
+ .note-editor .table-responsive > .table-bordered > tbody > tr > td:last-child,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+ }
+ .note-editor .table-responsive > .table-bordered > tbody > tr:last-child > th,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+ .note-editor .table-responsive > .table-bordered > tbody > tr:last-child > td,
+ .note-editor .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+ }
+}
+.note-editor fieldset {
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+.note-editor legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 20px;
+ font-size: 21px;
+ line-height: inherit;
+ color: #333333;
+ border: 0;
+ border-bottom: 1px solid #e5e5e5;
+}
+.note-editor label {
+ display: inline-block;
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+.note-editor input[type="search"] {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.note-editor input[type="radio"],
+.note-editor input[type="checkbox"] {
+ margin: 4px 0 0;
+ margin-top: 1px \9;
+ /* IE8-9 */
+
+ line-height: normal;
+}
+.note-editor input[type="file"] {
+ display: block;
+}
+.note-editor select[multiple],
+.note-editor select[size] {
+ height: auto;
+}
+.note-editor select optgroup {
+ font-size: inherit;
+ font-style: inherit;
+ font-family: inherit;
+}
+.note-editor input[type="file"]:focus,
+.note-editor input[type="radio"]:focus,
+.note-editor input[type="checkbox"]:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.note-editor input[type="number"]::-webkit-outer-spin-button,
+.note-editor input[type="number"]::-webkit-inner-spin-button {
+ height: auto;
+}
+.note-editor output {
+ display: block;
+ padding-top: 7px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #555555;
+ vertical-align: middle;
+}
+.note-editor .form-control:-moz-placeholder {
+ color: #999999;
+}
+.note-editor .form-control::-moz-placeholder {
+ color: #999999;
+}
+.note-editor .form-control:-ms-input-placeholder {
+ color: #999999;
+}
+.note-editor .form-control::-webkit-input-placeholder {
+ color: #999999;
+}
+.note-editor .form-control {
+ display: block;
+ width: 100%;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #555555;
+ vertical-align: middle;
+ background-color: #ffffff;
+ background-image: none;
+ border: 1px solid #cccccc;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.note-editor .form-control:focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+.note-editor .form-control[disabled],
+.note-editor .form-control[readonly],
+fieldset[disabled] .note-editor .form-control {
+ cursor: not-allowed;
+ background-color: #eeeeee;
+}
+textarea.note-editor .form-control {
+ height: auto;
+}
+.note-editor .form-group {
+ margin-bottom: 15px;
+}
+.note-editor .radio,
+.note-editor .checkbox {
+ display: block;
+ min-height: 20px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ padding-left: 20px;
+ vertical-align: middle;
+}
+.note-editor .radio label,
+.note-editor .checkbox label {
+ display: inline;
+ margin-bottom: 0;
+ font-weight: normal;
+ cursor: pointer;
+}
+.note-editor .radio input[type="radio"],
+.note-editor .radio-inline input[type="radio"],
+.note-editor .checkbox input[type="checkbox"],
+.note-editor .checkbox-inline input[type="checkbox"] {
+ float: left;
+ margin-left: -20px;
+}
+.note-editor .radio + .radio,
+.note-editor .checkbox + .checkbox {
+ margin-top: -5px;
+}
+.note-editor .radio-inline,
+.note-editor .checkbox-inline {
+ display: inline-block;
+ padding-left: 20px;
+ margin-bottom: 0;
+ vertical-align: middle;
+ font-weight: normal;
+ cursor: pointer;
+}
+.note-editor .radio-inline + .radio-inline,
+.note-editor .checkbox-inline + .checkbox-inline {
+ margin-top: 0;
+ margin-left: 10px;
+}
+.note-editor input[type="radio"][disabled],
+.note-editor input[type="checkbox"][disabled],
+.note-editor .radio[disabled],
+.note-editor .radio-inline[disabled],
+.note-editor .checkbox[disabled],
+.note-editor .checkbox-inline[disabled],
+fieldset[disabled] .note-editor input[type="radio"],
+fieldset[disabled] .note-editor input[type="checkbox"],
+fieldset[disabled] .note-editor .radio,
+fieldset[disabled] .note-editor .radio-inline,
+fieldset[disabled] .note-editor .checkbox,
+fieldset[disabled] .note-editor .checkbox-inline {
+ cursor: not-allowed;
+}
+.note-editor .input-sm {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.note-editor .input-sm {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.note-editor .input-sm {
+ height: auto;
+}
+.note-editor .input-lg {
+ height: 45px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+select.note-editor .input-lg {
+ height: 45px;
+ line-height: 45px;
+}
+textarea.note-editor .input-lg {
+ height: auto;
+}
+.note-editor .has-warning .help-block,
+.note-editor .has-warning .control-label {
+ color: #c09853;
+}
+.note-editor .has-warning .form-control {
+ border-color: #c09853;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.note-editor .has-warning .form-control:focus {
+ border-color: #a47e3c;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+.note-editor .has-warning .input-group-addon {
+ color: #c09853;
+ border-color: #c09853;
+ background-color: #fcf8e3;
+}
+.note-editor .has-error .help-block,
+.note-editor .has-error .control-label {
+ color: #b94a48;
+}
+.note-editor .has-error .form-control {
+ border-color: #b94a48;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.note-editor .has-error .form-control:focus {
+ border-color: #953b39;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+.note-editor .has-error .input-group-addon {
+ color: #b94a48;
+ border-color: #b94a48;
+ background-color: #f2dede;
+}
+.note-editor .has-success .help-block,
+.note-editor .has-success .control-label {
+ color: #468847;
+}
+.note-editor .has-success .form-control {
+ border-color: #468847;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.note-editor .has-success .form-control:focus {
+ border-color: #356635;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+.note-editor .has-success .input-group-addon {
+ color: #468847;
+ border-color: #468847;
+ background-color: #dff0d8;
+}
+.note-editor .form-control-static {
+ margin-bottom: 0;
+}
+.note-editor .help-block {
+ display: block;
+ margin-top: 5px;
+ margin-bottom: 10px;
+ color: #737373;
+}
+@media (min-width: 768px) {
+ .note-editor .form-inline .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .note-editor .form-inline .form-control {
+ display: inline-block;
+ }
+ .note-editor .form-inline .radio,
+ .note-editor .form-inline .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-left: 0;
+ }
+ .note-editor .form-inline .radio input[type="radio"],
+ .note-editor .form-inline .checkbox input[type="checkbox"] {
+ float: none;
+ margin-left: 0;
+ }
+}
+.note-editor .form-horizontal .control-label,
+.note-editor .form-horizontal .radio,
+.note-editor .form-horizontal .checkbox,
+.note-editor .form-horizontal .radio-inline,
+.note-editor .form-horizontal .checkbox-inline {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: 7px;
+}
+.note-editor .form-horizontal .form-group {
+ margin-left: -15px;
+ margin-right: -15px;
+}
+.note-editor .form-horizontal .form-group:before,
+.note-editor .form-horizontal .form-group:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .form-horizontal .form-group:after {
+ clear: both;
+}
+.note-editor .form-horizontal .form-group:before,
+.note-editor .form-horizontal .form-group:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .form-horizontal .form-group:after {
+ clear: both;
+}
+.note-editor .form-horizontal .form-control-static {
+ padding-top: 7px;
+}
+@media (min-width: 768px) {
+ .note-editor .form-horizontal .control-label {
+ text-align: right;
+ }
+}
+.note-editor .btn {
+ display: inline-block;
+ margin-bottom: 0;
+ font-weight: normal;
+ text-align: center;
+ vertical-align: middle;
+ cursor: pointer;
+ background-image: none;
+ border: 1px solid transparent;
+ white-space: nowrap;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ border-radius: 4px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ -o-user-select: none;
+ user-select: none;
+}
+.note-editor .btn:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.note-editor .btn:hover,
+.note-editor .btn:focus {
+ color: #333333;
+ text-decoration: none;
+}
+.note-editor .btn:active,
+.note-editor .btn.active {
+ outline: 0;
+ background-image: none;
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+.note-editor .btn.disabled,
+.note-editor .btn[disabled],
+fieldset[disabled] .note-editor .btn {
+ cursor: not-allowed;
+ pointer-events: none;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.note-editor .btn-default {
+ color: #333333;
+ background-color: #ffffff;
+ border-color: #cccccc;
+}
+.note-editor .btn-default:hover,
+.note-editor .btn-default:focus,
+.note-editor .btn-default:active,
+.note-editor .btn-default.active,
+.open .dropdown-toggle.note-editor .btn-default {
+ color: #333333;
+ background-color: #ebebeb;
+ border-color: #adadad;
+}
+.note-editor .btn-default:active,
+.note-editor .btn-default.active,
+.open .dropdown-toggle.note-editor .btn-default {
+ background-image: none;
+}
+.note-editor .btn-default.disabled,
+.note-editor .btn-default[disabled],
+fieldset[disabled] .note-editor .btn-default,
+.note-editor .btn-default.disabled:hover,
+.note-editor .btn-default[disabled]:hover,
+fieldset[disabled] .note-editor .btn-default:hover,
+.note-editor .btn-default.disabled:focus,
+.note-editor .btn-default[disabled]:focus,
+fieldset[disabled] .note-editor .btn-default:focus,
+.note-editor .btn-default.disabled:active,
+.note-editor .btn-default[disabled]:active,
+fieldset[disabled] .note-editor .btn-default:active,
+.note-editor .btn-default.disabled.active,
+.note-editor .btn-default[disabled].active,
+fieldset[disabled] .note-editor .btn-default.active {
+ background-color: #ffffff;
+ border-color: #cccccc;
+}
+.note-editor .btn-primary {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.note-editor .btn-primary:hover,
+.note-editor .btn-primary:focus,
+.note-editor .btn-primary:active,
+.note-editor .btn-primary.active,
+.open .dropdown-toggle.note-editor .btn-primary {
+ color: #ffffff;
+ background-color: #3276b1;
+ border-color: #285e8e;
+}
+.note-editor .btn-primary:active,
+.note-editor .btn-primary.active,
+.open .dropdown-toggle.note-editor .btn-primary {
+ background-image: none;
+}
+.note-editor .btn-primary.disabled,
+.note-editor .btn-primary[disabled],
+fieldset[disabled] .note-editor .btn-primary,
+.note-editor .btn-primary.disabled:hover,
+.note-editor .btn-primary[disabled]:hover,
+fieldset[disabled] .note-editor .btn-primary:hover,
+.note-editor .btn-primary.disabled:focus,
+.note-editor .btn-primary[disabled]:focus,
+fieldset[disabled] .note-editor .btn-primary:focus,
+.note-editor .btn-primary.disabled:active,
+.note-editor .btn-primary[disabled]:active,
+fieldset[disabled] .note-editor .btn-primary:active,
+.note-editor .btn-primary.disabled.active,
+.note-editor .btn-primary[disabled].active,
+fieldset[disabled] .note-editor .btn-primary.active {
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+.note-editor .btn-warning {
+ color: #ffffff;
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.note-editor .btn-warning:hover,
+.note-editor .btn-warning:focus,
+.note-editor .btn-warning:active,
+.note-editor .btn-warning.active,
+.open .dropdown-toggle.note-editor .btn-warning {
+ color: #ffffff;
+ background-color: #ed9c28;
+ border-color: #d58512;
+}
+.note-editor .btn-warning:active,
+.note-editor .btn-warning.active,
+.open .dropdown-toggle.note-editor .btn-warning {
+ background-image: none;
+}
+.note-editor .btn-warning.disabled,
+.note-editor .btn-warning[disabled],
+fieldset[disabled] .note-editor .btn-warning,
+.note-editor .btn-warning.disabled:hover,
+.note-editor .btn-warning[disabled]:hover,
+fieldset[disabled] .note-editor .btn-warning:hover,
+.note-editor .btn-warning.disabled:focus,
+.note-editor .btn-warning[disabled]:focus,
+fieldset[disabled] .note-editor .btn-warning:focus,
+.note-editor .btn-warning.disabled:active,
+.note-editor .btn-warning[disabled]:active,
+fieldset[disabled] .note-editor .btn-warning:active,
+.note-editor .btn-warning.disabled.active,
+.note-editor .btn-warning[disabled].active,
+fieldset[disabled] .note-editor .btn-warning.active {
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.note-editor .btn-danger {
+ color: #ffffff;
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.note-editor .btn-danger:hover,
+.note-editor .btn-danger:focus,
+.note-editor .btn-danger:active,
+.note-editor .btn-danger.active,
+.open .dropdown-toggle.note-editor .btn-danger {
+ color: #ffffff;
+ background-color: #d2322d;
+ border-color: #ac2925;
+}
+.note-editor .btn-danger:active,
+.note-editor .btn-danger.active,
+.open .dropdown-toggle.note-editor .btn-danger {
+ background-image: none;
+}
+.note-editor .btn-danger.disabled,
+.note-editor .btn-danger[disabled],
+fieldset[disabled] .note-editor .btn-danger,
+.note-editor .btn-danger.disabled:hover,
+.note-editor .btn-danger[disabled]:hover,
+fieldset[disabled] .note-editor .btn-danger:hover,
+.note-editor .btn-danger.disabled:focus,
+.note-editor .btn-danger[disabled]:focus,
+fieldset[disabled] .note-editor .btn-danger:focus,
+.note-editor .btn-danger.disabled:active,
+.note-editor .btn-danger[disabled]:active,
+fieldset[disabled] .note-editor .btn-danger:active,
+.note-editor .btn-danger.disabled.active,
+.note-editor .btn-danger[disabled].active,
+fieldset[disabled] .note-editor .btn-danger.active {
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.note-editor .btn-success {
+ color: #ffffff;
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.note-editor .btn-success:hover,
+.note-editor .btn-success:focus,
+.note-editor .btn-success:active,
+.note-editor .btn-success.active,
+.open .dropdown-toggle.note-editor .btn-success {
+ color: #ffffff;
+ background-color: #47a447;
+ border-color: #398439;
+}
+.note-editor .btn-success:active,
+.note-editor .btn-success.active,
+.open .dropdown-toggle.note-editor .btn-success {
+ background-image: none;
+}
+.note-editor .btn-success.disabled,
+.note-editor .btn-success[disabled],
+fieldset[disabled] .note-editor .btn-success,
+.note-editor .btn-success.disabled:hover,
+.note-editor .btn-success[disabled]:hover,
+fieldset[disabled] .note-editor .btn-success:hover,
+.note-editor .btn-success.disabled:focus,
+.note-editor .btn-success[disabled]:focus,
+fieldset[disabled] .note-editor .btn-success:focus,
+.note-editor .btn-success.disabled:active,
+.note-editor .btn-success[disabled]:active,
+fieldset[disabled] .note-editor .btn-success:active,
+.note-editor .btn-success.disabled.active,
+.note-editor .btn-success[disabled].active,
+fieldset[disabled] .note-editor .btn-success.active {
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.note-editor .btn-info {
+ color: #ffffff;
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.note-editor .btn-info:hover,
+.note-editor .btn-info:focus,
+.note-editor .btn-info:active,
+.note-editor .btn-info.active,
+.open .dropdown-toggle.note-editor .btn-info {
+ color: #ffffff;
+ background-color: #39b3d7;
+ border-color: #269abc;
+}
+.note-editor .btn-info:active,
+.note-editor .btn-info.active,
+.open .dropdown-toggle.note-editor .btn-info {
+ background-image: none;
+}
+.note-editor .btn-info.disabled,
+.note-editor .btn-info[disabled],
+fieldset[disabled] .note-editor .btn-info,
+.note-editor .btn-info.disabled:hover,
+.note-editor .btn-info[disabled]:hover,
+fieldset[disabled] .note-editor .btn-info:hover,
+.note-editor .btn-info.disabled:focus,
+.note-editor .btn-info[disabled]:focus,
+fieldset[disabled] .note-editor .btn-info:focus,
+.note-editor .btn-info.disabled:active,
+.note-editor .btn-info[disabled]:active,
+fieldset[disabled] .note-editor .btn-info:active,
+.note-editor .btn-info.disabled.active,
+.note-editor .btn-info[disabled].active,
+fieldset[disabled] .note-editor .btn-info.active {
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.note-editor .btn-link {
+ color: #428bca;
+ font-weight: normal;
+ cursor: pointer;
+ border-radius: 0;
+}
+.note-editor .btn-link,
+.note-editor .btn-link:active,
+.note-editor .btn-link[disabled],
+fieldset[disabled] .note-editor .btn-link {
+ background-color: transparent;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.note-editor .btn-link,
+.note-editor .btn-link:hover,
+.note-editor .btn-link:focus,
+.note-editor .btn-link:active {
+ border-color: transparent;
+}
+.note-editor .btn-link:hover,
+.note-editor .btn-link:focus {
+ color: #2a6496;
+ text-decoration: underline;
+ background-color: transparent;
+}
+.note-editor .btn-link[disabled]:hover,
+fieldset[disabled] .note-editor .btn-link:hover,
+.note-editor .btn-link[disabled]:focus,
+fieldset[disabled] .note-editor .btn-link:focus {
+ color: #999999;
+ text-decoration: none;
+}
+.note-editor .btn-lg {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+.note-editor .btn-sm,
+.note-editor .btn-xs {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.note-editor .btn-xs {
+ padding: 1px 5px;
+}
+.note-editor .btn-block {
+ display: block;
+ width: 100%;
+ padding-left: 0;
+ padding-right: 0;
+}
+.note-editor .btn-block + .btn-block {
+ margin-top: 5px;
+}
+.note-editor input[type="submit"].btn-block,
+.note-editor input[type="reset"].btn-block,
+.note-editor input[type="button"].btn-block {
+ width: 100%;
+}
+.note-editor .fade {
+ opacity: 0;
+ -webkit-transition: opacity 0.15s linear;
+ transition: opacity 0.15s linear;
+}
+.note-editor .fade.in {
+ opacity: 1;
+}
+.note-editor .collapse {
+ display: none;
+}
+.note-editor .collapse.in {
+ display: block;
+}
+.note-editor .collapsing {
+ position: relative;
+ height: 0;
+ overflow: hidden;
+ -webkit-transition: height 0.35s ease;
+ transition: height 0.35s ease;
+}
+@font-face {
+ font-family: 'Glyphicons Halflings';
+ src: url('../../../fonts/glyphicons-halflings-regular.eot');
+ src: url('../../../fonts/glyphicons-halflings-regular.eot?') format('embedded-opentype'), url('../../../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../../../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../../../fonts/glyphicons-halflings-regular.svg') format('svg');
+}
+.note-editor .glyphicon {
+ position: relative;
+ top: 1px;
+ display: inline-block;
+ font-family: 'Glyphicons Halflings';
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1;
+ -webkit-font-smoothing: antialiased;
+}
+.note-editor .glyphicon:empty {
+ width: 1em;
+}
+.note-editor .glyphicon-asterisk:before {
+ content: "\2a";
+}
+.note-editor .glyphicon-plus:before {
+ content: "\2b";
+}
+.note-editor .glyphicon-euro:before {
+ content: "\20ac";
+}
+.note-editor .glyphicon-minus:before {
+ content: "\2212";
+}
+.note-editor .glyphicon-cloud:before {
+ content: "\2601";
+}
+.note-editor .glyphicon-envelope:before {
+ content: "\2709";
+}
+.note-editor .glyphicon-pencil:before {
+ content: "\270f";
+}
+.note-editor .glyphicon-glass:before {
+ content: "\e001";
+}
+.note-editor .glyphicon-music:before {
+ content: "\e002";
+}
+.note-editor .glyphicon-search:before {
+ content: "\e003";
+}
+.note-editor .glyphicon-heart:before {
+ content: "\e005";
+}
+.note-editor .glyphicon-star:before {
+ content: "\e006";
+}
+.note-editor .glyphicon-star-empty:before {
+ content: "\e007";
+}
+.note-editor .glyphicon-user:before {
+ content: "\e008";
+}
+.note-editor .glyphicon-film:before {
+ content: "\e009";
+}
+.note-editor .glyphicon-th-large:before {
+ content: "\e010";
+}
+.note-editor .glyphicon-th:before {
+ content: "\e011";
+}
+.note-editor .glyphicon-th-list:before {
+ content: "\e012";
+}
+.note-editor .glyphicon-ok:before {
+ content: "\e013";
+}
+.note-editor .glyphicon-remove:before {
+ content: "\e014";
+}
+.note-editor .glyphicon-zoom-in:before {
+ content: "\e015";
+}
+.note-editor .glyphicon-zoom-out:before {
+ content: "\e016";
+}
+.note-editor .glyphicon-off:before {
+ content: "\e017";
+}
+.note-editor .glyphicon-signal:before {
+ content: "\e018";
+}
+.note-editor .glyphicon-cog:before {
+ content: "\e019";
+}
+.note-editor .glyphicon-trash:before {
+ content: "\e020";
+}
+.note-editor .glyphicon-home:before {
+ content: "\e021";
+}
+.note-editor .glyphicon-file:before {
+ content: "\e022";
+}
+.note-editor .glyphicon-time:before {
+ content: "\e023";
+}
+.note-editor .glyphicon-road:before {
+ content: "\e024";
+}
+.note-editor .glyphicon-download-alt:before {
+ content: "\e025";
+}
+.note-editor .glyphicon-download:before {
+ content: "\e026";
+}
+.note-editor .glyphicon-upload:before {
+ content: "\e027";
+}
+.note-editor .glyphicon-inbox:before {
+ content: "\e028";
+}
+.note-editor .glyphicon-play-circle:before {
+ content: "\e029";
+}
+.note-editor .glyphicon-repeat:before {
+ content: "\e030";
+}
+.note-editor .glyphicon-refresh:before {
+ content: "\e031";
+}
+.note-editor .glyphicon-list-alt:before {
+ content: "\e032";
+}
+.note-editor .glyphicon-lock:before {
+ content: "\e033";
+}
+.note-editor .glyphicon-flag:before {
+ content: "\e034";
+}
+.note-editor .glyphicon-headphones:before {
+ content: "\e035";
+}
+.note-editor .glyphicon-volume-off:before {
+ content: "\e036";
+}
+.note-editor .glyphicon-volume-down:before {
+ content: "\e037";
+}
+.note-editor .glyphicon-volume-up:before {
+ content: "\e038";
+}
+.note-editor .glyphicon-qrcode:before {
+ content: "\e039";
+}
+.note-editor .glyphicon-barcode:before {
+ content: "\e040";
+}
+.note-editor .glyphicon-tag:before {
+ content: "\e041";
+}
+.note-editor .glyphicon-tags:before {
+ content: "\e042";
+}
+.note-editor .glyphicon-book:before {
+ content: "\e043";
+}
+.note-editor .glyphicon-bookmark:before {
+ content: "\e044";
+}
+.note-editor .glyphicon-print:before {
+ content: "\e045";
+}
+.note-editor .glyphicon-camera:before {
+ content: "\e046";
+}
+.note-editor .glyphicon-font:before {
+ content: "\e047";
+}
+.note-editor .glyphicon-bold:before {
+ content: "\e048";
+}
+.note-editor .glyphicon-italic:before {
+ content: "\e049";
+}
+.note-editor .glyphicon-text-height:before {
+ content: "\e050";
+}
+.note-editor .glyphicon-text-width:before {
+ content: "\e051";
+}
+.note-editor .glyphicon-align-left:before {
+ content: "\e052";
+}
+.note-editor .glyphicon-align-center:before {
+ content: "\e053";
+}
+.note-editor .glyphicon-align-right:before {
+ content: "\e054";
+}
+.note-editor .glyphicon-align-justify:before {
+ content: "\e055";
+}
+.note-editor .glyphicon-list:before {
+ content: "\e056";
+}
+.note-editor .glyphicon-indent-left:before {
+ content: "\e057";
+}
+.note-editor .glyphicon-indent-right:before {
+ content: "\e058";
+}
+.note-editor .glyphicon-facetime-video:before {
+ content: "\e059";
+}
+.note-editor .glyphicon-picture:before {
+ content: "\e060";
+}
+.note-editor .glyphicon-map-marker:before {
+ content: "\e062";
+}
+.note-editor .glyphicon-adjust:before {
+ content: "\e063";
+}
+.note-editor .glyphicon-tint:before {
+ content: "\e064";
+}
+.note-editor .glyphicon-edit:before {
+ content: "\e065";
+}
+.note-editor .glyphicon-share:before {
+ content: "\e066";
+}
+.note-editor .glyphicon-check:before {
+ content: "\e067";
+}
+.note-editor .glyphicon-move:before {
+ content: "\e068";
+}
+.note-editor .glyphicon-step-backward:before {
+ content: "\e069";
+}
+.note-editor .glyphicon-fast-backward:before {
+ content: "\e070";
+}
+.note-editor .glyphicon-backward:before {
+ content: "\e071";
+}
+.note-editor .glyphicon-play:before {
+ content: "\e072";
+}
+.note-editor .glyphicon-pause:before {
+ content: "\e073";
+}
+.note-editor .glyphicon-stop:before {
+ content: "\e074";
+}
+.note-editor .glyphicon-forward:before {
+ content: "\e075";
+}
+.note-editor .glyphicon-fast-forward:before {
+ content: "\e076";
+}
+.note-editor .glyphicon-step-forward:before {
+ content: "\e077";
+}
+.note-editor .glyphicon-eject:before {
+ content: "\e078";
+}
+.note-editor .glyphicon-chevron-left:before {
+ content: "\e079";
+}
+.note-editor .glyphicon-chevron-right:before {
+ content: "\e080";
+}
+.note-editor .glyphicon-plus-sign:before {
+ content: "\e081";
+}
+.note-editor .glyphicon-minus-sign:before {
+ content: "\e082";
+}
+.note-editor .glyphicon-remove-sign:before {
+ content: "\e083";
+}
+.note-editor .glyphicon-ok-sign:before {
+ content: "\e084";
+}
+.note-editor .glyphicon-question-sign:before {
+ content: "\e085";
+}
+.note-editor .glyphicon-info-sign:before {
+ content: "\e086";
+}
+.note-editor .glyphicon-screenshot:before {
+ content: "\e087";
+}
+.note-editor .glyphicon-remove-circle:before {
+ content: "\e088";
+}
+.note-editor .glyphicon-ok-circle:before {
+ content: "\e089";
+}
+.note-editor .glyphicon-ban-circle:before {
+ content: "\e090";
+}
+.note-editor .glyphicon-arrow-left:before {
+ content: "\e091";
+}
+.note-editor .glyphicon-arrow-right:before {
+ content: "\e092";
+}
+.note-editor .glyphicon-arrow-up:before {
+ content: "\e093";
+}
+.note-editor .glyphicon-arrow-down:before {
+ content: "\e094";
+}
+.note-editor .glyphicon-share-alt:before {
+ content: "\e095";
+}
+.note-editor .glyphicon-resize-full:before {
+ content: "\e096";
+}
+.note-editor .glyphicon-resize-small:before {
+ content: "\e097";
+}
+.note-editor .glyphicon-exclamation-sign:before {
+ content: "\e101";
+}
+.note-editor .glyphicon-gift:before {
+ content: "\e102";
+}
+.note-editor .glyphicon-leaf:before {
+ content: "\e103";
+}
+.note-editor .glyphicon-fire:before {
+ content: "\e104";
+}
+.note-editor .glyphicon-eye-open:before {
+ content: "\e105";
+}
+.note-editor .glyphicon-eye-close:before {
+ content: "\e106";
+}
+.note-editor .glyphicon-warning-sign:before {
+ content: "\e107";
+}
+.note-editor .glyphicon-plane:before {
+ content: "\e108";
+}
+.note-editor .glyphicon-calendar:before {
+ content: "\e109";
+}
+.note-editor .glyphicon-random:before {
+ content: "\e110";
+}
+.note-editor .glyphicon-comment:before {
+ content: "\e111";
+}
+.note-editor .glyphicon-magnet:before {
+ content: "\e112";
+}
+.note-editor .glyphicon-chevron-up:before {
+ content: "\e113";
+}
+.note-editor .glyphicon-chevron-down:before {
+ content: "\e114";
+}
+.note-editor .glyphicon-retweet:before {
+ content: "\e115";
+}
+.note-editor .glyphicon-shopping-cart:before {
+ content: "\e116";
+}
+.note-editor .glyphicon-folder-close:before {
+ content: "\e117";
+}
+.note-editor .glyphicon-folder-open:before {
+ content: "\e118";
+}
+.note-editor .glyphicon-resize-vertical:before {
+ content: "\e119";
+}
+.note-editor .glyphicon-resize-horizontal:before {
+ content: "\e120";
+}
+.note-editor .glyphicon-hdd:before {
+ content: "\e121";
+}
+.note-editor .glyphicon-bullhorn:before {
+ content: "\e122";
+}
+.note-editor .glyphicon-bell:before {
+ content: "\e123";
+}
+.note-editor .glyphicon-certificate:before {
+ content: "\e124";
+}
+.note-editor .glyphicon-thumbs-up:before {
+ content: "\e125";
+}
+.note-editor .glyphicon-thumbs-down:before {
+ content: "\e126";
+}
+.note-editor .glyphicon-hand-right:before {
+ content: "\e127";
+}
+.note-editor .glyphicon-hand-left:before {
+ content: "\e128";
+}
+.note-editor .glyphicon-hand-up:before {
+ content: "\e129";
+}
+.note-editor .glyphicon-hand-down:before {
+ content: "\e130";
+}
+.note-editor .glyphicon-circle-arrow-right:before {
+ content: "\e131";
+}
+.note-editor .glyphicon-circle-arrow-left:before {
+ content: "\e132";
+}
+.note-editor .glyphicon-circle-arrow-up:before {
+ content: "\e133";
+}
+.note-editor .glyphicon-circle-arrow-down:before {
+ content: "\e134";
+}
+.note-editor .glyphicon-globe:before {
+ content: "\e135";
+}
+.note-editor .glyphicon-wrench:before {
+ content: "\e136";
+}
+.note-editor .glyphicon-tasks:before {
+ content: "\e137";
+}
+.note-editor .glyphicon-filter:before {
+ content: "\e138";
+}
+.note-editor .glyphicon-briefcase:before {
+ content: "\e139";
+}
+.note-editor .glyphicon-fullscreen:before {
+ content: "\e140";
+}
+.note-editor .glyphicon-dashboard:before {
+ content: "\e141";
+}
+.note-editor .glyphicon-paperclip:before {
+ content: "\e142";
+}
+.note-editor .glyphicon-heart-empty:before {
+ content: "\e143";
+}
+.note-editor .glyphicon-link:before {
+ content: "\e144";
+}
+.note-editor .glyphicon-phone:before {
+ content: "\e145";
+}
+.note-editor .glyphicon-pushpin:before {
+ content: "\e146";
+}
+.note-editor .glyphicon-usd:before {
+ content: "\e148";
+}
+.note-editor .glyphicon-gbp:before {
+ content: "\e149";
+}
+.note-editor .glyphicon-sort:before {
+ content: "\e150";
+}
+.note-editor .glyphicon-sort-by-alphabet:before {
+ content: "\e151";
+}
+.note-editor .glyphicon-sort-by-alphabet-alt:before {
+ content: "\e152";
+}
+.note-editor .glyphicon-sort-by-order:before {
+ content: "\e153";
+}
+.note-editor .glyphicon-sort-by-order-alt:before {
+ content: "\e154";
+}
+.note-editor .glyphicon-sort-by-attributes:before {
+ content: "\e155";
+}
+.note-editor .glyphicon-sort-by-attributes-alt:before {
+ content: "\e156";
+}
+.note-editor .glyphicon-unchecked:before {
+ content: "\e157";
+}
+.note-editor .glyphicon-expand:before {
+ content: "\e158";
+}
+.note-editor .glyphicon-collapse-down:before {
+ content: "\e159";
+}
+.note-editor .glyphicon-collapse-up:before {
+ content: "\e160";
+}
+.note-editor .glyphicon-log-in:before {
+ content: "\e161";
+}
+.note-editor .glyphicon-flash:before {
+ content: "\e162";
+}
+.note-editor .glyphicon-log-out:before {
+ content: "\e163";
+}
+.note-editor .glyphicon-new-window:before {
+ content: "\e164";
+}
+.note-editor .glyphicon-record:before {
+ content: "\e165";
+}
+.note-editor .glyphicon-save:before {
+ content: "\e166";
+}
+.note-editor .glyphicon-open:before {
+ content: "\e167";
+}
+.note-editor .glyphicon-saved:before {
+ content: "\e168";
+}
+.note-editor .glyphicon-import:before {
+ content: "\e169";
+}
+.note-editor .glyphicon-export:before {
+ content: "\e170";
+}
+.note-editor .glyphicon-send:before {
+ content: "\e171";
+}
+.note-editor .glyphicon-floppy-disk:before {
+ content: "\e172";
+}
+.note-editor .glyphicon-floppy-saved:before {
+ content: "\e173";
+}
+.note-editor .glyphicon-floppy-remove:before {
+ content: "\e174";
+}
+.note-editor .glyphicon-floppy-save:before {
+ content: "\e175";
+}
+.note-editor .glyphicon-floppy-open:before {
+ content: "\e176";
+}
+.note-editor .glyphicon-credit-card:before {
+ content: "\e177";
+}
+.note-editor .glyphicon-transfer:before {
+ content: "\e178";
+}
+.note-editor .glyphicon-cutlery:before {
+ content: "\e179";
+}
+.note-editor .glyphicon-header:before {
+ content: "\e180";
+}
+.note-editor .glyphicon-compressed:before {
+ content: "\e181";
+}
+.note-editor .glyphicon-earphone:before {
+ content: "\e182";
+}
+.note-editor .glyphicon-phone-alt:before {
+ content: "\e183";
+}
+.note-editor .glyphicon-tower:before {
+ content: "\e184";
+}
+.note-editor .glyphicon-stats:before {
+ content: "\e185";
+}
+.note-editor .glyphicon-sd-video:before {
+ content: "\e186";
+}
+.note-editor .glyphicon-hd-video:before {
+ content: "\e187";
+}
+.note-editor .glyphicon-subtitles:before {
+ content: "\e188";
+}
+.note-editor .glyphicon-sound-stereo:before {
+ content: "\e189";
+}
+.note-editor .glyphicon-sound-dolby:before {
+ content: "\e190";
+}
+.note-editor .glyphicon-sound-5-1:before {
+ content: "\e191";
+}
+.note-editor .glyphicon-sound-6-1:before {
+ content: "\e192";
+}
+.note-editor .glyphicon-sound-7-1:before {
+ content: "\e193";
+}
+.note-editor .glyphicon-copyright-mark:before {
+ content: "\e194";
+}
+.note-editor .glyphicon-registration-mark:before {
+ content: "\e195";
+}
+.note-editor .glyphicon-cloud-download:before {
+ content: "\e197";
+}
+.note-editor .glyphicon-cloud-upload:before {
+ content: "\e198";
+}
+.note-editor .glyphicon-tree-conifer:before {
+ content: "\e199";
+}
+.note-editor .glyphicon-tree-deciduous:before {
+ content: "\e200";
+}
+.note-editor .caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ margin-left: 2px;
+ vertical-align: middle;
+ border-top: 4px solid #000000;
+ border-right: 4px solid transparent;
+ border-left: 4px solid transparent;
+ border-bottom: 0 dotted;
+}
+.note-editor .dropdown {
+ position: relative;
+}
+.note-editor .dropdown-toggle:focus {
+ outline: 0;
+}
+.note-editor .dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ float: left;
+ min-width: 160px;
+ padding: 5px 0;
+ margin: 2px 0 0;
+ list-style: none;
+ font-size: 14px;
+ background-color: #ffffff;
+ border: 1px solid #cccccc;
+ border: 1px solid rgba(0, 0, 0, 0.15);
+ border-radius: 4px;
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+ background-clip: padding-box;
+}
+.note-editor .dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+.note-editor .dropdown-menu .divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.note-editor .dropdown-menu > li > a {
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: 1.428571429;
+ color: #333333;
+ white-space: nowrap;
+}
+.note-editor .dropdown-menu > li > a:hover,
+.note-editor .dropdown-menu > li > a:focus {
+ text-decoration: none;
+ color: #262626;
+ background-color: #f5f5f5;
+}
+.note-editor .dropdown-menu > .active > a,
+.note-editor .dropdown-menu > .active > a:hover,
+.note-editor .dropdown-menu > .active > a:focus {
+ color: #ffffff;
+ text-decoration: none;
+ outline: 0;
+ background-color: #428bca;
+}
+.note-editor .dropdown-menu > .disabled > a,
+.note-editor .dropdown-menu > .disabled > a:hover,
+.note-editor .dropdown-menu > .disabled > a:focus {
+ color: #999999;
+}
+.note-editor .dropdown-menu > .disabled > a:hover,
+.note-editor .dropdown-menu > .disabled > a:focus {
+ text-decoration: none;
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ cursor: not-allowed;
+}
+.note-editor .open > .dropdown-menu {
+ display: block;
+ left:0!important;
+ right:auto!important;
+}
+.note-editor .open > a {
+ outline: 0;
+}
+.note-editor .dropdown-header {
+ display: block;
+ padding: 3px 20px;
+ font-size: 12px;
+ line-height: 1.428571429;
+ color: #999999;
+}
+.note-editor .dropdown-backdrop {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ top: 0;
+ z-index: 990;
+}
+.note-editor .pull-right > .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+.note-editor .dropup .caret,
+.note-editor .navbar-fixed-bottom .dropdown .caret {
+ border-top: 0 dotted;
+ border-bottom: 4px solid #000000;
+ content: "";
+}
+.note-editor .dropup .dropdown-menu,
+.note-editor .navbar-fixed-bottom .dropdown .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 1px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-right .dropdown-menu {
+ right: 0;
+ left: auto;
+ }
+}
+.btn-default .note-editor .caret {
+ border-top-color: #333333;
+}
+.btn-primary .note-editor .caret,
+.btn-success .note-editor .caret,
+.btn-warning .note-editor .caret,
+.btn-danger .note-editor .caret,
+.btn-info .note-editor .caret {
+ border-top-color: #fff;
+}
+.note-editor .dropup .btn-default .caret {
+ border-bottom-color: #333333;
+}
+.note-editor .dropup .btn-primary .caret,
+.note-editor .dropup .btn-success .caret,
+.note-editor .dropup .btn-warning .caret,
+.note-editor .dropup .btn-danger .caret,
+.note-editor .dropup .btn-info .caret {
+ border-bottom-color: #fff;
+}
+.note-editor .btn-group,
+.note-editor .btn-group-vertical {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+}
+.note-editor .btn-group > .btn,
+.note-editor .btn-group-vertical > .btn {
+ position: relative;
+ float: left;
+}
+.note-editor .btn-group > .btn:hover,
+.note-editor .btn-group-vertical > .btn:hover,
+.note-editor .btn-group > .btn:focus,
+.note-editor .btn-group-vertical > .btn:focus,
+.note-editor .btn-group > .btn:active,
+.note-editor .btn-group-vertical > .btn:active,
+.note-editor .btn-group > .btn.active,
+.note-editor .btn-group-vertical > .btn.active {
+ z-index: 2;
+}
+.note-editor .btn-group > .btn:focus,
+.note-editor .btn-group-vertical > .btn:focus {
+ outline: none;
+}
+.note-editor .btn-group .btn + .btn,
+.note-editor .btn-group .btn + .btn-group,
+.note-editor .btn-group .btn-group + .btn,
+.note-editor .btn-group .btn-group + .btn-group {
+ margin-left: -1px;
+}
+.note-editor .btn-toolbar:before,
+.note-editor .btn-toolbar:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .btn-toolbar:after {
+ clear: both;
+}
+.note-editor .btn-toolbar:before,
+.note-editor .btn-toolbar:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .btn-toolbar:after {
+ clear: both;
+}
+.note-editor .btn-toolbar .btn-group {
+ float: left;
+}
+.note-editor .btn-toolbar > .btn + .btn,
+.note-editor .btn-toolbar > .btn-group + .btn,
+.note-editor .btn-toolbar > .btn + .btn-group,
+.note-editor .btn-toolbar > .btn-group + .btn-group {
+ margin-left: 5px;
+}
+.note-editor .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+ border-radius: 0;
+}
+.note-editor .btn-group > .btn:first-child {
+ margin-left: 0;
+}
+.note-editor .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0;
+}
+.note-editor .btn-group > .btn:last-child:not(:first-child),
+.note-editor .btn-group > .dropdown-toggle:not(:first-child) {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .btn-group > .btn-group {
+ float: left;
+}
+.note-editor .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.note-editor .btn-group > .btn-group:first-child > .btn:last-child,
+.note-editor .btn-group > .btn-group:first-child > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0;
+}
+.note-editor .btn-group > .btn-group:last-child > .btn:first-child {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .btn-group .dropdown-toggle:active,
+.note-editor .btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+.note-editor .btn-group-xs > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+ padding: 1px 5px;
+}
+.note-editor .btn-group-sm > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.note-editor .btn-group-lg > .btn {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+.note-editor .btn-group > .btn + .dropdown-toggle {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+.note-editor .btn-group > .btn-lg + .dropdown-toggle {
+ padding-left: 12px;
+ padding-right: 12px;
+}
+.note-editor .btn-group.open .dropdown-toggle {
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+.note-editor .btn .caret {
+ margin-left: 0;
+}
+.note-editor .btn-lg .caret {
+ border-width: 5px 5px 0;
+ border-bottom-width: 0;
+}
+.note-editor .dropup .btn-lg .caret {
+ border-width: 0 5px 5px;
+}
+.note-editor .btn-group-vertical > .btn,
+.note-editor .btn-group-vertical > .btn-group {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%;
+}
+.note-editor .btn-group-vertical > .btn-group:before,
+.note-editor .btn-group-vertical > .btn-group:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .btn-group-vertical > .btn-group:after {
+ clear: both;
+}
+.note-editor .btn-group-vertical > .btn-group:before,
+.note-editor .btn-group-vertical > .btn-group:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .btn-group-vertical > .btn-group:after {
+ clear: both;
+}
+.note-editor .btn-group-vertical > .btn-group > .btn {
+ float: none;
+}
+.note-editor .btn-group-vertical > .btn + .btn,
+.note-editor .btn-group-vertical > .btn + .btn-group,
+.note-editor .btn-group-vertical > .btn-group + .btn,
+.note-editor .btn-group-vertical > .btn-group + .btn-group {
+ margin-top: -1px;
+ margin-left: 0;
+}
+.note-editor .btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn:first-child:not(:last-child) {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn:last-child:not(:first-child) {
+ border-bottom-left-radius: 4px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn-group:first-child > .btn:last-child,
+.note-editor .btn-group-vertical > .btn-group:first-child > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.note-editor .btn-group-vertical > .btn-group:last-child > .btn:first-child {
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .btn-group-justified {
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+ border-collapse: separate;
+}
+.note-editor .btn-group-justified .btn {
+ float: none;
+ display: table-cell;
+ width: 1%;
+}
+.note-editor [data-toggle="buttons"] > .btn > input[type="radio"],
+.note-editor [data-toggle="buttons"] > .btn > input[type="checkbox"] {
+ display: none;
+}
+.note-editor .input-group {
+ position: relative;
+ display: table;
+ border-collapse: separate;
+}
+.note-editor .input-group.col {
+ float: none;
+ padding-left: 0;
+ padding-right: 0;
+}
+.note-editor .input-group .form-control {
+ width: 100%;
+ margin-bottom: 0;
+}
+.note-editor .input-group-lg > .form-control,
+.note-editor .input-group-lg > .input-group-addon,
+.note-editor .input-group-lg > .input-group-btn > .btn {
+ height: 45px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+select.note-editor .input-group-lg > .form-control,
+select.note-editor .input-group-lg > .input-group-addon,
+select.note-editor .input-group-lg > .input-group-btn > .btn {
+ height: 45px;
+ line-height: 45px;
+}
+textarea.note-editor .input-group-lg > .form-control,
+textarea.note-editor .input-group-lg > .input-group-addon,
+textarea.note-editor .input-group-lg > .input-group-btn > .btn {
+ height: auto;
+}
+.note-editor .input-group-sm > .form-control,
+.note-editor .input-group-sm > .input-group-addon,
+.note-editor .input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.note-editor .input-group-sm > .form-control,
+select.note-editor .input-group-sm > .input-group-addon,
+select.note-editor .input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.note-editor .input-group-sm > .form-control,
+textarea.note-editor .input-group-sm > .input-group-addon,
+textarea.note-editor .input-group-sm > .input-group-btn > .btn {
+ height: auto;
+}
+.note-editor .input-group-addon,
+.note-editor .input-group-btn,
+.note-editor .input-group .form-control {
+ display: table-cell;
+}
+.note-editor .input-group-addon:not(:first-child):not(:last-child),
+.note-editor .input-group-btn:not(:first-child):not(:last-child),
+.note-editor .input-group .form-control:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.note-editor .input-group-addon,
+.note-editor .input-group-btn {
+ width: 1%;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+.note-editor .input-group-addon {
+ padding: 6px 12px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1;
+ color: #555555;
+ text-align: center;
+ background-color: #eeeeee;
+ border: 1px solid #cccccc;
+ border-radius: 4px;
+}
+.note-editor .input-group-addon.input-sm {
+ padding: 5px 10px;
+ font-size: 12px;
+ border-radius: 3px;
+}
+.note-editor .input-group-addon.input-lg {
+ padding: 10px 16px;
+ font-size: 18px;
+ border-radius: 6px;
+}
+.note-editor .input-group-addon input[type="radio"],
+.note-editor .input-group-addon input[type="checkbox"] {
+ margin-top: 0;
+}
+.note-editor .input-group .form-control:first-child,
+.note-editor .input-group-addon:first-child,
+.note-editor .input-group-btn:first-child > .btn,
+.note-editor .input-group-btn:first-child > .dropdown-toggle,
+.note-editor .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0;
+}
+.note-editor .input-group-addon:first-child {
+ border-right: 0;
+}
+.note-editor .input-group .form-control:last-child,
+.note-editor .input-group-addon:last-child,
+.note-editor .input-group-btn:last-child > .btn,
+.note-editor .input-group-btn:last-child > .dropdown-toggle,
+.note-editor .input-group-btn:first-child > .btn:not(:first-child) {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .input-group-addon:last-child {
+ border-left: 0;
+}
+.note-editor .input-group-btn {
+ position: relative;
+ white-space: nowrap;
+}
+.note-editor .input-group-btn:first-child > .btn {
+ margin-right: -1px;
+}
+.note-editor .input-group-btn:last-child > .btn {
+ margin-left: -1px;
+}
+.note-editor .input-group-btn > .btn {
+ position: relative;
+}
+.note-editor .input-group-btn > .btn + .btn {
+ margin-left: -4px;
+}
+.note-editor .input-group-btn > .btn:hover,
+.note-editor .input-group-btn > .btn:active {
+ z-index: 2;
+}
+.note-editor .nav {
+ margin-bottom: 0;
+ padding-left: 0;
+ list-style: none;
+}
+.note-editor .nav:before,
+.note-editor .nav:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .nav:after {
+ clear: both;
+}
+.note-editor .nav:before,
+.note-editor .nav:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .nav:after {
+ clear: both;
+}
+.note-editor .nav > li {
+ position: relative;
+ display: block;
+}
+.note-editor .nav > li > a {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+}
+.note-editor .nav > li > a:hover,
+.note-editor .nav > li > a:focus {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+.note-editor .nav > li.disabled > a {
+ color: #999999;
+}
+.note-editor .nav > li.disabled > a:hover,
+.note-editor .nav > li.disabled > a:focus {
+ color: #999999;
+ text-decoration: none;
+ background-color: transparent;
+ cursor: not-allowed;
+}
+.note-editor .nav .open > a,
+.note-editor .nav .open > a:hover,
+.note-editor .nav .open > a:focus {
+ background-color: #eeeeee;
+ border-color: #428bca;
+}
+.note-editor .nav .open > a .caret,
+.note-editor .nav .open > a:hover .caret,
+.note-editor .nav .open > a:focus .caret {
+ border-top-color: #2a6496;
+ border-bottom-color: #2a6496;
+}
+.note-editor .nav .nav-divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.note-editor .nav > li > a > img {
+ max-width: none;
+}
+.note-editor .nav-tabs {
+ border-bottom: 1px solid #dddddd;
+}
+.note-editor .nav-tabs > li {
+ float: left;
+ margin-bottom: -1px;
+}
+.note-editor .nav-tabs > li > a {
+ margin-right: 2px;
+ line-height: 1.428571429;
+ border: 1px solid transparent;
+ border-radius: 4px 4px 0 0;
+}
+.note-editor .nav-tabs > li > a:hover {
+ border-color: #eeeeee #eeeeee #dddddd;
+}
+.note-editor .nav-tabs > li.active > a,
+.note-editor .nav-tabs > li.active > a:hover,
+.note-editor .nav-tabs > li.active > a:focus {
+ color: #555555;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-bottom-color: transparent;
+ cursor: default;
+}
+.note-editor .nav-tabs.nav-justified {
+ width: 100%;
+ border-bottom: 0;
+}
+.note-editor .nav-tabs.nav-justified > li {
+ float: none;
+}
+.note-editor .nav-tabs.nav-justified > li > a {
+ text-align: center;
+ margin-bottom: 5px;
+}
+@media (min-width: 768px) {
+ .note-editor .nav-tabs.nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .note-editor .nav-tabs.nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.note-editor .nav-tabs.nav-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.note-editor .nav-tabs.nav-justified > .active > a,
+.note-editor .nav-tabs.nav-justified > .active > a:hover,
+.note-editor .nav-tabs.nav-justified > .active > a:focus {
+ border: 1px solid #dddddd;
+}
+@media (min-width: 768px) {
+ .note-editor .nav-tabs.nav-justified > li > a {
+ border-bottom: 1px solid #dddddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .note-editor .nav-tabs.nav-justified > .active > a,
+ .note-editor .nav-tabs.nav-justified > .active > a:hover,
+ .note-editor .nav-tabs.nav-justified > .active > a:focus {
+ border-bottom-color: #ffffff;
+ }
+}
+.note-editor .nav-pills > li {
+ float: left;
+}
+.note-editor .nav-pills > li > a {
+ border-radius: 4px;
+}
+.note-editor .nav-pills > li + li {
+ margin-left: 2px;
+}
+.note-editor .nav-pills > li.active > a,
+.note-editor .nav-pills > li.active > a:hover,
+.note-editor .nav-pills > li.active > a:focus {
+ color: #ffffff;
+ background-color: #428bca;
+}
+.note-editor .nav-pills > li.active > a .caret,
+.note-editor .nav-pills > li.active > a:hover .caret,
+.note-editor .nav-pills > li.active > a:focus .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+}
+.note-editor .nav-stacked > li {
+ float: none;
+}
+.note-editor .nav-stacked > li + li {
+ margin-top: 2px;
+ margin-left: 0;
+}
+.note-editor .nav-justified {
+ width: 100%;
+}
+.note-editor .nav-justified > li {
+ float: none;
+}
+.note-editor .nav-justified > li > a {
+ text-align: center;
+ margin-bottom: 5px;
+}
+@media (min-width: 768px) {
+ .note-editor .nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .note-editor .nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.note-editor .nav-tabs-justified {
+ border-bottom: 0;
+}
+.note-editor .nav-tabs-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.note-editor .nav-tabs-justified > .active > a,
+.note-editor .nav-tabs-justified > .active > a:hover,
+.note-editor .nav-tabs-justified > .active > a:focus {
+ border: 1px solid #dddddd;
+}
+@media (min-width: 768px) {
+ .note-editor .nav-tabs-justified > li > a {
+ border-bottom: 1px solid #dddddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .note-editor .nav-tabs-justified > .active > a,
+ .note-editor .nav-tabs-justified > .active > a:hover,
+ .note-editor .nav-tabs-justified > .active > a:focus {
+ border-bottom-color: #ffffff;
+ }
+}
+.note-editor .tab-content > .tab-pane {
+ display: none;
+}
+.note-editor .tab-content > .active {
+ display: block;
+}
+.note-editor .nav .caret {
+ border-top-color: #428bca;
+ border-bottom-color: #428bca;
+}
+.note-editor .nav a:hover .caret {
+ border-top-color: #2a6496;
+ border-bottom-color: #2a6496;
+}
+.note-editor .nav-tabs .dropdown-menu {
+ margin-top: -1px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .navbar {
+ position: relative;
+ z-index: 1000;
+ min-height: 50px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+}
+.note-editor .navbar:before,
+.note-editor .navbar:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar:after {
+ clear: both;
+}
+.note-editor .navbar:before,
+.note-editor .navbar:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar:after {
+ clear: both;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar {
+ border-radius: 4px;
+ }
+}
+.note-editor .navbar-header:before,
+.note-editor .navbar-header:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar-header:after {
+ clear: both;
+}
+.note-editor .navbar-header:before,
+.note-editor .navbar-header:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar-header:after {
+ clear: both;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-header {
+ float: left;
+ }
+}
+.note-editor .navbar-collapse {
+ max-height: 340px;
+ overflow-x: visible;
+ padding-right: 15px;
+ padding-left: 15px;
+ border-top: 1px solid transparent;
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
+ -webkit-overflow-scrolling: touch;
+}
+.note-editor .navbar-collapse:before,
+.note-editor .navbar-collapse:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar-collapse:after {
+ clear: both;
+}
+.note-editor .navbar-collapse:before,
+.note-editor .navbar-collapse:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .navbar-collapse:after {
+ clear: both;
+}
+.note-editor .navbar-collapse.in {
+ overflow-y: auto;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-collapse {
+ width: auto;
+ border-top: 0;
+ box-shadow: none;
+ }
+ .note-editor .navbar-collapse.collapse {
+ display: block !important;
+ height: auto !important;
+ padding-bottom: 0;
+ overflow: visible !important;
+ }
+ .note-editor .navbar-collapse.in {
+ overflow-y: visible;
+ }
+ .note-editor .navbar-collapse .navbar-nav.navbar-left:first-child {
+ margin-left: -15px;
+ }
+ .note-editor .navbar-collapse .navbar-nav.navbar-right:last-child {
+ margin-right: -15px;
+ }
+ .note-editor .navbar-collapse .navbar-text:last-child {
+ margin-right: 0;
+ }
+}
+.note-editor .container > .navbar-header,
+.note-editor .container > .navbar-collapse {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+@media (min-width: 768px) {
+ .note-editor .container > .navbar-header,
+ .note-editor .container > .navbar-collapse {
+ margin-right: 0;
+ margin-left: 0;
+ }
+}
+.note-editor .navbar-static-top {
+ border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-static-top {
+ border-radius: 0;
+ }
+}
+.note-editor .navbar-fixed-top,
+.note-editor .navbar-fixed-bottom {
+ position: fixed;
+ right: 0;
+ left: 0;
+ border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-fixed-top,
+ .note-editor .navbar-fixed-bottom {
+ border-radius: 0;
+ }
+}
+.note-editor .navbar-fixed-top {
+ z-index: 1030;
+ top: 0;
+}
+.note-editor .navbar-fixed-bottom {
+ bottom: 0;
+ margin-bottom: 0;
+}
+.note-editor .navbar-brand {
+ float: left;
+ padding: 15px 15px;
+ font-size: 18px;
+ line-height: 20px;
+}
+.note-editor .navbar-brand:hover,
+.note-editor .navbar-brand:focus {
+ text-decoration: none;
+}
+@media (min-width: 768px) {
+ .navbar > .container .note-editor .navbar-brand {
+ margin-left: -15px;
+ }
+}
+.note-editor .navbar-toggle {
+ position: relative;
+ float: right;
+ margin-right: 15px;
+ padding: 9px 10px;
+ margin-top: 8px;
+ margin-bottom: 8px;
+ background-color: transparent;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.note-editor .navbar-toggle .icon-bar {
+ display: block;
+ width: 22px;
+ height: 2px;
+ border-radius: 1px;
+}
+.note-editor .navbar-toggle .icon-bar + .icon-bar {
+ margin-top: 4px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-toggle {
+ display: none;
+ }
+}
+.note-editor .navbar-nav {
+ margin: 7.5px -15px;
+}
+.note-editor .navbar-nav > li > a {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ line-height: 20px;
+}
+@media (max-width: 767px) {
+ .note-editor .navbar-nav .open .dropdown-menu {
+ position: static;
+ float: none;
+ width: auto;
+ margin-top: 0;
+ background-color: transparent;
+ border: 0;
+ box-shadow: none;
+ }
+ .note-editor .navbar-nav .open .dropdown-menu > li > a,
+ .note-editor .navbar-nav .open .dropdown-menu .dropdown-header {
+ padding: 5px 15px 5px 25px;
+ }
+ .note-editor .navbar-nav .open .dropdown-menu > li > a {
+ line-height: 20px;
+ }
+ .note-editor .navbar-nav .open .dropdown-menu > li > a:hover,
+ .note-editor .navbar-nav .open .dropdown-menu > li > a:focus {
+ background-image: none;
+ }
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-nav {
+ float: left;
+ margin: 0;
+ }
+ .note-editor .navbar-nav > li {
+ float: left;
+ }
+ .note-editor .navbar-nav > li > a {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ }
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-left {
+ float: left !important;
+ }
+ .note-editor .navbar-right {
+ float: right !important;
+ }
+}
+.note-editor .navbar-form {
+ margin-left: -15px;
+ margin-right: -15px;
+ padding: 10px 15px;
+ border-top: 1px solid transparent;
+ border-bottom: 1px solid transparent;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-form .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .note-editor .navbar-form .form-control {
+ display: inline-block;
+ }
+ .note-editor .navbar-form .radio,
+ .note-editor .navbar-form .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-left: 0;
+ }
+ .note-editor .navbar-form .radio input[type="radio"],
+ .note-editor .navbar-form .checkbox input[type="checkbox"] {
+ float: none;
+ margin-left: 0;
+ }
+}
+@media (max-width: 767px) {
+ .note-editor .navbar-form .form-group {
+ margin-bottom: 5px;
+ }
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-form {
+ width: auto;
+ border: 0;
+ margin-left: 0;
+ margin-right: 0;
+ padding-top: 0;
+ padding-bottom: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+}
+.note-editor .navbar-nav > li > .dropdown-menu {
+ margin-top: 0;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.note-editor .navbar-nav.pull-right > li > .dropdown-menu,
+.note-editor .navbar-nav > li > .dropdown-menu.pull-right {
+ left: auto;
+ right: 0;
+}
+.note-editor .navbar-btn {
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+.note-editor .navbar-text {
+ float: left;
+ margin-top: 15px;
+ margin-bottom: 15px;
+}
+@media (min-width: 768px) {
+ .note-editor .navbar-text {
+ margin-left: 15px;
+ margin-right: 15px;
+ }
+}
+.note-editor .navbar-default {
+ background-color: #f8f8f8;
+ border-color: #e7e7e7;
+}
+.note-editor .navbar-default .navbar-brand {
+ color: #777777;
+}
+.note-editor .navbar-default .navbar-brand:hover,
+.note-editor .navbar-default .navbar-brand:focus {
+ color: #5e5e5e;
+ background-color: transparent;
+}
+.note-editor .navbar-default .navbar-text {
+ color: #777777;
+}
+.note-editor .navbar-default .navbar-nav > li > a {
+ color: #777777;
+}
+.note-editor .navbar-default .navbar-nav > li > a:hover,
+.note-editor .navbar-default .navbar-nav > li > a:focus {
+ color: #333333;
+ background-color: transparent;
+}
+.note-editor .navbar-default .navbar-nav > .active > a,
+.note-editor .navbar-default .navbar-nav > .active > a:hover,
+.note-editor .navbar-default .navbar-nav > .active > a:focus {
+ color: #555555;
+ background-color: #e7e7e7;
+}
+.note-editor .navbar-default .navbar-nav > .disabled > a,
+.note-editor .navbar-default .navbar-nav > .disabled > a:hover,
+.note-editor .navbar-default .navbar-nav > .disabled > a:focus {
+ color: #cccccc;
+ background-color: transparent;
+}
+.note-editor .navbar-default .navbar-toggle {
+ border-color: #dddddd;
+}
+.note-editor .navbar-default .navbar-toggle:hover,
+.note-editor .navbar-default .navbar-toggle:focus {
+ background-color: #dddddd;
+}
+.note-editor .navbar-default .navbar-toggle .icon-bar {
+ background-color: #cccccc;
+}
+.note-editor .navbar-default .navbar-collapse,
+.note-editor .navbar-default .navbar-form {
+ border-color: #e7e7e7;
+}
+.note-editor .navbar-default .navbar-nav > .dropdown > a:hover .caret,
+.note-editor .navbar-default .navbar-nav > .dropdown > a:focus .caret {
+ border-top-color: #333333;
+ border-bottom-color: #333333;
+}
+.note-editor .navbar-default .navbar-nav > .open > a,
+.note-editor .navbar-default .navbar-nav > .open > a:hover,
+.note-editor .navbar-default .navbar-nav > .open > a:focus {
+ background-color: #e7e7e7;
+ color: #555555;
+}
+.note-editor .navbar-default .navbar-nav > .open > a .caret,
+.note-editor .navbar-default .navbar-nav > .open > a:hover .caret,
+.note-editor .navbar-default .navbar-nav > .open > a:focus .caret {
+ border-top-color: #555555;
+ border-bottom-color: #555555;
+}
+.note-editor .navbar-default .navbar-nav > .dropdown > a .caret {
+ border-top-color: #777777;
+ border-bottom-color: #777777;
+}
+@media (max-width: 767px) {
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+ color: #777777;
+ }
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #333333;
+ background-color: transparent;
+ }
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #555555;
+ background-color: #e7e7e7;
+ }
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .note-editor .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #cccccc;
+ background-color: transparent;
+ }
+}
+.note-editor .navbar-default .navbar-link {
+ color: #777777;
+}
+.note-editor .navbar-default .navbar-link:hover {
+ color: #333333;
+}
+.note-editor .navbar-inverse {
+ background-color: #222222;
+ border-color: #080808;
+}
+.note-editor .navbar-inverse .navbar-brand {
+ color: #999999;
+}
+.note-editor .navbar-inverse .navbar-brand:hover,
+.note-editor .navbar-inverse .navbar-brand:focus {
+ color: #ffffff;
+ background-color: transparent;
+}
+.note-editor .navbar-inverse .navbar-text {
+ color: #999999;
+}
+.note-editor .navbar-inverse .navbar-nav > li > a {
+ color: #999999;
+}
+.note-editor .navbar-inverse .navbar-nav > li > a:hover,
+.note-editor .navbar-inverse .navbar-nav > li > a:focus {
+ color: #ffffff;
+ background-color: transparent;
+}
+.note-editor .navbar-inverse .navbar-nav > .active > a,
+.note-editor .navbar-inverse .navbar-nav > .active > a:hover,
+.note-editor .navbar-inverse .navbar-nav > .active > a:focus {
+ color: #ffffff;
+ background-color: #080808;
+}
+.note-editor .navbar-inverse .navbar-nav > .disabled > a,
+.note-editor .navbar-inverse .navbar-nav > .disabled > a:hover,
+.note-editor .navbar-inverse .navbar-nav > .disabled > a:focus {
+ color: #444444;
+ background-color: transparent;
+}
+.note-editor .navbar-inverse .navbar-toggle {
+ border-color: #333333;
+}
+.note-editor .navbar-inverse .navbar-toggle:hover,
+.note-editor .navbar-inverse .navbar-toggle:focus {
+ background-color: #333333;
+}
+.note-editor .navbar-inverse .navbar-toggle .icon-bar {
+ background-color: #ffffff;
+}
+.note-editor .navbar-inverse .navbar-collapse,
+.note-editor .navbar-inverse .navbar-form {
+ border-color: #101010;
+}
+.note-editor .navbar-inverse .navbar-nav > .open > a,
+.note-editor .navbar-inverse .navbar-nav > .open > a:hover,
+.note-editor .navbar-inverse .navbar-nav > .open > a:focus {
+ background-color: #080808;
+ color: #ffffff;
+}
+.note-editor .navbar-inverse .navbar-nav > .dropdown > a:hover .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+}
+.note-editor .navbar-inverse .navbar-nav > .dropdown > a .caret {
+ border-top-color: #999999;
+ border-bottom-color: #999999;
+}
+.note-editor .navbar-inverse .navbar-nav > .open > a .caret,
+.note-editor .navbar-inverse .navbar-nav > .open > a:hover .caret,
+.note-editor .navbar-inverse .navbar-nav > .open > a:focus .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+}
+@media (max-width: 767px) {
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
+ border-color: #080808;
+ }
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
+ color: #999999;
+ }
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #ffffff;
+ background-color: transparent;
+ }
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #ffffff;
+ background-color: #080808;
+ }
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .note-editor .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #444444;
+ background-color: transparent;
+ }
+}
+.note-editor .navbar-inverse .navbar-link {
+ color: #999999;
+}
+.note-editor .navbar-inverse .navbar-link:hover {
+ color: #ffffff;
+}
+.note-editor .breadcrumb {
+ padding: 8px 15px;
+ margin-bottom: 20px;
+ list-style: none;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+}
+.note-editor .breadcrumb > li {
+ display: inline-block;
+}
+.note-editor .breadcrumb > li + li:before {
+ content: "/\00a0";
+ padding: 0 5px;
+ color: #cccccc;
+}
+.note-editor .breadcrumb > .active {
+ color: #999999;
+}
+.note-editor .pagination {
+ display: inline-block;
+ padding-left: 0;
+ margin: 20px 0;
+ border-radius: 4px;
+}
+.note-editor .pagination > li {
+ display: inline;
+}
+.note-editor .pagination > li > a,
+.note-editor .pagination > li > span {
+ position: relative;
+ float: left;
+ padding: 6px 12px;
+ line-height: 1.428571429;
+ text-decoration: none;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ margin-left: -1px;
+}
+.note-editor .pagination > li:first-child > a,
+.note-editor .pagination > li:first-child > span {
+ margin-left: 0;
+ border-bottom-left-radius: 4px;
+ border-top-left-radius: 4px;
+}
+.note-editor .pagination > li:last-child > a,
+.note-editor .pagination > li:last-child > span {
+ border-bottom-right-radius: 4px;
+ border-top-right-radius: 4px;
+}
+.note-editor .pagination > li > a:hover,
+.note-editor .pagination > li > span:hover,
+.note-editor .pagination > li > a:focus,
+.note-editor .pagination > li > span:focus {
+ background-color: #eeeeee;
+}
+.note-editor .pagination > .active > a,
+.note-editor .pagination > .active > span,
+.note-editor .pagination > .active > a:hover,
+.note-editor .pagination > .active > span:hover,
+.note-editor .pagination > .active > a:focus,
+.note-editor .pagination > .active > span:focus {
+ z-index: 2;
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #428bca;
+ cursor: default;
+}
+.note-editor .pagination > .disabled > span,
+.note-editor .pagination > .disabled > span:hover,
+.note-editor .pagination > .disabled > span:focus,
+.note-editor .pagination > .disabled > a,
+.note-editor .pagination > .disabled > a:hover,
+.note-editor .pagination > .disabled > a:focus {
+ color: #999999;
+ background-color: #ffffff;
+ border-color: #dddddd;
+ cursor: not-allowed;
+}
+.note-editor .pagination-lg > li > a,
+.note-editor .pagination-lg > li > span {
+ padding: 10px 16px;
+ font-size: 18px;
+}
+.note-editor .pagination-lg > li:first-child > a,
+.note-editor .pagination-lg > li:first-child > span {
+ border-bottom-left-radius: 6px;
+ border-top-left-radius: 6px;
+}
+.note-editor .pagination-lg > li:last-child > a,
+.note-editor .pagination-lg > li:last-child > span {
+ border-bottom-right-radius: 6px;
+ border-top-right-radius: 6px;
+}
+.note-editor .pagination-sm > li > a,
+.note-editor .pagination-sm > li > span {
+ padding: 5px 10px;
+ font-size: 12px;
+}
+.note-editor .pagination-sm > li:first-child > a,
+.note-editor .pagination-sm > li:first-child > span {
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px;
+}
+.note-editor .pagination-sm > li:last-child > a,
+.note-editor .pagination-sm > li:last-child > span {
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.note-editor .pager {
+ padding-left: 0;
+ margin: 20px 0;
+ list-style: none;
+ text-align: center;
+}
+.note-editor .pager:before,
+.note-editor .pager:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .pager:after {
+ clear: both;
+}
+.note-editor .pager:before,
+.note-editor .pager:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .pager:after {
+ clear: both;
+}
+.note-editor .pager li {
+ display: inline;
+}
+.note-editor .pager li > a,
+.note-editor .pager li > span {
+ display: inline-block;
+ padding: 5px 14px;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-radius: 15px;
+}
+.note-editor .pager li > a:hover,
+.note-editor .pager li > a:focus {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+.note-editor .pager .next > a,
+.note-editor .pager .next > span {
+ float: right;
+}
+.note-editor .pager .previous > a,
+.note-editor .pager .previous > span {
+ float: left;
+}
+.note-editor .pager .disabled > a,
+.note-editor .pager .disabled > a:hover,
+.note-editor .pager .disabled > a:focus,
+.note-editor .pager .disabled > span {
+ color: #999999;
+ background-color: #ffffff;
+ cursor: not-allowed;
+}
+.note-editor .label {
+ display: inline;
+ padding: .2em .6em .3em;
+ font-size: 75%;
+ font-weight: bold;
+ line-height: 1;
+ color: #ffffff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ border-radius: .25em;
+}
+.note-editor .label[href]:hover,
+.note-editor .label[href]:focus {
+ color: #ffffff;
+ text-decoration: none;
+ cursor: pointer;
+}
+.note-editor .label:empty {
+ display: none;
+}
+.note-editor .label-default {
+ background-color: #999999;
+}
+.note-editor .label-default[href]:hover,
+.note-editor .label-default[href]:focus {
+ background-color: #808080;
+}
+.note-editor .label-primary {
+ background-color: #428bca;
+}
+.note-editor .label-primary[href]:hover,
+.note-editor .label-primary[href]:focus {
+ background-color: #3071a9;
+}
+.note-editor .label-success {
+ background-color: #5cb85c;
+}
+.note-editor .label-success[href]:hover,
+.note-editor .label-success[href]:focus {
+ background-color: #449d44;
+}
+.note-editor .label-info {
+ background-color: #5bc0de;
+}
+.note-editor .label-info[href]:hover,
+.note-editor .label-info[href]:focus {
+ background-color: #31b0d5;
+}
+.note-editor .label-warning {
+ background-color: #f0ad4e;
+}
+.note-editor .label-warning[href]:hover,
+.note-editor .label-warning[href]:focus {
+ background-color: #ec971f;
+}
+.note-editor .label-danger {
+ background-color: #d9534f;
+}
+.note-editor .label-danger[href]:hover,
+.note-editor .label-danger[href]:focus {
+ background-color: #c9302c;
+}
+.note-editor .badge {
+ display: inline-block;
+ min-width: 10px;
+ padding: 3px 7px;
+ font-size: 12px;
+ font-weight: bold;
+ color: #ffffff;
+ line-height: 1;
+ vertical-align: baseline;
+ white-space: nowrap;
+ text-align: center;
+ background-color: #999999;
+ border-radius: 10px;
+}
+.note-editor .badge:empty {
+ display: none;
+}
+.note-editor a.badge:hover,
+.note-editor a.badge:focus {
+ color: #ffffff;
+ text-decoration: none;
+ cursor: pointer;
+}
+.note-editor .btn .badge {
+ position: relative;
+ top: -1px;
+}
+.note-editor a.list-group-item.active > .badge,
+.note-editor .nav-pills > .active > a > .badge {
+ color: #428bca;
+ background-color: #ffffff;
+}
+.note-editor .nav-pills > li > a > .badge {
+ margin-left: 3px;
+}
+.note-editor .jumbotron {
+ padding: 30px;
+ margin-bottom: 30px;
+ font-size: 21px;
+ font-weight: 200;
+ line-height: 2.1428571435;
+ color: inherit;
+ background-color: #eeeeee;
+}
+.note-editor .jumbotron h1 {
+ line-height: 1;
+ color: inherit;
+}
+.note-editor .jumbotron p {
+ line-height: 1.4;
+}
+.container .note-editor .jumbotron {
+ border-radius: 6px;
+}
+@media screen and (min-width: 768px) {
+ .note-editor .jumbotron {
+ padding-top: 48px;
+ padding-bottom: 48px;
+ }
+ .container .note-editor .jumbotron {
+ padding-left: 60px;
+ padding-right: 60px;
+ }
+ .note-editor .jumbotron h1 {
+ font-size: 63px;
+ }
+}
+.note-editor .thumbnail {
+ padding: 4px;
+ line-height: 1.428571429;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-radius: 4px;
+ -webkit-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+ display: inline-block;
+ max-width: 100%;
+ height: auto;
+ display: block;
+ margin-bottom: 20px;
+}
+.note-editor .thumbnail > img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+}
+.note-editor a.thumbnail:hover,
+.note-editor a.thumbnail:focus,
+.note-editor a.thumbnail.active {
+ border-color: #428bca;
+}
+.note-editor .thumbnail > img {
+ margin-left: auto;
+ margin-right: auto;
+}
+.note-editor .thumbnail .caption {
+ padding: 9px;
+ color: #333333;
+}
+.note-editor .alert {
+ padding: 15px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.note-editor .alert h4 {
+ margin-top: 0;
+ color: inherit;
+}
+.note-editor .alert .alert-link {
+ font-weight: bold;
+}
+.note-editor .alert > p,
+.note-editor .alert > ul {
+ margin-bottom: 0;
+}
+.note-editor .alert > p + p {
+ margin-top: 5px;
+}
+.note-editor .alert-dismissable {
+ padding-right: 35px;
+}
+.note-editor .alert-dismissable .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ color: inherit;
+}
+.note-editor .alert-success {
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+ color: #468847;
+}
+.note-editor .alert-success hr {
+ border-top-color: #c9e2b3;
+}
+.note-editor .alert-success .alert-link {
+ color: #356635;
+}
+.note-editor .alert-info {
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+ color: #3a87ad;
+}
+.note-editor .alert-info hr {
+ border-top-color: #a6e1ec;
+}
+.note-editor .alert-info .alert-link {
+ color: #2d6987;
+}
+.note-editor .alert-warning {
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+ color: #c09853;
+}
+.note-editor .alert-warning hr {
+ border-top-color: #f7e1b5;
+}
+.note-editor .alert-warning .alert-link {
+ color: #a47e3c;
+}
+.note-editor .alert-danger {
+ background-color: #f2dede;
+ border-color: #ebccd1;
+ color: #b94a48;
+}
+.note-editor .alert-danger hr {
+ border-top-color: #e4b9c0;
+}
+.note-editor .alert-danger .alert-link {
+ color: #953b39;
+}
+@-webkit-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+@-moz-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+@-o-keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+@keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+.note-editor .progress {
+ overflow: hidden;
+ height: 20px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+}
+.note-editor .progress-bar {
+ float: left;
+ width: 0%;
+ height: 100%;
+ font-size: 12px;
+ line-height: 20px;
+ color: #ffffff;
+ text-align: center;
+ background-color: #428bca;
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ -webkit-transition: width 0.6s ease;
+ transition: width 0.6s ease;
+}
+.note-editor .progress-striped .progress-bar {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-size: 40px 40px;
+}
+.note-editor .progress.active .progress-bar {
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
+ -moz-animation: progress-bar-stripes 2s linear infinite;
+ -ms-animation: progress-bar-stripes 2s linear infinite;
+ -o-animation: progress-bar-stripes 2s linear infinite;
+ animation: progress-bar-stripes 2s linear infinite;
+}
+.note-editor .progress-bar-success {
+ background-color: #5cb85c;
+}
+.progress-striped .note-editor .progress-bar-success {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.note-editor .progress-bar-info {
+ background-color: #5bc0de;
+}
+.progress-striped .note-editor .progress-bar-info {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.note-editor .progress-bar-warning {
+ background-color: #f0ad4e;
+}
+.progress-striped .note-editor .progress-bar-warning {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.note-editor .progress-bar-danger {
+ background-color: #d9534f;
+}
+.progress-striped .note-editor .progress-bar-danger {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.note-editor .media,
+.note-editor .media-body {
+ overflow: hidden;
+ zoom: 1;
+}
+.note-editor .media,
+.note-editor .media .media {
+ margin-top: 15px;
+}
+.note-editor .media:first-child {
+ margin-top: 0;
+}
+.note-editor .media-object {
+ display: block;
+}
+.note-editor .media-heading {
+ margin: 0 0 5px;
+}
+.note-editor .media > .pull-left {
+ margin-right: 10px;
+}
+.note-editor .media > .pull-right {
+ margin-left: 10px;
+}
+.note-editor .media-list {
+ padding-left: 0;
+ list-style: none;
+}
+.note-editor .list-group {
+ margin-bottom: 20px;
+ padding-left: 0;
+}
+.note-editor .list-group-item {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+ margin-bottom: -1px;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+}
+.note-editor .list-group-item:first-child {
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+}
+.note-editor .list-group-item:last-child {
+ margin-bottom: 0;
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+.note-editor .list-group-item > .badge {
+ float: right;
+}
+.note-editor .list-group-item > .badge + .badge {
+ margin-right: 5px;
+}
+.note-editor a.list-group-item {
+ color: #555555;
+}
+.note-editor a.list-group-item .list-group-item-heading {
+ color: #333333;
+}
+.note-editor a.list-group-item:hover,
+.note-editor a.list-group-item:focus {
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+.note-editor a.list-group-item.active,
+.note-editor a.list-group-item.active:hover,
+.note-editor a.list-group-item.active:focus {
+ z-index: 2;
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+.note-editor a.list-group-item.active .list-group-item-heading,
+.note-editor a.list-group-item.active:hover .list-group-item-heading,
+.note-editor a.list-group-item.active:focus .list-group-item-heading {
+ color: inherit;
+}
+.note-editor a.list-group-item.active .list-group-item-text,
+.note-editor a.list-group-item.active:hover .list-group-item-text,
+.note-editor a.list-group-item.active:focus .list-group-item-text {
+ color: #e1edf7;
+}
+.note-editor .list-group-item-heading {
+ margin-top: 0;
+ margin-bottom: 5px;
+}
+.note-editor .list-group-item-text {
+ margin-bottom: 0;
+ line-height: 1.3;
+}
+.note-editor .panel {
+ margin-bottom: 20px;
+ background-color: #ffffff;
+ border: 1px solid transparent;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.note-editor .panel-body {
+ padding: 15px;
+}
+.note-editor .panel-body:before,
+.note-editor .panel-body:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .panel-body:after {
+ clear: both;
+}
+.note-editor .panel-body:before,
+.note-editor .panel-body:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.note-editor .panel-body:after {
+ clear: both;
+}
+.note-editor .panel > .list-group {
+ margin-bottom: 0;
+}
+.note-editor .panel > .list-group .list-group-item {
+ border-width: 1px 0;
+}
+.note-editor .panel > .list-group .list-group-item:first-child {
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+.note-editor .panel > .list-group .list-group-item:last-child {
+ border-bottom: 0;
+}
+.note-editor .panel-heading + .list-group .list-group-item:first-child {
+ border-top-width: 0;
+}
+.note-editor .panel > .table,
+.note-editor .panel > .table-responsive {
+ margin-bottom: 0;
+}
+.note-editor .panel > .panel-body + .table,
+.note-editor .panel > .panel-body + .table-responsive {
+ border-top: 1px solid #dddddd;
+}
+.note-editor .panel > .table-bordered,
+.note-editor .panel > .table-responsive > .table-bordered {
+ border: 0;
+}
+.note-editor .panel > .table-bordered > thead > tr > th:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
+.note-editor .panel > .table-bordered > tbody > tr > th:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
+.note-editor .panel > .table-bordered > tfoot > tr > th:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+.note-editor .panel > .table-bordered > thead > tr > td:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
+.note-editor .panel > .table-bordered > tbody > tr > td:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
+.note-editor .panel > .table-bordered > tfoot > tr > td:first-child,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+}
+.note-editor .panel > .table-bordered > thead > tr > th:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
+.note-editor .panel > .table-bordered > tbody > tr > th:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
+.note-editor .panel > .table-bordered > tfoot > tr > th:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+.note-editor .panel > .table-bordered > thead > tr > td:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
+.note-editor .panel > .table-bordered > tbody > tr > td:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
+.note-editor .panel > .table-bordered > tfoot > tr > td:last-child,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+}
+.note-editor .panel > .table-bordered > thead > tr:last-child > th,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr:last-child > th,
+.note-editor .panel > .table-bordered > tbody > tr:last-child > th,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
+.note-editor .panel > .table-bordered > tfoot > tr:last-child > th,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+.note-editor .panel > .table-bordered > thead > tr:last-child > td,
+.note-editor .panel > .table-responsive > .table-bordered > thead > tr:last-child > td,
+.note-editor .panel > .table-bordered > tbody > tr:last-child > td,
+.note-editor .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
+.note-editor .panel > .table-bordered > tfoot > tr:last-child > td,
+.note-editor .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+}
+.note-editor .panel-heading {
+ padding: 10px 15px;
+ border-bottom: 1px solid transparent;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+}
+.note-editor .panel-title {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: 16px;
+}
+.note-editor .panel-title > a {
+ color: inherit;
+}
+.note-editor .panel-footer {
+ padding: 10px 15px;
+ background-color: #f5f5f5;
+ border-top: 1px solid #dddddd;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.note-editor .panel-group .panel {
+ margin-bottom: 0;
+ border-radius: 4px;
+ overflow: hidden;
+}
+.note-editor .panel-group .panel + .panel {
+ margin-top: 5px;
+}
+.note-editor .panel-group .panel-heading {
+ border-bottom: 0;
+}
+.note-editor .panel-group .panel-heading + .panel-collapse .panel-body {
+ border-top: 1px solid #dddddd;
+}
+.note-editor .panel-group .panel-footer {
+ border-top: 0;
+}
+.note-editor .panel-group .panel-footer + .panel-collapse .panel-body {
+ border-bottom: 1px solid #dddddd;
+}
+.note-editor .panel-default {
+ border-color: #dddddd;
+}
+.note-editor .panel-default > .panel-heading {
+ color: #333333;
+ background-color: #f5f5f5;
+ border-color: #dddddd;
+}
+.note-editor .panel-default > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #dddddd;
+}
+.note-editor .panel-default > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #dddddd;
+}
+.note-editor .panel-primary {
+ border-color: #428bca;
+}
+.note-editor .panel-primary > .panel-heading {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+.note-editor .panel-primary > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #428bca;
+}
+.note-editor .panel-primary > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #428bca;
+}
+.note-editor .panel-success {
+ border-color: #d6e9c6;
+}
+.note-editor .panel-success > .panel-heading {
+ color: #468847;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.note-editor .panel-success > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #d6e9c6;
+}
+.note-editor .panel-success > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #d6e9c6;
+}
+.note-editor .panel-warning {
+ border-color: #faebcc;
+}
+.note-editor .panel-warning > .panel-heading {
+ color: #c09853;
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+}
+.note-editor .panel-warning > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #faebcc;
+}
+.note-editor .panel-warning > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #faebcc;
+}
+.note-editor .panel-danger {
+ border-color: #ebccd1;
+}
+.note-editor .panel-danger > .panel-heading {
+ color: #b94a48;
+ background-color: #f2dede;
+ border-color: #ebccd1;
+}
+.note-editor .panel-danger > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #ebccd1;
+}
+.note-editor .panel-danger > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #ebccd1;
+}
+.note-editor .panel-info {
+ border-color: #bce8f1;
+}
+.note-editor .panel-info > .panel-heading {
+ color: #3a87ad;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+.note-editor .panel-info > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #bce8f1;
+}
+.note-editor .panel-info > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #bce8f1;
+}
+.note-editor .well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #e3e3e3;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.note-editor .well blockquote {
+ border-color: #ddd;
+ border-color: rgba(0, 0, 0, 0.15);
+}
+.note-editor .well-lg {
+ padding: 24px;
+ border-radius: 6px;
+}
+.note-editor .well-sm {
+ padding: 9px;
+ border-radius: 3px;
+}
+.note-editor .close {
+ float: right;
+ font-size: 21px;
+ font-weight: bold;
+ line-height: 1;
+ color: #000000;
+ text-shadow: 0 1px 0 #ffffff;
+ opacity: 0.2;
+ filter: alpha(opacity=20);
+}
+.note-editor .close:hover,
+.note-editor .close:focus {
+ color: #000000;
+ text-decoration: none;
+ cursor: pointer;
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+}
+button.note-editor .close {
+ padding: 0;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+ -webkit-appearance: none;
+}
+.modal-open {
+ overflow: hidden;
+}
+.modal {
+ display: none;
+ overflow: auto;
+ overflow-y: scroll;
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1040;
+}
+.modal.fade .modal-dialog {
+ -webkit-transform: translate(0, -25%);
+ -ms-transform: translate(0, -25%);
+ transform: translate(0, -25%);
+ -webkit-transition: -webkit-transform 0.3s ease-out;
+ -moz-transition: -moz-transform 0.3s ease-out;
+ -o-transition: -o-transform 0.3s ease-out;
+ transition: transform 0.3s ease-out;
+}
+.modal.in .modal-dialog {
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ transform: translate(0, 0);
+}
+.modal-dialog {
+ margin-left: auto;
+ margin-right: auto;
+ width: auto;
+ padding: 10px;
+ z-index: 1050;
+}
+.modal-content {
+ position: relative;
+ background-color: #ffffff;
+ border: 1px solid #999999;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 6px;
+ -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+ background-clip: padding-box;
+ outline: none;
+}
+.modal-backdrop {
+ position: static;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1030;
+ background-color: #000000;
+}
+.modal-backdrop.fade {
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.modal-backdrop.in {
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+}
+.modal-header {
+ padding: 15px;
+ border-bottom: 1px solid #e5e5e5;
+ min-height: 16.428571429px;
+}
+.modal-header .close {
+ margin-top: -2px;
+}
+.modal-title {
+ margin: 0;
+ line-height: 1.428571429;
+}
+.modal-body {
+ position: relative;
+ padding: 20px;
+}
+.modal-footer {
+ margin-top: 15px;
+ padding: 19px 20px 20px;
+ text-align: right;
+ border-top: 1px solid #e5e5e5;
+}
+.modal-footer:before,
+.modal-footer:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.modal-footer:after {
+ clear: both;
+}
+.modal-footer:before,
+.modal-footer:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.modal-footer:after {
+ clear: both;
+}
+.modal-footer .btn + .btn {
+ margin-left: 5px;
+ margin-bottom: 0;
+}
+.modal-footer .btn-group .btn + .btn {
+ margin-left: -1px;
+}
+.modal-footer .btn-block + .btn-block {
+ margin-left: 0;
+}
+@media screen and (min-width: 768px) {
+ .modal-dialog {
+ width: 600px;
+ padding-top: 30px;
+ padding-bottom: 30px;
+ }
+ .modal-content {
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+ }
+}
+.tooltip {
+ position: absolute;
+ z-index: 1030;
+ display: block;
+ visibility: visible;
+ font-size: 12px;
+ line-height: 1.4;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.tooltip.in {
+ opacity: 0.9;
+ filter: alpha(opacity=90);
+}
+.tooltip.top {
+ margin-top: -3px;
+ padding: 5px 0;
+}
+.tooltip.right {
+ margin-left: 3px;
+ padding: 0 5px;
+}
+.tooltip.bottom {
+ margin-top: 3px;
+ padding: 5px 0;
+}
+.tooltip.left {
+ margin-left: -3px;
+ padding: 0 5px;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #ffffff;
+ text-align: center;
+ text-decoration: none;
+ background-color: #000000;
+ border-radius: 4px;
+}
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000000;
+}
+.tooltip.top-left .tooltip-arrow {
+ bottom: 0;
+ left: 5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000000;
+}
+.tooltip.top-right .tooltip-arrow {
+ bottom: 0;
+ right: 5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-width: 5px 5px 5px 0;
+ border-right-color: #000000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-width: 5px 0 5px 5px;
+ border-left-color: #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000000;
+}
+.tooltip.bottom-left .tooltip-arrow {
+ top: 0;
+ left: 5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000000;
+}
+.tooltip.bottom-right .tooltip-arrow {
+ top: 0;
+ right: 5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000000;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ max-width: 276px;
+ padding: 1px;
+ text-align: left;
+ background-color: #ffffff;
+ background-clip: padding-box;
+ border: 1px solid #cccccc;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 6px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ white-space: normal;
+}
+.popover.top {
+ margin-top: -10px;
+}
+.popover.right {
+ margin-left: 10px;
+}
+.popover.bottom {
+ margin-top: 10px;
+}
+.popover.left {
+ margin-left: -10px;
+}
+.popover-title {
+ margin: 0;
+ padding: 8px 14px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 18px;
+ background-color: #f7f7f7;
+ border-bottom: 1px solid #ebebeb;
+ border-radius: 5px 5px 0 0;
+}
+.popover-content {
+ padding: 9px 14px;
+}
+.popover .arrow,
+.popover .arrow:after {
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+.popover .arrow {
+ border-width: 11px;
+}
+.popover .arrow:after {
+ border-width: 10px;
+ content: "";
+}
+.popover.top .arrow {
+ left: 50%;
+ margin-left: -11px;
+ border-bottom-width: 0;
+ border-top-color: #999999;
+ border-top-color: rgba(0, 0, 0, 0.25);
+ bottom: -11px;
+}
+.popover.top .arrow:after {
+ content: " ";
+ bottom: 1px;
+ margin-left: -10px;
+ border-bottom-width: 0;
+ border-top-color: #ffffff;
+}
+.popover.right .arrow {
+ top: 50%;
+ left: -11px;
+ margin-top: -11px;
+ border-left-width: 0;
+ border-right-color: #999999;
+ border-right-color: rgba(0, 0, 0, 0.25);
+}
+.popover.right .arrow:after {
+ content: " ";
+ left: 1px;
+ bottom: -10px;
+ border-left-width: 0;
+ border-right-color: #ffffff;
+}
+.popover.bottom .arrow {
+ left: 50%;
+ margin-left: -11px;
+ border-top-width: 0;
+ border-bottom-color: #999999;
+ border-bottom-color: rgba(0, 0, 0, 0.25);
+ top: -11px;
+}
+.popover.bottom .arrow:after {
+ content: " ";
+ top: 1px;
+ margin-left: -10px;
+ border-top-width: 0;
+ border-bottom-color: #ffffff;
+}
+.popover.left .arrow {
+ top: 50%;
+ right: -11px;
+ margin-top: -11px;
+ border-right-width: 0;
+ border-left-color: #999999;
+ border-left-color: rgba(0, 0, 0, 0.25);
+}
+.popover.left .arrow:after {
+ content: " ";
+ right: 1px;
+ border-right-width: 0;
+ border-left-color: #ffffff;
+ bottom: -10px;
+}
+.carousel {
+ position: relative;
+}
+.carousel-inner {
+ position: relative;
+ overflow: hidden;
+ width: 100%;
+}
+.carousel-inner > .item {
+ display: none;
+ position: relative;
+ -webkit-transition: 0.6s ease-in-out left;
+ transition: 0.6s ease-in-out left;
+}
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+ line-height: 1;
+}
+.carousel-inner > .active,
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ display: block;
+}
+.carousel-inner > .active {
+ left: 0;
+}
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+.carousel-inner > .next {
+ left: 100%;
+}
+.carousel-inner > .prev {
+ left: -100%;
+}
+.carousel-inner > .next.left,
+.carousel-inner > .prev.right {
+ left: 0;
+}
+.carousel-inner > .active.left {
+ left: -100%;
+}
+.carousel-inner > .active.right {
+ left: 100%;
+}
+.carousel-control {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ width: 15%;
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+ font-size: 20px;
+ color: #ffffff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+}
+.carousel-control.left {
+ background-image: -webkit-gradient(linear, 0% top, 100% top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.0001)));
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0%), color-stop(rgba(0, 0, 0, 0.0001) 100%));
+ background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
+}
+.carousel-control.right {
+ left: auto;
+ right: 0;
+ background-image: -webkit-gradient(linear, 0% top, 100% top, from(rgba(0, 0, 0, 0.0001)), to(rgba(0, 0, 0, 0.5)));
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0%), color-stop(rgba(0, 0, 0, 0.5) 100%));
+ background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
+}
+.carousel-control:hover,
+.carousel-control:focus {
+ color: #ffffff;
+ text-decoration: none;
+ opacity: 0.9;
+ filter: alpha(opacity=90);
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-left,
+.carousel-control .glyphicon-chevron-right {
+ position: absolute;
+ top: 50%;
+ z-index: 5;
+ display: inline-block;
+}
+.carousel-control .icon-prev,
+.carousel-control .glyphicon-chevron-left {
+ left: 50%;
+}
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-right {
+ right: 50%;
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next {
+ width: 20px;
+ height: 20px;
+ margin-top: -10px;
+ margin-left: -10px;
+ font-family: serif;
+}
+.carousel-control .icon-prev:before {
+ content: '\2039';
+}
+.carousel-control .icon-next:before {
+ content: '\203a';
+}
+.carousel-indicators {
+ position: absolute;
+ bottom: 10px;
+ left: 50%;
+ z-index: 15;
+ width: 60%;
+ margin-left: -30%;
+ padding-left: 0;
+ list-style: none;
+ text-align: center;
+}
+.carousel-indicators li {
+ display: inline-block;
+ width: 10px;
+ height: 10px;
+ margin: 1px;
+ text-indent: -999px;
+ border: 1px solid #ffffff;
+ border-radius: 10px;
+ cursor: pointer;
+}
+.carousel-indicators .active {
+ margin: 0;
+ width: 12px;
+ height: 12px;
+ background-color: #ffffff;
+}
+.carousel-caption {
+ position: absolute;
+ left: 15%;
+ right: 15%;
+ bottom: 20px;
+ z-index: 10;
+ padding-top: 20px;
+ padding-bottom: 20px;
+ color: #ffffff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+}
+.carousel-caption .btn {
+ text-shadow: none;
+}
+@media screen and (min-width: 768px) {
+ .carousel-control .glyphicons-chevron-left,
+ .carousel-control .glyphicons-chevron-right,
+ .carousel-control .icon-prev,
+ .carousel-control .icon-next {
+ width: 30px;
+ height: 30px;
+ margin-top: -15px;
+ margin-left: -15px;
+ font-size: 30px;
+ }
+ .carousel-caption {
+ left: 20%;
+ right: 20%;
+ padding-bottom: 30px;
+ }
+ .carousel-indicators {
+ bottom: 20px;
+ }
+}
+.clearfix:before,
+.clearfix:after {
+ content: " ";
+ /* 1 */
+
+ display: table;
+ /* 2 */
+
+}
+.clearfix:after {
+ clear: both;
+}
+.center-block {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+.pull-right {
+ float: right !important;
+}
+.pull-left {
+ float: left !important;
+}
+.hide {
+ display: none !important;
+}
+.show {
+ display: block !important;
+}
+.invisible {
+ visibility: hidden;
+}
+.text-hide {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
+}
+.hidden {
+ display: none !important;
+ visibility: hidden !important;
+}
+.affix {
+ position: fixed;
+}
+@-ms-viewport {
+ width: device-width;
+}
+.visible-xs,
+tr.visible-xs,
+th.visible-xs,
+td.visible-xs {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-xs {
+ display: block !important;
+ }
+ tr.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-xs,
+ td.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-xs.visible-sm {
+ display: block !important;
+ }
+ tr.visible-xs.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-xs.visible-sm,
+ td.visible-xs.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-xs.visible-md {
+ display: block !important;
+ }
+ tr.visible-xs.visible-md {
+ display: table-row !important;
+ }
+ th.visible-xs.visible-md,
+ td.visible-xs.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-xs.visible-lg {
+ display: block !important;
+ }
+ tr.visible-xs.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-xs.visible-lg,
+ td.visible-xs.visible-lg {
+ display: table-cell !important;
+ }
+}
+.visible-sm,
+tr.visible-sm,
+th.visible-sm,
+td.visible-sm {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-sm.visible-xs {
+ display: block !important;
+ }
+ tr.visible-sm.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-sm.visible-xs,
+ td.visible-sm.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-sm {
+ display: block !important;
+ }
+ tr.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-sm,
+ td.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-sm.visible-md {
+ display: block !important;
+ }
+ tr.visible-sm.visible-md {
+ display: table-row !important;
+ }
+ th.visible-sm.visible-md,
+ td.visible-sm.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-sm.visible-lg {
+ display: block !important;
+ }
+ tr.visible-sm.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-sm.visible-lg,
+ td.visible-sm.visible-lg {
+ display: table-cell !important;
+ }
+}
+.visible-md,
+tr.visible-md,
+th.visible-md,
+td.visible-md {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-md.visible-xs {
+ display: block !important;
+ }
+ tr.visible-md.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-md.visible-xs,
+ td.visible-md.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-md.visible-sm {
+ display: block !important;
+ }
+ tr.visible-md.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-md.visible-sm,
+ td.visible-md.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-md {
+ display: block !important;
+ }
+ tr.visible-md {
+ display: table-row !important;
+ }
+ th.visible-md,
+ td.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-md.visible-lg {
+ display: block !important;
+ }
+ tr.visible-md.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-md.visible-lg,
+ td.visible-md.visible-lg {
+ display: table-cell !important;
+ }
+}
+.visible-lg,
+tr.visible-lg,
+th.visible-lg,
+td.visible-lg {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-lg.visible-xs {
+ display: block !important;
+ }
+ tr.visible-lg.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-lg.visible-xs,
+ td.visible-lg.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-lg.visible-sm {
+ display: block !important;
+ }
+ tr.visible-lg.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-lg.visible-sm,
+ td.visible-lg.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-lg.visible-md {
+ display: block !important;
+ }
+ tr.visible-lg.visible-md {
+ display: table-row !important;
+ }
+ th.visible-lg.visible-md,
+ td.visible-lg.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-lg {
+ display: block !important;
+ }
+ tr.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-lg,
+ td.visible-lg {
+ display: table-cell !important;
+ }
+}
+.hidden-xs {
+ display: block !important;
+}
+tr.hidden-xs {
+ display: table-row !important;
+}
+th.hidden-xs,
+td.hidden-xs {
+ display: table-cell !important;
+}
+@media (max-width: 767px) {
+ .hidden-xs,
+ tr.hidden-xs,
+ th.hidden-xs,
+ td.hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-xs.hidden-sm,
+ tr.hidden-xs.hidden-sm,
+ th.hidden-xs.hidden-sm,
+ td.hidden-xs.hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-xs.hidden-md,
+ tr.hidden-xs.hidden-md,
+ th.hidden-xs.hidden-md,
+ td.hidden-xs.hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-xs.hidden-lg,
+ tr.hidden-xs.hidden-lg,
+ th.hidden-xs.hidden-lg,
+ td.hidden-xs.hidden-lg {
+ display: none !important;
+ }
+}
+.hidden-sm {
+ display: block !important;
+}
+tr.hidden-sm {
+ display: table-row !important;
+}
+th.hidden-sm,
+td.hidden-sm {
+ display: table-cell !important;
+}
+@media (max-width: 767px) {
+ .hidden-sm.hidden-xs,
+ tr.hidden-sm.hidden-xs,
+ th.hidden-sm.hidden-xs,
+ td.hidden-sm.hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-sm,
+ tr.hidden-sm,
+ th.hidden-sm,
+ td.hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-sm.hidden-md,
+ tr.hidden-sm.hidden-md,
+ th.hidden-sm.hidden-md,
+ td.hidden-sm.hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-sm.hidden-lg,
+ tr.hidden-sm.hidden-lg,
+ th.hidden-sm.hidden-lg,
+ td.hidden-sm.hidden-lg {
+ display: none !important;
+ }
+}
+.hidden-md {
+ display: block !important;
+}
+tr.hidden-md {
+ display: table-row !important;
+}
+th.hidden-md,
+td.hidden-md {
+ display: table-cell !important;
+}
+@media (max-width: 767px) {
+ .hidden-md.hidden-xs,
+ tr.hidden-md.hidden-xs,
+ th.hidden-md.hidden-xs,
+ td.hidden-md.hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-md.hidden-sm,
+ tr.hidden-md.hidden-sm,
+ th.hidden-md.hidden-sm,
+ td.hidden-md.hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-md,
+ tr.hidden-md,
+ th.hidden-md,
+ td.hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-md.hidden-lg,
+ tr.hidden-md.hidden-lg,
+ th.hidden-md.hidden-lg,
+ td.hidden-md.hidden-lg {
+ display: none !important;
+ }
+}
+.hidden-lg {
+ display: block !important;
+}
+tr.hidden-lg {
+ display: table-row !important;
+}
+th.hidden-lg,
+td.hidden-lg {
+ display: table-cell !important;
+}
+@media (max-width: 767px) {
+ .hidden-lg.hidden-xs,
+ tr.hidden-lg.hidden-xs,
+ th.hidden-lg.hidden-xs,
+ td.hidden-lg.hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-lg.hidden-sm,
+ tr.hidden-lg.hidden-sm,
+ th.hidden-lg.hidden-sm,
+ td.hidden-lg.hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-lg.hidden-md,
+ tr.hidden-lg.hidden-md,
+ th.hidden-lg.hidden-md,
+ td.hidden-lg.hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-lg,
+ tr.hidden-lg,
+ th.hidden-lg,
+ td.hidden-lg {
+ display: none !important;
+ }
+}
+.visible-print,
+tr.visible-print,
+th.visible-print,
+td.visible-print {
+ display: none !important;
+}
+@media print {
+ .visible-print {
+ display: block !important;
+ }
+ tr.visible-print {
+ display: table-row !important;
+ }
+ th.visible-print,
+ td.visible-print {
+ display: table-cell !important;
+ }
+ .hidden-print,
+ tr.hidden-print,
+ th.hidden-print,
+ td.hidden-print {
+ display: none !important;
+ }
+}
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-zh-CN.js b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-zh-CN.js
index 05a2553f0..a6945313e 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-zh-CN.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-zh-CN.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
(function ($) {
$.extend($.summernote.lang, {
'zh-CN': {
@@ -101,3 +102,108 @@
}
});
})(jQuery);
+=======
+(function ($) {
+ $.extend($.summernote.lang, {
+ 'zh-CN': {
+ font: {
+ bold: '粗体',
+ italic: '斜体',
+ underline: '下划线',
+ strikethrough: '删除线',
+ clear: '清除格式',
+ height: '行高',
+ name: '字体',
+ size: '字号'
+ },
+ image: {
+ image: '图片',
+ insert: '插入图片',
+ resizeFull: '调整至 100%',
+ resizeHalf: '调整至 50%',
+ resizeQuarter: '调整至 25%',
+ floatLeft: '左浮动',
+ floatRight: '右浮动',
+ floatNone: '不浮动',
+ dragImageHere: '将图片拖至此处',
+ selectFromFiles: '从本地上传',
+ url: '图片地址'
+ },
+ link: {
+ link: '链接',
+ insert: '插入链接',
+ unlink: '去除链接',
+ edit: '编辑链接',
+ textToDisplay: '显示文本',
+ url: '链接地址',
+ openInNewWindow: '在新窗口打开'
+ },
+ video: {
+ video: '视频',
+ videoLink: '视频链接',
+ insert: '插入视频',
+ url: '视频地址',
+ providers: '(优酷, Instagram, DailyMotion, Youtube等)'
+ },
+ table: {
+ table: '表格'
+ },
+ hr: {
+ insert: '水平线'
+ },
+ style: {
+ style: '样式',
+ normal: '普通',
+ blockquote: '引用',
+ pre: '代码',
+ h1: '标题 1',
+ h2: '标题 2',
+ h3: '标题 3',
+ h4: '标题 4',
+ h5: '标题 5',
+ h6: '标题 6'
+ },
+ lists: {
+ unordered: '无序列表',
+ ordered: '有序列表'
+ },
+ options: {
+ help: '帮助',
+ fullscreen: '全屏',
+ codeview: '源代码'
+ },
+ paragraph: {
+ paragraph: '段落',
+ outdent: '减少缩进',
+ indent: '增加缩进',
+ left: '左对齐',
+ center: '居中对齐',
+ right: '右对齐',
+ justify: '两端对齐'
+ },
+ color: {
+ recent: '最近使用',
+ more: '更多',
+ background: '背景',
+ foreground: '前景',
+ transparent: '透明',
+ setTransparent: '透明',
+ reset: '重置',
+ resetToDefault: '默认'
+ },
+ shortcut: {
+ shortcuts: '快捷键',
+ close: '关闭',
+ textFormatting: '文本格式',
+ action: '动作',
+ paragraphFormatting: '段落格式',
+ documentStyle: '文档样式'
+ },
+ history: {
+ undo: '撤销',
+ redo: '重做'
+ }
+ }
+ });
+})(jQuery);
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-zh-CN.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-zh-CN.min.js
index d2fd03d06..7fbdddcf4 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-zh-CN.min.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-zh-CN.min.js
@@ -1,3 +1,8 @@
+<<<<<<< HEAD
/*! Summernote v0.8.8 | (c) 2013- Alan Hong and other contributors | MIT license */
+=======
+/*! Summernote v0.8.8 | (c) 2013- Alan Hong and other contributors | MIT license */
+
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
!function(a){a.extend(a.summernote.lang,{"zh-CN":{font:{bold:"粗体",italic:"斜体",underline:"下划线",clear:"清除格式",height:"行高",name:"字体",strikethrough:"删除线",subscript:"下标",superscript:"上标",size:"字号"},image:{image:"图片",insert:"插入图片",resizeFull:"缩放至 100%",resizeHalf:"缩放至 50%",resizeQuarter:"缩放至 25%",floatLeft:"靠左浮动",floatRight:"靠右浮动",floatNone:"取消浮动",shapeRounded:"形状: 圆角",shapeCircle:"形状: 圆",shapeThumbnail:"形状: 缩略图",shapeNone:"形状: 无",dragImageHere:"将图片拖拽至此处",selectFromFiles:"从本地上传",maximumFileSize:"文件大小最大值",maximumFileSizeError:"文件大小超出最大值。",url:"图片地址",remove:"移除图片"},video:{video:"视频",videoLink:"视频链接",insert:"插入视频",url:"视频地址",providers:"(优酷, 腾讯, Instagram, DailyMotion, Youtube等)"},link:{link:"链接",insert:"插入链接",unlink:"去除链接",edit:"编辑链接",textToDisplay:"显示文本",url:"链接地址",openInNewWindow:"在新窗口打开"},table:{table:"表格"},hr:{insert:"水平线"},style:{style:"样式",p:"普通",blockquote:"引用",pre:"代码",h1:"标题 1",h2:"标题 2",h3:"标题 3",h4:"标题 4",h5:"标题 5",h6:"标题 6"},lists:{unordered:"无序列表",ordered:"有序列表"},options:{help:"帮助",fullscreen:"全屏",codeview:"源代码"},paragraph:{paragraph:"段落",outdent:"减少缩进",indent:"增加缩进",left:"左对齐",center:"居中对齐",right:"右对齐",justify:"两端对齐"},color:{recent:"最近使用",more:"更多",background:"背景",foreground:"前景",transparent:"透明",setTransparent:"透明",reset:"重置",resetToDefault:"默认"},shortcut:{shortcuts:"快捷键",close:"关闭",textFormatting:"文本格式",action:"动作",paragraphFormatting:"段落格式",documentStyle:"文档样式",extraKeys:"额外按键"},history:{undo:"撤销",redo:"重做"},help:{insertParagraph:"插入段落",undo:"撤销",redo:"重做",tab:"增加缩进",untab:"减少缩进",bold:"粗体",italic:"斜体",underline:"下划线",strikethrough:"删除线",removeFormat:"清除格式",justifyLeft:"左对齐",justifyCenter:"居中对齐",justifyRight:"右对齐",justifyFull:"两端对齐",insertUnorderedList:"无序列表",insertOrderedList:"有序列表",outdent:"减少缩进",indent:"增加缩进",formatPara:"设置选中内容样式为 普通",formatH1:"设置选中内容样式为 标题1",formatH2:"设置选中内容样式为 标题2",formatH3:"设置选中内容样式为 标题3",formatH4:"设置选中内容样式为 标题4",formatH5:"设置选中内容样式为 标题5",formatH6:"设置选中内容样式为 标题6",insertHorizontalRule:"插入水平线","linkDialog.show":"显示链接对话框"}}})}(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote.css b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote.css
index 3f050ae2c..d62c4dd5b 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote.css
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
.note-editor {
height: 300px;
}
@@ -444,3 +445,451 @@
.note-editor .note-color-palette div .note-color-btn:hover {
border: 1px solid #000
}
+=======
+.note-editor {
+ height: 300px;
+}
+
+.note-editor .note-dropzone {
+ position: absolute;
+ z-index: 1;
+ display: none;
+ color: #87cefa;
+ background-color: white;
+ border: 2px dashed #87cefa;
+ opacity: .95;
+ pointer-event: none
+}
+
+.note-editor .note-dropzone .note-dropzone-message {
+ display: table-cell;
+ font-size: 28px;
+ font-weight: bold;
+ text-align: center;
+ vertical-align: middle
+}
+
+.note-editor .note-dropzone.hover {
+ color: #098ddf;
+ border: 2px dashed #098ddf
+}
+
+.note-editor.dragover .note-dropzone {
+ display: table
+}
+
+.note-editor.fullscreen {
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 1050;
+ width: 100%
+}
+
+.note-editor.fullscreen .note-editable {
+ background-color: white
+}
+
+.note-editor.fullscreen .note-resizebar {
+ display: none
+}
+
+.note-editor.codeview .note-editable {
+ display: none
+}
+
+.note-editor.codeview .note-codable {
+ display: block
+}
+
+.note-editor .note-toolbar {
+ padding-bottom: 5px;
+ padding-left: 10px;
+ padding-top: 5px;
+ margin: 0;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #E7EAEC
+}
+
+.note-editor .note-toolbar > .btn-group {
+ margin-top: 5px;
+ margin-right: 5px;
+ margin-left: 0
+}
+
+.note-editor .note-toolbar .note-table .dropdown-menu {
+ min-width: 0;
+ padding: 5px
+}
+
+.note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker {
+ font-size: 18px
+}
+
+.note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker .note-dimension-picker-mousecatcher {
+ position: absolute !important;
+ z-index: 3;
+ width: 10em;
+ height: 10em;
+ cursor: pointer
+}
+
+.note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker .note-dimension-picker-unhighlighted {
+ position: relative !important;
+ z-index: 1;
+ width: 5em;
+ height: 5em;
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat
+}
+
+.note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker .note-dimension-picker-highlighted {
+ position: absolute !important;
+ z-index: 2;
+ width: 1em;
+ height: 1em;
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat
+}
+
+.note-editor .note-toolbar .note-style h1, .note-editor .note-toolbar .note-style h2, .note-editor .note-toolbar .note-style h3, .note-editor .note-toolbar .note-style h4, .note-editor .note-toolbar .note-style h5, .note-editor .note-toolbar .note-style h6, .note-editor .note-toolbar .note-style blockquote {
+ margin: 0
+}
+
+.note-editor .note-toolbar .note-color .dropdown-toggle {
+ width: 20px;
+ padding-left: 5px
+}
+
+.note-editor .note-toolbar .note-color .dropdown-menu {
+ min-width: 290px
+}
+
+.note-editor .note-toolbar .note-color .dropdown-menu .btn-group {
+ margin: 0
+}
+
+.note-editor .note-toolbar .note-color .dropdown-menu .btn-group:first-child {
+ margin: 0 5px
+}
+
+.note-editor .note-toolbar .note-color .dropdown-menu .btn-group .note-palette-title {
+ margin: 2px 7px;
+ font-size: 12px;
+ text-align: center;
+ border-bottom: 1px solid #eee
+}
+
+.note-editor .note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset {
+ padding: 0 3px;
+ margin: 5px;
+ font-size: 12px;
+ cursor: pointer;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px
+}
+
+.note-editor .note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset:hover {
+ background: #eee
+}
+
+.note-editor .note-toolbar .note-para .dropdown-menu {
+ min-width: 216px;
+ padding: 5px
+}
+
+.note-editor .note-toolbar .note-para .dropdown-menu > div:first-child {
+ margin-right: 5px
+}
+
+.note-editor .note-statusbar {
+ background-color: #f5f5f5
+}
+
+.note-editor .note-statusbar .note-resizebar {
+ width: 100%;
+ height: 8px;
+ cursor: s-resize;
+ border-top: 1px solid #a9a9a9
+}
+
+.note-editor .note-statusbar .note-resizebar .note-icon-bar {
+ width: 20px;
+ margin: 1px auto;
+ border-top: 1px solid #a9a9a9
+}
+
+.note-editor .note-popover .popover {
+ max-width: none
+}
+
+.note-editor .note-popover .popover .popover-content {
+ padding: 5px
+}
+
+.note-editor .note-popover .popover .popover-content a {
+ display: inline-block;
+ max-width: 200px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ vertical-align: middle
+}
+
+.note-editor .note-popover .popover .popover-content .btn-group + .btn-group {
+ margin-left: 5px
+}
+
+.note-editor .note-popover .popover .arrow {
+ left: 20px
+}
+
+.note-editor .note-handle .note-control-selection {
+ position: absolute;
+ display: none;
+ border: 1px solid black
+}
+
+.note-editor .note-handle .note-control-selection > div {
+ position: absolute
+}
+
+.note-editor .note-handle .note-control-selection .note-control-selection-bg {
+ width: 100%;
+ height: 100%;
+ background-color: black;
+ -webkit-opacity: .3;
+ -khtml-opacity: .3;
+ -moz-opacity: .3;
+ opacity: .3;
+ -ms-filter: alpha(opacity=30);
+ filter: alpha(opacity=30)
+}
+
+.note-editor .note-handle .note-control-selection .note-control-handle {
+ width: 7px;
+ height: 7px;
+ border: 1px solid black
+}
+
+.note-editor .note-handle .note-control-selection .note-control-holder {
+ width: 7px;
+ height: 7px;
+ border: 1px solid black
+}
+
+.note-editor .note-handle .note-control-selection .note-control-sizing {
+ width: 7px;
+ height: 7px;
+ background-color: white;
+ border: 1px solid black
+}
+
+.note-editor .note-handle .note-control-selection .note-control-nw {
+ top: -5px;
+ left: -5px;
+ border-right: 0;
+ border-bottom: 0
+}
+
+.note-editor .note-handle .note-control-selection .note-control-ne {
+ top: -5px;
+ right: -5px;
+ border-bottom: 0;
+ border-left: none
+}
+
+.note-editor .note-handle .note-control-selection .note-control-sw {
+ bottom: -5px;
+ left: -5px;
+ border-top: 0;
+ border-right: 0
+}
+
+.note-editor .note-handle .note-control-selection .note-control-se {
+ right: -5px;
+ bottom: -5px;
+ cursor: se-resize
+}
+
+.note-editor .note-handle .note-control-selection .note-control-selection-info {
+ right: 0;
+ bottom: 0;
+ padding: 5px;
+ margin: 5px;
+ font-size: 12px;
+ color: white;
+ background-color: black;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-opacity: .7;
+ -khtml-opacity: .7;
+ -moz-opacity: .7;
+ opacity: .7;
+ -ms-filter: alpha(opacity=70);
+ filter: alpha(opacity=70)
+}
+
+.note-editor .note-dialog > div {
+ display: none
+}
+
+.note-editor .note-dialog .note-image-dialog .note-dropzone {
+ min-height: 100px;
+ margin-bottom: 10px;
+ font-size: 30px;
+ line-height: 4;
+ color: lightgray;
+ text-align: center;
+ border: 4px dashed lightgray
+}
+
+.note-editor .note-dialog .note-help-dialog {
+ font-size: 12px;
+ color: #ccc;
+ background: transparent;
+ background-color: #222 !important;
+ border: 0;
+ -webkit-opacity: .9;
+ -khtml-opacity: .9;
+ -moz-opacity: .9;
+ opacity: .9;
+ -ms-filter: alpha(opacity=90);
+ filter: alpha(opacity=90)
+}
+
+.note-editor .note-dialog .note-help-dialog .modal-content {
+ background: transparent;
+ border: 1px solid white;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none
+}
+
+.note-editor .note-dialog .note-help-dialog a {
+ font-size: 12px;
+ color: white
+}
+
+.note-editor .note-dialog .note-help-dialog .title {
+ padding-bottom: 5px;
+ font-size: 14px;
+ font-weight: bold;
+ color: white;
+ border-bottom: white 1px solid
+}
+
+.note-editor .note-dialog .note-help-dialog .modal-close {
+ font-size: 14px;
+ color: #dd0;
+ cursor: pointer
+}
+
+.note-editor .note-dialog .note-help-dialog .note-shortcut-layout {
+ width: 100%
+}
+
+.note-editor .note-dialog .note-help-dialog .note-shortcut-layout td {
+ vertical-align: top
+}
+
+.note-editor .note-dialog .note-help-dialog .note-shortcut {
+ margin-top: 8px
+}
+
+.note-editor .note-dialog .note-help-dialog .note-shortcut th {
+ font-size: 13px;
+ color: #dd0;
+ text-align: left
+}
+
+.note-editor .note-dialog .note-help-dialog .note-shortcut td:first-child {
+ min-width: 110px;
+ padding-right: 10px;
+ font-family: "Courier New";
+ color: #dd0;
+ text-align: right
+}
+
+.note-editor .note-editable {
+ padding: 20px;
+ overflow: auto;
+ outline: 0
+}
+
+.note-editor .note-editable[contenteditable="false"] {
+ background-color: #e5e5e5
+}
+
+.note-editor .note-codable {
+ display: none;
+ width: 100%;
+ padding: 10px;
+ margin-bottom: 0;
+ font-family: Menlo, Monaco, monospace, sans-serif;
+ font-size: 14px;
+ color: #ccc;
+ background-color: #222;
+ border: 0;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+ box-shadow: none;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ resize: none
+}
+
+.note-editor .dropdown-menu {
+ min-width: 90px
+}
+
+.note-editor .dropdown-menu.right {
+ right: 0;
+ left: auto
+}
+
+.note-editor .dropdown-menu.right::before {
+ right: 9px;
+ left: auto !important
+}
+
+.note-editor .dropdown-menu.right::after {
+ right: 10px;
+ left: auto !important
+}
+
+.note-editor .dropdown-menu li a i {
+ color: deepskyblue;
+ visibility: hidden
+}
+
+.note-editor .dropdown-menu li a.checked i {
+ visibility: visible
+}
+
+.note-editor .note-fontsize-10 {
+ font-size: 10px
+}
+
+.note-editor .note-color-palette {
+ line-height: 1
+}
+
+.note-editor .note-color-palette div .note-color-btn {
+ width: 17px;
+ height: 17px;
+ padding: 0;
+ margin: 0;
+ border: 1px solid #fff
+}
+
+.note-editor .note-color-palette div .note-color-btn:hover {
+ border: 1px solid #000
+}
+>>>>>>> c404de177361c58256c3fe7ac8124ea9ac7f890d
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote.js b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote.js
index c815e9cbc..0346b4236 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/**
* Super simple wysiwyg editor v0.8.8
* http://summernote.org/
@@ -7985,3 +7986,7992 @@
});
}));
+=======
+/**
+ * Super simple wysiwyg editor v0.8.8
+ * http://summernote.org/
+ *
+ * summernote.js
+ * Copyright 2013- Alan Hong. and other contributors
+ * summernote may be freely distributed under the MIT license./
+ *
+ * Date: 2017-09-09T11:03Z
+ */
+(function (factory) {
+ /* global define */
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // Node/CommonJS
+ module.exports = factory(require('jquery'));
+ } else {
+ // Browser globals
+ factory(window.jQuery);
+ }
+}(function ($) {
+ 'use strict';
+
+ var isSupportAmd = typeof define === 'function' && define.amd;
+
+ /**
+ * returns whether font is installed or not.
+ *
+ * @param {String} fontName
+ * @return {Boolean}
+ */
+ var isFontInstalled = function (fontName) {
+ var testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS';
+ var $tester = $('').css({
+ position: 'absolute',
+ left: '-9999px',
+ top: '-9999px',
+ fontSize: '200px'
+ }).text('mmmmmmmmmwwwwwww').appendTo(document.body);
+
+ var originalWidth = $tester.css('fontFamily', testFontName).width();
+ var width = $tester.css('fontFamily', fontName + ',' + testFontName).width();
+
+ $tester.remove();
+
+ return originalWidth !== width;
+ };
+
+ var userAgent = navigator.userAgent;
+ var isMSIE = /MSIE|Trident/i.test(userAgent);
+ var browserVersion;
+ if (isMSIE) {
+ var matches = /MSIE (\d+[.]\d+)/.exec(userAgent);
+ if (matches) {
+ browserVersion = parseFloat(matches[1]);
+ }
+ matches = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(userAgent);
+ if (matches) {
+ browserVersion = parseFloat(matches[1]);
+ }
+ }
+
+ var isEdge = /Edge\/\d+/.test(userAgent);
+
+ var hasCodeMirror = !!window.CodeMirror;
+ if (!hasCodeMirror && isSupportAmd) {
+ // Webpack
+ if (typeof __webpack_require__ === 'function') { // jshint ignore:line
+ try {
+ // If CodeMirror can't be resolved, `require.resolve` will throw an
+ // exception and `hasCodeMirror` won't be set to `true`.
+ require.resolve('codemirror');
+ hasCodeMirror = true;
+ } catch (e) {
+ // do nothing
+ }
+ } else if (typeof require !== 'undefined') {
+ // Browserify
+ if (typeof require.resolve !== 'undefined') {
+ try {
+ // If CodeMirror can't be resolved, `require.resolve` will throw an
+ // exception and `hasCodeMirror` won't be set to `true`.
+ require.resolve('codemirror');
+ hasCodeMirror = true;
+ } catch (e) {
+ // do nothing
+ }
+ // Almond/Require
+ } else if (typeof require.specified !== 'undefined') {
+ hasCodeMirror = require.specified('codemirror');
+ }
+ }
+ }
+
+ var isSupportTouch =
+ (('ontouchstart' in window) ||
+ (navigator.MaxTouchPoints > 0) ||
+ (navigator.msMaxTouchPoints > 0));
+
+ /**
+ * @class core.agent
+ *
+ * Object which check platform and agent
+ *
+ * @singleton
+ * @alternateClassName agent
+ */
+ var agent = {
+ isMac: navigator.appVersion.indexOf('Mac') > -1,
+ isMSIE: isMSIE,
+ isEdge: isEdge,
+ isFF: !isEdge && /firefox/i.test(userAgent),
+ isPhantom: /PhantomJS/i.test(userAgent),
+ isWebkit: !isEdge && /webkit/i.test(userAgent),
+ isChrome: !isEdge && /chrome/i.test(userAgent),
+ isSafari: !isEdge && /safari/i.test(userAgent),
+ browserVersion: browserVersion,
+ jqueryVersion: parseFloat($.fn.jquery),
+ isSupportAmd: isSupportAmd,
+ isSupportTouch: isSupportTouch,
+ hasCodeMirror: hasCodeMirror,
+ isFontInstalled: isFontInstalled,
+ isW3CRangeSupport: !!document.createRange
+ };
+
+ /**
+ * @class core.func
+ *
+ * func utils (for high-order func's arg)
+ *
+ * @singleton
+ * @alternateClassName func
+ */
+ var func = (function () {
+ var eq = function (itemA) {
+ return function (itemB) {
+ return itemA === itemB;
+ };
+ };
+
+ var eq2 = function (itemA, itemB) {
+ return itemA === itemB;
+ };
+
+ var peq2 = function (propName) {
+ return function (itemA, itemB) {
+ return itemA[propName] === itemB[propName];
+ };
+ };
+
+ var ok = function () {
+ return true;
+ };
+
+ var fail = function () {
+ return false;
+ };
+
+ var not = function (f) {
+ return function () {
+ return !f.apply(f, arguments);
+ };
+ };
+
+ var and = function (fA, fB) {
+ return function (item) {
+ return fA(item) && fB(item);
+ };
+ };
+
+ var self = function (a) {
+ return a;
+ };
+
+ var invoke = function (obj, method) {
+ return function () {
+ return obj[method].apply(obj, arguments);
+ };
+ };
+
+ var idCounter = 0;
+
+ /**
+ * generate a globally-unique id
+ *
+ * @param {String} [prefix]
+ */
+ var uniqueId = function (prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ };
+
+ /**
+ * returns bnd (bounds) from rect
+ *
+ * - IE Compatibility Issue: http://goo.gl/sRLOAo
+ * - Scroll Issue: http://goo.gl/sNjUc
+ *
+ * @param {Rect} rect
+ * @return {Object} bounds
+ * @return {Number} bounds.top
+ * @return {Number} bounds.left
+ * @return {Number} bounds.width
+ * @return {Number} bounds.height
+ */
+ var rect2bnd = function (rect) {
+ var $document = $(document);
+ return {
+ top: rect.top + $document.scrollTop(),
+ left: rect.left + $document.scrollLeft(),
+ width: rect.right - rect.left,
+ height: rect.bottom - rect.top
+ };
+ };
+
+ /**
+ * returns a copy of the object where the keys have become the values and the values the keys.
+ * @param {Object} obj
+ * @return {Object}
+ */
+ var invertObject = function (obj) {
+ var inverted = {};
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ inverted[obj[key]] = key;
+ }
+ }
+ return inverted;
+ };
+
+ /**
+ * @param {String} namespace
+ * @param {String} [prefix]
+ * @return {String}
+ */
+ var namespaceToCamel = function (namespace, prefix) {
+ prefix = prefix || '';
+ return prefix + namespace.split('.').map(function (name) {
+ return name.substring(0, 1).toUpperCase() + name.substring(1);
+ }).join('');
+ };
+
+ /**
+ * Returns a function, that, as long as it continues to be invoked, will not
+ * be triggered. The function will be called after it stops being called for
+ * N milliseconds. If `immediate` is passed, trigger the function on the
+ * leading edge, instead of the trailing.
+ * @param {Function} func
+ * @param {Number} wait
+ * @param {Boolean} immediate
+ * @return {Function}
+ */
+ var debounce = function (func, wait, immediate) {
+ var timeout;
+ return function () {
+ var context = this, args = arguments;
+ var later = function () {
+ timeout = null;
+ if (!immediate) {
+ func.apply(context, args);
+ }
+ };
+ var callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+ if (callNow) {
+ func.apply(context, args);
+ }
+ };
+ };
+
+ return {
+ eq: eq,
+ eq2: eq2,
+ peq2: peq2,
+ ok: ok,
+ fail: fail,
+ self: self,
+ not: not,
+ and: and,
+ invoke: invoke,
+ uniqueId: uniqueId,
+ rect2bnd: rect2bnd,
+ invertObject: invertObject,
+ namespaceToCamel: namespaceToCamel,
+ debounce: debounce
+ };
+ })();
+
+ /**
+ * @class core.list
+ *
+ * list utils
+ *
+ * @singleton
+ * @alternateClassName list
+ */
+ var list = (function () {
+ /**
+ * returns the first item of an array.
+ *
+ * @param {Array} array
+ */
+ var head = function (array) {
+ return array[0];
+ };
+
+ /**
+ * returns the last item of an array.
+ *
+ * @param {Array} array
+ */
+ var last = function (array) {
+ return array[array.length - 1];
+ };
+
+ /**
+ * returns everything but the last entry of the array.
+ *
+ * @param {Array} array
+ */
+ var initial = function (array) {
+ return array.slice(0, array.length - 1);
+ };
+
+ /**
+ * returns the rest of the items in an array.
+ *
+ * @param {Array} array
+ */
+ var tail = function (array) {
+ return array.slice(1);
+ };
+
+ /**
+ * returns item of array
+ */
+ var find = function (array, pred) {
+ for (var idx = 0, len = array.length; idx < len; idx ++) {
+ var item = array[idx];
+ if (pred(item)) {
+ return item;
+ }
+ }
+ };
+
+ /**
+ * returns true if all of the values in the array pass the predicate truth test.
+ */
+ var all = function (array, pred) {
+ for (var idx = 0, len = array.length; idx < len; idx ++) {
+ if (!pred(array[idx])) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ /**
+ * returns index of item
+ */
+ var indexOf = function (array, item) {
+ return $.inArray(item, array);
+ };
+
+ /**
+ * returns true if the value is present in the list.
+ */
+ var contains = function (array, item) {
+ return indexOf(array, item) !== -1;
+ };
+
+ /**
+ * get sum from a list
+ *
+ * @param {Array} array - array
+ * @param {Function} fn - iterator
+ */
+ var sum = function (array, fn) {
+ fn = fn || func.self;
+ return array.reduce(function (memo, v) {
+ return memo + fn(v);
+ }, 0);
+ };
+
+ /**
+ * returns a copy of the collection with array type.
+ * @param {Collection} collection - collection eg) node.childNodes, ...
+ */
+ var from = function (collection) {
+ var result = [], idx = -1, length = collection.length;
+ while (++idx < length) {
+ result[idx] = collection[idx];
+ }
+ return result;
+ };
+
+ /**
+ * returns whether list is empty or not
+ */
+ var isEmpty = function (array) {
+ return !array || !array.length;
+ };
+
+ /**
+ * cluster elements by predicate function.
+ *
+ * @param {Array} array - array
+ * @param {Function} fn - predicate function for cluster rule
+ * @param {Array[]}
+ */
+ var clusterBy = function (array, fn) {
+ if (!array.length) { return []; }
+ var aTail = tail(array);
+ return aTail.reduce(function (memo, v) {
+ var aLast = last(memo);
+ if (fn(last(aLast), v)) {
+ aLast[aLast.length] = v;
+ } else {
+ memo[memo.length] = [v];
+ }
+ return memo;
+ }, [[head(array)]]);
+ };
+
+ /**
+ * returns a copy of the array with all false values removed
+ *
+ * @param {Array} array - array
+ * @param {Function} fn - predicate function for cluster rule
+ */
+ var compact = function (array) {
+ var aResult = [];
+ for (var idx = 0, len = array.length; idx < len; idx ++) {
+ if (array[idx]) { aResult.push(array[idx]); }
+ }
+ return aResult;
+ };
+
+ /**
+ * produces a duplicate-free version of the array
+ *
+ * @param {Array} array
+ */
+ var unique = function (array) {
+ var results = [];
+
+ for (var idx = 0, len = array.length; idx < len; idx ++) {
+ if (!contains(results, array[idx])) {
+ results.push(array[idx]);
+ }
+ }
+
+ return results;
+ };
+
+ /**
+ * returns next item.
+ * @param {Array} array
+ */
+ var next = function (array, item) {
+ var idx = indexOf(array, item);
+ if (idx === -1) { return null; }
+
+ return array[idx + 1];
+ };
+
+ /**
+ * returns prev item.
+ * @param {Array} array
+ */
+ var prev = function (array, item) {
+ var idx = indexOf(array, item);
+ if (idx === -1) { return null; }
+
+ return array[idx - 1];
+ };
+
+ return { head: head, last: last, initial: initial, tail: tail,
+ prev: prev, next: next, find: find, contains: contains,
+ all: all, sum: sum, from: from, isEmpty: isEmpty,
+ clusterBy: clusterBy, compact: compact, unique: unique };
+ })();
+
+
+ var NBSP_CHAR = String.fromCharCode(160);
+ var ZERO_WIDTH_NBSP_CHAR = '\ufeff';
+
+ /**
+ * @class core.dom
+ *
+ * Dom functions
+ *
+ * @singleton
+ * @alternateClassName dom
+ */
+ var dom = (function () {
+ /**
+ * @method isEditable
+ *
+ * returns whether node is `note-editable` or not.
+ *
+ * @param {Node} node
+ * @return {Boolean}
+ */
+ var isEditable = function (node) {
+ return node && $(node).hasClass('note-editable');
+ };
+
+ /**
+ * @method isControlSizing
+ *
+ * returns whether node is `note-control-sizing` or not.
+ *
+ * @param {Node} node
+ * @return {Boolean}
+ */
+ var isControlSizing = function (node) {
+ return node && $(node).hasClass('note-control-sizing');
+ };
+
+ /**
+ * @method makePredByNodeName
+ *
+ * returns predicate which judge whether nodeName is same
+ *
+ * @param {String} nodeName
+ * @return {Function}
+ */
+ var makePredByNodeName = function (nodeName) {
+ nodeName = nodeName.toUpperCase();
+ return function (node) {
+ return node && node.nodeName.toUpperCase() === nodeName;
+ };
+ };
+
+ /**
+ * @method isText
+ *
+ *
+ *
+ * @param {Node} node
+ * @return {Boolean} true if node's type is text(3)
+ */
+ var isText = function (node) {
+ return node && node.nodeType === 3;
+ };
+
+ /**
+ * @method isElement
+ *
+ *
+ *
+ * @param {Node} node
+ * @return {Boolean} true if node's type is element(1)
+ */
+ var isElement = function (node) {
+ return node && node.nodeType === 1;
+ };
+
+ /**
+ * ex) br, col, embed, hr, img, input, ...
+ * @see http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
+ */
+ var isVoid = function (node) {
+ return node && /^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT/.test(node.nodeName.toUpperCase());
+ };
+
+ var isPara = function (node) {
+ if (isEditable(node)) {
+ return false;
+ }
+
+ // Chrome(v31.0), FF(v25.0.1) use DIV for paragraph
+ return node && /^DIV|^P|^LI|^H[1-7]/.test(node.nodeName.toUpperCase());
+ };
+
+ var isHeading = function (node) {
+ return node && /^H[1-7]/.test(node.nodeName.toUpperCase());
+ };
+
+ var isPre = makePredByNodeName('PRE');
+
+ var isLi = makePredByNodeName('LI');
+
+ var isPurePara = function (node) {
+ return isPara(node) && !isLi(node);
+ };
+
+ var isTable = makePredByNodeName('TABLE');
+
+ var isData = makePredByNodeName('DATA');
+
+ var isInline = function (node) {
+ return !isBodyContainer(node) &&
+ !isList(node) &&
+ !isHr(node) &&
+ !isPara(node) &&
+ !isTable(node) &&
+ !isBlockquote(node) &&
+ !isData(node);
+ };
+
+ var isList = function (node) {
+ return node && /^UL|^OL/.test(node.nodeName.toUpperCase());
+ };
+
+ var isHr = makePredByNodeName('HR');
+
+ var isCell = function (node) {
+ return node && /^TD|^TH/.test(node.nodeName.toUpperCase());
+ };
+
+ var isBlockquote = makePredByNodeName('BLOCKQUOTE');
+
+ var isBodyContainer = function (node) {
+ return isCell(node) || isBlockquote(node) || isEditable(node);
+ };
+
+ var isAnchor = makePredByNodeName('A');
+
+ var isParaInline = function (node) {
+ return isInline(node) && !!ancestor(node, isPara);
+ };
+
+ var isBodyInline = function (node) {
+ return isInline(node) && !ancestor(node, isPara);
+ };
+
+ var isBody = makePredByNodeName('BODY');
+
+ /**
+ * returns whether nodeB is closest sibling of nodeA
+ *
+ * @param {Node} nodeA
+ * @param {Node} nodeB
+ * @return {Boolean}
+ */
+ var isClosestSibling = function (nodeA, nodeB) {
+ return nodeA.nextSibling === nodeB ||
+ nodeA.previousSibling === nodeB;
+ };
+
+ /**
+ * returns array of closest siblings with node
+ *
+ * @param {Node} node
+ * @param {function} [pred] - predicate function
+ * @return {Node[]}
+ */
+ var withClosestSiblings = function (node, pred) {
+ pred = pred || func.ok;
+
+ var siblings = [];
+ if (node.previousSibling && pred(node.previousSibling)) {
+ siblings.push(node.previousSibling);
+ }
+ siblings.push(node);
+ if (node.nextSibling && pred(node.nextSibling)) {
+ siblings.push(node.nextSibling);
+ }
+ return siblings;
+ };
+
+ /**
+ * blank HTML for cursor position
+ * - [workaround] old IE only works with
+ * - [workaround] IE11 and other browser works with bogus br
+ */
+ var blankHTML = agent.isMSIE && agent.browserVersion < 11 ? ' ' : '
';
+
+ /**
+ * @method nodeLength
+ *
+ * returns #text's text size or element's childNodes size
+ *
+ * @param {Node} node
+ */
+ var nodeLength = function (node) {
+ if (isText(node)) {
+ return node.nodeValue.length;
+ }
+
+ if (node) {
+ return node.childNodes.length;
+ }
+
+ return 0;
+
+ };
+
+ /**
+ * returns whether node is empty or not.
+ *
+ * @param {Node} node
+ * @return {Boolean}
+ */
+ var isEmpty = function (node) {
+ var len = nodeLength(node);
+
+ if (len === 0) {
+ return true;
+ } else if (!isText(node) && len === 1 && node.innerHTML === blankHTML) {
+ // ex)
,
+ return true;
+ } else if (list.all(node.childNodes, isText) && node.innerHTML === '') {
+ // ex)
,
+ return true;
+ }
+
+ return false;
+ };
+
+ /**
+ * padding blankHTML if node is empty (for cursor position)
+ */
+ var paddingBlankHTML = function (node) {
+ if (!isVoid(node) && !nodeLength(node)) {
+ node.innerHTML = blankHTML;
+ }
+ };
+
+ /**
+ * find nearest ancestor predicate hit
+ *
+ * @param {Node} node
+ * @param {Function} pred - predicate function
+ */
+ var ancestor = function (node, pred) {
+ while (node) {
+ if (pred(node)) { return node; }
+ if (isEditable(node)) { break; }
+
+ node = node.parentNode;
+ }
+ return null;
+ };
+
+ /**
+ * find nearest ancestor only single child blood line and predicate hit
+ *
+ * @param {Node} node
+ * @param {Function} pred - predicate function
+ */
+ var singleChildAncestor = function (node, pred) {
+ node = node.parentNode;
+
+ while (node) {
+ if (nodeLength(node) !== 1) { break; }
+ if (pred(node)) { return node; }
+ if (isEditable(node)) { break; }
+
+ node = node.parentNode;
+ }
+ return null;
+ };
+
+ /**
+ * returns new array of ancestor nodes (until predicate hit).
+ *
+ * @param {Node} node
+ * @param {Function} [optional] pred - predicate function
+ */
+ var listAncestor = function (node, pred) {
+ pred = pred || func.fail;
+
+ var ancestors = [];
+ ancestor(node, function (el) {
+ if (!isEditable(el)) {
+ ancestors.push(el);
+ }
+
+ return pred(el);
+ });
+ return ancestors;
+ };
+
+ /**
+ * find farthest ancestor predicate hit
+ */
+ var lastAncestor = function (node, pred) {
+ var ancestors = listAncestor(node);
+ return list.last(ancestors.filter(pred));
+ };
+
+ /**
+ * returns common ancestor node between two nodes.
+ *
+ * @param {Node} nodeA
+ * @param {Node} nodeB
+ */
+ var commonAncestor = function (nodeA, nodeB) {
+ var ancestors = listAncestor(nodeA);
+ for (var n = nodeB; n; n = n.parentNode) {
+ if ($.inArray(n, ancestors) > -1) { return n; }
+ }
+ return null; // difference document area
+ };
+
+ /**
+ * listing all previous siblings (until predicate hit).
+ *
+ * @param {Node} node
+ * @param {Function} [optional] pred - predicate function
+ */
+ var listPrev = function (node, pred) {
+ pred = pred || func.fail;
+
+ var nodes = [];
+ while (node) {
+ if (pred(node)) { break; }
+ nodes.push(node);
+ node = node.previousSibling;
+ }
+ return nodes;
+ };
+
+ /**
+ * listing next siblings (until predicate hit).
+ *
+ * @param {Node} node
+ * @param {Function} [pred] - predicate function
+ */
+ var listNext = function (node, pred) {
+ pred = pred || func.fail;
+
+ var nodes = [];
+ while (node) {
+ if (pred(node)) { break; }
+ nodes.push(node);
+ node = node.nextSibling;
+ }
+ return nodes;
+ };
+
+ /**
+ * listing descendant nodes
+ *
+ * @param {Node} node
+ * @param {Function} [pred] - predicate function
+ */
+ var listDescendant = function (node, pred) {
+ var descendants = [];
+ pred = pred || func.ok;
+
+ // start DFS(depth first search) with node
+ (function fnWalk(current) {
+ if (node !== current && pred(current)) {
+ descendants.push(current);
+ }
+ for (var idx = 0, len = current.childNodes.length; idx < len; idx++) {
+ fnWalk(current.childNodes[idx]);
+ }
+ })(node);
+
+ return descendants;
+ };
+
+ /**
+ * wrap node with new tag.
+ *
+ * @param {Node} node
+ * @param {Node} tagName of wrapper
+ * @return {Node} - wrapper
+ */
+ var wrap = function (node, wrapperName) {
+ var parent = node.parentNode;
+ var wrapper = $('<' + wrapperName + '>')[0];
+
+ parent.insertBefore(wrapper, node);
+ wrapper.appendChild(node);
+
+ return wrapper;
+ };
+
+ /**
+ * insert node after preceding
+ *
+ * @param {Node} node
+ * @param {Node} preceding - predicate function
+ */
+ var insertAfter = function (node, preceding) {
+ var next = preceding.nextSibling, parent = preceding.parentNode;
+ if (next) {
+ parent.insertBefore(node, next);
+ } else {
+ parent.appendChild(node);
+ }
+ return node;
+ };
+
+ /**
+ * append elements.
+ *
+ * @param {Node} node
+ * @param {Collection} aChild
+ */
+ var appendChildNodes = function (node, aChild) {
+ $.each(aChild, function (idx, child) {
+ node.appendChild(child);
+ });
+ return node;
+ };
+
+ /**
+ * returns whether boundaryPoint is left edge or not.
+ *
+ * @param {BoundaryPoint} point
+ * @return {Boolean}
+ */
+ var isLeftEdgePoint = function (point) {
+ return point.offset === 0;
+ };
+
+ /**
+ * returns whether boundaryPoint is right edge or not.
+ *
+ * @param {BoundaryPoint} point
+ * @return {Boolean}
+ */
+ var isRightEdgePoint = function (point) {
+ return point.offset === nodeLength(point.node);
+ };
+
+ /**
+ * returns whether boundaryPoint is edge or not.
+ *
+ * @param {BoundaryPoint} point
+ * @return {Boolean}
+ */
+ var isEdgePoint = function (point) {
+ return isLeftEdgePoint(point) || isRightEdgePoint(point);
+ };
+
+ /**
+ * returns whether node is left edge of ancestor or not.
+ *
+ * @param {Node} node
+ * @param {Node} ancestor
+ * @return {Boolean}
+ */
+ var isLeftEdgeOf = function (node, ancestor) {
+ while (node && node !== ancestor) {
+ if (position(node) !== 0) {
+ return false;
+ }
+ node = node.parentNode;
+ }
+
+ return true;
+ };
+
+ /**
+ * returns whether node is right edge of ancestor or not.
+ *
+ * @param {Node} node
+ * @param {Node} ancestor
+ * @return {Boolean}
+ */
+ var isRightEdgeOf = function (node, ancestor) {
+ if (!ancestor) {
+ return false;
+ }
+ while (node && node !== ancestor) {
+ if (position(node) !== nodeLength(node.parentNode) - 1) {
+ return false;
+ }
+ node = node.parentNode;
+ }
+
+ return true;
+ };
+
+ /**
+ * returns whether point is left edge of ancestor or not.
+ * @param {BoundaryPoint} point
+ * @param {Node} ancestor
+ * @return {Boolean}
+ */
+ var isLeftEdgePointOf = function (point, ancestor) {
+ return isLeftEdgePoint(point) && isLeftEdgeOf(point.node, ancestor);
+ };
+
+ /**
+ * returns whether point is right edge of ancestor or not.
+ * @param {BoundaryPoint} point
+ * @param {Node} ancestor
+ * @return {Boolean}
+ */
+ var isRightEdgePointOf = function (point, ancestor) {
+ return isRightEdgePoint(point) && isRightEdgeOf(point.node, ancestor);
+ };
+
+ /**
+ * returns offset from parent.
+ *
+ * @param {Node} node
+ */
+ var position = function (node) {
+ var offset = 0;
+ while ((node = node.previousSibling)) {
+ offset += 1;
+ }
+ return offset;
+ };
+
+ var hasChildren = function (node) {
+ return !!(node && node.childNodes && node.childNodes.length);
+ };
+
+ /**
+ * returns previous boundaryPoint
+ *
+ * @param {BoundaryPoint} point
+ * @param {Boolean} isSkipInnerOffset
+ * @return {BoundaryPoint}
+ */
+ var prevPoint = function (point, isSkipInnerOffset) {
+ var node, offset;
+
+ if (point.offset === 0) {
+ if (isEditable(point.node)) {
+ return null;
+ }
+
+ node = point.node.parentNode;
+ offset = position(point.node);
+ } else if (hasChildren(point.node)) {
+ node = point.node.childNodes[point.offset - 1];
+ offset = nodeLength(node);
+ } else {
+ node = point.node;
+ offset = isSkipInnerOffset ? 0 : point.offset - 1;
+ }
+
+ return {
+ node: node,
+ offset: offset
+ };
+ };
+
+ /**
+ * returns next boundaryPoint
+ *
+ * @param {BoundaryPoint} point
+ * @param {Boolean} isSkipInnerOffset
+ * @return {BoundaryPoint}
+ */
+ var nextPoint = function (point, isSkipInnerOffset) {
+ var node, offset;
+
+ if (nodeLength(point.node) === point.offset) {
+ if (isEditable(point.node)) {
+ return null;
+ }
+
+ node = point.node.parentNode;
+ offset = position(point.node) + 1;
+ } else if (hasChildren(point.node)) {
+ node = point.node.childNodes[point.offset];
+ offset = 0;
+ } else {
+ node = point.node;
+ offset = isSkipInnerOffset ? nodeLength(point.node) : point.offset + 1;
+ }
+
+ return {
+ node: node,
+ offset: offset
+ };
+ };
+
+ /**
+ * returns whether pointA and pointB is same or not.
+ *
+ * @param {BoundaryPoint} pointA
+ * @param {BoundaryPoint} pointB
+ * @return {Boolean}
+ */
+ var isSamePoint = function (pointA, pointB) {
+ return pointA.node === pointB.node && pointA.offset === pointB.offset;
+ };
+
+ /**
+ * returns whether point is visible (can set cursor) or not.
+ *
+ * @param {BoundaryPoint} point
+ * @return {Boolean}
+ */
+ var isVisiblePoint = function (point) {
+ if (isText(point.node) || !hasChildren(point.node) || isEmpty(point.node)) {
+ return true;
+ }
+
+ var leftNode = point.node.childNodes[point.offset - 1];
+ var rightNode = point.node.childNodes[point.offset];
+ if ((!leftNode || isVoid(leftNode)) && (!rightNode || isVoid(rightNode))) {
+ return true;
+ }
+
+ return false;
+ };
+
+ /**
+ * @method prevPointUtil
+ *
+ * @param {BoundaryPoint} point
+ * @param {Function} pred
+ * @return {BoundaryPoint}
+ */
+ var prevPointUntil = function (point, pred) {
+ while (point) {
+ if (pred(point)) {
+ return point;
+ }
+
+ point = prevPoint(point);
+ }
+
+ return null;
+ };
+
+ /**
+ * @method nextPointUntil
+ *
+ * @param {BoundaryPoint} point
+ * @param {Function} pred
+ * @return {BoundaryPoint}
+ */
+ var nextPointUntil = function (point, pred) {
+ while (point) {
+ if (pred(point)) {
+ return point;
+ }
+
+ point = nextPoint(point);
+ }
+
+ return null;
+ };
+
+ /**
+ * returns whether point has character or not.
+ *
+ * @param {Point} point
+ * @return {Boolean}
+ */
+ var isCharPoint = function (point) {
+ if (!isText(point.node)) {
+ return false;
+ }
+
+ var ch = point.node.nodeValue.charAt(point.offset - 1);
+ return ch && (ch !== ' ' && ch !== NBSP_CHAR);
+ };
+
+ /**
+ * @method walkPoint
+ *
+ * @param {BoundaryPoint} startPoint
+ * @param {BoundaryPoint} endPoint
+ * @param {Function} handler
+ * @param {Boolean} isSkipInnerOffset
+ */
+ var walkPoint = function (startPoint, endPoint, handler, isSkipInnerOffset) {
+ var point = startPoint;
+
+ while (point) {
+ handler(point);
+
+ if (isSamePoint(point, endPoint)) {
+ break;
+ }
+
+ var isSkipOffset = isSkipInnerOffset &&
+ startPoint.node !== point.node &&
+ endPoint.node !== point.node;
+ point = nextPoint(point, isSkipOffset);
+ }
+ };
+
+ /**
+ * @method makeOffsetPath
+ *
+ * return offsetPath(array of offset) from ancestor
+ *
+ * @param {Node} ancestor - ancestor node
+ * @param {Node} node
+ */
+ var makeOffsetPath = function (ancestor, node) {
+ var ancestors = listAncestor(node, func.eq(ancestor));
+ return ancestors.map(position).reverse();
+ };
+
+ /**
+ * @method fromOffsetPath
+ *
+ * return element from offsetPath(array of offset)
+ *
+ * @param {Node} ancestor - ancestor node
+ * @param {array} offsets - offsetPath
+ */
+ var fromOffsetPath = function (ancestor, offsets) {
+ var current = ancestor;
+ for (var i = 0, len = offsets.length; i < len; i++) {
+ if (current.childNodes.length <= offsets[i]) {
+ current = current.childNodes[current.childNodes.length - 1];
+ } else {
+ current = current.childNodes[offsets[i]];
+ }
+ }
+ return current;
+ };
+
+ /**
+ * @method splitNode
+ *
+ * split element or #text
+ *
+ * @param {BoundaryPoint} point
+ * @param {Object} [options]
+ * @param {Boolean} [options.isSkipPaddingBlankHTML] - default: false
+ * @param {Boolean} [options.isNotSplitEdgePoint] - default: false
+ * @return {Node} right node of boundaryPoint
+ */
+ var splitNode = function (point, options) {
+ var isSkipPaddingBlankHTML = options && options.isSkipPaddingBlankHTML;
+ var isNotSplitEdgePoint = options && options.isNotSplitEdgePoint;
+
+ // edge case
+ if (isEdgePoint(point) && (isText(point.node) || isNotSplitEdgePoint)) {
+ if (isLeftEdgePoint(point)) {
+ return point.node;
+ } else if (isRightEdgePoint(point)) {
+ return point.node.nextSibling;
+ }
+ }
+
+ // split #text
+ if (isText(point.node)) {
+ return point.node.splitText(point.offset);
+ } else {
+ var childNode = point.node.childNodes[point.offset];
+ var clone = insertAfter(point.node.cloneNode(false), point.node);
+ appendChildNodes(clone, listNext(childNode));
+
+ if (!isSkipPaddingBlankHTML) {
+ paddingBlankHTML(point.node);
+ paddingBlankHTML(clone);
+ }
+
+ return clone;
+ }
+ };
+
+ /**
+ * @method splitTree
+ *
+ * split tree by point
+ *
+ * @param {Node} root - split root
+ * @param {BoundaryPoint} point
+ * @param {Object} [options]
+ * @param {Boolean} [options.isSkipPaddingBlankHTML] - default: false
+ * @param {Boolean} [options.isNotSplitEdgePoint] - default: false
+ * @return {Node} right node of boundaryPoint
+ */
+ var splitTree = function (root, point, options) {
+ // ex) [#text,
, ]
+ var ancestors = listAncestor(point.node, func.eq(root));
+
+ if (!ancestors.length) {
+ return null;
+ } else if (ancestors.length === 1) {
+ return splitNode(point, options);
+ }
+
+ return ancestors.reduce(function (node, parent) {
+ if (node === point.node) {
+ node = splitNode(point, options);
+ }
+
+ return splitNode({
+ node: parent,
+ offset: node ? dom.position(node) : nodeLength(parent)
+ }, options);
+ });
+ };
+
+ /**
+ * split point
+ *
+ * @param {Point} point
+ * @param {Boolean} isInline
+ * @return {Object}
+ */
+ var splitPoint = function (point, isInline) {
+ // find splitRoot, container
+ // - inline: splitRoot is a child of paragraph
+ // - block: splitRoot is a child of bodyContainer
+ var pred = isInline ? isPara : isBodyContainer;
+ var ancestors = listAncestor(point.node, pred);
+ var topAncestor = list.last(ancestors) || point.node;
+
+ var splitRoot, container;
+ if (pred(topAncestor)) {
+ splitRoot = ancestors[ancestors.length - 2];
+ container = topAncestor;
+ } else {
+ splitRoot = topAncestor;
+ container = splitRoot.parentNode;
+ }
+
+ // if splitRoot is exists, split with splitTree
+ var pivot = splitRoot && splitTree(splitRoot, point, {
+ isSkipPaddingBlankHTML: isInline,
+ isNotSplitEdgePoint: isInline
+ });
+
+ // if container is point.node, find pivot with point.offset
+ if (!pivot && container === point.node) {
+ pivot = point.node.childNodes[point.offset];
+ }
+
+ return {
+ rightNode: pivot,
+ container: container
+ };
+ };
+
+ var create = function (nodeName) {
+ return document.createElement(nodeName);
+ };
+
+ var createText = function (text) {
+ return document.createTextNode(text);
+ };
+
+ /**
+ * @method remove
+ *
+ * remove node, (isRemoveChild: remove child or not)
+ *
+ * @param {Node} node
+ * @param {Boolean} isRemoveChild
+ */
+ var remove = function (node, isRemoveChild) {
+ if (!node || !node.parentNode) { return; }
+ if (node.removeNode) { return node.removeNode(isRemoveChild); }
+
+ var parent = node.parentNode;
+ if (!isRemoveChild) {
+ var nodes = [];
+ var i, len;
+ for (i = 0, len = node.childNodes.length; i < len; i++) {
+ nodes.push(node.childNodes[i]);
+ }
+
+ for (i = 0, len = nodes.length; i < len; i++) {
+ parent.insertBefore(nodes[i], node);
+ }
+ }
+
+ parent.removeChild(node);
+ };
+
+ /**
+ * @method removeWhile
+ *
+ * @param {Node} node
+ * @param {Function} pred
+ */
+ var removeWhile = function (node, pred) {
+ while (node) {
+ if (isEditable(node) || !pred(node)) {
+ break;
+ }
+
+ var parent = node.parentNode;
+ remove(node);
+ node = parent;
+ }
+ };
+
+ /**
+ * @method replace
+ *
+ * replace node with provided nodeName
+ *
+ * @param {Node} node
+ * @param {String} nodeName
+ * @return {Node} - new node
+ */
+ var replace = function (node, nodeName) {
+ if (node.nodeName.toUpperCase() === nodeName.toUpperCase()) {
+ return node;
+ }
+
+ var newNode = create(nodeName);
+
+ if (node.style.cssText) {
+ newNode.style.cssText = node.style.cssText;
+ }
+
+ appendChildNodes(newNode, list.from(node.childNodes));
+ insertAfter(newNode, node);
+ remove(node);
+
+ return newNode;
+ };
+
+ var isTextarea = makePredByNodeName('TEXTAREA');
+
+ /**
+ * @param {jQuery} $node
+ * @param {Boolean} [stripLinebreaks] - default: false
+ */
+ var value = function ($node, stripLinebreaks) {
+ var val = isTextarea($node[0]) ? $node.val() : $node.html();
+ if (stripLinebreaks) {
+ return val.replace(/[\n\r]/g, '');
+ }
+ return val;
+ };
+
+ /**
+ * @method html
+ *
+ * get the HTML contents of node
+ *
+ * @param {jQuery} $node
+ * @param {Boolean} [isNewlineOnBlock]
+ */
+ var html = function ($node, isNewlineOnBlock) {
+ var markup = value($node);
+
+ if (isNewlineOnBlock) {
+ var regexTag = /<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g;
+ markup = markup.replace(regexTag, function (match, endSlash, name) {
+ name = name.toUpperCase();
+ var isEndOfInlineContainer = /^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(name) &&
+ !!endSlash;
+ var isBlockNode = /^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name);
+
+ return match + ((isEndOfInlineContainer || isBlockNode) ? '\n' : '');
+ });
+ markup = $.trim(markup);
+ }
+
+ return markup;
+ };
+
+ var posFromPlaceholder = function (placeholder) {
+ var $placeholder = $(placeholder);
+ var pos = $placeholder.offset();
+ var height = $placeholder.outerHeight(true); // include margin
+
+ return {
+ left: pos.left,
+ top: pos.top + height
+ };
+ };
+
+ var attachEvents = function ($node, events) {
+ Object.keys(events).forEach(function (key) {
+ $node.on(key, events[key]);
+ });
+ };
+
+ var detachEvents = function ($node, events) {
+ Object.keys(events).forEach(function (key) {
+ $node.off(key, events[key]);
+ });
+ };
+
+ /**
+ * @method isCustomStyleTag
+ *
+ * assert if a node contains a "note-styletag" class,
+ * which implies that's a custom-made style tag node
+ *
+ * @param {Node} an HTML DOM node
+ */
+ var isCustomStyleTag = function (node) {
+ return node && !dom.isText(node) && list.contains(node.classList, 'note-styletag');
+ };
+
+ return {
+ /** @property {String} NBSP_CHAR */
+ NBSP_CHAR: NBSP_CHAR,
+ /** @property {String} ZERO_WIDTH_NBSP_CHAR */
+ ZERO_WIDTH_NBSP_CHAR: ZERO_WIDTH_NBSP_CHAR,
+ /** @property {String} blank */
+ blank: blankHTML,
+ /** @property {String} emptyPara */
+ emptyPara: '
' + blankHTML + '
',
+ makePredByNodeName: makePredByNodeName,
+ isEditable: isEditable,
+ isControlSizing: isControlSizing,
+ isText: isText,
+ isElement: isElement,
+ isVoid: isVoid,
+ isPara: isPara,
+ isPurePara: isPurePara,
+ isHeading: isHeading,
+ isInline: isInline,
+ isBlock: func.not(isInline),
+ isBodyInline: isBodyInline,
+ isBody: isBody,
+ isParaInline: isParaInline,
+ isPre: isPre,
+ isList: isList,
+ isTable: isTable,
+ isData: isData,
+ isCell: isCell,
+ isBlockquote: isBlockquote,
+ isBodyContainer: isBodyContainer,
+ isAnchor: isAnchor,
+ isDiv: makePredByNodeName('DIV'),
+ isLi: isLi,
+ isBR: makePredByNodeName('BR'),
+ isSpan: makePredByNodeName('SPAN'),
+ isB: makePredByNodeName('B'),
+ isU: makePredByNodeName('U'),
+ isS: makePredByNodeName('S'),
+ isI: makePredByNodeName('I'),
+ isImg: makePredByNodeName('IMG'),
+ isTextarea: isTextarea,
+ isEmpty: isEmpty,
+ isEmptyAnchor: func.and(isAnchor, isEmpty),
+ isClosestSibling: isClosestSibling,
+ withClosestSiblings: withClosestSiblings,
+ nodeLength: nodeLength,
+ isLeftEdgePoint: isLeftEdgePoint,
+ isRightEdgePoint: isRightEdgePoint,
+ isEdgePoint: isEdgePoint,
+ isLeftEdgeOf: isLeftEdgeOf,
+ isRightEdgeOf: isRightEdgeOf,
+ isLeftEdgePointOf: isLeftEdgePointOf,
+ isRightEdgePointOf: isRightEdgePointOf,
+ prevPoint: prevPoint,
+ nextPoint: nextPoint,
+ isSamePoint: isSamePoint,
+ isVisiblePoint: isVisiblePoint,
+ prevPointUntil: prevPointUntil,
+ nextPointUntil: nextPointUntil,
+ isCharPoint: isCharPoint,
+ walkPoint: walkPoint,
+ ancestor: ancestor,
+ singleChildAncestor: singleChildAncestor,
+ listAncestor: listAncestor,
+ lastAncestor: lastAncestor,
+ listNext: listNext,
+ listPrev: listPrev,
+ listDescendant: listDescendant,
+ commonAncestor: commonAncestor,
+ wrap: wrap,
+ insertAfter: insertAfter,
+ appendChildNodes: appendChildNodes,
+ position: position,
+ hasChildren: hasChildren,
+ makeOffsetPath: makeOffsetPath,
+ fromOffsetPath: fromOffsetPath,
+ splitTree: splitTree,
+ splitPoint: splitPoint,
+ create: create,
+ createText: createText,
+ remove: remove,
+ removeWhile: removeWhile,
+ replace: replace,
+ html: html,
+ value: value,
+ posFromPlaceholder: posFromPlaceholder,
+ attachEvents: attachEvents,
+ detachEvents: detachEvents,
+ isCustomStyleTag: isCustomStyleTag
+ };
+ })();
+
+ /**
+ * @param {jQuery} $note
+ * @param {Object} options
+ * @return {Context}
+ */
+ var Context = function ($note, options) {
+ var self = this;
+
+ var ui = $.summernote.ui;
+ this.memos = {};
+ this.modules = {};
+ this.layoutInfo = {};
+ this.options = options;
+
+ /**
+ * create layout and initialize modules and other resources
+ */
+ this.initialize = function () {
+ this.layoutInfo = ui.createLayout($note, options);
+ this._initialize();
+ $note.hide();
+ return this;
+ };
+
+ /**
+ * destroy modules and other resources and remove layout
+ */
+ this.destroy = function () {
+ this._destroy();
+ $note.removeData('summernote');
+ ui.removeLayout($note, this.layoutInfo);
+ };
+
+ /**
+ * destory modules and other resources and initialize it again
+ */
+ this.reset = function () {
+ var disabled = self.isDisabled();
+ this.code(dom.emptyPara);
+ this._destroy();
+ this._initialize();
+
+ if (disabled) {
+ self.disable();
+ }
+ };
+
+ this._initialize = function () {
+ // add optional buttons
+ var buttons = $.extend({}, this.options.buttons);
+ Object.keys(buttons).forEach(function (key) {
+ self.memo('button.' + key, buttons[key]);
+ });
+
+ var modules = $.extend({}, this.options.modules, $.summernote.plugins || {});
+
+ // add and initialize modules
+ Object.keys(modules).forEach(function (key) {
+ self.module(key, modules[key], true);
+ });
+
+ Object.keys(this.modules).forEach(function (key) {
+ self.initializeModule(key);
+ });
+ };
+
+ this._destroy = function () {
+ // destroy modules with reversed order
+ Object.keys(this.modules).reverse().forEach(function (key) {
+ self.removeModule(key);
+ });
+
+ Object.keys(this.memos).forEach(function (key) {
+ self.removeMemo(key);
+ });
+ // trigger custom onDestroy callback
+ this.triggerEvent('destroy', this);
+ };
+
+ this.code = function (html) {
+ var isActivated = this.invoke('codeview.isActivated');
+
+ if (html === undefined) {
+ this.invoke('codeview.sync');
+ return isActivated ? this.layoutInfo.codable.val() : this.layoutInfo.editable.html();
+ } else {
+ if (isActivated) {
+ this.layoutInfo.codable.val(html);
+ } else {
+ this.layoutInfo.editable.html(html);
+ }
+ $note.val(html);
+ this.triggerEvent('change', html);
+ }
+ };
+
+ this.isDisabled = function () {
+ return this.layoutInfo.editable.attr('contenteditable') === 'false';
+ };
+
+ this.enable = function () {
+ this.layoutInfo.editable.attr('contenteditable', true);
+ this.invoke('toolbar.activate', true);
+ this.triggerEvent('disable', false);
+ };
+
+ this.disable = function () {
+ // close codeview if codeview is opend
+ if (this.invoke('codeview.isActivated')) {
+ this.invoke('codeview.deactivate');
+ }
+ this.layoutInfo.editable.attr('contenteditable', false);
+ this.invoke('toolbar.deactivate', true);
+
+ this.triggerEvent('disable', true);
+ };
+
+ this.triggerEvent = function () {
+ var namespace = list.head(arguments);
+ var args = list.tail(list.from(arguments));
+
+ var callback = this.options.callbacks[func.namespaceToCamel(namespace, 'on')];
+ if (callback) {
+ callback.apply($note[0], args);
+ }
+ $note.trigger('summernote.' + namespace, args);
+ };
+
+ this.initializeModule = function (key) {
+ var module = this.modules[key];
+ module.shouldInitialize = module.shouldInitialize || func.ok;
+ if (!module.shouldInitialize()) {
+ return;
+ }
+
+ // initialize module
+ if (module.initialize) {
+ module.initialize();
+ }
+
+ // attach events
+ if (module.events) {
+ dom.attachEvents($note, module.events);
+ }
+ };
+
+ this.module = function (key, ModuleClass, withoutIntialize) {
+ if (arguments.length === 1) {
+ return this.modules[key];
+ }
+
+ this.modules[key] = new ModuleClass(this);
+
+ if (!withoutIntialize) {
+ this.initializeModule(key);
+ }
+ };
+
+ this.removeModule = function (key) {
+ var module = this.modules[key];
+ if (module.shouldInitialize()) {
+ if (module.events) {
+ dom.detachEvents($note, module.events);
+ }
+
+ if (module.destroy) {
+ module.destroy();
+ }
+ }
+
+ delete this.modules[key];
+ };
+
+ this.memo = function (key, obj) {
+ if (arguments.length === 1) {
+ return this.memos[key];
+ }
+ this.memos[key] = obj;
+ };
+
+ this.removeMemo = function (key) {
+ if (this.memos[key] && this.memos[key].destroy) {
+ this.memos[key].destroy();
+ }
+
+ delete this.memos[key];
+ };
+
+ /**
+ *Some buttons need to change their visual style immediately once they get pressed
+ */
+ this.createInvokeHandlerAndUpdateState = function (namespace, value) {
+ return function (event) {
+ self.createInvokeHandler(namespace, value)(event);
+ self.invoke('buttons.updateCurrentStyle');
+ };
+ };
+
+ this.createInvokeHandler = function (namespace, value) {
+ return function (event) {
+ event.preventDefault();
+ var $target = $(event.target);
+ self.invoke(namespace, value || $target.closest('[data-value]').data('value'), $target);
+ };
+ };
+
+ this.invoke = function () {
+ var namespace = list.head(arguments);
+ var args = list.tail(list.from(arguments));
+
+ var splits = namespace.split('.');
+ var hasSeparator = splits.length > 1;
+ var moduleName = hasSeparator && list.head(splits);
+ var methodName = hasSeparator ? list.last(splits) : list.head(splits);
+
+ var module = this.modules[moduleName || 'editor'];
+ if (!moduleName && this[methodName]) {
+ return this[methodName].apply(this, args);
+ } else if (module && module[methodName] && module.shouldInitialize()) {
+ return module[methodName].apply(module, args);
+ }
+ };
+
+ return this.initialize();
+ };
+
+ $.fn.extend({
+ /**
+ * Summernote API
+ *
+ * @param {Object|String}
+ * @return {this}
+ */
+ summernote: function () {
+ var type = $.type(list.head(arguments));
+ var isExternalAPICalled = type === 'string';
+ var hasInitOptions = type === 'object';
+
+ var options = hasInitOptions ? list.head(arguments) : {};
+
+ options = $.extend({}, $.summernote.options, options);
+
+ // Update options
+ options.langInfo = $.extend(true, {}, $.summernote.lang['en-US'], $.summernote.lang[options.lang]);
+ options.icons = $.extend(true, {}, $.summernote.options.icons, options.icons);
+ options.tooltip = options.tooltip === 'auto' ? !agent.isSupportTouch : options.tooltip;
+
+ this.each(function (idx, note) {
+ var $note = $(note);
+ if (!$note.data('summernote')) {
+ var context = new Context($note, options);
+ $note.data('summernote', context);
+ $note.data('summernote').triggerEvent('init', context.layoutInfo);
+ }
+ });
+
+ var $note = this.first();
+ if ($note.length) {
+ var context = $note.data('summernote');
+ if (isExternalAPICalled) {
+ return context.invoke.apply(context, list.from(arguments));
+ } else if (options.focus) {
+ context.invoke('editor.focus');
+ }
+ }
+
+ return this;
+ }
+ });
+
+
+ var Renderer = function (markup, children, options, callback) {
+ this.render = function ($parent) {
+ var $node = $(markup);
+
+ if (options && options.contents) {
+ $node.html(options.contents);
+ }
+
+ if (options && options.className) {
+ $node.addClass(options.className);
+ }
+
+ if (options && options.data) {
+ $.each(options.data, function (k, v) {
+ $node.attr('data-' + k, v);
+ });
+ }
+
+ if (options && options.click) {
+ $node.on('click', options.click);
+ }
+
+ if (children) {
+ var $container = $node.find('.note-children-container');
+ children.forEach(function (child) {
+ child.render($container.length ? $container : $node);
+ });
+ }
+
+ if (callback) {
+ callback($node, options);
+ }
+
+ if (options && options.callback) {
+ options.callback($node);
+ }
+
+ if ($parent) {
+ $parent.append($node);
+ }
+
+ return $node;
+ };
+ };
+
+ var renderer = {
+ create: function (markup, callback) {
+ return function () {
+ var children = $.isArray(arguments[0]) ? arguments[0] : [];
+ var options = typeof arguments[1] === 'object' ? arguments[1] : arguments[0];
+ if (options && options.children) {
+ children = options.children;
+ }
+ return new Renderer(markup, children, options, callback);
+ };
+ }
+ };
+
+ var editor = renderer.create('
');
+ var toolbar = renderer.create('
');
+ var editingArea = renderer.create('
');
+ var codable = renderer.create('');
+ var editable = renderer.create('
');
+ var statusbar = renderer.create([
+ '',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
'
+ ].join(''));
+
+ var airEditor = renderer.create('
');
+ var airEditable = renderer.create('
');
+
+ var buttonGroup = renderer.create('');
+
+ var dropdown = renderer.create('