若依 3.0
@ -0,0 +1,617 @@
|
||||
/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
|
||||
/*
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2007-2013 Einar Lielmanis and contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation files
|
||||
(the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
Style HTML
|
||||
---------------
|
||||
|
||||
Written by Nochum Sossonko, (nsossonko@hotmail.com)
|
||||
|
||||
Based on code initially developed by: Einar Lielmanis, <elfz@laacz.lv>
|
||||
http://jsbeautifier.org/
|
||||
|
||||
Usage:
|
||||
style_html(html_source);
|
||||
|
||||
style_html(html_source, options);
|
||||
|
||||
The options are:
|
||||
indent_size (default 4) — indentation size,
|
||||
indent_char (default space) — character to indent with,
|
||||
max_char (default 250) - maximum amount of characters per line (0 = disable)
|
||||
brace_style (default "collapse") - "collapse" | "expand" | "end-expand"
|
||||
put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line.
|
||||
unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted
|
||||
indent_scripts (default normal) - "keep"|"separate"|"normal"
|
||||
|
||||
e.g.
|
||||
|
||||
style_html(html_source, {
|
||||
'indent_size': 2,
|
||||
'indent_char': ' ',
|
||||
'max_char': 78,
|
||||
'brace_style': 'expand',
|
||||
'unformatted': ['a', 'sub', 'sup', 'b', 'i', 'u']
|
||||
});
|
||||
*/
|
||||
|
||||
(function() {
|
||||
|
||||
function style_html(html_source, options, js_beautify, css_beautify) {
|
||||
//Wrapper function to invoke all the necessary constructors and deal with the output.
|
||||
|
||||
var multi_parser,
|
||||
indent_size,
|
||||
indent_character,
|
||||
max_char,
|
||||
brace_style,
|
||||
unformatted;
|
||||
|
||||
options = options || {};
|
||||
indent_size = options.indent_size || 4;
|
||||
indent_character = options.indent_char || ' ';
|
||||
brace_style = options.brace_style || 'collapse';
|
||||
max_char = options.max_char === 0 ? Infinity : options.max_char || 250;
|
||||
unformatted = options.unformatted || ['a', 'span', 'bdo', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'sub', 'sup', 'tt', 'i', 'b', 'big', 'small', 'u', 's', 'strike', 'font', 'ins', 'del', 'pre', 'address', 'dt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
||||
|
||||
function Parser() {
|
||||
|
||||
this.pos = 0; //Parser position
|
||||
this.token = '';
|
||||
this.current_mode = 'CONTENT'; //reflects the current Parser mode: TAG/CONTENT
|
||||
this.tags = { //An object to hold tags, their position, and their parent-tags, initiated with default values
|
||||
parent: 'parent1',
|
||||
parentcount: 1,
|
||||
parent1: ''
|
||||
};
|
||||
this.tag_type = '';
|
||||
this.token_text = this.last_token = this.last_text = this.token_type = '';
|
||||
|
||||
this.Utils = { //Uilities made available to the various functions
|
||||
whitespace: "\n\r\t ".split(''),
|
||||
single_token: 'br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?='.split(','), //all the single tags for HTML
|
||||
extra_liners: 'head,body,/html'.split(','), //for tags that need a line of whitespace before them
|
||||
in_array: function (what, arr) {
|
||||
for (var i=0; i<arr.length; i++) {
|
||||
if (what === arr[i]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
this.get_content = function () { //function to capture regular content between tags
|
||||
|
||||
var input_char = '',
|
||||
content = [],
|
||||
space = false; //if a space is needed
|
||||
|
||||
while (this.input.charAt(this.pos) !== '<') {
|
||||
if (this.pos >= this.input.length) {
|
||||
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)) {
|
||||
if (content.length) {
|
||||
space = true;
|
||||
}
|
||||
this.line_char_count--;
|
||||
continue; //don't want to insert unnecessary space
|
||||
}
|
||||
else if (space) {
|
||||
if (this.line_char_count >= this.max_char) { //insert a line when the max_char is reached
|
||||
content.push('\n');
|
||||
for (var i=0; i<this.indent_level; i++) {
|
||||
content.push(this.indent_string);
|
||||
}
|
||||
this.line_char_count = 0;
|
||||
}
|
||||
else{
|
||||
content.push(' ');
|
||||
this.line_char_count++;
|
||||
}
|
||||
space = false;
|
||||
}
|
||||
content.push(input_char); //letter at-a-time (or string) inserted to an array
|
||||
}
|
||||
return content.length?content.join(''):'';
|
||||
};
|
||||
|
||||
this.get_contents_to = function (name) { //get the full content of a script or style to pass to js_beautify
|
||||
if (this.pos === this.input.length) {
|
||||
return ['', 'TK_EOF'];
|
||||
}
|
||||
var input_char = '';
|
||||
var content = '';
|
||||
var reg_match = new RegExp('</' + name + '\\s*>', '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 <!-- comment
|
||||
if (tag_check.indexOf('[if') !== -1) { //peek for <!--[if conditional comment
|
||||
if (tag_complete.indexOf('!IE') !== -1) { //this type needs a closing --> 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 <!--[endif end conditional comment
|
||||
this.tag_type = 'END';
|
||||
this.unindent();
|
||||
}
|
||||
else if (tag_check.indexOf('[cdata[') !== -1) { //if it's a <[cdata[ comment...
|
||||
comment = this.get_unformatted(']]>', tag_complete); //...delegate to get_unformatted function
|
||||
content.push(comment);
|
||||
if ( ! peek) {
|
||||
this.tag_type = 'SINGLE'; //<![CDATA[ comments are treated like single tags
|
||||
}
|
||||
}
|
||||
else {
|
||||
comment = this.get_unformatted('-->', 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 <pre> tags if they are specified in the 'unformatted array'
|
||||
for (var i=0; i<this.indent_level; i++) {
|
||||
content += this.indent_string;
|
||||
}
|
||||
space = false; //...and make sure other indentation is erased
|
||||
*/
|
||||
this.line_char_count = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
content += input_char;
|
||||
this.line_char_count++;
|
||||
space = true;
|
||||
|
||||
|
||||
} while (content.toLowerCase().indexOf(delimiter) === -1);
|
||||
return content;
|
||||
};
|
||||
|
||||
this.get_token = function () { //initial handler for token-retrieval
|
||||
var token;
|
||||
|
||||
if (this.last_token === 'TK_TAG_SCRIPT' || this.last_token === 'TK_TAG_STYLE') { //check if we need to format javascript
|
||||
var type = this.last_token.substr(7);
|
||||
token = this.get_contents_to(type);
|
||||
if (typeof token !== 'string') {
|
||||
return token;
|
||||
}
|
||||
return [token, 'TK_' + type];
|
||||
}
|
||||
if (this.current_mode === 'CONTENT') {
|
||||
token = this.get_content();
|
||||
if (typeof token !== 'string') {
|
||||
return token;
|
||||
}
|
||||
else {
|
||||
return [token, 'TK_CONTENT'];
|
||||
}
|
||||
}
|
||||
|
||||
if (this.current_mode === 'TAG') {
|
||||
token = this.get_tag();
|
||||
if (typeof token !== 'string') {
|
||||
return token;
|
||||
}
|
||||
else {
|
||||
var tag_name_type = 'TK_TAG_' + this.tag_type;
|
||||
return [token, tag_name_type];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.get_full_indent = function (level) {
|
||||
level = this.indent_level + level || 0;
|
||||
if (level < 1) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return Array(level + 1).join(this.indent_string);
|
||||
};
|
||||
|
||||
this.is_unformatted = function(tag_check, unformatted) {
|
||||
//is this an HTML5 block-level link?
|
||||
if (!this.Utils.in_array(tag_check, unformatted)){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tag_check.toLowerCase() !== 'a' || !this.Utils.in_array('a', unformatted)){
|
||||
return true;
|
||||
}
|
||||
|
||||
//at this point we have an tag; is its first child something we want to remain
|
||||
//unformatted?
|
||||
var next_tag = this.get_tag(true /* peek. */);
|
||||
|
||||
// tets next_tag to see if it is just html tag (no external content)
|
||||
var tag = (next_tag || "").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\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<this.indent_size; i++) {
|
||||
this.indent_string += this.indent_character;
|
||||
}
|
||||
|
||||
this.print_newline = function (ignore, arr) {
|
||||
this.line_char_count = 0;
|
||||
if (!arr || !arr.length) {
|
||||
return;
|
||||
}
|
||||
if (!ignore) { //we might want the extra line
|
||||
while (this.Utils.in_array(arr[arr.length-1], this.Utils.whitespace)) {
|
||||
arr.pop();
|
||||
}
|
||||
}
|
||||
arr.push('\n');
|
||||
for (var i=0; i<this.indent_level; i++) {
|
||||
arr.push(this.indent_string);
|
||||
}
|
||||
};
|
||||
|
||||
this.print_token = function (text) {
|
||||
this.output.push(text);
|
||||
};
|
||||
|
||||
this.indent = function () {
|
||||
this.indent_level++;
|
||||
};
|
||||
|
||||
this.unindent = function () {
|
||||
if (this.indent_level > 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);
|
||||
};
|
||||
|
||||
}());
|
@ -0,0 +1,620 @@
|
||||
/*!
|
||||
* 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 = $('<div class="growlUI"></div>');
|
||||
if (title) $m.append('<h1>'+title+'</h1>');
|
||||
if (message) $m.append('<h2>'+message+'</h2>');
|
||||
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: '<div class="loaderbox"><div class="loading-activity"></div> 加载中......</div>',
|
||||
|
||||
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 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
|
||||
else
|
||||
lyr1 = $('<div class="blockUI" style="display:none"></div>');
|
||||
|
||||
if (opts.theme)
|
||||
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
|
||||
else
|
||||
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
|
||||
|
||||
if (opts.theme && full) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
|
||||
if ( opts.title ) {
|
||||
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
||||
}
|
||||
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
||||
s += '</div>';
|
||||
}
|
||||
else if (opts.theme) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
|
||||
if ( opts.title ) {
|
||||
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
||||
}
|
||||
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
||||
s += '</div>';
|
||||
}
|
||||
else if (full) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
|
||||
}
|
||||
else {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
})();
|
1
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.css
vendored
Normal file
8
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js
vendored
Normal file
@ -0,0 +1,146 @@
|
||||
/**
|
||||
* @author zhixin wen <wenzhixin2010@gmail.com>
|
||||
* 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 ['<a href="javascript:void(0)"',
|
||||
' data-name="' + column.field + '"',
|
||||
' data-pk="' + row[that.options.idField] + '"',
|
||||
' data-value="' + result + '"',
|
||||
editableDataMarkup.join(''),
|
||||
'>' + '</a>'
|
||||
].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');
|
||||
};
|
||||
|
||||
})(jQuery);
|
@ -0,0 +1,7 @@
|
||||
/*
|
||||
* bootstrap-table - v1.11.0 - 2016-07-02
|
||||
* https://github.com/wenzhixin/bootstrap-table
|
||||
* Copyright (c) 2016 zhixin wen
|
||||
* Licensed MIT License
|
||||
*/
|
||||
!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?['<a href="javascript:void(0)"',' data-name="'+d.field+'"',' data-pk="'+g[b.options.idField]+'"',' data-value="'+j+'"',f.join(""),"></a>"].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);
|
@ -0,0 +1,119 @@
|
||||
/**
|
||||
* @author zhixin wen <wenzhixin2010@gmail.com>
|
||||
* 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 = $([
|
||||
'<div class="export btn-group">',
|
||||
'<button class="btn' +
|
||||
sprintf(' btn-%s', this.options.buttonsClass) +
|
||||
sprintf(' btn-%s', this.options.iconSize) +
|
||||
' dropdown-toggle" ' +
|
||||
'title="' + this.options.formatExport() + '" ' +
|
||||
'data-toggle="dropdown" type="button">',
|
||||
sprintf('<i class="%s %s"></i> ', this.options.iconsPrefix, this.options.icons.export),
|
||||
'<span class="caret"></span>',
|
||||
'</button>',
|
||||
'<ul class="dropdown-menu" role="menu">',
|
||||
'</ul>',
|
||||
'</div>'].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(['<li data-type="' + type + '">',
|
||||
'<a href="javascript:void(0)">',
|
||||
TYPE_NAME[type],
|
||||
'</a>',
|
||||
'</li>'].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);
|
@ -0,0 +1,136 @@
|
||||
/**
|
||||
* @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
|
||||
};
|
||||
}
|
||||
};
|
||||
}(jQuery);
|
@ -0,0 +1,7 @@
|
||||
/*
|
||||
* bootstrap-table - v1.11.0 - 2016-07-02
|
||||
* https://github.com/wenzhixin/bootstrap-table
|
||||
* Copyright (c) 2016 zhixin wen
|
||||
* Licensed MIT License
|
||||
*/
|
||||
!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);
|
@ -0,0 +1,211 @@
|
||||
/**
|
||||
* @author: aperez <aperez@datadec.es>
|
||||
* @version: v2.0.0
|
||||
*
|
||||
* @update Dennis Hernández <http://djhvscf.github.io/Blog>
|
||||
*/
|
||||
|
||||
!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("<div id=\"avdSearchModal%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">", "_" + that.options.idTable);
|
||||
vModal += "<div class=\"modal-dialog modal-xs\">";
|
||||
vModal += " <div class=\"modal-content\">";
|
||||
vModal += " <div class=\"modal-header\">";
|
||||
vModal += " <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" >×</button>";
|
||||
vModal += sprintf(" <h4 class=\"modal-title\">%s</h4>", searchTitle);
|
||||
vModal += " </div>";
|
||||
vModal += " <div class=\"modal-body modal-body-custom\">";
|
||||
vModal += sprintf(" <div class=\"container-fluid\" id=\"avdSearchModalContent%s\" style=\"padding-right: 0px;padding-left: 0px;\" >", "_" + that.options.idTable);
|
||||
vModal += " </div>";
|
||||
vModal += " </div>";
|
||||
vModal += " </div>";
|
||||
vModal += " </div>";
|
||||
vModal += "</div>";
|
||||
|
||||
$("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('<form class="form-horizontal" id="%s" action="%s" >', that.options.idForm, that.options.actionForm));
|
||||
for (var i in pColumns) {
|
||||
var vObjCol = pColumns[i];
|
||||
if (!vObjCol.checkbox && vObjCol.visible && vObjCol.searchable) {
|
||||
htmlForm.push('<div class="form-group">');
|
||||
htmlForm.push(sprintf('<label class="col-sm-4 control-label">%s</label>', vObjCol.title));
|
||||
htmlForm.push('<div class="col-sm-6">');
|
||||
htmlForm.push(sprintf('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">', vObjCol.field, vObjCol.title, vObjCol.field));
|
||||
htmlForm.push('</div>');
|
||||
htmlForm.push('</div>');
|
||||
}
|
||||
}
|
||||
|
||||
htmlForm.push('<div class="form-group">');
|
||||
htmlForm.push('<div class="col-sm-offset-9 col-sm-3">');
|
||||
htmlForm.push(sprintf('<button type="button" id="btnCloseAvd%s" class="btn btn-default" >%s</button>', "_" + that.options.idTable, searchText));
|
||||
htmlForm.push('</div>');
|
||||
htmlForm.push('</div>');
|
||||
htmlForm.push('</form>');
|
||||
|
||||
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('<div class="columns columns-%s btn-group pull-%s" role="group">', this.options.buttonsAlign, this.options.buttonsAlign));
|
||||
html.push(sprintf('<button class="btn btn-default%s' + '" type="button" name="advancedSearch" title="%s">', that.options.iconSize === undefined ? '' : ' btn-' + that.options.iconSize, that.options.formatAdvancedSearch()));
|
||||
html.push(sprintf('<i class="%s %s"></i>', that.options.iconsPrefix, that.options.icons.advancedSearchIcon))
|
||||
html.push('</button></div>');
|
||||
|
||||
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);
|
||||
};
|
||||
}(jQuery);
|
@ -0,0 +1,7 @@
|
||||
/*
|
||||
* bootstrap-table - v1.11.0 - 2016-07-02
|
||||
* https://github.com/wenzhixin/bootstrap-table
|
||||
* Copyright (c) 2016 zhixin wen
|
||||
* Licensed MIT License
|
||||
*/
|
||||
!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('<div id="avdSearchModal%s" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">',"_"+g.options.idTable);h+='<div class="modal-dialog modal-xs">',h+=' <div class="modal-content">',h+=' <div class="modal-header">',h+=' <button type="button" class="close" data-dismiss="modal" aria-hidden="true" >×</button>',h+=c(' <h4 class="modal-title">%s</h4>',d),h+=" </div>",h+=' <div class="modal-body modal-body-custom">',h+=c(' <div class="container-fluid" id="avdSearchModalContent%s" style="padding-right: 0px;padding-left: 0px;" >',"_"+g.options.idTable),h+=" </div>",h+=" </div>",h+=" </div>",h+=" </div>",h+="</div>",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('<form class="form-horizontal" id="%s" action="%s" >',d.options.idForm,d.options.actionForm));for(var f in a){var g=a[f];!g.checkbox&&g.visible&&g.searchable&&(e.push('<div class="form-group">'),e.push(c('<label class="col-sm-4 control-label">%s</label>',g.title)),e.push('<div class="col-sm-6">'),e.push(c('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">',g.field,g.title,g.field)),e.push("</div>"),e.push("</div>"))}return e.push('<div class="form-group">'),e.push('<div class="col-sm-offset-9 col-sm-3">'),e.push(c('<button type="button" id="btnCloseAvd%s" class="btn btn-default" >%s</button>',"_"+d.options.idTable,b)),e.push("</div>"),e.push("</div>"),e.push("</form>"),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('<div class="columns columns-%s btn-group pull-%s" role="group">',this.options.buttonsAlign,this.options.buttonsAlign)),b.push(c('<button class="btn btn-default%s" type="button" name="advancedSearch" title="%s">',void 0===a.options.iconSize?"":" btn-"+a.options.iconSize,a.options.formatAdvancedSearch())),b.push(c('<i class="%s %s"></i>',a.options.iconsPrefix,a.options.icons.advancedSearchIcon)),b.push("</button></div>"),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);
|
42
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.js
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
(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);
|
@ -0,0 +1 @@
|
||||
(function($){$.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);
|
14
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.css
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
.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;}
|
670
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js
vendored
Normal file
@ -0,0 +1,670 @@
|
||||
/**
|
||||
* 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 = $("<div class='bootstrap-tree-table'></div>");
|
||||
var $treetable = $("<div class='treetable-table'></div>");
|
||||
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 = $("<div class='treetable-bars'></div>");
|
||||
if (options.toolbar) {
|
||||
$(options.toolbar).addClass('tool-left');
|
||||
$toolbar.append($(options.toolbar));
|
||||
}
|
||||
var $rightToolbar = $('<div class="btn-group tool-right">');
|
||||
$toolbar.append($rightToolbar);
|
||||
target.parent().before($toolbar);
|
||||
// 是否显示刷新按钮
|
||||
if (options.showRefresh) {
|
||||
var $refreshBtn = $('<button class="btn btn-default btn-outline" type="button" aria-label="refresh" title="刷新"><i class="glyphicon glyphicon-repeat"></i></button>');
|
||||
$rightToolbar.append($refreshBtn);
|
||||
registerRefreshBtnClickEvent($refreshBtn);
|
||||
}
|
||||
// 是否显示列选项
|
||||
if (options.showColumns) {
|
||||
var $columns_div = $('<div class="btn-group pull-right" title="列"><button type="button" aria-label="columns" class="btn btn-default btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="glyphicon glyphicon-list"></i> <span class="caret"></span></button></div>');
|
||||
var $columns_ul = $('<ul class="dropdown-menu columns" role="menu"></ul>');
|
||||
$.each(options.columns, function(i, column) {
|
||||
if (column.field != 'selectItem') {
|
||||
var _li = null;
|
||||
if(typeof column.visible == "undefined"||column.visible==true){
|
||||
_li = $('<li role="menuitem"><label><input type="checkbox" checked="checked" data-field="'+column.field+'" value="'+column.field+'" > '+column.title+'</label></li>');
|
||||
}else{
|
||||
_li = $('<li role="menuitem"><label><input type="checkbox" data-field="'+column.field+'" value="'+column.field+'" > '+column.title+'</label></li>');
|
||||
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 = $('<tr></tr>');
|
||||
$.each(options.columns, function(i, column) {
|
||||
var $th = null;
|
||||
// 判断有没有选择列
|
||||
if (i == 0 && column.field == 'selectItem') {
|
||||
target.hasSelectItem = true;
|
||||
$th = $('<th style="width:36px"></th>');
|
||||
} else {
|
||||
$th = $('<th style="' + ((column.width) ? ('width:' + column.width) : '') + '" class="' + column.field + '_cls"></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 class="treetable-thead"></thead>');
|
||||
$thead.append($thr);
|
||||
target.append($thead);
|
||||
}
|
||||
// 初始化表体
|
||||
var initBody = function() {
|
||||
var $tbody = $('<tbody class="treetable-tbody"></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 = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">正在努力地加载数据中,请稍候……</div></td></tr>'
|
||||
$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 = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">' + xhr.responseText + '</div></td></tr>'
|
||||
$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 = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">没有找到匹配的记录</div></td></tr>'
|
||||
$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.parentId] == '0' ||
|
||||
item[options.parentId] == 0 ||
|
||||
item[options.parentId] == null ||
|
||||
item[options.parentId] == '';
|
||||
if (!item[options.parentId] || (_root ? (item[options.parentId] == options.rootIdValue) : _defaultRootFlag)) {
|
||||
if (!target.data_list["_root_"]) {
|
||||
target.data_list["_root_"] = [];
|
||||
}
|
||||
if (!target.data_obj["id_" + item[options.id]]) {
|
||||
target.data_list["_root_"].push(item);
|
||||
}
|
||||
} else {
|
||||
if (!target.data_list["_n_" + item[options.parentId]]) {
|
||||
target.data_list["_n_" + item[options.parentId]] = [];
|
||||
}
|
||||
if (!target.data_obj["id_" + item[options.id]]) {
|
||||
target.data_list["_n_" + item[options.parentId]].push(item);
|
||||
}
|
||||
}
|
||||
target.data_obj["id_" + item[options.id]] = item;
|
||||
});
|
||||
}
|
||||
// 递归获取子节点并且设置子节点
|
||||
var recursionNode = function(parentNode, lv, row_id, p_id) {
|
||||
var $tbody = target.find("tbody");
|
||||
var _ls = target.data_list["_n_" + parentNode[options.id]];
|
||||
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 = $('<tr id="' + row_id + '" pid="' + p_id + '"></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 = $('<td style="text-align:center;width:36px"></td>');
|
||||
if (column.radio) {
|
||||
var _ipt = $('<input name="select_item" type="radio" value="' + item[options.id] + '"></input>');
|
||||
$td.append(_ipt);
|
||||
}
|
||||
if (column.checkbox) {
|
||||
var _ipt = $('<input name="select_item" type="checkbox" value="' + item[options.id] + '"></input>');
|
||||
$td.append(_ipt);
|
||||
}
|
||||
$tr.append($td);
|
||||
} else {
|
||||
var $td = $('<td name="' + column.field + '" class="' + column.field + '_cls"></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('<span class="treetable-expander"></span>')
|
||||
} else {
|
||||
$td.prepend('<span class="treetable-expander ' + _icon + '"></span>')
|
||||
}
|
||||
for (var int = 0; int < (lv - 1); int++) {
|
||||
$td.prepend('<span class="treetable-indent"></span>')
|
||||
}
|
||||
}
|
||||
$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.id]];
|
||||
var _p_data = target.data_obj["id_" + item[options.parentId]];
|
||||
var _c_list = target.data_list["_n_" + item[options.parentId]];
|
||||
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 = {
|
||||
id: 'id', // 选取记录返回的值,用于设置父子关系
|
||||
parentId: 'parentId', // 用于设置父子关系
|
||||
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' // 缩起的按钮的图标
|
||||
|
||||
};
|
||||
})(jQuery);
|
@ -0,0 +1,127 @@
|
||||
@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;}
|
@ -0,0 +1,135 @@
|
||||
"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);
|
||||
};
|
||||
}));
|
1671
ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datepicker.js
vendored
Normal file
@ -0,0 +1,789 @@
|
||||
/*!
|
||||
* 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;
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
/**
|
||||
* @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 = $('<div>', {
|
||||
'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));
|
@ -0,0 +1,72 @@
|
||||
/* 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;
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 3.7 KiB |
BIN
ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/green.png
Normal file
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 7.5 KiB |
11
ruoyi-admin/src/main/resources/static/ajax/libs/iCheck/icheck.min.js
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/*! 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='<div class="'+l+'" '+(u?'role="'+c[_type]+'" ':"");u&&z.each(function(){h+=
|
||||
'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('<ins class="'+C+'"/>').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);
|
@ -0,0 +1 @@
|
||||
.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-layout-pane{overflow:auto}.ui-layout-content{padding:10px;position:relative;overflow:auto;width:100%;border:0}.layout-child-container,.layout-content-container{padding:0;overflow:hidden}.layout-child-container{border:0}.layout-scroll{overflow:auto}.layout-hide{display:none}.ui-layout-resizer{background:#fafafa;border:1px solid #eee;border-width:0}.ui-layout-resizer-open-hover,.ui-layout-resizer-dragging{background:#fafafa}.ui-layout-resizer-dragging{border:1px solid #eee}.ui-layout-resizer-north-dragging,.ui-layout-resizer-south-dragging{border-width:1px 0}.ui-layout-resizer-west-dragging,.ui-layout-resizer-east-dragging{border-width:0 1px}.ui-layout-resizer-dragging-limit{background:#e1a4a4}.ui-layout-resizer-closed-hover{background:#ebd5aa}.ui-layout-resizer-north-sliding-hover{border-bottom-width:1px}.ui-layout-resizer-south-sliding-hover{border-top-width:1px}.ui-layout-resizer-west-sliding-hover{border-right-width:1px}.ui-layout-resizer-east-sliding-hover{border-left-width:1px}.ui-layout-toggler{border:1px solid #eee;background-color:#eee}.ui-layout-resizer-hover .ui-layout-toggler{opacity:1.00;filter:alpha(opacity=100)}.ui-layout-toggler-hover,.ui-layout-resizer-hover .ui-layout-toggler-hover{background-color:#FC6;opacity:1.00;filter:alpha(opacity=100)}.ui-layout-toggler-north,.ui-layout-toggler-south{border-width:0 1px}.ui-layout-toggler-west,.ui-layout-toggler-east{border-width:1px 0}.ui-layout-resizer-sliding .ui-layout-toggler{display:none}.ui-layout-toggler .ui-content{color:#666;font-size:12px;font-weight:bold;line-height:8px;width:100%;padding-bottom:.35ex}.ui-layout-toggler .ui-content .fa{line-height:8px}.ui-layout-toggler-north-closed .fa:before,.ui-layout-toggler-south-open .fa:before{content:"\f0d7"}.ui-layout-toggler-south-closed .fa:before,.ui-layout-toggler-north-open .fa:before{content:"\f0d8"}.ui-layout-toggler-west-closed .fa:before,.ui-layout-toggler-east-open .fa:before{content:"\f0da"}.ui-layout-toggler-east-closed .fa:before,.ui-layout-toggler-west-open .fa:before{content:"\f0d9"}.ui-layout-mask{border:none!important;padding:0!important;margin:0!important;overflow:hidden!important;position:absolute!important;opacity:0!important;filter:Alpha(Opacity="0")!important}.ui-layout-mask-inside-pane{top:0!important;left:0!important;width:100%!important;height:100%!important}@media print{html{height:auto!important;overflow:visible!important}body.ui-layout-container{position:static!important;top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;_width:auto!important;_height:auto!important}.ui-layout-resizer,.ui-layout-toggler{display:none!important}.ui-layout-pane{border:none!important;background:transparent!important;position:relative!important;top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;width:auto!important;height:auto!important;overflow:visible!important}}
|
After Width: | Height: | Size: 601 B |
After Width: | Height: | Size: 580 B |
After Width: | Height: | Size: 570 B |
After Width: | Height: | Size: 762 B |
After Width: | Height: | Size: 399 B |
After Width: | Height: | Size: 710 B |
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 534 B |
After Width: | Height: | Size: 529 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 45 B |
After Width: | Height: | Size: 381 B |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,102 @@
|
||||
/*-------------------------------------
|
||||
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;
|
||||
}*/
|
After Width: | Height: | Size: 45 B |
After Width: | Height: | Size: 933 B |
After Width: | Height: | Size: 381 B |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 7.1 KiB |
@ -0,0 +1,107 @@
|
||||
/*-------------------------------------
|
||||
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;}
|
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 421 B |
After Width: | Height: | Size: 45 B |
After Width: | Height: | Size: 381 B |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,118 @@
|
||||
/*-------------------------------------
|
||||
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;}
|
@ -0,0 +1,624 @@
|
||||
/*
|
||||
* 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("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
|
||||
}
|
||||
},
|
||||
//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<j; i++) {
|
||||
if(!data.getNodeCache(setting, checkedList[i].tId)) {
|
||||
checkedList.splice(i, 1);
|
||||
i--; j--;
|
||||
}
|
||||
}
|
||||
return checkedList;
|
||||
},
|
||||
getCheckStatus: function(setting, node) {
|
||||
if (!setting.check.enable || node.nocheck || node.chkDisabled) return null;
|
||||
var checkedKey = setting.data.key.checked,
|
||||
r = {
|
||||
checked: node[checkedKey],
|
||||
half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -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<l ; i++) {
|
||||
var node = root[childKey][i];
|
||||
if (node.nocheck !== true && node.chkDisabled !== true) {
|
||||
node[checkedKey] = checked;
|
||||
}
|
||||
view.setSonNodeCheckBox(setting, node, checked);
|
||||
}
|
||||
}
|
||||
},
|
||||
repairChkClass: function(setting, node) {
|
||||
if (!node) return;
|
||||
data.makeChkFlag(setting, node);
|
||||
if (node.nocheck !== true) {
|
||||
var checkObj = $("#" + node.tId + consts.id.CHECK);
|
||||
view.setChkClass(setting, checkObj, node);
|
||||
}
|
||||
},
|
||||
repairParentChkClass: function(setting, node) {
|
||||
if (!node || !node.parentTId) return;
|
||||
var pNode = node.getParentNode();
|
||||
view.repairChkClass(setting, pNode);
|
||||
view.repairParentChkClass(setting, pNode);
|
||||
},
|
||||
repairParentChkClassWithSelf: function(setting, node) {
|
||||
if (!node) return;
|
||||
var childKey = setting.data.key.children;
|
||||
if (node[childKey] && node[childKey].length > 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);
|
@ -0,0 +1,366 @@
|
||||
/*
|
||||
* 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("<li ", (node.isHidden ? "style='display:none;' " : ""), "id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>");
|
||||
},
|
||||
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<j; i++) {
|
||||
var n = nodes[i];
|
||||
if (!pList[n.parentTId]) {
|
||||
var pn = n.getParentNode();
|
||||
pList[n.parentTId] = (pn === null) ? data.getRoot(setting) : n.getParentNode();
|
||||
}
|
||||
view.showNode(setting, n, options);
|
||||
}
|
||||
for (var tId in pList) {
|
||||
var children = pList[tId][setting.data.key.children];
|
||||
view.setFirstNodeForShow(setting, children);
|
||||
view.setLastNodeForShow(setting, children);
|
||||
}
|
||||
},
|
||||
hideNode: function(setting, node, options) {
|
||||
node.isHidden = true;
|
||||
node.isFirstNode = false;
|
||||
node.isLastNode = false;
|
||||
data.initHideForExCheck(setting, node);
|
||||
view.cancelPreSelectedNode(setting, node);
|
||||
$("#" + node.tId).hide();
|
||||
},
|
||||
hideNodes: function(setting, nodes, options) {
|
||||
if (!nodes || nodes.length == 0) {
|
||||
return;
|
||||
}
|
||||
var pList = {}, i, j;
|
||||
for (i=0, j=nodes.length; i<j; i++) {
|
||||
var n = nodes[i];
|
||||
if ((n.isFirstNode || n.isLastNode) && !pList[n.parentTId]) {
|
||||
var pn = n.getParentNode();
|
||||
pList[n.parentTId] = (pn === null) ? data.getRoot(setting) : n.getParentNode();
|
||||
}
|
||||
view.hideNode(setting, n, options);
|
||||
}
|
||||
for (var tId in pList) {
|
||||
var children = pList[tId][setting.data.key.children];
|
||||
view.setFirstNodeForHide(setting, children);
|
||||
view.setLastNodeForHide(setting, children);
|
||||
}
|
||||
},
|
||||
setFirstNode: function(setting, parentNode) {
|
||||
var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
|
||||
if (childLength > 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<j; i++) {
|
||||
n = nodes[i];
|
||||
if (n.isFirstNode) {
|
||||
break;
|
||||
}
|
||||
if (!n.isHidden && !n.isFirstNode) {
|
||||
n.isFirstNode = true;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
break;
|
||||
} else {
|
||||
n = null;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
},
|
||||
setFirstNodeForShow: function(setting, nodes) {
|
||||
var n,i,j, first, old;
|
||||
for(i=0, j=nodes.length; i<j; i++) {
|
||||
n = nodes[i];
|
||||
if (!first && !n.isHidden && n.isFirstNode) {
|
||||
first = n;
|
||||
break;
|
||||
} else if (!first && !n.isHidden && !n.isFirstNode) {
|
||||
n.isFirstNode = true;
|
||||
first = n;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
} else if (first && n.isFirstNode) {
|
||||
n.isFirstNode = false;
|
||||
old = n;
|
||||
view.setNodeLineIcos(setting, n);
|
||||
break;
|
||||
} else {
|
||||
n = null;
|
||||
}
|
||||
}
|
||||
return {"new":first, "old":old};
|
||||
},
|
||||
setLastNodeForHide: function(setting, nodes) {
|
||||
var n,i;
|
||||
for (i=nodes.length-1; 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);
|
||||
}
|
||||
}
|
||||
})(jQuery);
|
@ -0,0 +1,170 @@
|
||||
=ZTree v3.x (JQuery Tree插件) 更新日志=
|
||||
|
||||
<font color="red">为了更好的优化及扩展zTree, 因此决定升级为v3.x,并且对之前的v2.x不兼容,会有很多结构上的修改,对此深感无奈与抱歉,请大家谅解。</font>
|
||||
<font color="red">
|
||||
|
||||
具体修改内容可参考:
|
||||
|
||||
* [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 常见问题]
|
||||
|
||||
</font>
|
||||
|
||||
<font color=#041594>
|
||||
*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 下 在 节点<a> 右侧 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%"'`<input/>`)
|
||||
|
||||
*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 常见问题]
|
2
ruoyi-admin/src/main/resources/static/ajax/libs/layer/layer.min.js
vendored
Normal file
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<!--
|
||||
2013-9-30: Created.
|
||||
-->
|
||||
<svg>
|
||||
<metadata>
|
||||
Created by iconfont
|
||||
</metadata>
|
||||
<defs>
|
||||
|
||||
<font id="laydate-icon" horiz-adv-x="1024" >
|
||||
<font-face
|
||||
font-family="laydate-icon"
|
||||
font-weight="500"
|
||||
font-stretch="normal"
|
||||
units-per-em="1024"
|
||||
ascent="896"
|
||||
descent="-128"
|
||||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
|
||||
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
|
||||
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
|
||||
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
|
||||
|
||||
|
||||
|
||||
<glyph glyph-name="youyou" unicode="" d="M283.648 721.918976 340.873216 780.926976 740.352 383.997952 340.876288-12.925952 283.648 46.077952 619.52 383.997952Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zuozuo" unicode="" d="M740.352 721.918976 683.126784 780.926976 283.648 383.997952 683.123712-12.925952 740.352 46.077952 404.48 383.997952Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiayiye" unicode="" d="M62.573 384.103l423.401 423.662c18.985 18.985 49.757 18.985 68.727 0 18.982-18.972 18.985-49.746 0-68.729l-355.058-355.067 356.796-356.796c18.977-18.971 18.976-49.746 0-68.727-18.982-18.976-49.751-18.976-68.727 0l-39.753 39.753 0.269 0.246-385.655 385.661zM451.365 384.103l423.407 423.662c18.985 18.985 49.757 18.985 68.727 0 18.982-18.972 18.985-49.746 0-68.729l-355.058-355.067 356.796-356.796c18.977-18.971 18.976-49.746 0-68.727-18.982-18.976-49.757-18.977-68.727 0l-39.762 39.754 0.273 0.249-385.662 385.661zM451.365 384.103z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiayiye1" unicode="" d="M948.066926 382.958838l-411.990051-412.24426c-18.47333-18.47333-48.417689-18.47333-66.875207 0-18.47333 18.461167-18.47333 48.405526 0 66.875207L814.691135 383.088983 467.512212 730.269123c-18.466032 18.458735-18.466032 48.405526 0 66.873991 18.468465 18.464816 48.410391 18.464816 66.872774 0l38.682336-38.682336-0.261507-0.239614 375.259894-375.265975v0.003649m-378.312834 0L157.756743-29.285422c-18.47333-18.47333-48.415256-18.47333-66.872775 0-18.47333 18.461167-18.47333 48.405526 0 66.875207L436.369787 383.088983 89.19208 730.269123c-18.4636 18.458735-18.4636 48.405526 0 66.873991 18.470898 18.464816 48.415256 18.464816 66.872774 0l38.692067-38.682336-0.266372-0.239614 375.267191-375.265975-0.004865 0.003649m0 0z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
||||
|
||||
</font>
|
||||
</defs></svg>
|
After Width: | Height: | Size: 3.0 KiB |
@ -0,0 +1,103 @@
|
||||
(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);
|
3
ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-zh-CN.min.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/*! Summernote v0.8.8 | (c) 2013- Alan Hong and other contributors | MIT license */
|
||||
|
||||
!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);
|
@ -0,0 +1,446 @@
|
||||
.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
|
||||
}
|
2
ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote.min.js
vendored
Normal file
4
ruoyi-admin/src/main/resources/static/ajax/libs/validate/additional-methods.min.js
vendored
Normal file
@ -0,0 +1,169 @@
|
||||
/*this is basic form validation using for validation person's basic information author:Clara Guo data:2017/07/20*/
|
||||
$(document).ready(function(){
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function(form) {
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
//手机号码验证身份证正则合并:(^\d{15}$)|(^\d{17}([0-9]|X)$)
|
||||
jQuery.validator.addMethod("isPhone",function(value,element){
|
||||
var length = value.length;
|
||||
var phone=/^1[3|4|5|7|8][0-9]\d{8}$/;
|
||||
return this.optional(element)||(length == 11 && phone.test(value));
|
||||
},"请填写正确的11位手机号");
|
||||
//电话号码验证
|
||||
jQuery.validator.addMethod("isTel",function(value,element){
|
||||
var tel = /^(0\d{2,3}-)?\d{7,8}$/g;//区号3,4位,号码7,8位
|
||||
return this.optional(element) || (tel.test(value));
|
||||
},"请填写正确的座机号码");
|
||||
//姓名校验
|
||||
jQuery.validator.addMethod("isName",function(value,element){
|
||||
var name=/^[\u4e00-\u9fa5]{2,6}$/;
|
||||
return this.optional(element) || (name.test(value));
|
||||
},"姓名只能用汉字,长度2-4位");
|
||||
//校验用户名
|
||||
jQuery.validator.addMethod("isUserName",function(value,element){
|
||||
var userName=/^[a-zA-Z0-9]{2,13}$/;
|
||||
return this.optional(element) || (userName).test(value);
|
||||
},'请输入数字或者字母,不包含特殊字符');
|
||||
|
||||
//校验身份证
|
||||
jQuery.validator.addMethod("isIdentity",function(value,element){
|
||||
var id= /^(\d{15}$|^\d{18}$|^\d{17}(\d|X))$/;
|
||||
return this.optional(element) || (id.test(value));
|
||||
},"请输入正确的15或18位身份证号,末尾为大写X");
|
||||
//校验出生日期
|
||||
jQuery.validator.addMethod("isBirth",function(value,element){
|
||||
var birth = /^(19|20)\d{2}-(1[0-2]|0?[1-9])-(0?[1-9]|[1-2][0-9]|3[0-1])$/;
|
||||
return this.optional(element) || (birth).test(value);
|
||||
},"出生日期格式示例2000-01-01");
|
||||
//校验新旧密码是否相同
|
||||
jQuery.validator.addMethod("isdiff",function(){
|
||||
var p1=$("#pwdOld").val();
|
||||
var p2=$("#pwdNew").val();
|
||||
if(p1==p2){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
});
|
||||
//校验新密码和确认密码是否相同
|
||||
jQuery.validator.addMethod("issame",function(){
|
||||
var p3=$("#confirm_password").val();
|
||||
var p4=$("#pwdNew").val();
|
||||
if(p3==p4){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
//校验基础信息表单
|
||||
$("#basicInfoForm").validate({
|
||||
errorElement:'span',
|
||||
errorClass:'help-block error-mes',
|
||||
rules:{
|
||||
name:{
|
||||
required:true,
|
||||
isName:true
|
||||
},
|
||||
sex:"required",
|
||||
birth:"required",
|
||||
mobile:{
|
||||
required:true,
|
||||
isPhone:true
|
||||
},
|
||||
email:{
|
||||
required:true,
|
||||
email:true
|
||||
}
|
||||
},
|
||||
messages:{
|
||||
name:{
|
||||
required:"请输入中文姓名",
|
||||
isName:"姓名只能为汉字"
|
||||
},
|
||||
sex:{
|
||||
required:"请输入性别"
|
||||
},
|
||||
birth:{
|
||||
required:"请输入出生年月"
|
||||
},
|
||||
mobile:{
|
||||
required:"请输入手机号",
|
||||
isPhone:"请填写正确的11位手机号"
|
||||
},
|
||||
email:{
|
||||
required:"请输入邮箱",
|
||||
email:"请填写正确的邮箱格式"
|
||||
}
|
||||
},
|
||||
|
||||
errorPlacement:function(error,element){
|
||||
element.next().remove();
|
||||
element.closest('.gg-formGroup').append(error);
|
||||
},
|
||||
|
||||
highlight:function(element){
|
||||
$(element).closest('.gg-formGroup').addClass('has-error has-feedback');
|
||||
},
|
||||
success:function(label){
|
||||
var el = label.closest('.gg-formGroup').find("input");
|
||||
el.next().remove();
|
||||
label.closest('.gg-formGroup').removeClass('has-error').addClass("has-feedback has-success");
|
||||
label.remove();
|
||||
},
|
||||
submitHandler:function(form){
|
||||
alert("保存成功!");
|
||||
}
|
||||
});
|
||||
|
||||
//校验修改密码表单
|
||||
$("#modifyPwd").validate({
|
||||
onfocusout: function(element) { $(element).valid()},
|
||||
debug:false, //表示校验通过后是否直接提交表单
|
||||
onkeyup:false, //表示按键松开时候监听验证
|
||||
rules:{
|
||||
pwdOld:{
|
||||
required:true,
|
||||
minlength:6
|
||||
},
|
||||
pwdNew:{
|
||||
required:true,
|
||||
minlength:6,
|
||||
isdiff:true,
|
||||
//issame:true,
|
||||
},
|
||||
confirm_password:{
|
||||
required:true,
|
||||
minlength:6,
|
||||
issame:true,
|
||||
}
|
||||
|
||||
},
|
||||
messages:{
|
||||
pwdOld : {
|
||||
required:'必填',
|
||||
minlength:$.validator.format('密码长度要大于6')
|
||||
},
|
||||
pwdNew:{
|
||||
required:'必填',
|
||||
minlength:$.validator.format('密码长度要大于6'),
|
||||
isdiff:'原密码与新密码不能重复',
|
||||
|
||||
},
|
||||
confirm_password:{
|
||||
required:'必填',
|
||||
minlength:$.validator.format('密码长度要大于6'),
|
||||
issame:'新密码要与确认新密码一致',
|
||||
}
|
||||
|
||||
},
|
||||
errorElement:"mes",
|
||||
errorClass:"gg-star",
|
||||
errorPlacement: function(error, element)
|
||||
{
|
||||
element.closest('.gg-formGroup').append(error);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
4
ruoyi-admin/src/main/resources/static/ajax/libs/validate/jquery.validate.min.js
vendored
Normal file
27
ruoyi-admin/src/main/resources/static/ajax/libs/validate/messages_zh.min.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/*! jQuery Validation Plugin - v1.13.1 - 10/14/2014
|
||||
* http://jqueryvalidation.org/
|
||||
* Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
|
||||
! function (a) {
|
||||
"function" == typeof define && define.amd ? define(["jquery", "jquery.validate.min"], a) : a(jQuery)
|
||||
}(function (a) {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
a.extend(a.validator.messages, {
|
||||
required: icon + "必填",
|
||||
remote: icon + "请修正此栏位",
|
||||
email: icon + "请输入有效的电子邮件",
|
||||
url: icon + "请输入有效的网址",
|
||||
date: icon + "请输入有效的日期",
|
||||
dateISO: icon + "请输入有效的日期 (YYYY-MM-DD)",
|
||||
number: icon + "请输入正确的数字",
|
||||
digits: icon + "只能输入数字",
|
||||
creditcard: icon + "请输入有效的信用卡号码",
|
||||
equalTo: icon + "你的输入不相同",
|
||||
extension: icon + "请输入有效的后缀",
|
||||
maxlength: a.validator.format(icon + "最多 {0} 个字"),
|
||||
minlength: a.validator.format(icon + "最少 {0} 个字"),
|
||||
rangelength: a.validator.format(icon + "请输入长度为 {0} 至 {1} 之间的字串"),
|
||||
range: a.validator.format(icon + "请输入 {0} 至 {1} 之间的数值"),
|
||||
max: a.validator.format(icon + "请输入不大于 {0} 的数值"),
|
||||
min: a.validator.format(icon + "请输入不小于 {0} 的数值")
|
||||
})
|
||||
});
|
2880
ruoyi-admin/src/main/resources/static/css/animate.css
vendored
Normal file
6
ruoyi-admin/src/main/resources/static/css/bootstrap.min.css
vendored
Normal file
4
ruoyi-admin/src/main/resources/static/css/font-awesome.min.css
vendored
Normal file
86
ruoyi-admin/src/main/resources/static/css/login.css
Normal file
@ -0,0 +1,86 @@
|
||||
html {
|
||||
height:100%
|
||||
}
|
||||
body.signin {
|
||||
height:auto;
|
||||
background:url(../img/login-background.jpg) no-repeat center fixed;
|
||||
-webkit-background-size:cover;
|
||||
-moz-background-size:cover;
|
||||
-o-background-size:cover;
|
||||
background-size:cover;
|
||||
color:rgba(255,255,255,.95)
|
||||
}
|
||||
.signinpanel {
|
||||
width:750px;
|
||||
margin:10% auto 0
|
||||
}
|
||||
.signinpanel .logopanel {
|
||||
float:none;
|
||||
width:auto;
|
||||
padding:0;
|
||||
background:0 0
|
||||
}
|
||||
.signinpanel .signin-info ul {
|
||||
list-style:none;
|
||||
padding:0;
|
||||
margin:20px 0
|
||||
}
|
||||
.signinpanel .form-control {
|
||||
display:block;
|
||||
margin-top:15px
|
||||
}
|
||||
.signinpanel .uname {
|
||||
background:#fff url(../img/user.png) no-repeat 95% center;
|
||||
color:#333
|
||||
}
|
||||
.signinpanel .pword {
|
||||
background:#fff url(../img/locked.png) no-repeat 95% center;
|
||||
color:#333
|
||||
}
|
||||
.signinpanel .code {
|
||||
background: #fff no-repeat 95% center;color:#333; margin:0 0 15px 0;
|
||||
}
|
||||
.signinpanel .btn {
|
||||
margin-top:15px
|
||||
}
|
||||
.signinpanel form {
|
||||
background:rgba(255,255,255,.2);
|
||||
border:1px solid rgba(255,255,255,.3);
|
||||
-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);
|
||||
-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);
|
||||
box-shadow:0 3px 0 rgba(12,12,12,.03);
|
||||
-moz-border-radius:3px;
|
||||
-webkit-border-radius:3px;
|
||||
border-radius:3px;
|
||||
padding:30px
|
||||
}
|
||||
.signup-footer {
|
||||
border-top:solid 1px rgba(255,255,255,.3);
|
||||
margin:20px 0;
|
||||
padding-top:15px
|
||||
}
|
||||
@media screen and (max-width:768px) {
|
||||
.signinpanel,.signuppanel {
|
||||
margin:0 auto;
|
||||
width:420px!important;
|
||||
padding:20px
|
||||
}
|
||||
.signinpanel form {
|
||||
margin-top:20px
|
||||
}
|
||||
.signup-footer,.signuppanel .form-control {
|
||||
margin-bottom:10px
|
||||
}
|
||||
.signup-footer .pull-left,.signup-footer .pull-right {
|
||||
float:none!important;
|
||||
text-align:center
|
||||
}
|
||||
.signinpanel .signin-info ul {
|
||||
display:none
|
||||
}
|
||||
}@media screen and (max-width:320px) {
|
||||
.signinpanel,.signuppanel {
|
||||
margin:0 20px;
|
||||
width:auto
|
||||
}
|
||||
}
|
1
ruoyi-admin/src/main/resources/static/css/login.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0 0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}
|