diff --git a/awx/ui/static/lib/jstree/README.txt b/awx/ui/static/lib/jstree/README.txt
deleted file mode 100644
index eb90797b47..0000000000
--- a/awx/ui/static/lib/jstree/README.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-jsTree pre1.0
-http://jstree.com/
-
-Copyright (c) 2011 Ivan Bozhanov (vakata.com)
-
-Dual licensed under the MIT and GPL licenses:
- http://www.opensource.org/licenses/mit-license.php
- http://www.gnu.org/licenses/gpl.html
-
-This is the latest stable version before switching from GoogleCode to GitHub.
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_demo/_dump.sql b/awx/ui/static/lib/jstree/_demo/_dump.sql
deleted file mode 100644
index 19dfdd1f3d..0000000000
--- a/awx/ui/static/lib/jstree/_demo/_dump.sql
+++ /dev/null
@@ -1,20 +0,0 @@
-CREATE TABLE IF NOT EXISTS `tree` (
- `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
- `parent_id` bigint(20) unsigned NOT NULL,
- `position` bigint(20) unsigned NOT NULL,
- `left` bigint(20) unsigned NOT NULL,
- `right` bigint(20) unsigned NOT NULL,
- `level` bigint(20) unsigned NOT NULL,
- `title` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
- `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;
-
-INSERT INTO `tree` (`id`, `parent_id`, `position`, `left`, `right`, `level`, `title`, `type`) VALUES
-(1, 0, 2, 1, 14, 0, 'ROOT', ''),
-(2, 1, 0, 2, 11, 1, 'C:', 'drive'),
-(3, 2, 0, 3, 6, 2, '_demo', 'folder'),
-(4, 3, 0, 4, 5, 3, 'index.html', 'default'),
-(5, 2, 1, 7, 10, 2, '_docs', 'folder'),
-(6, 1, 1, 12, 13, 1, 'D:', 'drive'),
-(12, 5, 0, 8, 9, 3, 'zmei.html', 'default');
diff --git a/awx/ui/static/lib/jstree/_demo/_inc/__mysql_errors.log b/awx/ui/static/lib/jstree/_demo/_inc/__mysql_errors.log
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/awx/ui/static/lib/jstree/_demo/_inc/class._database.php b/awx/ui/static/lib/jstree/_demo/_inc/class._database.php
deleted file mode 100644
index 9b6fd56aee..0000000000
--- a/awx/ui/static/lib/jstree/_demo/_inc/class._database.php
+++ /dev/null
@@ -1,146 +0,0 @@
- "localhost",
- "serverport"=> "3306",
- "username" => false,
- "password" => false,
- "database" => false,
- "persist" => false,
- "dieonerror"=> false,
- "showerror" => false,
- "error_file"=> true
- );
-
- function __construct() {
- global $db_config;
- $this->settings = array_merge($this->settings, $db_config);
- if($this->settings["error_file"] === true) $this->settings["error_file"] = dirname(__FILE__)."/__mysql_errors.log";
- }
-
- function connect() {
- if (!$this->link) {
- $this->link = ($this->settings["persist"]) ?
- mysql_pconnect(
- $this->settings["servername"].":".$this->settings["serverport"],
- $this->settings["username"],
- $this->settings["password"]
- ) :
- mysql_connect(
- $this->settings["servername"].":".$this->settings["serverport"],
- $this->settings["username"],
- $this->settings["password"]
- ) or $this->error();
- }
- if (!mysql_select_db($this->settings["database"], $this->link)) $this->error();
- if($this->link) mysql_query("SET NAMES 'utf8'");
- return ($this->link) ? true : false;
- }
-
- function query($sql) {
- if (!$this->link && !$this->connect()) $this->error();
- if (!($this->result = mysql_query($sql, $this->link))) $this->error($sql);
- return ($this->result) ? true : false;
- }
-
- function nextr() {
- if(!$this->result) {
- $this->error("No query pending");
- return false;
- }
- unset($this->row);
- $this->row = mysql_fetch_array($this->result, MYSQL_BOTH);
- return ($this->row) ? true : false ;
- }
-
- function get_row($mode = "both") {
- if(!$this->row) return false;
-
- $return = array();
- switch($mode) {
- case "assoc":
- foreach($this->row as $k => $v) {
- if(!is_int($k)) $return[$k] = $v;
- }
- break;
- case "num":
- foreach($this->row as $k => $v) {
- if(is_int($k)) $return[$k] = $v;
- }
- break;
- default:
- $return = $this->row;
- break;
- }
- return array_map("stripslashes",$return);
- }
-
- function get_all($mode = "both", $key = false) {
- if(!$this->result) {
- $this->error("No query pending");
- return false;
- }
- $return = array();
- while($this->nextr()) {
- if($key !== false) $return[$this->f($key)] = $this->get_row($mode);
- else $return[] = $this->get_row($mode);
- }
- return $return;
- }
-
- function f($index) {
- return stripslashes($this->row[$index]);
- }
-
- function go_to($row) {
- if(!$this->result) {
- $this->error("No query pending");
- return false;
- }
- if(!mysql_data_seek($this->result, $row)) $this->error();
- }
-
- function nf() {
- if ($numb = mysql_num_rows($this->result) === false) $this->error();
- return mysql_num_rows($this->result);
- }
- function af() {
- return mysql_affected_rows();
- }
- function error($string="") {
- $error = mysql_error();
- if($this->settings["show_error"]) echo $error;
- if($this->settings["error_file"] !== false) {
- $handle = @fopen($this->settings["error_file"], "a+");
- if($handle) {
- @fwrite($handle, "[".date("Y-m-d H:i:s")."] ".$string." <".$error.">\n");
- @fclose($handle);
- }
- }
- if($this->settings["dieonerror"]) {
- if(isset($this->result)) mysql_free_result($this->result);
- mysql_close($this->link);
- die();
- }
- }
- function insert_id() {
- if(!$this->link) return false;
- return mysql_insert_id();
- }
- function escape($string){
- if(!$this->link) return addslashes($string);
- return mysql_real_escape_string($string);
- }
-
- function destroy(){
- if (isset($this->result)) mysql_free_result($this->result);
- if (isset($this->link)) mysql_close($this->link);
- }
-
-
-}
-?>
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_demo/_inc/class._database_i.php b/awx/ui/static/lib/jstree/_demo/_inc/class._database_i.php
deleted file mode 100644
index 04f9ee7f9c..0000000000
--- a/awx/ui/static/lib/jstree/_demo/_inc/class._database_i.php
+++ /dev/null
@@ -1,152 +0,0 @@
- "localhost",
- "serverport"=> "3306",
- "username" => false,
- "password" => false,
- "database" => false,
- "persist" => false,
- "dieonerror"=> false,
- "showerror" => false,
- "error_file"=> true
- );
-
- function __construct() {
- global $db_config;
- $this->settings = array_merge($this->settings, $db_config);
- if($this->settings["error_file"] === true) $this->settings["error_file"] = dirname(__FILE__)."/__mysql_errors.log";
- }
-
- function connect() {
- $this->data = new mysqli(
- $this->settings["servername"],
- $this->settings["username"],
- $this->settings["password"],
- $this->settings["database"],
- $this->settings["serverport"]
- );
-
- if(mysqli_connect_errno()) {
- $this->error("Connection error: ".mysqli_connect_error() );
- return false;
- }
- if(!$this->data->set_charset("utf8")) {
- $this->error("Error loading character set utf8");
- return false;
- }
- return true;
- }
-
- function query($sql) {
- if(!$this->data && !$this->connect()) {
- $this->error("Could node connect for query: ".$sql);
- return false;
- }
- //echo $sql."
:";
- if(!($this->result = $this->data->query($sql))) $this->error($sql);
- return ($this->result) ? true : false;
- }
-
- function nextr(){
- if(!$this->result) {
- $this->error("No query pending");
- return false;
- }
- unset($this->row);
- $this->row = $this->result->fetch_array(MYSQL_BOTH);
- return ($this->row) ? true : false ;
- }
-
- function get_row($mode = "both") {
- if(!$this->row) return false;
-
- $return = array();
- switch($mode) {
- case "assoc":
- foreach($this->row as $k => $v) {
- if(!is_int($k)) $return[$k] = $v;
- }
- break;
- case "num":
- foreach($this->row as $k => $v) {
- if(is_int($k)) $return[$k] = $v;
- }
- break;
- default:
- $return = $this->row;
- break;
- }
- return array_map("stripslashes",$return);
- }
-
- function get_all($mode = "both", $key = false) {
- if(!$this->result) {
- $this->error("No query pending");
- return false;
- }
- $return = array();
- while($this->nextr()) {
- if($key !== false) $return[$this->f($key)] = $this->get_row($mode);
- else $return[] = $this->get_row($mode);
- }
- return $return;
- }
-
- function f($index) {
- return stripslashes($this->row[$index]);
- }
-
- function go_to($row) {
- if(!$this->result) {
- $this->error("No query pending");
- return false;
- }
- if(!$this->data->data_seek($row)) $this->error();
- }
-
- function nf() {
- if (!$this->result) {
- $this->error("nf: no result set");
- return false;
- }
- return $this->result->num_rows;
- }
- function af() {
- return $this->data->affected_rows;
- }
- function error($string = "") {
- $error = $this->data->error;
- if($this->settings["show_error"]) echo $error;
- if($this->settings["error_file"] !== false) {
- $handle = @fopen($this->settings["error_file"], "a+");
- if($handle) {
- @fwrite($handle, "[".date("Y-m-d H:i:s")."] ".$string." <".$error.">\n");
- @fclose($handle);
- }
- }
- if($this->settings["dieonerror"]) {
- if(isset($this->result)) $this->result->free();
- @$this->data->close();
- die();
- }
- }
- function insert_id() {
- return $this->data->insert_id;
- }
- function escape($string) {
- if(!$this->data) return addslashes($string);
- return $this->data->escape_string($string);
- }
-
- function destroy() {
- if(isset($this->result)) $this->result->free();
- if($this->data) $this->data->close();
- }
-
-
-}
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_demo/_inc/class.tree.php b/awx/ui/static/lib/jstree/_demo/_inc/class.tree.php
deleted file mode 100644
index 690b0a3dc5..0000000000
--- a/awx/ui/static/lib/jstree/_demo/_inc/class.tree.php
+++ /dev/null
@@ -1,602 +0,0 @@
- false,
- "parent_id" => false,
- "position" => false,
- "left" => false,
- "right" => false,
- "level" => false
- );
-
- // Constructor
- function __construct($table = "tree", $fields = array()) {
- $this->table = $table;
- if(!count($fields)) {
- foreach($this->fields as $k => &$v) { $v = $k; }
- }
- else {
- foreach($fields as $key => $field) {
- switch($key) {
- case "id":
- case "parent_id":
- case "position":
- case "left":
- case "right":
- case "level":
- $this->fields[$key] = $field;
- break;
- }
- }
- }
- // Database
- $this->db = new _database;
- }
-
- function _get_node($id) {
- $this->db->query("SELECT `".implode("` , `", $this->fields)."` FROM `".$this->table."` WHERE `".$this->fields["id"]."` = ".(int) $id);
- $this->db->nextr();
- return $this->db->nf() === 0 ? false : $this->db->get_row("assoc");
- }
- function _get_children($id, $recursive = false) {
- $children = array();
- if($recursive) {
- $node = $this->_get_node($id);
- $this->db->query("SELECT `".implode("` , `", $this->fields)."` FROM `".$this->table."` WHERE `".$this->fields["left"]."` >= ".(int) $node[$this->fields["left"]]." AND `".$this->fields["right"]."` <= ".(int) $node[$this->fields["right"]]." ORDER BY `".$this->fields["left"]."` ASC");
- }
- else {
- $this->db->query("SELECT `".implode("` , `", $this->fields)."` FROM `".$this->table."` WHERE `".$this->fields["parent_id"]."` = ".(int) $id." ORDER BY `".$this->fields["position"]."` ASC");
- }
- while($this->db->nextr()) $children[$this->db->f($this->fields["id"])] = $this->db->get_row("assoc");
- return $children;
- }
- function _get_path($id) {
- $node = $this->_get_node($id);
- $path = array();
- if(!$node === false) return false;
- $this->db->query("SELECT `".implode("` , `", $this->fields)."` FROM `".$this->table."` WHERE `".$this->fields["left"]."` <= ".(int) $node[$this->fields["left"]]." AND `".$this->fields["right"]."` >= ".(int) $node[$this->fields["right"]]);
- while($this->db->nextr()) $path[$this->db->f($this->fields["id"])] = $this->db->get_row("assoc");
- return $path;
- }
-
- function _create($parent, $position) {
- return $this->_move(0, $parent, $position);
- }
- function _remove($id) {
- if((int)$id === 1) { return false; }
- $data = $this->_get_node($id);
- $lft = (int)$data[$this->fields["left"]];
- $rgt = (int)$data[$this->fields["right"]];
- $dif = $rgt - $lft + 1;
-
- // deleting node and its children
- $this->db->query("" .
- "DELETE FROM `".$this->table."` " .
- "WHERE `".$this->fields["left"]."` >= ".$lft." AND `".$this->fields["right"]."` <= ".$rgt
- );
- // shift left indexes of nodes right of the node
- $this->db->query("".
- "UPDATE `".$this->table."` " .
- "SET `".$this->fields["left"]."` = `".$this->fields["left"]."` - ".$dif." " .
- "WHERE `".$this->fields["left"]."` > ".$rgt
- );
- // shift right indexes of nodes right of the node and the node's parents
- $this->db->query("" .
- "UPDATE `".$this->table."` " .
- "SET `".$this->fields["right"]."` = `".$this->fields["right"]."` - ".$dif." " .
- "WHERE `".$this->fields["right"]."` > ".$lft
- );
-
- $pid = (int)$data[$this->fields["parent_id"]];
- $pos = (int)$data[$this->fields["position"]];
-
- // Update position of siblings below the deleted node
- $this->db->query("" .
- "UPDATE `".$this->table."` " .
- "SET `".$this->fields["position"]."` = `".$this->fields["position"]."` - 1 " .
- "WHERE `".$this->fields["parent_id"]."` = ".$pid." AND `".$this->fields["position"]."` > ".$pos
- );
- return true;
- }
- function _move($id, $ref_id, $position = 0, $is_copy = false) {
- if((int)$ref_id === 0 || (int)$id === 1) { return false; }
- $sql = array(); // Queries executed at the end
- $node = $this->_get_node($id); // Node data
- $nchildren = $this->_get_children($id); // Node children
- $ref_node = $this->_get_node($ref_id); // Ref node data
- $rchildren = $this->_get_children($ref_id);// Ref node children
-
- $ndif = 2;
- $node_ids = array(-1);
- if($node !== false) {
- $node_ids = array_keys($this->_get_children($id, true));
- // TODO: should be !$is_copy && , but if copied to self - screws some right indexes
- if(in_array($ref_id, $node_ids)) return false;
- $ndif = $node[$this->fields["right"]] - $node[$this->fields["left"]] + 1;
- }
- if($position >= count($rchildren)) {
- $position = count($rchildren);
- }
-
- // Not creating or copying - old parent is cleaned
- if($node !== false && $is_copy == false) {
- $sql[] = "" .
- "UPDATE `".$this->table."` " .
- "SET `".$this->fields["position"]."` = `".$this->fields["position"]."` - 1 " .
- "WHERE " .
- "`".$this->fields["parent_id"]."` = ".$node[$this->fields["parent_id"]]." AND " .
- "`".$this->fields["position"]."` > ".$node[$this->fields["position"]];
- $sql[] = "" .
- "UPDATE `".$this->table."` " .
- "SET `".$this->fields["left"]."` = `".$this->fields["left"]."` - ".$ndif." " .
- "WHERE `".$this->fields["left"]."` > ".$node[$this->fields["right"]];
- $sql[] = "" .
- "UPDATE `".$this->table."` " .
- "SET `".$this->fields["right"]."` = `".$this->fields["right"]."` - ".$ndif." " .
- "WHERE " .
- "`".$this->fields["right"]."` > ".$node[$this->fields["left"]]." AND " .
- "`".$this->fields["id"]."` NOT IN (".implode(",", $node_ids).") ";
- }
- // Preparing new parent
- $sql[] = "" .
- "UPDATE `".$this->table."` " .
- "SET `".$this->fields["position"]."` = `".$this->fields["position"]."` + 1 " .
- "WHERE " .
- "`".$this->fields["parent_id"]."` = ".$ref_id." AND " .
- "`".$this->fields["position"]."` >= ".$position." " .
- ( $is_copy ? "" : " AND `".$this->fields["id"]."` NOT IN (".implode(",", $node_ids).") ");
-
- $ref_ind = $ref_id === 0 ? (int)$rchildren[count($rchildren) - 1][$this->fields["right"]] + 1 : (int)$ref_node[$this->fields["right"]];
- $ref_ind = max($ref_ind, 1);
-
- $self = ($node !== false && !$is_copy && (int)$node[$this->fields["parent_id"]] == $ref_id && $position > $node[$this->fields["position"]]) ? 1 : 0;
- foreach($rchildren as $k => $v) {
- if($v[$this->fields["position"]] - $self == $position) {
- $ref_ind = (int)$v[$this->fields["left"]];
- break;
- }
- }
- if($node !== false && !$is_copy && $node[$this->fields["left"]] < $ref_ind) {
- $ref_ind -= $ndif;
- }
-
- $sql[] = "" .
- "UPDATE `".$this->table."` " .
- "SET `".$this->fields["left"]."` = `".$this->fields["left"]."` + ".$ndif." " .
- "WHERE " .
- "`".$this->fields["left"]."` >= ".$ref_ind." " .
- ( $is_copy ? "" : " AND `".$this->fields["id"]."` NOT IN (".implode(",", $node_ids).") ");
- $sql[] = "" .
- "UPDATE `".$this->table."` " .
- "SET `".$this->fields["right"]."` = `".$this->fields["right"]."` + ".$ndif." " .
- "WHERE " .
- "`".$this->fields["right"]."` >= ".$ref_ind." " .
- ( $is_copy ? "" : " AND `".$this->fields["id"]."` NOT IN (".implode(",", $node_ids).") ");
-
- $ldif = $ref_id == 0 ? 0 : $ref_node[$this->fields["level"]] + 1;
- $idif = $ref_ind;
- if($node !== false) {
- $ldif = $node[$this->fields["level"]] - ($ref_node[$this->fields["level"]] + 1);
- $idif = $node[$this->fields["left"]] - $ref_ind;
- if($is_copy) {
- $sql[] = "" .
- "INSERT INTO `".$this->table."` (" .
- "`".$this->fields["parent_id"]."`, " .
- "`".$this->fields["position"]."`, " .
- "`".$this->fields["left"]."`, " .
- "`".$this->fields["right"]."`, " .
- "`".$this->fields["level"]."`" .
- ") " .
- "SELECT " .
- "".$ref_id.", " .
- "`".$this->fields["position"]."`, " .
- "`".$this->fields["left"]."` - (".($idif + ($node[$this->fields["left"]] >= $ref_ind ? $ndif : 0))."), " .
- "`".$this->fields["right"]."` - (".($idif + ($node[$this->fields["left"]] >= $ref_ind ? $ndif : 0))."), " .
- "`".$this->fields["level"]."` - (".$ldif.") " .
- "FROM `".$this->table."` " .
- "WHERE " .
- "`".$this->fields["id"]."` IN (".implode(",", $node_ids).") " .
- "ORDER BY `".$this->fields["level"]."` ASC";
- }
- else {
- $sql[] = "" .
- "UPDATE `".$this->table."` SET " .
- "`".$this->fields["parent_id"]."` = ".$ref_id.", " .
- "`".$this->fields["position"]."` = ".$position." " .
- "WHERE " .
- "`".$this->fields["id"]."` = ".$id;
- $sql[] = "" .
- "UPDATE `".$this->table."` SET " .
- "`".$this->fields["left"]."` = `".$this->fields["left"]."` - (".$idif."), " .
- "`".$this->fields["right"]."` = `".$this->fields["right"]."` - (".$idif."), " .
- "`".$this->fields["level"]."` = `".$this->fields["level"]."` - (".$ldif.") " .
- "WHERE " .
- "`".$this->fields["id"]."` IN (".implode(",", $node_ids).") ";
- }
- }
- else {
- $sql[] = "" .
- "INSERT INTO `".$this->table."` (" .
- "`".$this->fields["parent_id"]."`, " .
- "`".$this->fields["position"]."`, " .
- "`".$this->fields["left"]."`, " .
- "`".$this->fields["right"]."`, " .
- "`".$this->fields["level"]."` " .
- ") " .
- "VALUES (" .
- $ref_id.", " .
- $position.", " .
- $idif.", " .
- ($idif + 1).", " .
- $ldif.
- ")";
- }
- foreach($sql as $q) { $this->db->query($q); }
- $ind = $this->db->insert_id();
- if($is_copy) $this->_fix_copy($ind, $position);
- return $node === false || $is_copy ? $ind : true;
- }
- function _fix_copy($id, $position) {
- $node = $this->_get_node($id);
- $children = $this->_get_children($id, true);
-
- $map = array();
- for($i = $node[$this->fields["left"]] + 1; $i < $node[$this->fields["right"]]; $i++) {
- $map[$i] = $id;
- }
- foreach($children as $cid => $child) {
- if((int)$cid == (int)$id) {
- $this->db->query("UPDATE `".$this->table."` SET `".$this->fields["position"]."` = ".$position." WHERE `".$this->fields["id"]."` = ".$cid);
- continue;
- }
- $this->db->query("UPDATE `".$this->table."` SET `".$this->fields["parent_id"]."` = ".$map[(int)$child[$this->fields["left"]]]." WHERE `".$this->fields["id"]."` = ".$cid);
- for($i = $child[$this->fields["left"]] + 1; $i < $child[$this->fields["right"]]; $i++) {
- $map[$i] = $cid;
- }
- }
- }
-
- function _reconstruct() {
- $this->db->query("" .
- "CREATE TEMPORARY TABLE `temp_tree` (" .
- "`".$this->fields["id"]."` INTEGER NOT NULL, " .
- "`".$this->fields["parent_id"]."` INTEGER NOT NULL, " .
- "`". $this->fields["position"]."` INTEGER NOT NULL" .
- ") type=HEAP"
- );
- $this->db->query("" .
- "INSERT INTO `temp_tree` " .
- "SELECT " .
- "`".$this->fields["id"]."`, " .
- "`".$this->fields["parent_id"]."`, " .
- "`".$this->fields["position"]."` " .
- "FROM `".$this->table."`"
- );
-
- $this->db->query("" .
- "CREATE TEMPORARY TABLE `temp_stack` (" .
- "`".$this->fields["id"]."` INTEGER NOT NULL, " .
- "`".$this->fields["left"]."` INTEGER, " .
- "`".$this->fields["right"]."` INTEGER, " .
- "`".$this->fields["level"]."` INTEGER, " .
- "`stack_top` INTEGER NOT NULL, " .
- "`".$this->fields["parent_id"]."` INTEGER, " .
- "`".$this->fields["position"]."` INTEGER " .
- ") type=HEAP"
- );
- $counter = 2;
- $this->db->query("SELECT COUNT(*) FROM temp_tree");
- $this->db->nextr();
- $maxcounter = (int) $this->db->f(0) * 2;
- $currenttop = 1;
- $this->db->query("" .
- "INSERT INTO `temp_stack` " .
- "SELECT " .
- "`".$this->fields["id"]."`, " .
- "1, " .
- "NULL, " .
- "0, " .
- "1, " .
- "`".$this->fields["parent_id"]."`, " .
- "`".$this->fields["position"]."` " .
- "FROM `temp_tree` " .
- "WHERE `".$this->fields["parent_id"]."` = 0"
- );
- $this->db->query("DELETE FROM `temp_tree` WHERE `".$this->fields["parent_id"]."` = 0");
-
- while ($counter <= $maxcounter) {
- $this->db->query("" .
- "SELECT " .
- "`temp_tree`.`".$this->fields["id"]."` AS tempmin, " .
- "`temp_tree`.`".$this->fields["parent_id"]."` AS pid, " .
- "`temp_tree`.`".$this->fields["position"]."` AS lid " .
- "FROM `temp_stack`, `temp_tree` " .
- "WHERE " .
- "`temp_stack`.`".$this->fields["id"]."` = `temp_tree`.`".$this->fields["parent_id"]."` AND " .
- "`temp_stack`.`stack_top` = ".$currenttop." " .
- "ORDER BY `temp_tree`.`".$this->fields["position"]."` ASC LIMIT 1"
- );
-
- if ($this->db->nextr()) {
- $tmp = $this->db->f("tempmin");
-
- $q = "INSERT INTO temp_stack (stack_top, `".$this->fields["id"]."`, `".$this->fields["left"]."`, `".$this->fields["right"]."`, `".$this->fields["level"]."`, `".$this->fields["parent_id"]."`, `".$this->fields["position"]."`) VALUES(".($currenttop + 1).", ".$tmp.", ".$counter.", NULL, ".$currenttop.", ".$this->db->f("pid").", ".$this->db->f("lid").")";
- $this->db->query($q);
- $this->db->query("DELETE FROM `temp_tree` WHERE `".$this->fields["id"]."` = ".$tmp);
- $counter++;
- $currenttop++;
- }
- else {
- $this->db->query("" .
- "UPDATE temp_stack SET " .
- "`".$this->fields["right"]."` = ".$counter.", " .
- "`stack_top` = -`stack_top` " .
- "WHERE `stack_top` = ".$currenttop
- );
- $counter++;
- $currenttop--;
- }
- }
-
- $temp_fields = $this->fields;
- unset($temp_fields["parent_id"]);
- unset($temp_fields["position"]);
- unset($temp_fields["left"]);
- unset($temp_fields["right"]);
- unset($temp_fields["level"]);
- if(count($temp_fields) > 1) {
- $this->db->query("" .
- "CREATE TEMPORARY TABLE `temp_tree2` " .
- "SELECT `".implode("`, `", $temp_fields)."` FROM `".$this->table."` "
- );
- }
- $this->db->query("TRUNCATE TABLE `".$this->table."`");
- $this->db->query("" .
- "INSERT INTO ".$this->table." (" .
- "`".$this->fields["id"]."`, " .
- "`".$this->fields["parent_id"]."`, " .
- "`".$this->fields["position"]."`, " .
- "`".$this->fields["left"]."`, " .
- "`".$this->fields["right"]."`, " .
- "`".$this->fields["level"]."` " .
- ") " .
- "SELECT " .
- "`".$this->fields["id"]."`, " .
- "`".$this->fields["parent_id"]."`, " .
- "`".$this->fields["position"]."`, " .
- "`".$this->fields["left"]."`, " .
- "`".$this->fields["right"]."`, " .
- "`".$this->fields["level"]."` " .
- "FROM temp_stack " .
- "ORDER BY `".$this->fields["id"]."`"
- );
- if(count($temp_fields) > 1) {
- $sql = "" .
- "UPDATE `".$this->table."` v, `temp_tree2` SET v.`".$this->fields["id"]."` = v.`".$this->fields["id"]."` ";
- foreach($temp_fields as $k => $v) {
- if($k == "id") continue;
- $sql .= ", v.`".$v."` = `temp_tree2`.`".$v."` ";
- }
- $sql .= " WHERE v.`".$this->fields["id"]."` = `temp_tree2`.`".$this->fields["id"]."` ";
- $this->db->query($sql);
- }
- }
-
- function _analyze() {
- $report = array();
-
- $this->db->query("" .
- "SELECT " .
- "`".$this->fields["left"]."` FROM `".$this->table."` s " .
- "WHERE " .
- "`".$this->fields["parent_id"]."` = 0 "
- );
- $this->db->nextr();
- if($this->db->nf() == 0) {
- $report[] = "[FAIL]\tNo root node.";
- }
- else {
- $report[] = ($this->db->nf() > 1) ? "[FAIL]\tMore than one root node." : "[OK]\tJust one root node.";
- }
- $report[] = ($this->db->f(0) != 1) ? "[FAIL]\tRoot node's left index is not 1." : "[OK]\tRoot node's left index is 1.";
-
- $this->db->query("" .
- "SELECT " .
- "COUNT(*) FROM `".$this->table."` s " .
- "WHERE " .
- "`".$this->fields["parent_id"]."` != 0 AND " .
- "(SELECT COUNT(*) FROM `".$this->table."` WHERE `".$this->fields["id"]."` = s.`".$this->fields["parent_id"]."`) = 0 ");
- $this->db->nextr();
- $report[] = ($this->db->f(0) > 0) ? "[FAIL]\tMissing parents." : "[OK]\tNo missing parents.";
-
- $this->db->query("SELECT MAX(`".$this->fields["right"]."`) FROM `".$this->table."`");
- $this->db->nextr();
- $n = $this->db->f(0);
- $this->db->query("SELECT COUNT(*) FROM `".$this->table."`");
- $this->db->nextr();
- $c = $this->db->f(0);
- $report[] = ($n/2 != $c) ? "[FAIL]\tRight index does not match node count." : "[OK]\tRight index matches count.";
-
- $this->db->query("" .
- "SELECT COUNT(`".$this->fields["id"]."`) FROM `".$this->table."` s " .
- "WHERE " .
- "(SELECT COUNT(*) FROM `".$this->table."` WHERE " .
- "`".$this->fields["right"]."` < s.`".$this->fields["right"]."` AND " .
- "`".$this->fields["left"]."` > s.`".$this->fields["left"]."` AND " .
- "`".$this->fields["level"]."` = s.`".$this->fields["level"]."` + 1" .
- ") != " .
- "(SELECT COUNT(*) FROM `".$this->table."` WHERE " .
- "`".$this->fields["parent_id"]."` = s.`".$this->fields["id"]."`" .
- ") "
- );
- $this->db->nextr();
- $report[] = ($this->db->f(0) > 0) ? "[FAIL]\tAdjacency and nested set do not match." : "[OK]\tNS and AJ match";
-
- return implode("
",$report);
- }
-
- function _dump($output = false) {
- $nodes = array();
- $this->db->query("SELECT * FROM ".$this->table." ORDER BY `".$this->fields["left"]."`");
- while($this->db->nextr()) $nodes[] = $this->db->get_row("assoc");
- if($output) {
- echo "
";
- foreach($nodes as $node) {
- echo str_repeat(" ",(int)$node[$this->fields["level"]] * 2);
- echo $node[$this->fields["id"]]." (".$node[$this->fields["left"]].",".$node[$this->fields["right"]].",".$node[$this->fields["level"]].",".$node[$this->fields["parent_id"]].",".$node[$this->fields["position"]].")
";
- }
- echo str_repeat("-",40);
- echo "";
- }
- return $nodes;
- }
- function _drop() {
- $this->db->query("TRUNCATE TABLE `".$this->table."`");
- $this->db->query("" .
- "INSERT INTO `".$this->table."` (" .
- "`".$this->fields["id"]."`, " .
- "`".$this->fields["parent_id"]."`, " .
- "`".$this->fields["position"]."`, " .
- "`".$this->fields["left"]."`, " .
- "`".$this->fields["right"]."`, " .
- "`".$this->fields["level"]."` " .
- ") " .
- "VALUES (" .
- "1, " .
- "0, " .
- "0, " .
- "1, " .
- "2, " .
- "0 ".
- ")");
- }
-}
-
-class json_tree extends _tree_struct {
- function __construct($table = "tree", $fields = array(), $add_fields = array("title" => "title", "type" => "type")) {
- parent::__construct($table, $fields);
- $this->fields = array_merge($this->fields, $add_fields);
- $this->add_fields = $add_fields;
- }
-
- function create_node($data) {
- $id = parent::_create((int)$data[$this->fields["id"]], (int)$data[$this->fields["position"]]);
- if($id) {
- $data["id"] = $id;
- $this->set_data($data);
- return "{ \"status\" : 1, \"id\" : ".(int)$id." }";
- }
- return "{ \"status\" : 0 }";
- }
- function set_data($data) {
- if(count($this->add_fields) == 0) { return "{ \"status\" : 1 }"; }
- $s = "UPDATE `".$this->table."` SET `".$this->fields["id"]."` = `".$this->fields["id"]."` ";
- foreach($this->add_fields as $k => $v) {
- if(isset($data[$k])) $s .= ", `".$this->fields[$v]."` = \"".$this->db->escape($data[$k])."\" ";
- else $s .= ", `".$this->fields[$v]."` = `".$this->fields[$v]."` ";
- }
- $s .= "WHERE `".$this->fields["id"]."` = ".(int)$data["id"];
- $this->db->query($s);
- return "{ \"status\" : 1 }";
- }
- function rename_node($data) { return $this->set_data($data); }
-
- function move_node($data) {
- $id = parent::_move((int)$data["id"], (int)$data["ref"], (int)$data["position"], (int)$data["copy"]);
- if(!$id) return "{ \"status\" : 0 }";
- if((int)$data["copy"] && count($this->add_fields)) {
- $ids = array_keys($this->_get_children($id, true));
- $data = $this->_get_children((int)$data["id"], true);
-
- $i = 0;
- foreach($data as $dk => $dv) {
- $s = "UPDATE `".$this->table."` SET `".$this->fields["id"]."` = `".$this->fields["id"]."` ";
- foreach($this->add_fields as $k => $v) {
- if(isset($dv[$k])) $s .= ", `".$this->fields[$v]."` = \"".$this->db->escape($dv[$k])."\" ";
- else $s .= ", `".$this->fields[$v]."` = `".$this->fields[$v]."` ";
- }
- $s .= "WHERE `".$this->fields["id"]."` = ".$ids[$i];
- $this->db->query($s);
- $i++;
- }
- }
- return "{ \"status\" : 1, \"id\" : ".$id." }";
- }
- function remove_node($data) {
- $id = parent::_remove((int)$data["id"]);
- return "{ \"status\" : 1 }";
- }
- function get_children($data) {
- $tmp = $this->_get_children((int)$data["id"]);
- if((int)$data["id"] === 1 && count($tmp) === 0) {
- $this->_create_default();
- $tmp = $this->_get_children((int)$data["id"]);
- }
- $result = array();
- if((int)$data["id"] === 0) return json_encode($result);
- foreach($tmp as $k => $v) {
- $result[] = array(
- "attr" => array("id" => "node_".$k, "rel" => $v[$this->fields["type"]]),
- "data" => $v[$this->fields["title"]],
- "state" => ((int)$v[$this->fields["right"]] - (int)$v[$this->fields["left"]] > 1) ? "closed" : ""
- );
- }
- return json_encode($result);
- }
- function search($data) {
- $this->db->query("SELECT `".$this->fields["left"]."`, `".$this->fields["right"]."` FROM `".$this->table."` WHERE `".$this->fields["title"]."` LIKE '%".$this->db->escape($data["search_str"])."%'");
- if($this->db->nf() === 0) return "[]";
- $q = "SELECT DISTINCT `".$this->fields["id"]."` FROM `".$this->table."` WHERE 0 ";
- while($this->db->nextr()) {
- $q .= " OR (`".$this->fields["left"]."` < ".(int)$this->db->f(0)." AND `".$this->fields["right"]."` > ".(int)$this->db->f(1).") ";
- }
- $result = array();
- $this->db->query($q);
- while($this->db->nextr()) { $result[] = "#node_".$this->db->f(0); }
- return json_encode($result);
- }
-
- function _create_default() {
- $this->_drop();
- $this->create_node(array(
- "id" => 1,
- "position" => 0,
- "title" => "C:",
- "type" => "drive"
- ));
- $this->create_node(array(
- "id" => 1,
- "position" => 1,
- "title" => "D:",
- "type" => "drive"
- ));
- $this->create_node(array(
- "id" => 2,
- "position" => 0,
- "title" => "_demo",
- "type" => "folder"
- ));
- $this->create_node(array(
- "id" => 2,
- "position" => 1,
- "title" => "_docs",
- "type" => "folder"
- ));
- $this->create_node(array(
- "id" => 4,
- "position" => 0,
- "title" => "index.html",
- "type" => "default"
- ));
- $this->create_node(array(
- "id" => 5,
- "position" => 1,
- "title" => "doc.html",
- "type" => "default"
- ));
- }
-}
-
-?>
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_demo/_install.txt b/awx/ui/static/lib/jstree/_demo/_install.txt
deleted file mode 100644
index 39aff82c01..0000000000
--- a/awx/ui/static/lib/jstree/_demo/_install.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-1) Create a database and a user with all privileges for this database.
-2) Edit the config.php file and update the configuration for the database at the top of the file
-3) Import the _dump.sql in your newly created database
-4) You are ready to go
-
-*) PLEASE NOTE THAT THE PHP TREE CLASS HAS NOT BEEN THOROUGHLY TESTED
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_demo/config.php b/awx/ui/static/lib/jstree/_demo/config.php
deleted file mode 100644
index 354f6a9a9b..0000000000
--- a/awx/ui/static/lib/jstree/_demo/config.php
+++ /dev/null
@@ -1,14 +0,0 @@
- "localhost",
- "username" => "root",
- "password" => "",
- "database" => ""
-);
-if(extension_loaded("mysqli")) require_once("_inc/class._database_i.php");
-else require_once("_inc/class._database.php");
-
-// Tree class
-require_once("_inc/class.tree.php");
-?>
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_demo/file.png b/awx/ui/static/lib/jstree/_demo/file.png
deleted file mode 100644
index 58959687bc..0000000000
Binary files a/awx/ui/static/lib/jstree/_demo/file.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/_demo/folder.png b/awx/ui/static/lib/jstree/_demo/folder.png
deleted file mode 100644
index 30eedea1d9..0000000000
Binary files a/awx/ui/static/lib/jstree/_demo/folder.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/_demo/index.html b/awx/ui/static/lib/jstree/_demo/index.html
deleted file mode 100644
index 342dfc5c06..0000000000
--- a/awx/ui/static/lib/jstree/_demo/index.html
+++ /dev/null
@@ -1,461 +0,0 @@
-
-
-
-
- Here is how you create an instance, bind an event and then get the instance.
-You can use a few events to do that.
-Here is a PHP & mySQL enabled demo. You can use the classes/DB structure included, but those are not thoroughly tested and not officially a part of jstree. In the log window you can also see all function calls as they happen on the instance.
- - - - -The checkbox plugin makes multiselection possible using three-state checkboxes.
If set to true all selection will be handled by checkboxes. The checkbox plugin will map UI's get_selected function to its own get_checked function and overwrite the UI reselect function. It will also disable the select_node, deselect_node and deselect_all functions. If left as false nodes can be selected and checked independently.
When set to true when programatically checking a node in the tree all of its closed parents are opened automatically.
If set to true checkboxes will be two-state only, meaning that you will be able to select parent and children independently and there will be no undetermined state.
If set to true real hidden checkboxes will be created for each element, so if the tree is part of a form, checked nodes will be submitted automatically. By default the name of the checkbox is "check_" + the ID of the LI element and the value is 1, this can be changed using the real_checkboxes_names config option.
If real checkboxes are used this function is invoked in the current tree's scope for each new checkbox that is created. It receives a single argument - the node that will contain the checkbox. The function must return an array consisting of two values - the name for the checkbox and the value for the checkbox.
- -Inserts the checkbox icons on the node. Used internally.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-Repairs the checkbox state inside the node. Used internally.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-Changes the state of a node. Used mostly internally - you'd be better off using the check_node and uncheck_node functions. Triggers an event.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-boolean uncheck
- If set to true the node is unchecked, if set to false the node is checked, otherwise - the state is toggled.
Checks a node.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-Unchecks a node.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-Checks all nodes.
- -Unchecks all nodes.
- -Checks if a node is checked. Returns boolean.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-Both functions return jQuery collections.
-mixed context
- This can be a DOM node, jQuery node or selector pointing to an element within the tree. If specified only nodes inside the specified context are returned, otherwise the whole tree is searched.
-boolean get_all
- By default these functions return only top level checked/unchecked nodes (if a node is checked its children are note returned), if this parameter is set to true they will return all checked/unchecked nodes.
Show or hide the checkbox icons.
- -The contextmenu plugin enables a contextual menu to be shown, when the user right-clicks a node (or when triggered programatically by the developer).
Whether to select the right clicked node when showing the context menu. If this is set to true and the node is not selected all currently selected nodes will be deselected.
Whether to show the context menu just below the node, or at the clicked point exactly.
- -Expects an object or a function, which should return an object. If a function is used it fired in the tree's context and receives one argument - the node that was right clicked. The object format is:
-
-{
-// Some key
-"rename" : {
- // The item label
- "label" : "Rename",
- // The function to execute upon a click
- "action" : function (obj) { this.rename(obj); },
- // All below are optional
- "_disabled" : true, // clicking the item won't do a thing
- "_class" : "class", // class is applied to the item LI node
- "separator_before" : false, // Insert a separator before the item
- "separator_after" : true, // Insert a separator after the item
- // false or string - if does not contain `/` - used as classname
- "icon" : false,
- "submenu" : {
- /* Collection of objects (the same structure) */
- }
-}
-/* MORE ENTRIES ... */
-}
-
-Shows the contextmenu next to a node. Triggered automatically when right-clicking a node.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-number x
- The X-coordinate to show the menu at - may be overwritten by show_at_node. If you omit this the menu is shown aligned with the left of the node.
number y
- The Y-coordinate to show the menu at - may be overwritten by show_at_node. If you omit this the menu is shown just below the node.
The cookies enables jstree to save the state of the tree across sessions. What this does is save the opened and selected nodes in a cookie, and reopen & reselect them the next time the user loads the tree. Depends on the jQuery.cookie plugin.
The nodes need to have IDs for this plugin to work.
-The name of the cookie to save opened nodes in. If set to false - opened nodes won't be saved.
The name of the cookie to save selected nodes in. If set to false - selected nodes won't be saved.
If set to true jstree will automatically update the cookies every time a change in the state occurs.
The options accepted by the jQuery.cookie plugin.
- -Check your data plugin documentation (html_data, xml_data, json_data) or take a close look at these examples for information on how to specify multilanguage nodes.
- -Go ahead and make changes to the tree and then refresh this page.
-Save the current state.
-string event
- Used internally with the auto_save option. Do not set this manually.
First of all, as jsTree is a jQuery component, you need to include jQuery itself. jsTree v.1.0 requires jQuery version 1.4.2
- --<script type="text/javascript" src="_lib/jquery.js"></script> -
Then you need to include jsTree:
- --<script type="text/javascript" src="jquery.jstree.js"></script> -
Or you could use the minified version:
- --<script type="text/javascript" src="jquery.jstree.min.js"></script> -
You may change the path to whatever you like, but it is recommended not to rename jquery.tree.js or jquery.tree.min.js as the filenames may be used for path autodetection (for example in the themes plugin, but if you really need to rename the file most plugins will give you the option to set the path manually).
Additionally some plugins have dependencies - plugins that detect a dependency is missing will throw an error.
- -You can create a tree in the following manner:
- -
-jQuery("some-selector-to-container-node-here").jstree([ config_object ]);
-In the optional config object you specify all the options that you want to set. Each plugin will describe its configuration and defaults. In the configuration section below you will find the options defined by the core. Each plugin's options (even the core) are set in their own subobject, which is named after the plugin. For example all of the core's options are set in the core key of the config object:
-jQuery("some-selector-to-container-node-here")
- .jstree({
- core : {
- /* core options go here */
- }
- });
-Please note that if your options for a given plugin are the same as the defaults you may omit those options or omit the subobject completely (if you do not need to modify the defaults).
- -There is only one special config option that is not a part of any plugin - this is the plugins option, which defines a list of active plugins for the instance being created. Although many plugins may be included, only the ones listed in this option will be active. The only autoincluded "plugin" is the jstree core.
-jQuery("some-selector-to-container-node-here")
- .jstree({
- core : { /* core options go here */ },
- plugins : [ "themes", "html_data", "some-other-plugin" ]
- });
-To perform an operation programatically on a given instance you can use two methods:
-
-/* METHOD ONE */
-jQuery("some-selector-to-container-node-here")
- .jstree("operation_name" [, argument_1, argument_2, ...]);
-
-/* METHOD TWO */
-jQuery.jstree._reference(needle)
- /* NEEDLE can be a DOM node or selector for the container or a node within the container */
- .operation_name([ argument_1, argument_2, ...]);
-NOTE: Functions prefixed with _ can not be called with method one.
jsTree uses events to notify of any changes happening in the tree. All events fire on the tree container in the jstree namespace and are named after the function that triggered them. Please note that for some events it is best to bind before creating the instance. For example:
-jQuery("some-container")
- .bind("loaded.jstree", function (event, data) {
- alert("TREE IS LOADED");
- })
- .jstree({ /* configuration here */ });
-Please note the second parameter data. Its structure is as follows:
-{
- "inst" : /* the actual tree instance */,
- "args" : /* arguments passed to the function */,
- "rslt" : /* any data the function passed to the event */,
- "rlbk" : /* an optional rollback object - it is not always present */
-}
-There is also one special event - before.jstree. This events enables you to prevent an operation from executing. Look at the demo below.
Defines whether titles can contain HTML code.
- -Defines the duration of open/close animations. 0 means no animation.
Defines which nodes are to be automatically opened (if they are not present they will first be loaded) when the tree finishes loading - a list of IDs is expected.
- -Defines which nodes are to be automatically loaded (but not opened) when the tree finishes loading - a list of IDs is expected.
- -When set to true forces loading of nodes marked as open, which do not have children. Otherwise nodes are only visualized as open without any children and opening/closing such a node won't cause it to load (make a server call).
If set to true opening a node will also open any closed ancestors it has (will open the whole chain down to this node).
- -If set to true loading nodes with some metadata will trigger some actions on the corresponding plugin. So you can actually set the selected/checked/etc
- -Defines whether the tree is in right-to-left mode (also make sure you are using a RTL theme - for example the included default-rtl).
Contains strings needed for the operation of the tree so that you can localize.
- - -- -
This is the same demo as above, but this time the operation will be prevented.
- --
The important part is e.stopImmediatePropagation(); return false.
Use extra caution when working with functions prefixed with an underscore - _!
Those functions are probably for internal usage only.
This object is exposed so that you can apply standart settings to all future instances
- -This function is used by developers to extend jstree (add "plugins").
-string plugin_name
- The plugin name - it should be unique.
-object plugin_data
- The plugin itself. It consists of __init & __destroy functions, defaults object (that of course could be an array or a simple value) and a _fn object, whose keys are all the functions you are extending jstree with. You can overwrite functions (but you can in your function call the overriden old function), and you are responsible for triggering events and setting rollback points. You can omit any of the elements in the plugin_data param. Keep in mind jstree will automatically clear classes prepended with jstree- and all events in the jstree namespace when destroying a tree, so you do not need to worry about those.
Read jstree's code for examples on how to develop plugins.
-This function will roll the tree back to the state specified by the rollback object
-string rollback_object
- Normally you will get this object from the event you are handling. You can of course use .get_rollback() to get the current state of the tree as a rollback object.
-$("some-container").bind("some-event.jstree", function (e, data) {
- $.jstree.rollback(data.rlbk);
-});Keep in mind that not all events will give you a rollback object - sometimes data.rlbk will be false.
Returns the currently focused tree instance on the page. If not interaction has been made - it is the last one to be created.
- -Returns the tree instance for the specified needle.
mixed needle
- This can be a DOM node, jQuery node or selector pointing to the tree container, or an element within the tree.
-This function is used internally when creating new tree instances. Calling this function by itself is not enough to create a new instance. To create a tree use the documented method $("selector").jstree([ options ]).
This object stores all functions included by plugins. It is used internally as a prototype for all instances - do not modify manually.
- -An object where all plugins store instance specific data. Do not modify manually.
- -Returns a copy of the instance's settings object - the defaults, extended by your own config object.
- -Returns the instance's settings object - the defaults, extended by your own config object.
- -Returns the internal instance index.
- -Returns the jQuery extended container node of the tree.
- -Returns the jQuery extended first UL node in the container of the tree.
- -Replace the settings object with the settings param. Please note that not all plugins will react to the change. Unless you know exactly what you are doing you'd be better off recreating the tree with the new settings.
This function is used internally when creating a new instance. Triggers an event, which fires after the tree is initialized, but not yet loaded.
- -Destroys the instance - it will automatically remove all bound events in the jstree namespace & remove all classes starting with jstree-. Triggers an event.
Stores the currently open nodes before refreshing. Used internally. Triggers an event.
- -Reopens all the nodes stored by save_opened or set in the initially_open config option on first load. It is called multiple times while reopening nodes - the is_callback param determines if this is the first call (false) or not. Used internally. Triggers an event.
Refreshes the tree. Saves all open nodes, and reloads and then reopens all saved nodes. Triggers an event.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree. If set this will reload only the given node - otherwise - the whole tree. Passing -1 also reloads the whole tree.
A dummy function, whose purpose is only to trigger the loaded event. This event is triggered once after the tree's root nodes are loaded, but before any nodes set in initially_open are opened.
Makes the current instance the focused one on the page. Triggers an event.
- -If the current instance is focused this removes the focus. Triggers an event.
- -Returns true if the current instance is the focused one, otherwise returns false.
Sets the tree to a locked state - no methods can be called on that instance except for unlock and is_locked.
Sets the tree to a unlocked state (the default state).
-Returns true if the tree is locked, otherwise returns false.
Return the jQuery extended LI element of the node, -1 if the container node is passed, or false otherwise.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-Gets the LI element representing the node next to the passed node. Returns false on failure.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose next sibling we want.
-bool strict
- If set to true only immediate siblings are calculated. Otherwise if the node is the last child of its parent this function will "jump out" and return the parent's next sibling, etc. Default is false.
Gets the LI element representing the node previous to the passed node. Returns false on failure.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose previous sibling we want.
-bool strict
- If set to true only immediate siblings are calculated. Otherwise if the node is the first child of its parent this function will "jump out" and return the parent itself. Default is false.
Gets the LI element representing the parent of the passed node. Returns false on failure.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose parent we want.
-Gets the LI elements representing the children of the passed node. Returns false on failure (or if the node has no children).
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose children we want. Use -1 to return all root nodes.
Return the path to a node, either as an array of IDs or as an array of node names.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree, whose path we want.
-bool id_mode
- If set to true IDs are returned instead of the names of the parents. Default is false.
Corrects closed items to leaf items, if no children are found. Used internally, triggers an event.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element we want corrected.
-Opens a closed node, so that its children are visible. If the animation config option is greater than 0 the children are revealed using a slide down animation, whose duration is the value of the animation config option in milliseconds. Triggers an event.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element we want opened.
-function callback
- A callback function executed once the node is opened. Used mostly internally, you'd be better of waiting for the event. You can skip this, by not specifying it, or by passing false.
bool skip_animation
- If set to true the animation set in the animation config option is skipped. Default is false.
A dummy function, it triggers an event after the open animation has finished.
- -Closes an open node, so that its children are not visible. If the animation config option is greater than 0 the children are hidden using a slide up animation, whose duration is the value of the animation config option in milliseconds. Triggers an event.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element we want closed.
-bool skip_animation
- If set to true the animation set in the animation config option is skipped. Default is false.
A dummy function, it triggers an event after the close animation has finished.
- -If a node is closed - this function opens it, if it is open - calling this function will close it.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element we want toggled.
-Opens all descendants of the node node.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element whose descendants you want opened. If this param is omitted or set to -1 all nodes in the tree are opened.
boolean do_animation
- If set to true all nodes are opened with an animation. This can be slow on large trees.
mixed original_obj
- Used internally when recursively calling the same function - do not pass this param.
-Closes all descendants of the node node.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element whose descendants you want closed. If this param is omitted or set to -1 all nodes in the tree are closed.
boolean do_animation
- If set to true all nodes are closed with an animation. This can be slow on large trees.
Those function check if the node is in a state.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element you want checked.
-Applies all necessary classes to the node and its descendants. Used internally. Triggers an event.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element you want cleaned. If this param is omitted or set to -1 all nodes in the tree are cleaned.
Get the current tree's state in the rollback format. Used mainly internally by plugins.
- -Rollback the tree. Used ONLY internally! Both arguments are part of the rollback object. If you need to rollback - take a look at jQuery.jstree.rollback(). Triggers event.
- -A dummy function that is overwritten by data plugins. Triggers event.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use -1 for root nodes.
function success_callback
- A function to be executed once the node is loaded successfully - used internally. You should wait for the event.
-function error_callback
- A function to be executed if the node is not loaded due to an error - used internally. You should wait for the event.
-A dummy function that should return true if the node's children are loaded or false otherwise.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element you want to check.
-Creates the DOM structure necessary for a new node. Triggers an event.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to the element you want to create in (or next to).
-mixed position
- The position of the newly created node. This can be a zero based index to position the element at a specific point among the current children. You can also pass in one of those strings: "before", "after", "inside", "first", "last".
object js
- The data for the newly created node. Consists of three keys:
attr - an object of attributes (same used for jQuery.attr(). You can omit this key;state - a string - either "open" or "closed", for a leaf node - omit this key;data - a string or an object - if a string is passed it is used for the title of the node, if an object is passed there are two keys you can specify: attr and title;
function callback
- A function to be executed once the node is created - used internally. You should wait for the event.
-bool is_loaded
- Specifies if the parent of the node is loaded or not - used ONLY internally.
-Returns the needed string from the config object. If the key does not exist the key itself is returned.
-string key
- The name of the string you are looking for.
-Returns the title of a node.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to the element whose title you need.
-Sets the title of a node. Triggers an event. This is used mostly internally - wait for a .rename_node event to avoid confusion.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to the element whose title you want to change.
-string text
- The new title.
-Sets the title of a node. Triggers an event.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to the element whose title you want to change.
-string text
- The new title.
-Removes a node. Triggers an event.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to the element you want to remove.
-This function is used internally to prepare all necessary variables and nodes when moving a node around. It is automatically called as needed - you do not need to call it manually. Triggers an event.
- -Checks if the prepared move is a valid one.
- -Moves a node to a new place. Triggers an event.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to the element you want to move.
-mixed ref
- This can be a DOM node, jQuery node or selector pointing to the element which will be the reference element in the move. -1 may be used too (to indicate the container node).
mixed position
- The new position of the moved node. This can be a zero based index to position the element at a specific point among the reference node's current children. You can also use one of these strings: "before", "after", "inside", "first", "last".
bool is_copy
- Should this be a copy or a move operation.
-bool is_prepared
- Used internally when this function is called recursively.
-bool skip_check
- If this is set to true check_move is not called.
Returns the lastly prepared move. The returned object contains:
-.o - the node being moved
-.r - the reference node in the move
-.ot - the origin tree instance
-.rt - the reference tree instance
-.p - the position to move to (may be a string - "last", "first", etc)
-.cp - the calculated position to move to (always a number)
-.np - the new parent
-.oc - the original node (if there was a copy)
-.cy - boolen indicating if the move was a copy
-.cr - same as np, but if a root node is created this is -1
-.op - the former parent
-.or - the node that was previously in the position of the moved node
-
The CRRM plugin handles creating, renaming, removing and moving nodes by the user.
When renaming (or creating) nodes the input for the text will autosize - this number sets the maximum size for the input.
- -Defines how moves are handled - if set to true every move will be forced to a copy (leaving the original node in place). If set to "multitree" only moves between trees will be forced to a copy.
If set to true, when moving a node to a new, closed parent, the parent node will be opened when the move completes.
- -The default position to move to if no position is specified. This can be a zero based index to position the element at a specific point among the new parent's current children. You can also use one of these strings: "before", "after", "inside", "first", "last".
The callback function enabling you to prevent some moves - just return false. The m parameter is the move object generated by jstree. The object follows the structure described in ._get_move.
move_1 uses the default position - "first"
move_2 specifies a position - "before" - meaning that the node specified as a first argument will come above the node specified as the second argument
move_3 will never work, because of the specified check_move function which prevents the first root node from being moved
Renders an input field in a node. Used only internally.
- -Sets a node in rename mode and when the user has entered changes, an event is triggered.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected item.
Creates a new node. Triggers an event.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to the element you want to create in (or next to). If you use the UI plugin - pass null to use the currently selected item.
mixed position
- The position of the newly created node. This can be a zero based index to position the element at a specific point among the current children. You can also pass in one of those strings: "before", "after", "inside", "first", "last".
object js
- The data for the newly created node. Consists of three keys:
attr - an object of attributes (same used for jQuery.attr(). You can omit this key;state - a string - either "open" or "closed", for a leaf node - omit this key;data - a string or an object - if a string is passed it is used for the title of the node, if an object is passed there are two keys you can specify: attr and title;
function callback
- A function to be executed once the node is created. You'd be better off waiting for the event.
-bool skip_rename
- Skips the user input step. The node is created with the data you have supplied.
-Removes a node. Triggers an event.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected items.
Both functions are overwritten from the core in order to implement the new functionality.
- -Cuts a node (prepares it for pasting).
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected item.
Copies a node (prepares it for pasting).
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected item.
Pastes copied or cut nodes inside a node.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass null to use the currently selected item.
The dnd plugin enables drag'n'drop support for jstree, also using foreign nodes and drop targets.
All foreign node options and callback functions in the config (drop_target, drop_check, drop_finish, drag_target, drag_check, drag_finish) are to be used ONLY when nodes that are not part of any tree are involved.
If moving nodes from one tree instance to another - just listen for the "move_node.jstree" event on the receiving tree.
DO NOT SET drag_target AND drop_target to match tree nodes!
The special key used to make a drag copy instead of move ("ctrl", "shift", "alt", "meta").
The number of milliseconds to wait before checking if a move is valid upon hovering a node (while dragging). 200 is a reasonable value - a higher number means better performance but slow feedback to the user, a lower number means lower performance (possibly) but the user will get feedback faster.
The number of milliseconds to wait before opening a hovered if it has children (while dragging). This means that the user has to stop over the node for half a second in order to trigger the open operation. Keep in mind that a low value in combination with async data could mean a lot of unneeded traffic, so 500 is quite reasonable.
A jquery selector matching all drop targets (you can also use the comma , in the string to specify multiple valid targets). If set to false drop targets are disabled.
Return false to mark the move as invalid, otherwise return true. The data parameter is as follows:
data.o - the object being dragged
data.r - the drop target
Gets executed after a valid drop, you get one parameter, which is as follows:
-data.o - the object being dragged
data.r - the drop target
A jquery selector matching all foreign nodes that can be dropped on the tree (you can also use the comma , in the string to specify multiple valid foreign nodes). If set to false dragging foreign nodes is disabled.
Return a boolean for each position. The data parameter is as follows:
data.o - the foreign object being dragged
data.r - the hovered node
Gets executed after a dropping a foreign element on a tree item, you get one parameter, which is as follows:
-data.o - the foreign object being dragged
data.r - the target node
Drag stuff around!
-All those functions are used internally only. If you want more information - examine the source code.
- -The hotkeys plugin enables keyboard navigation and shortcuts. Depends on the jquery.hotkeys plugin.
Expects an object:
each key is the keyboard shortcut (for possible values check the hotkeys plugin)
each value is a function executed in the instance's context, the return value is used as a return value for the event.
Simple example:
-"del" : function () { this.remove(); }
By default "up", "ctrl+up", "shift+up", "down", "ctrl+down", "shift+down", "left", "ctrl+left", "shift+left", "right", "ctrl+right", "shift+right", "space", "ctrl+space", "shift+space", "f2", "del" are bound.
To override any of those - just specify your own function, to disable - just set to false.
-
Try pressing up/down/left/right/space/f2/del.
Enable shortcuts on the instance (enabled by default).
- -Disable shortcuts on the instance.
- -The html_data plugin enables jsTree to convert nested unordered lists to interactive trees. jsTree can also get HTML from the server insert it into the DOM and convert that to a tree.
The basic structure you need to follow when supplying data in the HTML format is:
--<li> - <a href="some_value_here">Node title</a> - <!-- UL node only needed for children - omit if there are no children --> - <ul> - <!-- Children LI nodes here --> - </ul> -</li> --
If you inspect the resulting structure you will find it a bit different - that is because jstree will automatically do some corrections.
--<!-- one of the three classes will be applied depending on node structure --> -<li class="[ jstree-open | jstree-closed | jstree-leaf ]"> - <!-- an INS element is inserted --> - <ins class="jstree-icon"> </ins> - <a href="some_value_here"> - <!-- another INS element is inserted --> - <ins class="jstree-icon"> </ins> - Node title - </a> -</li> --
Both ins elements are inserted for visualization purposes. As for the class (jstree-open, jstree-closed) - you can specify that yourself to force the node to appear either closed or opened. Making a node with no children appear closed is often used - if you use ajax, opening a closed node with no children will result in jstree making a server call for the children (see the demo below).
Specifies the content to load into the container and convert to a tree.
-The ajax config object is pretty much the same as the jQuery ajax settings object.
-You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the function will be sent to the server as data (so for example you can send the node's ID).
You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the url function will be used as the ajax URL (so that you can accomodate pretty paths such as /get_children/node_2).
The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used to populate the tree - this can be useful if you want to somehow change what the server returned on the client side before it is displayed in the tree.
If this option is set to true if an AJAX request returns an empty result, the node that was about to be opened will be converted to a leaf node (the open icon will no longer be displayed).
NOTE:
If both data and ajax are not set, the current container's HTML is used to build the tree.
If both data and ajax are set the initial tree is rendered from the data string. When opening a closed node (that has no loaded children) an AJAX request is made.
Both dummy functions - _is_loaded and load_node are overwritten.
This function is called instead of load_node.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use -1 for root nodes.
function success_callback
- A function to be executed once the node is loaded successfully - used internally. You should wait for the load_node event.
function error_callback
- A function to be executed if the node is not loaded due to an error - used internally. You should wait for the load_node event.
if you like the project - consider supporting jstree.
-As of version 1.0 jsTree is extremely plugin friendly, so all functionality is now wrapped in plugins, which take care of various aspects of the tree and can be removed without affecting the functionality of other plugins. Below you will find a list of plugins - each with its own documentation page. Probably a good place to start is the core.
-all core functions for manipulating the tree + basic examples of including, configuring and working with the tree, along with demos of the new event system
enables jsTree to convert nested unordered lists to interactive trees, an already existing UL may be used or data could be retrieved from a server
enables jsTree to convert JSON objects to interactive trees, data can be set up in the config or retrieved from a server
enables jsTree to convert XML objects to interactive trees (using XSL), data can be set up in the config or retrieved from a server
controls the looks of jstree - without this plugin you will get a functional tree, but it will look just like an ordinary UL list
handles selecting, deselecting and hovering tree items
handles creating, renaming, removing and moving nodes by the user, also includes cut/copy/paste functions
enables support for keyboard navigation & shortcuts, highly configurable
enables multilanguage support - each node can have multiple titles, but only one is visible
enables jstree to save the state of the tree across sessions, by saving selected and opened nodes in a cookie
enables jstree to automatically sort all nodes
using a specified function
enables drag'n'drop support for jstree, also using foreign nodes and drop targets
makes multiselection possible using three-state checkboxes
enables searching for nodes whose title contains a given string, works on async trees too
enables a multilevel context menu on tree items
each node can have a type, and you can define rules on how that type should behave
adds support for jQuery UI's themes
adds unique checking to jsTree
enhances UIs select & hover functions
The json_data plugin enables jsTree to convert JSON objects to interactive trees. The data (JSON) can be set up in the config or retrieved from a server (also ondemand). Version 1.0 also introduces the experimental progressive render feature, which is suitable for large heavy trees, when the DOM would be too heavy to manipulate.
The basic structure you need to follow when supplying data in the JSON format is:
-
-{
- "data" : "node_title",
- // omit `attr` if not needed; the `attr` object gets passed to the jQuery `attr` function
- "attr" : { "id" : "node_identificator", "some-other-attribute" : "attribute_value" },
- // `state` and `children` are only used for NON-leaf nodes
- "state" : "closed", // or "open", defaults to "closed"
- "children" : [ /* an array of child nodes objects */ ]
-}
-
-The attr object will appear as attributes on the resulting li node.
You may need to pass some attributes to the a node, or set some metadata, or use language versions (for the languages plugin):
-{
- // `data` can also be an object
- "data" : {
- "title" : "The node title",
- // omit when not needed
- "attr" : {},
- // if `icon` contains a slash / it is treated as a file, used for background
- // otherwise - it is added as a class to the <ins> node
- "icon" : "folder"
- },
-
- // the `metadata` property will be saved using the jQuery `data` function on the `li` node
- "metadata" : "a string, array, object, etc",
-
- // if you use the language plugin - just set this property
- // also make sure that `data` is an array of objects
- "language" : "en" // any code you are using
-}
-
-As seen in the first example below - you can also use a simple string to define a node (Child 1 & Child 2).
-Specifies the content to load into the container and convert to a tree. You can also set this to a function - it will be executed in the tree's scope for every node that needs to be loaded, the function will receive two arguments - the node being loaded & a function to call with the data once your processing is done.
-The ajax config object is pretty much the same as the jQuery ajax settings object.
-You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the data function will be sent to the server as data (so for example you can send the node's ID).
You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the url function will be used as the ajax URL (so that you can accomodate pretty paths such as /get_children/node_2).
The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used to populate the tree - this can be useful if you want to somehow change what the server returned on the client side before it is displayed in the tree (for example some .NET json implementations require this to work: "success" : function (data) { return data.d; }.
If this option is set to true if an AJAX returns an empty result, the node that was about to be opened will be converted to a leaf node (the open icon will no longer be displayed).
If this option is set to true only the visible (open nodes) parts of the returned JSON are converted to DOM nodes, any hidden parts are saved away and parsed ondemand (when a node becomes visible). This is useful when you have a large nested tree which would result in a heavy DOM.
If this option is set to true when a node is closed its children are removed from the DOM and saved as metadata on the node itself, on reopen that metadata is used (much like progressive_render).
NOTE:
If both data and ajax are set the initial tree is rendered from the data string. When opening a closed node (that has no loaded children) an AJAX request is made.
Both dummy functions - _is_loaded and load_node are overwritten.
This function is called instead of load_node.
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use -1 for root nodes.
function success_callback
- A function to be executed once the node is loaded successfully - used internally. You should wait for the load_node event.
function error_callback
- A function to be executed if the node is not loaded due to an error - used internally. You should wait for the load_node event.
This function converts JSON nodes to the DOM structure required by jstree. Returns a jQuery object.
-mixed node
- This can be a tree node in the JSON format described above, or an array of such JSON nodes, may also be a string.
-mixed node
- This is the DOM node, jQuery node or selector pointing to the element for which data is parsed. -1 means root nodes.
bool is_callback
- Specifies if the function is called recursively - used ONLY internally.
-This function returns an array of tree nodes converted back to JSON.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to an element you want returned. Use -1 or omit to get the whole tree.
array li_attr
- The attributes to collect from the LI node. Defaults to [ "id" , "class" ]
array a_attr
- The attributes to collect from the A node. Defaults to [ ]
boolean is_callback
- Used internally.
-The languages plugin enables multilanguage trees. This means that each node has a specified number of titles - each in a different "language". Only one language set is visible at any given time. This is useful for maintaining the same structure in many languages (hence the name of the plugin)
Expects an array of language codes. Each of the items is used as a CSS class name, so make sure you specify only valid CSS class name strings. The first langauge will be visible onload. For example:
-[ "en", "de", "bg" ]
Check your data plugin documentation (html_data, xml_data, json_data) or take a close look at these examples for information on how to specify multilanguage nodes.
- -Set the tree's visible language. Triggers an event.
-string
number lang
- Either the language code string (as specified in the config) or an index from the config array.
-Returns the name of the currently visible language.
- -Returns the needed string from the core config object. Overwrites the get_string function from the core. If the key does not exist in that language, but exists in the root of the object - that is returned, if even that does not exist - the key itself is returned.
-string key
- The name of the string you are looking for. If you want to use the localize option just set the strings core config option to an object like this one: strings : { "lang-code-here" : { "string-key" : "string-value" ... }, "other-lang" : { ... } }, otherwise _get_strings won't be affected.
string lang
- The language code string (as specified in the config) to get the key in. If not specified the currently visible language is used.
-Returns the title of a node. Overwrites the get_text function from the core.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to the element whose title you need.
-string lang
- The language code string (as specified in the config) to get the title in. If you omit this - the currently visible language is used.
-Sets the title of a node. Overwrites the set_text function from the core. This is used internally - you should use rename_node. Since rename_node uses set_text internally you can pass a language string as a third parameter to rename_node.
mixed node
- This can be a DOM node, jQuery node or selector pointing to the element whose title you want to change.
-string text
- The new title.
-string lang
- The language code string (as specified in the config) to get the title in. If you omit this - the currently visible language is used.
-used only internally to include the CSS necessary for the plugin onload.
- -Overwrites the create_node function from the core. To create a node with a few titles use an array for the data property of the js parameter:
{ "data" : [ { "title" : "EN title", language : "en" }, { "title" : "BG заглавие", language : "bg" } ] }
The search plugin enables searching for nodes whose title contains a given string, works on async trees too. All found nodes get the jstree-search class applied to their contained a nodes - you can use that class to style search results.
The method to use for searching. The other options bundled with jstree are "jstree_contains" (case insensitive search) and "jstree_title_contains" (case insensitive based on the title tag of the A node). For multiple word search take a look this: https://github.com/vakata/jstree/issues/10 - you can easily write your own method too.
If set to true all non-matching nodes are hidden and only the matching nodes (and their parents) are left visible, until the search is cleared. Keep in mind show_only_matches is heavy on the browser/DOM and is still experimental.
This object can be used to make a request to the server on each search - useful if you are using async trees. That way you can return an array of IDs that need to be loaded before the actual DOM search is performed (so that all the nodes that will match the search are loaded). For example if the user searches for "string", you get that on the server side, check the database and find out that there is a node containing that string. But the node is the child of some other node, etc - so in your response you must return the path to the node (without the node itself) as ids: ["#root_node","#child_node_3"]. This means that jstree will load those two nodes before doing the client side search, ensuring that your node will be visible.
The ajax config object is pretty much the same as the jQuery ajax settings object.
-You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the search string as a paramater. Whatever you return in the function will be sent to the server as data.
You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the search string as a paramater. Whatever you return in the function will be used as the URL of the ajax request.
The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used as the array of IDs.
Do not open the node - instead - just press the button.
- - - - -Try pressing the buttons. It will also work with AJAX searching.
- - - - -Searches for nodes matching the supplied string. Triggers an event.
-string str
- The string to search for.
-boolean skip_async
- If set to true - skip the async search (if setup in the config). This is used mostly internally.
Clears the current search. This function is automatically called when doing a new search. Triggers an event.
- -Used internally if async is setup in the config. This functions loads the nodes returned by the server one by one.
- -The sort enables jstree to automatically sort all nodes using a specified function. This means that when the user creates, renames or moves nodes around - they will automatically sort.
Expects a function. The functions receives two arguments - two nodes to be compared. Return -1 or 1 (or any other different from -1). Default is:
function (a, b) { return this.get_text(a) > this.get_text(b) ? 1 : -1; }
Sorts the children of the specified node - this function is called automatically.
-mixed node
- This can be a DOM node, jQuery node or selector pointing to the element.
-clipboardSwf is configured.
- */
- copyToClipboard : function(highlighter)
- {
- var flashDiv, flashSwf,
- highlighterId = highlighter.id
- ;
-
- this.create = function()
- {
- var config = sh.config;
-
- // disable functionality if running locally
- if (config.clipboardSwf == null)
- return null;
-
- function params(list)
- {
- var result = '';
-
- for (var name in list)
- result += "";
-
- return result;
- };
-
- function attributes(list)
- {
- var result = '';
-
- for (var name in list)
- result += " " + name + "='" + list[name] + "'";
-
- return result;
- };
-
- var args1 = {
- width : config.toolbarItemWidth,
- height : config.toolbarItemHeight,
- id : highlighterId + '_clipboard',
- type : 'application/x-shockwave-flash',
- title : sh.config.strings.copyToClipboard
- },
-
- // these arguments are used in IE's collection
- args2 = {
- allowScriptAccess : 'always',
- wmode : 'transparent',
- flashVars : 'highlighterId=' + highlighterId,
- menu : 'false'
- },
- swf = config.clipboardSwf,
- html
- ;
-
- if (/msie/i.test(navigator.userAgent))
- {
- html = ''
- ;
- }
- else
- {
- html = ''
- ;
- }
-
- flashDiv = document.createElement('div');
- flashDiv.innerHTML = html;
-
- return flashDiv;
- };
-
- this.execute = function(sender, event, args)
- {
- var command = args.command;
-
- switch (command)
- {
- case 'get':
- var code = sh.utils.unindent(
- sh.utils.fixInputString(highlighter.originalCode)
- .replace(/</g, '<')
- .replace(/>/g, '>')
- .replace(/&/g, '&')
- );
-
- if(window.clipboardData)
- // will fall through to the confirmation because there isn't a break
- window.clipboardData.setData('text', code);
- else
- return sh.utils.unindent(code);
-
- case 'ok':
- sh.utils.alert(sh.config.strings.copyToClipboardConfirmation);
- break;
-
- case 'error':
- sh.utils.alert(args.message);
- break;
- }
- };
- },
-
- /** Command to print the colored source code. */
- printSource : function(highlighter)
- {
- this.create = function()
- {
- return sh.config.strings.print;
- };
-
- this.execute = function(sender, event, args)
- {
- var iframe = document.createElement('IFRAME'),
- doc = null
- ;
-
- // make sure there is never more than one hidden iframe created by SH
- if (sh.vars.printFrame != null)
- document.body.removeChild(sh.vars.printFrame);
-
- sh.vars.printFrame = iframe;
-
- // this hides the iframe
- iframe.style.cssText = 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;';
-
- document.body.appendChild(iframe);
- doc = iframe.contentWindow.document;
-
- copyStyles(doc, window.document);
- doc.write(' tag with given style applied to it.
- *
- * @param {String} str Input string.
- * @param {String} css Style name to apply to the string.
- * @return {String} Returns input string with each line surrounded by tag.
- */
- decorate: function(str, css)
- {
- if (str == null || str.length == 0 || str == '\n')
- return str;
-
- str = str.replace(/... to them so that
- // leading spaces aren't included.
- if (css != null)
- str = sh.utils.eachLine(str, function(line)
- {
- if (line.length == 0)
- return '';
-
- var spaces = '';
-
- line = line.replace(/^( | )+/, function(s)
- {
- spaces = s;
- return '';
- });
-
- if (line.length == 0)
- return spaces;
-
- return spaces + '' + line + '';
- });
-
- return str;
- },
-
- /**
- * Pads number with zeros until it's length is the same as given length.
- *
- * @param {Number} number Number to pad.
- * @param {Number} length Max string length with.
- * @return {String} Returns a string padded with proper amount of '0'.
- */
- padNumber : function(number, length)
- {
- var result = number.toString();
-
- while (result.length < length)
- result = '0' + result;
-
- return result;
- },
-
- /**
- * Measures width of a single space character.
- * @return {Number} Returns width of a single space character.
- */
- measureSpace : function()
- {
- var container = document.createElement('div'),
- span,
- result = 0,
- body = document.body,
- id = sh.utils.guid('measureSpace'),
-
- // variable names will be compressed, so it's better than a plain string
- divOpen = 'regexList collection.
- * @return {Array} Returns a list of Match objects.
- */
- getMatches: function(code, regexInfo)
- {
- function defaultAdd(match, regexInfo)
- {
- return [new sh.Match(match[0], match.index, regexInfo.css)];
- };
-
- var index = 0,
- match = null,
- result = [],
- func = regexInfo.func ? regexInfo.func : defaultAdd
- ;
-
- while((match = regexInfo.regex.exec(code)) != null)
- result = result.concat(func(match, regexInfo));
-
- return result;
- },
-
- processUrls: function(code)
- {
- var lt = '<',
- gt = '>'
- ;
-
- return code.replace(sh.regexLib.url, function(m)
- {
- var suffix = '', prefix = '';
-
- // We include < and > in the URL for the common cases like ' + lineNumber + ' | ' : '')
- + ''
- + (spaces != null ? '' + spaces.replace(' ', ' ') + '' : '')
- + line
- + ' | '
- + '
.*?)" +
- "(?" + regexGroup.right.source + ")",
- "sgi"
- )
- };
- }
-}; // end of Highlighter
-
-return sh;
-}(); // end of anonymous function
-
-
-/**
- * XRegExp 0.6.1
- * (c) 2007-2008 Steven Levithan
- *
- * MIT License
- *
- * provides an augmented, cross-browser implementation of regular expressions
- * including support for additional modifiers and syntax. several convenience
- * methods and a recursive-construct parser are also included.
- */
-
-// prevent running twice, which would break references to native globals
-if (!window.XRegExp) {
-// anonymous function to avoid global variables
-(function () {
-// copy various native globals for reference. can't use the name ``native``
-// because it's a reserved JavaScript keyword.
-var real = {
- exec: RegExp.prototype.exec,
- match: String.prototype.match,
- replace: String.prototype.replace,
- split: String.prototype.split
- },
- /* regex syntax parsing with support for all the necessary cross-
- browser and context issues (escapings, character classes, etc.) */
- lib = {
- part: /(?:[^\\([#\s.]+|\\(?!k<[\w$]+>|[pP]{[^}]+})[\S\s]?|\((?=\?(?!#|<[\w$]+>)))+|(\()(?:\?(?:(#)[^)]*\)|<([$\w]+)>))?|\\(?:k<([\w$]+)>|[pP]{([^}]+)})|(\[\^?)|([\S\s])/g,
- replaceVar: /(?:[^$]+|\$(?![1-9$&`']|{[$\w]+}))+|\$(?:([1-9]\d*|[$&`'])|{([$\w]+)})/g,
- extended: /^(?:\s+|#.*)+/,
- quantifier: /^(?:[?*+]|{\d+(?:,\d*)?})/,
- classLeft: /&&\[\^?/g,
- classRight: /]/g
- },
- indexOf = function (array, item, from) {
- for (var i = from || 0; i < array.length; i++)
- if (array[i] === item) return i;
- return -1;
- },
- brokenExecUndef = /()??/.exec("")[1] !== undefined,
- plugins = {};
-
-/**
- * Accepts a pattern and flags, returns a new, extended RegExp object.
- * differs from a native regex in that additional flags and syntax are
- * supported and browser inconsistencies are ameliorated.
- * @ignore
- */
-XRegExp = function (pattern, flags) {
- if (pattern instanceof RegExp) {
- if (flags !== undefined)
- throw TypeError("can't supply flags when constructing one RegExp from another");
- return pattern.addFlags(); // new copy
- }
-
- var flags = flags || "",
- singleline = flags.indexOf("s") > -1,
- extended = flags.indexOf("x") > -1,
- hasNamedCapture = false,
- captureNames = [],
- output = [],
- part = lib.part,
- match, cc, len, index, regex;
-
- part.lastIndex = 0; // in case the last XRegExp compilation threw an error (unbalanced character class)
-
- while (match = real.exec.call(part, pattern)) {
- // comment pattern. this check must come before the capturing group check,
- // because both match[1] and match[2] will be non-empty.
- if (match[2]) {
- // keep tokens separated unless the following token is a quantifier
- if (!lib.quantifier.test(pattern.slice(part.lastIndex)))
- output.push("(?:)");
- // capturing group
- } else if (match[1]) {
- captureNames.push(match[3] || null);
- if (match[3])
- hasNamedCapture = true;
- output.push("(");
- // named backreference
- } else if (match[4]) {
- index = indexOf(captureNames, match[4]);
- // keep backreferences separate from subsequent literal numbers
- // preserve backreferences to named groups that are undefined at this point as literal strings
- output.push(index > -1 ?
- "\\" + (index + 1) + (isNaN(pattern.charAt(part.lastIndex)) ? "" : "(?:)") :
- match[0]
- );
- // unicode element (requires plugin)
- } else if (match[5]) {
- output.push(plugins.unicode ?
- plugins.unicode.get(match[5], match[0].charAt(1) === "P") :
- match[0]
- );
- // character class opening delimiter ("[" or "[^")
- // (non-native unicode elements are not supported within character classes)
- } else if (match[6]) {
- if (pattern.charAt(part.lastIndex) === "]") {
- // for cross-browser compatibility with ECMA-262 v3 behavior,
- // convert [] to (?!) and [^] to [\S\s].
- output.push(match[6] === "[" ? "(?!)" : "[\\S\\s]");
- part.lastIndex++;
- } else {
- // parse the character class with support for inner escapes and
- // ES4's infinitely nesting intersection syntax ([&&[^&&[]]]).
- cc = XRegExp.matchRecursive("&&" + pattern.slice(match.index), lib.classLeft, lib.classRight, "", {escapeChar: "\\"})[0];
- output.push(match[6] + cc + "]");
- part.lastIndex += cc.length + 1;
- }
- // dot ("."), pound sign ("#"), or whitespace character
- } else if (match[7]) {
- if (singleline && match[7] === ".") {
- output.push("[\\S\\s]");
- } else if (extended && lib.extended.test(match[7])) {
- len = real.exec.call(lib.extended, pattern.slice(part.lastIndex - 1))[0].length;
- // keep tokens separated unless the following token is a quantifier
- if (!lib.quantifier.test(pattern.slice(part.lastIndex - 1 + len)))
- output.push("(?:)");
- part.lastIndex += len - 1;
- } else {
- output.push(match[7]);
- }
- } else {
- output.push(match[0]);
- }
- }
-
- regex = RegExp(output.join(""), real.replace.call(flags, /[sx]+/g, ""));
- regex._x = {
- source: pattern,
- captureNames: hasNamedCapture ? captureNames : null
- };
- return regex;
-};
-
-/**
- * Barebones plugin support for now (intentionally undocumented)
- * @ignore
- * @param {Object} name
- * @param {Object} o
- */
-XRegExp.addPlugin = function (name, o) {
- plugins[name] = o;
-};
-
-/**
- * Adds named capture support, with values returned as ``result.name``.
- *
- * Also fixes two cross-browser issues, following the ECMA-262 v3 spec:
- * - captured values for non-participating capturing groups should be returned
- * as ``undefined``, rather than the empty string.
- * - the regex's ``lastIndex`` should not be incremented after zero-length
- * matches.
- * @ignore
- */
-RegExp.prototype.exec = function (str) {
- var match = real.exec.call(this, str),
- name, i, r2;
- if (match) {
- // fix browsers whose exec methods don't consistently return
- // undefined for non-participating capturing groups
- if (brokenExecUndef && match.length > 1) {
- // r2 doesn't need /g or /y, but they shouldn't hurt
- r2 = new RegExp("^" + this.source + "$(?!\\s)", this.getNativeFlags());
- real.replace.call(match[0], r2, function () {
- for (i = 1; i < arguments.length - 2; i++) {
- if (arguments[i] === undefined) match[i] = undefined;
- }
- });
- }
- // attach named capture properties
- if (this._x && this._x.captureNames) {
- for (i = 1; i < match.length; i++) {
- name = this._x.captureNames[i - 1];
- if (name) match[name] = match[i];
- }
- }
- // fix browsers that increment lastIndex after zero-length matches
- if (this.global && this.lastIndex > (match.index + match[0].length))
- this.lastIndex--;
- }
- return match;
-};
-})(); // end anonymous function
-} // end if(!window.XRegExp)
-
-/**
- * intentionally undocumented
- * @ignore
- */
-RegExp.prototype.getNativeFlags = function () {
- return (this.global ? "g" : "") +
- (this.ignoreCase ? "i" : "") +
- (this.multiline ? "m" : "") +
- (this.extended ? "x" : "") +
- (this.sticky ? "y" : "");
-};
-
-/**
- * Accepts flags; returns a new XRegExp object generated by recompiling
- * the regex with the additional flags (may include non-native flags).
- * The original regex object is not altered.
- * @ignore
- */
-RegExp.prototype.addFlags = function (flags) {
- var regex = new XRegExp(this.source, (flags || "") + this.getNativeFlags());
- if (this._x) {
- regex._x = {
- source: this._x.source,
- captureNames: this._x.captureNames ? this._x.captureNames.slice(0) : null
- };
- }
- return regex;
-};
-
-/**
- * Accepts a context object and string; returns the result of calling
- * ``exec`` with the provided string. the context is ignored but is
- * accepted for congruity with ``Function.prototype.call``.
- * @ignore
- */
-RegExp.prototype.call = function (context, str) {
- return this.exec(str);
-};
-
-/**
- * Accepts a context object and arguments array; returns the result of
- * calling ``exec`` with the first value in the arguments array. the context
- * is ignored but is accepted for congruity with ``Function.prototype.apply``.
- * @ignore
- */
-RegExp.prototype.apply = function (context, args) {
- return this.exec(args[0]);
-};
-
-/**
- * Accepts a pattern and flags; returns an XRegExp object. if the pattern
- * and flag combination has previously been cached, the cached copy is
- * returned, otherwise the new object is cached.
- * @ignore
- */
-XRegExp.cache = function (pattern, flags) {
- var key = "/" + pattern + "/" + (flags || "");
- return XRegExp.cache[key] || (XRegExp.cache[key] = new XRegExp(pattern, flags));
-};
-
-/**
- * Accepts a string; returns the string with regex metacharacters escaped.
- * the returned string can safely be used within a regex to match a literal
- * string. escaped characters are [, ], {, }, (, ), -, *, +, ?, ., \, ^, $,
- * |, #, [comma], and whitespace.
- * @ignore
- */
-XRegExp.escape = function (str) {
- return str.replace(/[-[\]{}()*+?.\\^$|,#\s]/g, "\\$&");
-};
-
-/**
- * Accepts a string to search, left and right delimiters as regex pattern
- * strings, optional regex flags (may include non-native s, x, and y flags),
- * and an options object which allows setting an escape character and changing
- * the return format from an array of matches to a two-dimensional array of
- * string parts with extended position data. returns an array of matches
- * (optionally with extended data), allowing nested instances of left and right
- * delimiters. use the g flag to return all matches, otherwise only the first
- * is returned. if delimiters are unbalanced within the subject data, an error
- * is thrown.
- *
- * This function admittedly pushes the boundaries of what can be accomplished
- * sensibly without a "real" parser. however, by doing so it provides flexible
- * and powerful recursive parsing capabilities with minimal code weight.
- *
- * Warning: the ``escapeChar`` option is considered experimental and might be
- * changed or removed in future versions of XRegExp.
- *
- * unsupported features:
- * - backreferences within delimiter patterns when using ``escapeChar``.
- * - although providing delimiters as regex objects adds the minor feature of
- * independent delimiter flags, it introduces other limitations and is only
- * intended to be done by the ``XRegExp`` constructor (which can't call
- * itself while building a regex).
- *
- * @ignore
- */
-XRegExp.matchRecursive = function (str, left, right, flags, options) {
- var options = options || {},
- escapeChar = options.escapeChar,
- vN = options.valueNames,
- flags = flags || "",
- global = flags.indexOf("g") > -1,
- ignoreCase = flags.indexOf("i") > -1,
- multiline = flags.indexOf("m") > -1,
- sticky = flags.indexOf("y") > -1,
- /* sticky mode has its own handling in this function, which means you
- can use flag "y" even in browsers which don't support it natively */
- flags = flags.replace(/y/g, ""),
- left = left instanceof RegExp ? (left.global ? left : left.addFlags("g")) : new XRegExp(left, "g" + flags),
- right = right instanceof RegExp ? (right.global ? right : right.addFlags("g")) : new XRegExp(right, "g" + flags),
- output = [],
- openTokens = 0,
- delimStart = 0,
- delimEnd = 0,
- lastOuterEnd = 0,
- outerStart, innerStart, leftMatch, rightMatch, escaped, esc;
-
- if (escapeChar) {
- if (escapeChar.length > 1) throw SyntaxError("can't supply more than one escape character");
- if (multiline) throw TypeError("can't supply escape character when using the multiline flag");
- escaped = XRegExp.escape(escapeChar);
- /* Escape pattern modifiers:
- /g - not needed here
- /i - included
- /m - **unsupported**, throws error
- /s - handled by XRegExp when delimiters are provided as strings
- /x - handled by XRegExp when delimiters are provided as strings
- /y - not needed here; supported by other handling in this function
- */
- esc = new RegExp(
- "^(?:" + escaped + "[\\S\\s]|(?:(?!" + left.source + "|" + right.source + ")[^" + escaped + "])+)+",
- ignoreCase ? "i" : ""
- );
- }
-
- while (true) {
- /* advance the starting search position to the end of the last delimiter match.
- a couple special cases are also covered:
- - if using an escape character, advance to the next delimiter's starting position,
- skipping any escaped characters
- - first time through, reset lastIndex in case delimiters were provided as regexes
- */
- left.lastIndex = right.lastIndex = delimEnd +
- (escapeChar ? (esc.exec(str.slice(delimEnd)) || [""])[0].length : 0);
-
- leftMatch = left.exec(str);
- rightMatch = right.exec(str);
-
- // only keep the result which matched earlier in the string
- if (leftMatch && rightMatch) {
- if (leftMatch.index <= rightMatch.index)
- rightMatch = null;
- else leftMatch = null;
- }
-
- /* paths*:
- leftMatch | rightMatch | openTokens | result
- 1 | 0 | 1 | ...
- 1 | 0 | 0 | ...
- 0 | 1 | 1 | ...
- 0 | 1 | 0 | throw
- 0 | 0 | 1 | throw
- 0 | 0 | 0 | break
- * - does not include the sticky mode special case
- - the loop ends after the first completed match if not in global mode
- */
-
- if (leftMatch || rightMatch) {
- delimStart = (leftMatch || rightMatch).index;
- delimEnd = (leftMatch ? left : right).lastIndex;
- } else if (!openTokens) {
- break;
- }
-
- if (sticky && !openTokens && delimStart > lastOuterEnd)
- break;
-
- if (leftMatch) {
- if (!openTokens++) {
- outerStart = delimStart;
- innerStart = delimEnd;
- }
- } else if (rightMatch && openTokens) {
- if (!--openTokens) {
- if (vN) {
- if (vN[0] && outerStart > lastOuterEnd)
- output.push([vN[0], str.slice(lastOuterEnd, outerStart), lastOuterEnd, outerStart]);
- if (vN[1]) output.push([vN[1], str.slice(outerStart, innerStart), outerStart, innerStart]);
- if (vN[2]) output.push([vN[2], str.slice(innerStart, delimStart), innerStart, delimStart]);
- if (vN[3]) output.push([vN[3], str.slice(delimStart, delimEnd), delimStart, delimEnd]);
- } else {
- output.push(str.slice(innerStart, delimStart));
- }
- lastOuterEnd = delimEnd;
- if (!global)
- break;
- }
- } else {
- // reset lastIndex in case delimiters were provided as regexes
- left.lastIndex = right.lastIndex = 0;
- throw Error("subject data contains unbalanced delimiters");
- }
-
- // if the delimiter matched an empty string, advance delimEnd to avoid an infinite loop
- if (delimStart === delimEnd)
- delimEnd++;
- }
-
- if (global && !sticky && vN && vN[0] && str.length > lastOuterEnd)
- output.push([vN[0], str.slice(lastOuterEnd), lastOuterEnd, str.length]);
-
- // reset lastIndex in case delimiters were provided as regexes
- left.lastIndex = right.lastIndex = 0;
-
- return output;
-};
-/**
- * SyntaxHighlighter
- * http://alexgorbatchev.com/
- *
- * SyntaxHighlighter is donationware. If you are using it, please donate.
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
- *
- * @version
- * 2.0.320 (May 03 2009)
- *
- * @copyright
- * Copyright (C) 2004-2009 Alex Gorbatchev.
- *
- * @license
- * This file is part of SyntaxHighlighter.
- *
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * SyntaxHighlighter is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with SyntaxHighlighter. If not, see .
- */
-SyntaxHighlighter.brushes.Xml = function()
-{
- function process(match, regexInfo)
- {
- var constructor = SyntaxHighlighter.Match,
- code = match[0],
- tag = new XRegExp('(<|<)[\\s\\/\\?]*(?[:\\w-\\.]+)', 'xg').exec(code),
- result = []
- ;
-
- if (match.attributes != null)
- {
- var attributes,
- regex = new XRegExp('(? [\\w:\\-\\.]+)' +
- '\\s*=\\s*' +
- '(? ".*?"|\'.*?\'|\\w+)',
- 'xg');
-
- while ((attributes = regex.exec(code)) != null)
- {
- result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
- result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
- }
- }
-
- if (tag != null)
- result.push(
- new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
- );
-
- return result;
- }
-
- this.regexList = [
- { regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, //
- { regex: new XRegExp('(\\<|<)!--\\s*.*?\\s*--(\\>|>)', 'gm'), css: 'comments' }, //
- { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process }
- ];
-};
-
-SyntaxHighlighter.brushes.Xml.prototype = new SyntaxHighlighter.Highlighter();
-SyntaxHighlighter.brushes.Xml.aliases = ['xml', 'xhtml', 'xslt', 'html', 'xhtml'];
-/**
- * SyntaxHighlighter
- * http://alexgorbatchev.com/
- *
- * SyntaxHighlighter is donationware. If you are using it, please donate.
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
- *
- * @version
- * 2.0.320 (May 03 2009)
- *
- * @copyright
- * Copyright (C) 2004-2009 Alex Gorbatchev.
- *
- * @license
- * This file is part of SyntaxHighlighter.
- *
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * SyntaxHighlighter is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with SyntaxHighlighter. If not, see .
- */
-SyntaxHighlighter.brushes.JScript = function()
-{
- var keywords = 'break case catch continue ' +
- 'default delete do else false ' +
- 'for function if in instanceof ' +
- 'new null return super switch ' +
- 'this throw true try typeof var while with'
- ;
-
- this.regexList = [
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
- { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
- ];
-
- this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
-};
-
-SyntaxHighlighter.brushes.JScript.prototype = new SyntaxHighlighter.Highlighter();
-SyntaxHighlighter.brushes.JScript.aliases = ['js', 'jscript', 'javascript'];
-
-
-SyntaxHighlighter.config.clipboardSwf = 'syntax/clipboard.swf';
-$(function () {
- var divs = $([]);
- $("#container .source").each(function () {
- var code = $(this).html().replace(//g,'>'),
- div = $('' + code + '
'),
- demo = $(this).prevAll(".demo:eq(0)");
- $(this).after(div);
- if(!$(this).hasClass("below")) divs = divs.add(div);
- });
- SyntaxHighlighter.all();
-
- setTimeout((function (divs) {
- return function () {
- divs.each(function () {
- var div = $(this),
- demo = $(this).prevAll(".demo:eq(0)"),
- h = false;
- var h = Math.max(demo[0].offsetHeight, div[0].offsetHeight);
- if(h) {
- if(h < 198) h = 198;
- div.height(h);
- demo.height(h);
- }
- });
- }
- })(divs), 500);
-
- // $(".panel").hide().prev().click(function () { $(this).next().toggle(); }).css("cursor","pointer");
-});
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_docs/syntax/!style.css b/awx/ui/static/lib/jstree/_docs/syntax/!style.css
deleted file mode 100644
index ed3cafd9a5..0000000000
--- a/awx/ui/static/lib/jstree/_docs/syntax/!style.css
+++ /dev/null
@@ -1,511 +0,0 @@
-/**
- * SyntaxHighlighter
- * http://alexgorbatchev.com/
- *
- * SyntaxHighlighter is donationware. If you are using it, please donate.
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
- *
- * @version
- * 2.1.364 (October 15 2009)
- *
- * @copyright
- * Copyright (C) 2004-2009 Alex Gorbatchev.
- *
- * @license
- * This file is part of SyntaxHighlighter.
- *
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * SyntaxHighlighter is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with SyntaxHighlighter. If not, see .
- */
-.syntaxhighlighter,
-.syntaxhighlighter div,
-.syntaxhighlighter code,
-.syntaxhighlighter table,
-.syntaxhighlighter table td,
-.syntaxhighlighter table tr,
-.syntaxhighlighter table tbody
-{
- margin: 0 !important;
- padding: 0 !important;
- border: 0 !important;
- outline: 0 !important;
- background: none !important;
- text-align: left !important;
- float: none !important;
- vertical-align: baseline !important;
- position: static !important;
- left: auto !important;
- top: auto !important;
- right: auto !important;
- bottom: auto !important;
- height: auto !important;
- width: auto !important;
- font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
- font-weight: normal !important;
- font-style: normal !important;
- min-height: inherit !important; /* For IE8, FF & WebKit */
- min-height: auto !important; /* For IE7 */
-
-
-/*
- line-height: 1.1em !important;
- font-size: 1em !important;
-*/
-
- font-size:12px !important;
- line-height:18px !important;
-
-}
-
-.syntaxhighlighter
-{
- width: 99.9% !important; /* 99% fixes IE8 horizontal scrollbar */
- margin: 1em 0 1em 0 !important;
- padding: 1px !important; /* adds a little border on top and bottom */
- position: relative !important;
-}
-
-.syntaxhighlighter .bold
-{
- font-weight: bold !important;
-}
-
-.syntaxhighlighter .italic
-{
- font-style: italic !important;
-}
-
-.syntaxhighlighter .line
-{
-}
-
-.syntaxhighlighter .no-wrap .line .content
-{
- white-space: pre !important;
-}
-
-.syntaxhighlighter .line table
-{
- border-collapse: collapse !important;
-}
-
-.syntaxhighlighter .line td
-{
- vertical-align: top !important;
-}
-
-.syntaxhighlighter .line .number
-{
- width: 3em !important;
-}
-
-.syntaxhighlighter .line .number code
-{
- width: 2.7em !important;
- padding-right: .3em !important;
- text-align: right !important;
- display: block !important;
-}
-
-.syntaxhighlighter .line .content
-{
- padding-left: .5em !important;
-}
-
-.syntaxhighlighter .line .spaces
-{
-}
-
-/* Disable border and margin on the lines when no gutter option is set */
-.syntaxhighlighter.nogutter .line .content
-{
- border-left: none !important;
-}
-
-.syntaxhighlighter .bar
-{
- display: none !important;
-}
-
-.syntaxhighlighter .bar.show
-{
- display: block !important;
-}
-
-.syntaxhighlighter.collapsed .bar
-{
- display: block !important;
-}
-
-/* Adjust some properties when collapsed */
-
-.syntaxhighlighter.collapsed .lines
-{
- display: none !important;
-}
-
-.syntaxhighlighter .lines.no-wrap
-{
- overflow: auto !important;
- overflow-y: hidden !important;
-}
-
-/* Styles for the toolbar */
-
-.syntaxhighlighter .toolbar
-{
- position: absolute !important;
- right: 0px !important;
- top: 0px !important;
- font-size: 1px !important;
- padding: 8px 8px 8px 0 !important; /* in px because images don't scale with ems */
-}
-
-.syntaxhighlighter.collapsed .toolbar
-{
- font-size: 80% !important;
- padding: .2em 0 .5em .5em !important;
- position: static !important;
-}
-
-.syntaxhighlighter .toolbar a.item,
-.syntaxhighlighter .toolbar .item
-{
- display: block !important;
- float: left !important;
- margin-left: 8px !important;
- background-repeat: no-repeat !important;
- overflow: hidden !important;
- text-indent: -5000px !important;
-}
-
-.syntaxhighlighter.collapsed .toolbar .item
-{
- display: none !important;
-}
-
-.syntaxhighlighter.collapsed .toolbar .item.expandSource
-{
- background-image: url(magnifier.png) !important;
- display: inline !important;
- text-indent: 0 !important;
- width: auto !important;
- float: none !important;
- height: 16px !important;
- padding-left: 20px !important;
-}
-
-.syntaxhighlighter .toolbar .item.viewSource
-{
- background-image: url(page_white_code.png) !important;
-}
-
-.syntaxhighlighter .toolbar .item.printSource
-{
- background-image: url(printer.png) !important;
-}
-
-.syntaxhighlighter .toolbar .item.copyToClipboard
-{
- text-indent: 0 !important;
- background: none !important;
- overflow: visible !important;
-}
-
-.syntaxhighlighter .toolbar .item.about
-{
- background-image: url(help.png) !important;
-}
-
-/**
- * Print view.
- * Colors are based on the default theme without background.
- */
-
-.syntaxhighlighter.printing,
-.syntaxhighlighter.printing .line.alt1 .content,
-.syntaxhighlighter.printing .line.alt2 .content,
-.syntaxhighlighter.printing .line.highlighted .number,
-.syntaxhighlighter.printing .line.highlighted.alt1 .content,
-.syntaxhighlighter.printing .line.highlighted.alt2 .content,
-{
- background: none !important;
-}
-
-/* Gutter line numbers */
-.syntaxhighlighter.printing .line .number
-{
- color: #bbb !important;
-}
-
-/* Add border to the lines */
-.syntaxhighlighter.printing .line .content
-{
- color: #000 !important;
-}
-
-/* Toolbar when visible */
-.syntaxhighlighter.printing .toolbar
-{
- display: none !important;
-}
-
-.syntaxhighlighter.printing a
-{
- text-decoration: none !important;
-}
-
-.syntaxhighlighter.printing .plain,
-.syntaxhighlighter.printing .plain a
-{
- color: #000 !important;
-}
-
-.syntaxhighlighter.printing .comments,
-.syntaxhighlighter.printing .comments a
-{
- color: #008200 !important;
-}
-
-.syntaxhighlighter.printing .string,
-.syntaxhighlighter.printing .string a
-{
- color: blue !important;
-}
-
-.syntaxhighlighter.printing .keyword
-{
- color: #069 !important;
- font-weight: bold !important;
-}
-
-.syntaxhighlighter.printing .preprocessor
-{
- color: gray !important;
-}
-
-.syntaxhighlighter.printing .variable
-{
- color: #a70 !important;
-}
-
-.syntaxhighlighter.printing .value
-{
- color: #090 !important;
-}
-
-.syntaxhighlighter.printing .functions
-{
- color: #ff1493 !important;
-}
-
-.syntaxhighlighter.printing .constants
-{
- color: #0066CC !important;
-}
-
-.syntaxhighlighter.printing .script
-{
- font-weight: bold !important;
-}
-
-.syntaxhighlighter.printing .color1,
-.syntaxhighlighter.printing .color1 a
-{
- color: #808080 !important;
-}
-
-.syntaxhighlighter.printing .color2,
-.syntaxhighlighter.printing .color2 a
-{
- color: #ff1493 !important;
-}
-
-.syntaxhighlighter.printing .color3,
-.syntaxhighlighter.printing .color3 a
-{
- color: red !important;
-}
-/**
- * SyntaxHighlighter
- * http://alexgorbatchev.com/
- *
- * SyntaxHighlighter is donationware. If you are using it, please donate.
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
- *
- * @version
- * 2.1.364 (October 15 2009)
- *
- * @copyright
- * Copyright (C) 2004-2009 Alex Gorbatchev.
- *
- * @license
- * This file is part of SyntaxHighlighter.
- *
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * SyntaxHighlighter is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with SyntaxHighlighter. If not, see .
- */
-/************************************
- * Default Syntax Highlighter theme.
- *
- * Interface elements.
- ************************************/
-
-.syntaxhighlighter
-{
- background-color: #fff !important;
-}
-
-/* Highlighed line number */
-.syntaxhighlighter .line.highlighted .number
-{
- color: black !important;
-}
-
-/* Highlighed line */
-.syntaxhighlighter .line.highlighted.alt1,
-.syntaxhighlighter .line.highlighted.alt2
-{
- background-color: #e0e0e0 !important;
-}
-
-/* Gutter line numbers */
-.syntaxhighlighter .line .number
-{
- color: #afafaf !important;
-}
-
-/* Add border to the lines */
-.syntaxhighlighter .line .content
-{
- border-left: 1px solid gray !important;
- color: #000 !important;
-}
-
-.syntaxhighlighter.printing .line .content
-{
- border: 0 !important;
-}
-
-/* First line */
-.syntaxhighlighter .line.alt1
-{
- background-color: #fff !important;
-}
-
-/* Second line */
-.syntaxhighlighter .line.alt2
-{
- background-color: #F8F8F8 !important;
-}
-
-.syntaxhighlighter .toolbar
-{
- background-color: #F8F8F8 !important;
- border: #E7E5DC solid 1px !important;
-}
-
-.syntaxhighlighter .toolbar a
-{
- color: #a0a0a0 !important;
-}
-
-.syntaxhighlighter .toolbar a:hover
-{
- color: red !important;
-}
-
-/************************************
- * Actual syntax highlighter colors.
- ************************************/
-.syntaxhighlighter .plain,
-.syntaxhighlighter .plain a
-{
- color: #000 !important;
-}
-
-.syntaxhighlighter .comments,
-.syntaxhighlighter .comments a
-{
- color: #008200 !important;
-}
-
-.syntaxhighlighter .string,
-.syntaxhighlighter .string a
-{
- color: blue !important;
-}
-
-.syntaxhighlighter .keyword
-{
- color: #069 !important;
- font-weight: bold !important;
-}
-
-.syntaxhighlighter .preprocessor
-{
- color: gray !important;
-}
-
-.syntaxhighlighter .variable
-{
- color: #a70 !important;
-}
-
-.syntaxhighlighter .value
-{
- color: #090 !important;
-}
-
-.syntaxhighlighter .functions
-{
- color: #ff1493 !important;
-}
-
-.syntaxhighlighter .constants
-{
- color: #0066CC !important;
-}
-
-.syntaxhighlighter .script
-{
- background-color: yellow !important;
-}
-
-.syntaxhighlighter .color1,
-.syntaxhighlighter .color1 a
-{
- color: #808080 !important;
-}
-
-.syntaxhighlighter .color2,
-.syntaxhighlighter .color2 a
-{
- color: #ff1493 !important;
-}
-
-.syntaxhighlighter .color3,
-.syntaxhighlighter .color3 a
-{
- color: red !important;
-}
diff --git a/awx/ui/static/lib/jstree/_docs/syntax/clipboard.swf b/awx/ui/static/lib/jstree/_docs/syntax/clipboard.swf
deleted file mode 100644
index 1b4d90a0fb..0000000000
Binary files a/awx/ui/static/lib/jstree/_docs/syntax/clipboard.swf and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/_docs/syntax/help.png b/awx/ui/static/lib/jstree/_docs/syntax/help.png
deleted file mode 100644
index 5c870176d4..0000000000
Binary files a/awx/ui/static/lib/jstree/_docs/syntax/help.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/_docs/syntax/magnifier.png b/awx/ui/static/lib/jstree/_docs/syntax/magnifier.png
deleted file mode 100644
index cf3d97f75e..0000000000
Binary files a/awx/ui/static/lib/jstree/_docs/syntax/magnifier.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/_docs/syntax/page_white_code.png b/awx/ui/static/lib/jstree/_docs/syntax/page_white_code.png
deleted file mode 100644
index 0c76bd1297..0000000000
Binary files a/awx/ui/static/lib/jstree/_docs/syntax/page_white_code.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/_docs/syntax/page_white_copy.png b/awx/ui/static/lib/jstree/_docs/syntax/page_white_copy.png
deleted file mode 100644
index a9f31a278e..0000000000
Binary files a/awx/ui/static/lib/jstree/_docs/syntax/page_white_copy.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/_docs/syntax/printer.png b/awx/ui/static/lib/jstree/_docs/syntax/printer.png
deleted file mode 100644
index a350d18715..0000000000
Binary files a/awx/ui/static/lib/jstree/_docs/syntax/printer.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/_docs/syntax/wrapping.png b/awx/ui/static/lib/jstree/_docs/syntax/wrapping.png
deleted file mode 100644
index 6972c5e594..0000000000
Binary files a/awx/ui/static/lib/jstree/_docs/syntax/wrapping.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/_docs/themeroller.html b/awx/ui/static/lib/jstree/_docs/themeroller.html
deleted file mode 100644
index 934dfe8531..0000000000
--- a/awx/ui/static/lib/jstree/_docs/themeroller.html
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
- jsTree v.1.0 - themeroller documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-jsTree v.1.0
-themeroller plugin
-Description
-
-The themeroller plugin adds support for jQuery UI's themes. Add the plugin as last in your plugins config option. Also make sure that you have included the jquery theme you'd like to use and you should NOT use the native jstree themes plugin.
-If using the search plugin - bind to "search.jstree" to style the found nodes, or apply some styles to the .jstree-search class (which is added by default) but make sure the selector is stronger than your current theme or use !important
-
-
-Configuration
-
-opened
-
-The class name to use for open nodes (shows the arrow to close).
-
-closed
-
-The class name to use for closed nodes (shows the arrow to open).
-
-item
-
-The class name to use for the actual items.
-
-item_h
-
-The class name to use for the hovered item.
-
-item_a
-
-The class name to use for selected items (UI plugin).
-
-item_open
-
-The class name to use for the opened items. If set to false the icon is not shown.
-item_clsd
-
-The class name to use for the opened items. If set to false the icon is not shown.
-item_leaf
-
-The class name to use for the opened items. If set to false the icon is not shown.
-
-
-
-
-Demos
-
-
-Using the themeroller plugin
-
-
- -
- Root node 1
-
- -
- Child node 1
-
- -
- Child node 2
-
-
-
- -
- Root node 2
-
-
-
-
-
-
-
-API
-
-
-._themeroller ( obj )
-Fixes the tree on various events by applying the configured classes - used internally only.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_docs/themes.html b/awx/ui/static/lib/jstree/_docs/themes.html
deleted file mode 100644
index a3318f47ed..0000000000
--- a/awx/ui/static/lib/jstree/_docs/themes.html
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
- jsTree v.1.0 - themes documentation
-
-
-
-
-
-
-
-
-
-
-
-
-jsTree v.1.0
-themes plugin
-Description
-
-The themes plugin controls the looks of jstree - without this plugin you will get a functional tree, but it will look just like an ordinary UL list.
-
-
-Configuration
-
-theme
-
-The name of the theme to use to style the tree.
-
-url
-
-The location of the theme's CSS file, if set to false jstree will look for the file in < theme folder >/themes/< theme name >/style.css. You can set the theme folder using $.jstree._themes = "PATH/TO/FOLDER/";, otherwise it is autodetected as <jquery.tree.js location>/themes/.
-
-dots
-
-Whether to show the connecting dots or not.
-
-icons
-
-Whether to show the node icons or not.
-
-
-
-Demos
-
-
-Using the themes plugin
-
-
-
-
-
-
- -
- Root node 1
-
- -
- Child node 1
-
- -
- Child node 2
-
-
-
- -
- Root node 2
-
-
-
-
-
-
-
-API
-
-
-.set_theme ( name , url )
-Set the tree's theme. Triggers an event.
-
- -
-
string name
- The name of the theme to use to style the tree.
-
- -
-
string url
- The location of the theme's CSS file, if omitted jstree will look for the file in:
< theme folder >/themes/< name >/style.css.
You can set the theme folder using:
$.jstree._themes = "PATH/TO/FOLDER/";, otherwise it is autodetected as <jquery.tree.js location>/themes/.
-
-
-.get_theme ( )
-Returns the name of the currently active theme.
-
-
-.show_dots ( ), .hide_dots ( ), .toggle_dots ( )
-Show, hide or toggle the visibility of the dots connecting the tree's nodes.
-
-
-.show_icons ( ), .hide_icons ( ), .toggle_icons ( )
-Show, hide or toggle the visibility of the icons next to the title of each the tree node.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_docs/types.html b/awx/ui/static/lib/jstree/_docs/types.html
deleted file mode 100644
index 620bba2f25..0000000000
--- a/awx/ui/static/lib/jstree/_docs/types.html
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
-
- jsTree v.1.0 - types documentation
-
-
-
-
-
-
-
-
-
-
-
-
-jsTree v.1.0
-types plugin
-Description
-
-The types enables node types - each node can have a type, and you can define rules on how that type should behave - maximum children count, maximum depth, valid children types, selectable or not, etc.
-
-
-Configuration
-
-
-max_children
-
-Defines maximum number of root nodes (-1 means unlimited, -2 means disable max_children checking in the tree).
-
-max_depth
-
-Defines maximum depth of the tree (-1 means unlimited, -2 means disable max_depth checking in the tree).
-
-valid_children
-
-Defines valid root node types (could be "all", "none", or an array of type strings).
-
-use_data
-
-If set to true jstree will check every node for $.metadata or $.data for rules (valid_children, max_depth & the function rules). Keep in mind jstree will look for this data in $("li-node-here").metadata().jstree.rule_name (or $.data respectively).
-
-type_attr
-
-Defines the attribute on each li node, where the type attribute will be stored. For correct usage in IE - do not assign to "type" - it triggers an IE bug.
-
-types
-
-Defines all the active types in the tree. Each key is the type name, and each value represents the rules for this type. A default type is defined - all nodes with no explicit type set are treated as if they were of the default type.
-
-
-types : {
- // the default type
- "default" : {
- "max_children" : -1,
- "max_depth" : -1,
- "valid_children": "all"
-
- // Bound functions - you can bind any other function here (using boolean or function)
- //"select_node" : true,
- //"open_node" : true,
- //"close_node" : true,
- //"create_node" : true,
- //"delete_node" : true
- }
-}
-
-
-For max_children, max_depth & valid_children use the same values as for the tree, but the value you set will only apply for that node type.
-You can set an icon key - it should be an object consisting of two keys - image (string - location of the image to be used as an icon) & position (string - left and top pixels of the image - 10px 40px, only useful when using sprites - omit otherwise).
-You can set more keys in that object - each key should be a function name, and each value - either a boolean (in order to allow or disallow that operation, on that node type) or a function. If you supply a function - your function will be called with two arguments - the name of the called function (the key) and the arguments passed to that function - you can then decide whether to return true or false.
-For any type - for now you can control only functions that take the node being manipulated as the first argument.
-
-
-
-Demos
-
-Using the types plugin
-
-
-
- -
- Root node 1
-
- -
- Child node 1
-
- -
- Child node 2
-
-
-
- -
- Root node 2
-
-
-
-
-
-
-
-API
-
-
-._get_type ( node )
-Get the type of a node.
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to the element.
-
-
-
-.set_type ( type , node )
-Set the type of a node. Triggers an event.
-
- -
-
string type
- The new type.
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to the element.
-
-
-
-._check ( rule , node , opts )
-Checks a rule on a give node. Used mostly internally.
-
- -
-
string rule
- The rule to check.
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to the element.
-
- -
-
mixed opts
- Any additional options regarding the rule. Used internally.
-
-
-
-
-.create_node ( ), .check_move ( )
-Both functions are overwritten to accomodate the new functionality presented by the plugin.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_docs/ui.html b/awx/ui/static/lib/jstree/_docs/ui.html
deleted file mode 100644
index 4e7bc9a54d..0000000000
--- a/awx/ui/static/lib/jstree/_docs/ui.html
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-
-
- jsTree v.1.0 - UI documentation
-
-
-
-
-
-
-
-
-
-
-
-
-jsTree v.1.0
-ui plugin
-Description
-
-The UI plugin handles selecting, deselecting and hovering tree items.
-
-
-Configuration
-
-select_limit
-
-Defines how many nodes can be selected at a given time (-1 means unlimited).
-
-select_multiple_modifier
-
-The special key used to make a click add to the selection and not replace it ("ctrl", "shift", "alt", "meta").
You can also set this to "on" making every click add to the selection.
-
-select_range_modifier
-
-The special key used to make a click expand a range from the last selected item ("ctrl", "shift", "alt", "meta").
Note that the last clicked elemtn should be a sibling of the currently clicked element so that a range will be created (same as common file explorers).
-
-selected_parent_close
-
-What action to take when a selected node's parent is closed (making the selected node invisible). Possible values are false - do nothing, "select_parent" - select the closed node's parent and "deselect" - deselect the node.
-
-selected_parent_open
-
-When set to true when programatically selecting a node in the tree all of its closed parents are opened automatically.
-
-select_prev_on_delete
-
-If set to true when a selected node is deleted, its previous sibling (or parent) is selected.
-
-disable_selecting_children
-
-If set to true you will not be able to select children of already selected nodes.
-
-initially_select
-
-Defines which nodes are to be automatically selected when the tree finishes loading - a list of IDs is expected.
-
-
-
-Demos
-
-
-Using the UI plugin
-
-
- -
- Root node 1
-
- -
- Child node 1
-
- -
- Child node 2
-
-
-
- -
- Root node 2
-
-
-
-
-
-
-
-API
-
-
-._get_node ( node , allow_multiple )
-Overrides the function from the core module.
if node is undefined or null and allow_multiple is true all the currently selected nodes are returned
if node is undefined or null and allow_multiple is NOT true only the last selected node is returned.
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-
- -
-
boolean allow_multiple
- Whether to return all selected nodes or only the last selected one if node is null.
-
-
-
-.save_selected ( )
-Saves away the current selection state of the tree (saves it in a variable, so do not expect a restore after a refresh - for that functionality refer to the cookies plugin. Used mostly internally. Triggers an event.
-
-.reselect ( )
-Restores the state of the tree using the variable saved in the above function. Used mostly internally. Triggers an event.
-
-.refresh ( node )
-Overrides the function form the core module.
Enables saving the selection state before the refresh and restoring it afterwards.
-
-.hover_node ( node )
-Sets the specified node as hovered. Triggers an event.
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-
-
-
-.dehover_node ( )
-Removes the hover state from the currently hovered node (if there is one). Triggers an event.
-
-
-.select_node ( node , check , event )
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-
- -
-
bool check
- Whether to check the specified rules and do appropriate actions (check select_limit, deselect other nodes respectively, etc) or to just force selection of the node regardless of select_limit.
-
- -
-
event event
- Used internally - when a click on a node caused this function to be executed.
-
-
-
-
-.deselect_node ( node ), .toggle_select ( node )
-There functions control the selected state on a node. deselect_node triggers an event.
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-
-
-
-.deselect_all ( context )
-Deselects all selected nodes. If context is set - only the selected nodes within that context are deselected. Triggers an event.
-
- -
-
mixed context
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-
-
-
-.get_selected ( context )
-Returns all selected nodes. If context is set - only the selected nodes within that context are returned.
-
- -
-
mixed context
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-
-
-
-.is_selected ( node )
-Returns whether the specified node is selected or not.
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element within the tree.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_docs/unique.html b/awx/ui/static/lib/jstree/_docs/unique.html
deleted file mode 100644
index ae4e5da83f..0000000000
--- a/awx/ui/static/lib/jstree/_docs/unique.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
- jsTree v.1.0 - unique documentation
-
-
-
-
-
-
-
-
-
-
-
-
-jsTree v.1.0
-unique plugin
-Description
-
-The unique plugin prevents from nodes with same titles coexisting (create/move/rename) in the same parent.
-
-
-Configuration
-
-
-error_callback
-
-Whenever the plugin stops an action (because it violates the unique policy) this function will bre triggered in current tree's scope, receiving the name, siblings and function name that caused the conflict.
-
-
-
-Demos
-
-Try moving the child nodes together (drag'n'drop).
-
-Using the unique plugin
-
-
- -
- Root node 1
-
- -
- Child node 1
-
-
-
- -
- Root node 2
-
- -
- Child node 1
-
-
-
-
-
-
-
-
-
-API
-
-
-._check_unique ( names, siblings )
-Used internally - checks the names array against the sibling nodes for matches.
-
-
-
-
-
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_docs/xml_data.html b/awx/ui/static/lib/jstree/_docs/xml_data.html
deleted file mode 100644
index eecc708356..0000000000
--- a/awx/ui/static/lib/jstree/_docs/xml_data.html
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
-
- jsTree v.1.0 - xml_data documentation
-
-
-
-
-
-
-
-
-
-
-
-
-jsTree v.1.0
-xml_data plugin
-Description
-
-The xml_data plugin enables jsTree to convert XML objects to interactive trees (using XSL). The data (XML) can be set up in the config (as a string) or retrieved from a server (also ondemand).
-Two types of XML structures are supported - flat and nested:
-
-
-<!-- FLAT -->
-<root>
- <item id="root_1" parent_id="0" state="closed">
- <content>
- <name><![CDATA[Node 1]]></name>
- </content>
- </item>
- <item id="node_2" parent_id="root_1">
- <content>
- <name><![CDATA[Node 2]]></name>
- </content>
- </item>
-</root>
-
-<!-- NESTED -->
-<root>
- <item id="xml_1">
- <content><name><![CDATA[Root node 1]]></name></content>
- <item id="xml_2">
- <content><name><![CDATA[Child node 1]]></name></content>
- </item>
- </item>
-</root>
-
-
-Aside from nesting the only difference is the parent_id attribute used in xml_flat.
-parent_id defines the parent of the node in XML flat, use 0 for root nodes. Also when using async - use 0 for the first level.
-state defines the state of the node (open or closed). You can omit it too - jstree will handle the data automatically - nodes with no children will be leaf nodes, nodes with children will be closed.
-All attributes you set on the item node will be transfered to the resulting li node. All attributes you set on the name node will be transfered to the resulting a node.
-If you are using the languages plugin you can have multiple name nodes in a every item node, just set a language attribute on each one (<name language="en" ...).
-Remember to always set the XML header on your XML files.
-
-
-Configuration
-
-data
-
-Specifies the content to load into the container and convert to a tree.
-ajax
-
-The ajax config object is pretty much the same as the jQuery ajax settings object.
-You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a parameter (or -1 for initial load). Whatever you return in the function will be sent to the server as data (so for example you can send the node's ID).
-You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the url function will be used as the ajax URL (so that you can accomodate pretty paths such as /get_children/node_2).
-The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used to populate the tree - this can be useful if you want to somehow change what the server returned on the client side before it is displayed in the tree. Please note that the success function receives a string as the first parameter, and also if you decide to return a value - return a string.
-correct_state
-
-If this option is set to true if an AJAX returns an empty result, the node that was about to be opened will be converted to a leaf node (the open icon will no longer be displayed).
-clean_node
-
-Set to true if node needs to be cleaned - usually you should leave this to false.
-xsl
-
-The type of structure you wiil be using - set either to "flat" or "nest".
-get_skip_empty
-
-If set to true empty attributes won't be returned by the get_xml function.
-
-NOTE:
If both data and ajax are set the initial tree is rendered from the data string. When opening a closed node (that has no loaded children) an AJAX request is made.
-
-
-Demos
-
-
-Using the data config option (flat)
-
-
-
-Using the ajax config option (nested)
-
-
-
-Using both the data & ajax config options (flat)
-
-
-
-
-API
-
-Both dummy functions - _is_loaded and load_node are overwritten.
-.load_node_xml ( node , success_callback , error_callback )
-This function is called instead of load_node.
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use -1 for root nodes.
-
- -
-
function success_callback
- A function to be executed once the node is loaded successfully - used internally. You should wait for the load_node event.
-
- -
-
function error_callback
- A function to be executed if the node is not loaded due to an error - used internally. You should wait for the load_node event.
-
-
-.parse_xml ( data )
-This function converts XML strings or objects to the DOM structure required by jstree. Returns a jQuery object.
-
- -
-
mixed data
- The XML string/object.
-
-
-.get_xml ( type , node , li_attr , a_attr , is_callback )
-This function returns an array of tree nodes converted back to XML.
-
- -
-
string type
- Either "flat" or "nest". Default is "flat".
-
- -
-
mixed node
- This can be a DOM node, jQuery node or selector pointing to an element you want returned. Use -1 or omit to get the whole tree.
-
- -
-
array li_attr
- The attributes to collect from the LI node. Defaults to [ "id" , "class" ]
-
- -
-
array a_attr
- The attributes to collect from the A node. Defaults to [ ]
-
- -
-
string is_callback
- Used internally.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_lib/jquery.cookie.js b/awx/ui/static/lib/jstree/_lib/jquery.cookie.js
deleted file mode 100644
index 6df1faca25..0000000000
--- a/awx/ui/static/lib/jstree/_lib/jquery.cookie.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Cookie plugin
- *
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- */
-
-/**
- * Create a cookie with the given name and value and other optional parameters.
- *
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Set the value of a cookie.
- * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
- * @desc Create a cookie with all available options.
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Create a session cookie.
- * @example $.cookie('the_cookie', null);
- * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
- * used when the cookie was set.
- *
- * @param String name The name of the cookie.
- * @param String value The value of the cookie.
- * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
- * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
- * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
- * If set to null or omitted, the cookie will be a session cookie and will not be retained
- * when the the browser exits.
- * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
- * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
- * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
- * require a secure protocol (like HTTPS).
- * @type undefined
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-
-/**
- * Get the value of a cookie with the given name.
- *
- * @example $.cookie('the_cookie');
- * @desc Get the value of a cookie.
- *
- * @param String name The name of the cookie.
- * @return The value of the cookie.
- * @type String
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-jQuery.cookie = function(name, value, options) {
- if (typeof value != 'undefined') { // name and value given, set cookie
- options = options || {};
- if (value === null) {
- value = '';
- options.expires = -1;
- }
- var expires = '';
- if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
- var date;
- if (typeof options.expires == 'number') {
- date = new Date();
- date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
- } else {
- date = options.expires;
- }
- expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
- }
- // CAUTION: Needed to parenthesize options.path and options.domain
- // in the following expressions, otherwise they evaluate to undefined
- // in the packed version for some reason...
- var path = options.path ? '; path=' + (options.path) : '';
- var domain = options.domain ? '; domain=' + (options.domain) : '';
- var secure = options.secure ? '; secure' : '';
- document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
- } else { // only name given, get cookie
- var cookieValue = null;
- if (document.cookie && document.cookie != '') {
- var cookies = document.cookie.split(';');
- for (var i = 0; i < cookies.length; i++) {
- var cookie = jQuery.trim(cookies[i]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
-};
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_lib/jquery.hotkeys.js b/awx/ui/static/lib/jstree/_lib/jquery.hotkeys.js
deleted file mode 100644
index fbd71c71ec..0000000000
--- a/awx/ui/static/lib/jstree/_lib/jquery.hotkeys.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * jQuery Hotkeys Plugin
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- *
- * Based upon the plugin by Tzury Bar Yochay:
- * http://github.com/tzuryby/hotkeys
- *
- * Original idea by:
- * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
-*/
-
-(function(jQuery){
-
- jQuery.hotkeys = {
- version: "0.8",
-
- specialKeys: {
- 8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
- 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
- 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
- 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
- 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
- 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
- 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
- },
-
- shiftNums: {
- "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
- "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
- ".": ">", "/": "?", "\\": "|"
- }
- };
-
- function keyHandler( handleObj ) {
- // Only care when a possible input has been specified
- if ( typeof handleObj.data !== "string" ) {
- return;
- }
-
- var origHandler = handleObj.handler,
- keys = handleObj.data.toLowerCase().split(" ");
-
- handleObj.handler = function( event ) {
- // Don't fire in text-accepting inputs that we didn't directly bind to
- if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
- event.target.type === "text") ) {
- return;
- }
-
- // Keypress represents characters, not special keys
- var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
- character = String.fromCharCode( event.which ).toLowerCase(),
- key, modif = "", possible = {};
-
- // check combinations (alt|ctrl|shift+anything)
- if ( event.altKey && special !== "alt" ) {
- modif += "alt+";
- }
-
- if ( event.ctrlKey && special !== "ctrl" ) {
- modif += "ctrl+";
- }
-
- // TODO: Need to make sure this works consistently across platforms
- if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
- modif += "meta+";
- }
-
- if ( event.shiftKey && special !== "shift" ) {
- modif += "shift+";
- }
-
- if ( special ) {
- possible[ modif + special ] = true;
-
- } else {
- possible[ modif + character ] = true;
- possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
-
- // "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
- if ( modif === "shift+" ) {
- possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
- }
- }
-
- for ( var i = 0, l = keys.length; i < l; i++ ) {
- if ( possible[ keys[i] ] ) {
- return origHandler.apply( this, arguments );
- }
- }
- };
- }
-
- jQuery.each([ "keydown", "keyup", "keypress" ], function() {
- jQuery.event.special[ this ] = { add: keyHandler };
- });
-
-})( jQuery );
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/_lib/jquery.js b/awx/ui/static/lib/jstree/_lib/jquery.js
deleted file mode 100644
index 006e953102..0000000000
--- a/awx/ui/static/lib/jstree/_lib/jquery.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
-//@ sourceMappingURL=jquery.min.map
-*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="t
",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
-return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,""],area:[1,""],param:[1,""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X",""]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
-}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write(""),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/jquery.jstree.js b/awx/ui/static/lib/jstree/jquery.jstree.js
deleted file mode 100644
index 8f685b38ec..0000000000
--- a/awx/ui/static/lib/jstree/jquery.jstree.js
+++ /dev/null
@@ -1,4565 +0,0 @@
-/*
- * jsTree 1.0-rc3
- * http://jstree.com/
- *
- * Copyright (c) 2010 Ivan Bozhanov (vakata.com)
- *
- * Licensed same as jquery - under the terms of either the MIT License or the GPL Version 2 License
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * $Date: 2011-02-09 01:17:14 +0200 (ср, 09 февр 2011) $
- * $Revision: 236 $
- */
-
-/*jslint browser: true, onevar: true, undef: true, bitwise: true, strict: true */
-/*global window : false, clearInterval: false, clearTimeout: false, document: false, setInterval: false, setTimeout: false, jQuery: false, navigator: false, XSLTProcessor: false, DOMParser: false, XMLSerializer: false, ActiveXObject: false */
-
-"use strict";
-
-// top wrapper to prevent multiple inclusion (is this OK?)
-(function () { if(jQuery && jQuery.jstree) { return; }
- var is_ie6 = false, is_ie7 = false, is_ff2 = false;
-
-/*
- * jsTree core
- */
-(function ($) {
- // Common functions not related to jsTree
- // decided to move them to a `vakata` "namespace"
- $.vakata = {};
- // CSS related functions
- $.vakata.css = {
- get_css : function(rule_name, delete_flag, sheet) {
- rule_name = rule_name.toLowerCase();
- var css_rules = sheet.cssRules || sheet.rules,
- j = 0;
- do {
- if(css_rules.length && j > css_rules.length + 5) { return false; }
- if(css_rules[j].selectorText && css_rules[j].selectorText.toLowerCase() == rule_name) {
- if(delete_flag === true) {
- if(sheet.removeRule) { sheet.removeRule(j); }
- if(sheet.deleteRule) { sheet.deleteRule(j); }
- return true;
- }
- else { return css_rules[j]; }
- }
- }
- while (css_rules[++j]);
- return false;
- },
- add_css : function(rule_name, sheet) {
- if($.jstree.css.get_css(rule_name, false, sheet)) { return false; }
- if(sheet.insertRule) { sheet.insertRule(rule_name + ' { }', 0); } else { sheet.addRule(rule_name, null, 0); }
- return $.vakata.css.get_css(rule_name);
- },
- remove_css : function(rule_name, sheet) {
- return $.vakata.css.get_css(rule_name, true, sheet);
- },
- add_sheet : function(opts) {
- var tmp = false, is_new = true;
- if(opts.str) {
- if(opts.title) { tmp = $("style[id='" + opts.title + "-stylesheet']")[0]; }
- if(tmp) { is_new = false; }
- else {
- tmp = document.createElement("style");
- tmp.setAttribute('type',"text/css");
- if(opts.title) { tmp.setAttribute("id", opts.title + "-stylesheet"); }
- }
- if(tmp.styleSheet) {
- if(is_new) {
- document.getElementsByTagName("head")[0].appendChild(tmp);
- tmp.styleSheet.cssText = opts.str;
- }
- else {
- tmp.styleSheet.cssText = tmp.styleSheet.cssText + " " + opts.str;
- }
- }
- else {
- tmp.appendChild(document.createTextNode(opts.str));
- document.getElementsByTagName("head")[0].appendChild(tmp);
- }
- return tmp.sheet || tmp.styleSheet;
- }
- if(opts.url) {
- if(document.createStyleSheet) {
- try { tmp = document.createStyleSheet(opts.url); } catch (e) { }
- }
- else {
- tmp = document.createElement('link');
- tmp.rel = 'stylesheet';
- tmp.type = 'text/css';
- tmp.media = "all";
- tmp.href = opts.url;
- document.getElementsByTagName("head")[0].appendChild(tmp);
- return tmp.styleSheet;
- }
- }
- }
- };
-
- // private variables
- var instances = [], // instance array (used by $.jstree.reference/create/focused)
- focused_instance = -1, // the index in the instance array of the currently focused instance
- plugins = {}, // list of included plugins
- prepared_move = {}; // for the move_node function
-
- // jQuery plugin wrapper (thanks to jquery UI widget function)
- $.fn.jstree = function (settings) {
- var isMethodCall = (typeof settings == 'string'), // is this a method call like $().jstree("open_node")
- args = Array.prototype.slice.call(arguments, 1),
- returnValue = this;
-
- // if a method call execute the method on all selected instances
- if(isMethodCall) {
- if(settings.substring(0, 1) == '_') { return returnValue; }
- this.each(function() {
- var instance = instances[$.data(this, "jstree_instance_id")],
- methodValue = (instance && $.isFunction(instance[settings])) ? instance[settings].apply(instance, args) : instance;
- if(typeof methodValue !== "undefined" && (settings.indexOf("is_") === 0 || (methodValue !== true && methodValue !== false))) { returnValue = methodValue; return false; }
- });
- }
- else {
- this.each(function() {
- // extend settings and allow for multiple hashes and $.data
- var instance_id = $.data(this, "jstree_instance_id"),
- a = [],
- b = settings ? $.extend({}, true, settings) : {},
- c = $(this),
- s = false,
- t = [];
- a = a.concat(args);
- if(c.data("jstree")) { a.push(c.data("jstree")); }
- b = a.length ? $.extend.apply(null, [true, b].concat(a)) : b;
-
- // if an instance already exists, destroy it first
- if(typeof instance_id !== "undefined" && instances[instance_id]) { instances[instance_id].destroy(); }
- // push a new empty object to the instances array
- instance_id = parseInt(instances.push({}),10) - 1;
- // store the jstree instance id to the container element
- $.data(this, "jstree_instance_id", instance_id);
- // clean up all plugins
- b.plugins = $.isArray(b.plugins) ? b.plugins : $.jstree.defaults.plugins.slice();
- b.plugins.unshift("core");
- // only unique plugins
- b.plugins = b.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");
-
- // extend defaults with passed data
- s = $.extend(true, {}, $.jstree.defaults, b);
- s.plugins = b.plugins;
- $.each(plugins, function (i, val) {
- if($.inArray(i, s.plugins) === -1) { s[i] = null; delete s[i]; }
- else { t.push(i); }
- });
- s.plugins = t;
-
- // push the new object to the instances array (at the same time set the default classes to the container) and init
- instances[instance_id] = new $.jstree._instance(instance_id, $(this).addClass("jstree jstree-" + instance_id), s);
- // init all activated plugins for this instance
- $.each(instances[instance_id]._get_settings().plugins, function (i, val) { instances[instance_id].data[val] = {}; });
- $.each(instances[instance_id]._get_settings().plugins, function (i, val) { if(plugins[val]) { plugins[val].__init.apply(instances[instance_id]); } });
- // initialize the instance
- setTimeout(function() { if(instances[instance_id]) { instances[instance_id].init(); } }, 0);
- });
- }
- // return the jquery selection (or if it was a method call that returned a value - the returned value)
- return returnValue;
- };
- // object to store exposed functions and objects
- $.jstree = {
- defaults : {
- plugins : []
- },
- _focused : function () { return instances[focused_instance] || null; },
- _reference : function (needle) {
- // get by instance id
- if(instances[needle]) { return instances[needle]; }
- // get by DOM (if still no luck - return null
- var o = $(needle);
- if(!o.length && typeof needle === "string") { o = $("#" + needle); }
- if(!o.length) { return null; }
- return instances[o.closest(".jstree").data("jstree_instance_id")] || null;
- },
- _instance : function (index, container, settings) {
- // for plugins to store data in
- this.data = { core : {} };
- this.get_settings = function () { return $.extend(true, {}, settings); };
- this._get_settings = function () { return settings; };
- this.get_index = function () { return index; };
- this.get_container = function () { return container; };
- this.get_container_ul = function () { return container.children("ul:eq(0)"); };
- this._set_settings = function (s) {
- settings = $.extend(true, {}, settings, s);
- };
- },
- _fn : { },
- plugin : function (pname, pdata) {
- pdata = $.extend({}, {
- __init : $.noop,
- __destroy : $.noop,
- _fn : {},
- defaults : false
- }, pdata);
- plugins[pname] = pdata;
-
- $.jstree.defaults[pname] = pdata.defaults;
- $.each(pdata._fn, function (i, val) {
- val.plugin = pname;
- val.old = $.jstree._fn[i];
- $.jstree._fn[i] = function () {
- var rslt,
- func = val,
- args = Array.prototype.slice.call(arguments),
- evnt = new $.Event("before.jstree"),
- rlbk = false;
-
- if(this.data.core.locked === true && i !== "unlock" && i !== "is_locked") { return; }
-
- // Check if function belongs to the included plugins of this instance
- do {
- if(func && func.plugin && $.inArray(func.plugin, this._get_settings().plugins) !== -1) { break; }
- func = func.old;
- } while(func);
- if(!func) { return; }
-
- // context and function to trigger events, then finally call the function
- if(i.indexOf("_") === 0) {
- rslt = func.apply(this, args);
- }
- else {
- rslt = this.get_container().triggerHandler(evnt, { "func" : i, "inst" : this, "args" : args, "plugin" : func.plugin });
- if(rslt === false) { return; }
- if(typeof rslt !== "undefined") { args = rslt; }
-
- rslt = func.apply(
- $.extend({}, this, {
- __callback : function (data) {
- this.get_container().triggerHandler( i + '.jstree', { "inst" : this, "args" : args, "rslt" : data, "rlbk" : rlbk });
- },
- __rollback : function () {
- rlbk = this.get_rollback();
- return rlbk;
- },
- __call_old : function (replace_arguments) {
- return func.old.apply(this, (replace_arguments ? Array.prototype.slice.call(arguments, 1) : args ) );
- }
- }), args);
- }
-
- // return the result
- return rslt;
- };
- $.jstree._fn[i].old = val.old;
- $.jstree._fn[i].plugin = pname;
- });
- },
- rollback : function (rb) {
- if(rb) {
- if(!$.isArray(rb)) { rb = [ rb ]; }
- $.each(rb, function (i, val) {
- instances[val.i].set_rollback(val.h, val.d);
- });
- }
- }
- };
- // set the prototype for all instances
- $.jstree._fn = $.jstree._instance.prototype = {};
-
- // load the css when DOM is ready
- $(function() {
- // code is copied from jQuery ($.browser is deprecated + there is a bug in IE)
- var u = navigator.userAgent.toLowerCase(),
- v = (u.match( /.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
- css_string = '' +
- '.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } ' +
- '.jstree li { display:block; min-height:18px; line-height:18px; margin-left:18px; min-width:18px; } ' +
- '.jstree-rtl li { margin-left:0; margin-right:18px; } ' +
- '.jstree > ul > li { margin-left:0px; } ' +
- '.jstree-rtl > ul > li { margin-right:0px; } ' +
- '.jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } ' +
- '.jstree a { display:inline-block; line-height:16px; height:16px; color:black; text-wrap: unrestricted; text-decoration:none; padding:1px 2px; margin:0; } ' +
- '.jstree a:focus { outline: none; } ' +
- '.jstree a > ins { height:16px; width:16px; } ' +
- '.jstree a > .jstree-icon { margin-right:3px; } ' +
- '.jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } ' +
- 'li.jstree-open > ul { display:block; } ' +
- 'li.jstree-closed > ul { display:none; } ';
- // Correct IE 6 (does not support the > CSS selector)
- if(/msie/.test(u) && parseInt(v, 10) == 6) {
- is_ie6 = true;
-
- // fix image flicker and lack of caching
- try {
- document.execCommand("BackgroundImageCache", false, true);
- } catch (err) { }
-
- css_string += '' +
- '.jstree li { height:18px; margin-left:0; margin-right:0; } ' +
- '.jstree li li { margin-left:18px; } ' +
- '.jstree-rtl li li { margin-left:0px; margin-right:18px; } ' +
- 'li.jstree-open ul { display:block; } ' +
- 'li.jstree-closed ul { display:none !important; } ' +
- '.jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } ' +
- '.jstree li a ins { height:16px; width:16px; margin-right:3px; } ' +
- '.jstree-rtl li a ins { margin-right:0px; margin-left:3px; } ';
- }
- // Correct IE 7 (shifts anchor nodes onhover)
- if(/msie/.test(u) && parseInt(v, 10) == 7) {
- is_ie7 = true;
- css_string += '.jstree li a { border-width:0 !important; padding:0px 2px !important; } ';
- }
- // correct ff2 lack of display:inline-block
- if(!/compatible/.test(u) && /mozilla/.test(u) && parseFloat(v, 10) < 1.9) {
- is_ff2 = true;
- css_string += '' +
- '.jstree ins { display:-moz-inline-box; } ' +
- '.jstree li { line-height:12px; } ' + // WHY??
- '.jstree a { display:-moz-inline-box; } ' +
- '.jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } ';
- /* this shouldn't be here as it is theme specific */
- }
- // the default stylesheet
- $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
- });
-
- // core functions (open, close, create, update, delete)
- $.jstree.plugin("core", {
- __init : function () {
- this.data.core.locked = false;
- this.data.core.to_open = this.get_settings().core.initially_open;
- this.data.core.to_load = this.get_settings().core.initially_load;
- },
- defaults : {
- html_titles : false,
- animation : 500,
- initially_open : [],
- initially_load : [],
- open_parents : true,
- notify_plugins : true,
- rtl : false,
- load_open : false,
- strings : {
- loading : "Loading ...",
- new_node : "New node",
- multiple_selection : "Multiple selection"
- }
- },
- _fn : {
- init : function () {
- this.set_focus();
- if(this._get_settings().core.rtl) {
- this.get_container().addClass("jstree-rtl").css("direction", "rtl");
- }
- this.get_container().html("");
- this.data.core.li_height = this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height() || 18;
-
- this.get_container()
- .delegate("li > ins", "click.jstree", $.proxy(function (event) {
- var trgt = $(event.target);
- // if(trgt.is("ins") && event.pageY - trgt.offset().top < this.data.core.li_height) { this.toggle_node(trgt); }
- this.toggle_node(trgt);
- }, this))
- .bind("mousedown.jstree", $.proxy(function () {
- this.set_focus(); // This used to be setTimeout(set_focus,0) - why?
- }, this))
- .bind("dblclick.jstree", function (event) {
- var sel;
- if(document.selection && document.selection.empty) { document.selection.empty(); }
- else {
- if(window.getSelection) {
- sel = window.getSelection();
- try {
- sel.removeAllRanges();
- sel.collapse();
- } catch (err) { }
- }
- }
- });
- if(this._get_settings().core.notify_plugins) {
- this.get_container()
- .bind("load_node.jstree", $.proxy(function (e, data) {
- var o = this._get_node(data.rslt.obj),
- t = this;
- if(o === -1) { o = this.get_container_ul(); }
- if(!o.length) { return; }
- o.find("li").each(function () {
- var th = $(this);
- if(th.data("jstree")) {
- $.each(th.data("jstree"), function (plugin, values) {
- if(t.data[plugin] && $.isFunction(t["_" + plugin + "_notify"])) {
- t["_" + plugin + "_notify"].call(t, th, values);
- }
- });
- }
- });
- }, this));
- }
- if(this._get_settings().core.load_open) {
- this.get_container()
- .bind("load_node.jstree", $.proxy(function (e, data) {
- var o = this._get_node(data.rslt.obj),
- t = this;
- if(o === -1) { o = this.get_container_ul(); }
- if(!o.length) { return; }
- o.find("li.jstree-open:not(:has(ul))").each(function () {
- t.load_node(this, $.noop, $.noop);
- });
- }, this));
- }
- this.__callback();
- this.load_node(-1, function () { this.loaded(); this.reload_nodes(); });
- },
- destroy : function () {
- var i,
- n = this.get_index(),
- s = this._get_settings(),
- _this = this;
-
- $.each(s.plugins, function (i, val) {
- try { plugins[val].__destroy.apply(_this); } catch(err) { }
- });
- this.__callback();
- // set focus to another instance if this one is focused
- if(this.is_focused()) {
- for(i in instances) {
- if(instances.hasOwnProperty(i) && i != n) {
- instances[i].set_focus();
- break;
- }
- }
- }
- // if no other instance found
- if(n === focused_instance) { focused_instance = -1; }
- // remove all traces of jstree in the DOM (only the ones set using jstree*) and cleans all events
- this.get_container()
- .unbind(".jstree")
- .undelegate(".jstree")
- .removeData("jstree_instance_id")
- .find("[class^='jstree']")
- .addBack()
- .attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); });
- $(document)
- .unbind(".jstree-" + n)
- .undelegate(".jstree-" + n);
- // remove the actual data
- instances[n] = null;
- delete instances[n];
- },
-
- _core_notify : function (n, data) {
- if(data.opened) {
- this.open_node(n, false, true);
- }
- },
-
- lock : function () {
- this.data.core.locked = true;
- this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7");
- this.__callback({});
- },
- unlock : function () {
- this.data.core.locked = false;
- this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1");
- this.__callback({});
- },
- is_locked : function () { return this.data.core.locked; },
- save_opened : function () {
- var _this = this;
- this.data.core.to_open = [];
- this.get_container_ul().find("li.jstree-open").each(function () {
- if(this.id) { _this.data.core.to_open.push("#" + this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")); }
- });
- this.__callback(_this.data.core.to_open);
- },
- save_loaded : function () { },
- reload_nodes : function (is_callback) {
- var _this = this,
- done = true,
- current = [],
- remaining = [];
- if(!is_callback) {
- this.data.core.reopen = false;
- this.data.core.refreshing = true;
- this.data.core.to_open = $.map($.makeArray(this.data.core.to_open), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); });
- this.data.core.to_load = $.map($.makeArray(this.data.core.to_load), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); });
- if(this.data.core.to_open.length) {
- this.data.core.to_load = this.data.core.to_load.concat(this.data.core.to_open);
- }
- }
- if(this.data.core.to_load.length) {
- $.each(this.data.core.to_load, function (i, val) {
- if(val == "#") { return true; }
- if($(val).length) { current.push(val); }
- else { remaining.push(val); }
- });
- if(current.length) {
- this.data.core.to_load = remaining;
- $.each(current, function (i, val) {
- if(!_this._is_loaded(val)) {
- _this.load_node(val, function () { _this.reload_nodes(true); }, function () { _this.reload_nodes(true); });
- done = false;
- }
- });
- }
- }
- if(this.data.core.to_open.length) {
- $.each(this.data.core.to_open, function (i, val) {
- _this.open_node(val, false, true);
- });
- }
- if(done) {
- // TODO: find a more elegant approach to syncronizing returning requests
- if(this.data.core.reopen) { clearTimeout(this.data.core.reopen); }
- this.data.core.reopen = setTimeout(function () { _this.__callback({}, _this); }, 50);
- this.data.core.refreshing = false;
- this.reopen();
- }
- },
- reopen : function () {
- var _this = this;
- if(this.data.core.to_open.length) {
- $.each(this.data.core.to_open, function (i, val) {
- _this.open_node(val, false, true);
- });
- }
- this.__callback({});
- },
- refresh : function (obj) {
- var _this = this;
- this.save_opened();
- if(!obj) { obj = -1; }
- obj = this._get_node(obj);
- if(!obj) { obj = -1; }
- if(obj !== -1) { obj.children("UL").remove(); }
- else { this.get_container_ul().empty(); }
- this.load_node(obj, function () { _this.__callback({ "obj" : obj}); _this.reload_nodes(); });
- },
- // Dummy function to fire after the first load (so that there is a jstree.loaded event)
- loaded : function () {
- this.__callback();
- },
- // deal with focus
- set_focus : function () {
- if(this.is_focused()) { return; }
- var f = $.jstree._focused();
- if(f) { f.unset_focus(); }
-
- this.get_container().addClass("jstree-focused");
- focused_instance = this.get_index();
- this.__callback();
- },
- is_focused : function () {
- return focused_instance == this.get_index();
- },
- unset_focus : function () {
- if(this.is_focused()) {
- this.get_container().removeClass("jstree-focused");
- focused_instance = -1;
- }
- this.__callback();
- },
-
- // traverse
- _get_node : function (obj) {
- var $obj = $(obj, this.get_container());
- if($obj.is(".jstree") || obj == -1) { return -1; }
- $obj = $obj.closest("li", this.get_container());
- return $obj.length ? $obj : false;
- },
- _get_next : function (obj, strict) {
- obj = this._get_node(obj);
- if(obj === -1) { return this.get_container().find("> ul > li:first-child"); }
- if(!obj.length) { return false; }
- if(strict) { return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false; }
-
- if(obj.hasClass("jstree-open")) { return obj.find("li:eq(0)"); }
- else if(obj.nextAll("li").size() > 0) { return obj.nextAll("li:eq(0)"); }
- else { return obj.parentsUntil(".jstree","li").next("li").eq(0); }
- },
- _get_prev : function (obj, strict) {
- obj = this._get_node(obj);
- if(obj === -1) { return this.get_container().find("> ul > li:last-child"); }
- if(!obj.length) { return false; }
- if(strict) { return (obj.prevAll("li").length > 0) ? obj.prevAll("li:eq(0)") : false; }
-
- if(obj.prev("li").length) {
- obj = obj.prev("li").eq(0);
- while(obj.hasClass("jstree-open")) { obj = obj.children("ul:eq(0)").children("li:last"); }
- return obj;
- }
- else { var o = obj.parentsUntil(".jstree","li:eq(0)"); return o.length ? o : false; }
- },
- _get_parent : function (obj) {
- obj = this._get_node(obj);
- if(obj == -1 || !obj.length) { return false; }
- var o = obj.parentsUntil(".jstree", "li:eq(0)");
- return o.length ? o : -1;
- },
- _get_children : function (obj) {
- obj = this._get_node(obj);
- if(obj === -1) { return this.get_container().children("ul:eq(0)").children("li"); }
- if(!obj.length) { return false; }
- return obj.children("ul:eq(0)").children("li");
- },
- get_path : function (obj, id_mode) {
- var p = [],
- _this = this;
- obj = this._get_node(obj);
- if(obj === -1 || !obj || !obj.length) { return false; }
- obj.parentsUntil(".jstree", "li").each(function () {
- p.push( id_mode ? this.id : _this.get_text(this) );
- });
- p.reverse();
- p.push( id_mode ? obj.attr("id") : this.get_text(obj) );
- return p;
- },
-
- // string functions
- _get_string : function (key) {
- return this._get_settings().core.strings[key] || key;
- },
-
- is_open : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-open"); },
- is_closed : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-closed"); },
- is_leaf : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-leaf"); },
- correct_state : function (obj) {
- obj = this._get_node(obj);
- if(!obj || obj === -1) { return false; }
- obj.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove();
- this.__callback({ "obj" : obj });
- },
- // open/close
- open_node : function (obj, callback, skip_animation) {
- obj = this._get_node(obj);
- if(!obj.length) { return false; }
- if(!obj.hasClass("jstree-closed")) { if(callback) { callback.call(); } return false; }
- var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation,
- t = this;
- if(!this._is_loaded(obj)) {
- obj.children("a").addClass("jstree-loading");
- this.load_node(obj, function () { t.open_node(obj, callback, skip_animation); }, callback);
- }
- else {
- if(this._get_settings().core.open_parents) {
- obj.parentsUntil(".jstree",".jstree-closed").each(function () {
- t.open_node(this, false, true);
- });
- }
- if(s) { obj.children("ul").css("display","none"); }
- obj.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");
- if(s) { obj.children("ul").stop(true, true).slideDown(s, function () { this.style.display = ""; t.after_open(obj); }); }
- else { t.after_open(obj); }
- this.__callback({ "obj" : obj });
- if(callback) { callback.call(); }
- }
- },
- after_open : function (obj) { this.__callback({ "obj" : obj }); },
- close_node : function (obj, skip_animation) {
- obj = this._get_node(obj);
- var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation,
- t = this;
- if(!obj.length || !obj.hasClass("jstree-open")) { return false; }
- if(s) { obj.children("ul").attr("style","display:block !important"); }
- obj.removeClass("jstree-open").addClass("jstree-closed");
- if(s) { obj.children("ul").stop(true, true).slideUp(s, function () { this.style.display = ""; t.after_close(obj); }); }
- else { t.after_close(obj); }
- this.__callback({ "obj" : obj });
- },
- after_close : function (obj) { this.__callback({ "obj" : obj }); },
- toggle_node : function (obj) {
- obj = this._get_node(obj);
- if(obj.hasClass("jstree-closed")) { return this.open_node(obj); }
- if(obj.hasClass("jstree-open")) { return this.close_node(obj); }
- },
- open_all : function (obj, do_animation, original_obj) {
- obj = obj ? this._get_node(obj) : -1;
- if(!obj || obj === -1) { obj = this.get_container_ul(); }
- if(original_obj) {
- obj = obj.find("li.jstree-closed");
- }
- else {
- original_obj = obj;
- if(obj.is(".jstree-closed")) { obj = obj.find("li.jstree-closed").addBack(); }
- else { obj = obj.find("li.jstree-closed"); }
- }
- var _this = this;
- obj.each(function () {
- var __this = this;
- if(!_this._is_loaded(this)) { _this.open_node(this, function() { _this.open_all(__this, do_animation, original_obj); }, !do_animation); }
- else { _this.open_node(this, false, !do_animation); }
- });
- // so that callback is fired AFTER all nodes are open
- if(original_obj.find('li.jstree-closed').length === 0) { this.__callback({ "obj" : original_obj }); }
- },
- close_all : function (obj, do_animation) {
- var _this = this;
- obj = obj ? this._get_node(obj) : this.get_container();
- if(!obj || obj === -1) { obj = this.get_container_ul(); }
- obj.find("li.jstree-open").addBack().each(function () { _this.close_node(this, !do_animation); });
- this.__callback({ "obj" : obj });
- },
- clean_node : function (obj) {
- obj = obj && obj != -1 ? $(obj) : this.get_container_ul();
- obj = obj.is("li") ? obj.find("li").addBack() : obj.find("li");
- obj.removeClass("jstree-last")
- .filter("li:last-child").addClass("jstree-last").end()
- .filter(":has(li)")
- .not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");
- obj.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();
- this.__callback({ "obj" : obj });
- },
- // rollback
- get_rollback : function () {
- this.__callback();
- return { i : this.get_index(), h : this.get_container().children("ul").clone(true), d : this.data };
- },
- set_rollback : function (html, data) {
- this.get_container().empty().append(html);
- this.data = data;
- this.__callback();
- },
- // Dummy functions to be overwritten by any datastore plugin included
- load_node : function (obj, s_call, e_call) { this.__callback({ "obj" : obj }); },
- _is_loaded : function (obj) { return true; },
-
- // Basic operations: create
- create_node : function (obj, position, js, callback, is_loaded) {
- obj = this._get_node(obj);
- position = typeof position === "undefined" ? "last" : position;
- var d = $(""),
- s = this._get_settings().core,
- tmp;
-
- if(obj !== -1 && !obj.length) { return false; }
- if(!is_loaded && !this._is_loaded(obj)) { this.load_node(obj, function () { this.create_node(obj, position, js, callback, true); }); return false; }
-
- this.__rollback();
-
- if(typeof js === "string") { js = { "data" : js }; }
- if(!js) { js = {}; }
- if(js.attr) { d.attr(js.attr); }
- if(js.metadata) { d.data(js.metadata); }
- if(js.state) { d.addClass("jstree-" + js.state); }
- if(!js.data) { js.data = this._get_string("new_node"); }
- if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); }
- $.each(js.data, function (i, m) {
- tmp = $("");
- if($.isFunction(m)) { m = m.call(this, js); }
- if(typeof m == "string") { tmp.attr('href','#')[ s.html_titles ? "html" : "text" ](m); }
- else {
- if(!m.attr) { m.attr = {}; }
- if(!m.attr.href) { m.attr.href = '#'; }
- tmp.attr(m.attr)[ s.html_titles ? "html" : "text" ](m.title);
- if(m.language) { tmp.addClass(m.language); }
- }
- tmp.prepend(" ");
- if(!m.icon && js.icon) { m.icon = js.icon; }
- if(m.icon) {
- if(m.icon.indexOf("/") === -1) { tmp.children("ins").addClass(m.icon); }
- else { tmp.children("ins").css("background","url('" + m.icon + "') center center no-repeat"); }
- }
- d.append(tmp);
- });
- d.prepend(" ");
- if(obj === -1) {
- obj = this.get_container();
- if(position === "before") { position = "first"; }
- if(position === "after") { position = "last"; }
- }
- switch(position) {
- case "before": obj.before(d); tmp = this._get_parent(obj); break;
- case "after" : obj.after(d); tmp = this._get_parent(obj); break;
- case "inside":
- case "first" :
- if(!obj.children("ul").length) { obj.append("
"); }
- obj.children("ul").prepend(d);
- tmp = obj;
- break;
- case "last":
- if(!obj.children("ul").length) { obj.append("
"); }
- obj.children("ul").append(d);
- tmp = obj;
- break;
- default:
- if(!obj.children("ul").length) { obj.append("
"); }
- if(!position) { position = 0; }
- tmp = obj.children("ul").children("li").eq(position);
- if(tmp.length) { tmp.before(d); }
- else { obj.children("ul").append(d); }
- tmp = obj;
- break;
- }
- if(tmp === -1 || tmp.get(0) === this.get_container().get(0)) { tmp = -1; }
- this.clean_node(tmp);
- this.__callback({ "obj" : d, "parent" : tmp });
- if(callback) { callback.call(this, d); }
- return d;
- },
- // Basic operations: rename (deal with text)
- get_text : function (obj) {
- obj = this._get_node(obj);
- if(!obj.length) { return false; }
- var s = this._get_settings().core.html_titles;
- obj = obj.children("a:eq(0)");
- if(s) {
- obj = obj.clone();
- obj.children("INS").remove();
- return obj.html();
- }
- else {
- obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
- return obj.nodeValue;
- }
- },
- set_text : function (obj, val) {
- obj = this._get_node(obj);
- if(!obj.length) { return false; }
- obj = obj.children("a:eq(0)");
- if(this._get_settings().core.html_titles) {
- var tmp = obj.children("INS").clone();
- obj.html(val).prepend(tmp);
- this.__callback({ "obj" : obj, "name" : val });
- return true;
- }
- else {
- obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
- this.__callback({ "obj" : obj, "name" : val });
- return (obj.nodeValue = val);
- }
- },
- rename_node : function (obj, val) {
- obj = this._get_node(obj);
- this.__rollback();
- if(obj && obj.length && this.set_text.apply(this, Array.prototype.slice.call(arguments))) { this.__callback({ "obj" : obj, "name" : val }); }
- },
- // Basic operations: deleting nodes
- delete_node : function (obj) {
- obj = this._get_node(obj);
- if(!obj.length) { return false; }
- this.__rollback();
- var p = this._get_parent(obj), prev = $([]), t = this;
- obj.each(function () {
- prev = prev.add(t._get_prev(this));
- });
- obj = obj.detach();
- if(p !== -1 && p.find("> ul > li").length === 0) {
- p.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");
- }
- this.clean_node(p);
- this.__callback({ "obj" : obj, "prev" : prev, "parent" : p });
- return obj;
- },
- prepare_move : function (o, r, pos, cb, is_cb) {
- var p = {};
-
- p.ot = $.jstree._reference(o) || this;
- p.o = p.ot._get_node(o);
- p.r = r === - 1 ? -1 : this._get_node(r);
- p.p = (typeof pos === "undefined" || pos === false) ? "last" : pos; // TODO: move to a setting
- if(!is_cb && prepared_move.o && prepared_move.o[0] === p.o[0] && prepared_move.r[0] === p.r[0] && prepared_move.p === p.p) {
- this.__callback(prepared_move);
- if(cb) { cb.call(this, prepared_move); }
- return;
- }
- p.ot = $.jstree._reference(p.o) || this;
- p.rt = $.jstree._reference(p.r) || this; // r === -1 ? p.ot : $.jstree._reference(p.r) || this
- if(p.r === -1 || !p.r) {
- p.cr = -1;
- switch(p.p) {
- case "first":
- case "before":
- case "inside":
- p.cp = 0;
- break;
- case "after":
- case "last":
- p.cp = p.rt.get_container().find(" > ul > li").length;
- break;
- default:
- p.cp = p.p;
- break;
- }
- }
- else {
- if(!/^(before|after)$/.test(p.p) && !this._is_loaded(p.r)) {
- return this.load_node(p.r, function () { this.prepare_move(o, r, pos, cb, true); });
- }
- switch(p.p) {
- case "before":
- p.cp = p.r.index();
- p.cr = p.rt._get_parent(p.r);
- break;
- case "after":
- p.cp = p.r.index() + 1;
- p.cr = p.rt._get_parent(p.r);
- break;
- case "inside":
- case "first":
- p.cp = 0;
- p.cr = p.r;
- break;
- case "last":
- p.cp = p.r.find(" > ul > li").length;
- p.cr = p.r;
- break;
- default:
- p.cp = p.p;
- p.cr = p.r;
- break;
- }
- }
- p.np = p.cr == -1 ? p.rt.get_container() : p.cr;
- p.op = p.ot._get_parent(p.o);
- p.cop = p.o.index();
- if(p.op === -1) { p.op = p.ot ? p.ot.get_container() : this.get_container(); }
- if(!/^(before|after)$/.test(p.p) && p.op && p.np && p.op[0] === p.np[0] && p.o.index() < p.cp) { p.cp++; }
- //if(p.p === "before" && p.op && p.np && p.op[0] === p.np[0] && p.o.index() < p.cp) { p.cp--; }
- p.or = p.np.find(" > ul > li:nth-child(" + (p.cp + 1) + ")");
- prepared_move = p;
- this.__callback(prepared_move);
- if(cb) { cb.call(this, prepared_move); }
- },
- check_move : function () {
- var obj = prepared_move, ret = true, r = obj.r === -1 ? this.get_container() : obj.r;
- if(!obj || !obj.o || obj.or[0] === obj.o[0]) { return false; }
- if(!obj.cy) {
- if(obj.op && obj.np && obj.op[0] === obj.np[0] && obj.cp - 1 === obj.o.index()) { return false; }
- obj.o.each(function () {
- if(r.parentsUntil(".jstree", "li").addBack().index(this) !== -1) { ret = false; return false; }
- });
- }
- return ret;
- },
- move_node : function (obj, ref, position, is_copy, is_prepared, skip_check) {
- if(!is_prepared) {
- return this.prepare_move(obj, ref, position, function (p) {
- this.move_node(p, false, false, is_copy, true, skip_check);
- });
- }
- if(is_copy) {
- prepared_move.cy = true;
- }
- if(!skip_check && !this.check_move()) { return false; }
-
- this.__rollback();
- var o = false;
- if(is_copy) {
- o = obj.o.clone(true);
- o.find("*[id]").addBack().each(function () {
- if(this.id) { this.id = "copy_" + this.id; }
- });
- }
- else { o = obj.o; }
-
- if(obj.or.length) { obj.or.before(o); }
- else {
- if(!obj.np.children("ul").length) { $("
").appendTo(obj.np); }
- obj.np.children("ul:eq(0)").append(o);
- }
-
- try {
- obj.ot.clean_node(obj.op);
- obj.rt.clean_node(obj.np);
- if(!obj.op.find("> ul > li").length) {
- obj.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove();
- }
- } catch (e) { }
-
- if(is_copy) {
- prepared_move.cy = true;
- prepared_move.oc = o;
- }
- this.__callback(prepared_move);
- return prepared_move;
- },
- _get_move : function () { return prepared_move; }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree ui plugin
- * This plugins handles selecting/deselecting/hovering/dehovering nodes
- */
-(function ($) {
- var scrollbar_width, e1, e2;
- $(function() {
- if (/msie/.test(navigator.userAgent.toLowerCase())) {
- e1 = $('').css({ position: 'absolute', top: -1000, left: 0 }).appendTo('body');
- e2 = $('').css({ position: 'absolute', top: -1000, left: 0 }).appendTo('body');
- scrollbar_width = e1.width() - e2.width();
- e1.add(e2).remove();
- }
- else {
- e1 = $('').css({ width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: 0 })
- .prependTo('body').append('').find('div').css({ width: '100%', height: 200 });
- scrollbar_width = 100 - e1.width();
- e1.parent().remove();
- }
- });
- $.jstree.plugin("ui", {
- __init : function () {
- this.data.ui.selected = $();
- this.data.ui.last_selected = false;
- this.data.ui.hovered = null;
- this.data.ui.to_select = this.get_settings().ui.initially_select;
-
- this.get_container()
- .delegate("a", "click.jstree", $.proxy(function (event) {
- event.preventDefault();
- event.currentTarget.blur();
- if(!$(event.currentTarget).hasClass("jstree-loading")) {
- this.select_node(event.currentTarget, true, event);
- }
- }, this))
- .delegate("a", "mouseenter.jstree", $.proxy(function (event) {
- if(!$(event.currentTarget).hasClass("jstree-loading")) {
- this.hover_node(event.target);
- }
- }, this))
- .delegate("a", "mouseleave.jstree", $.proxy(function (event) {
- if(!$(event.currentTarget).hasClass("jstree-loading")) {
- this.dehover_node(event.target);
- }
- }, this))
- .bind("reopen.jstree", $.proxy(function () {
- this.reselect();
- }, this))
- .bind("get_rollback.jstree", $.proxy(function () {
- this.dehover_node();
- this.save_selected();
- }, this))
- .bind("set_rollback.jstree", $.proxy(function () {
- this.reselect();
- }, this))
- .bind("close_node.jstree", $.proxy(function (event, data) {
- var s = this._get_settings().ui,
- obj = this._get_node(data.rslt.obj),
- clk = (obj && obj.length) ? obj.children("ul").find("a.jstree-clicked") : $(),
- _this = this;
- if(s.selected_parent_close === false || !clk.length) { return; }
- clk.each(function () {
- _this.deselect_node(this);
- if(s.selected_parent_close === "select_parent") { _this.select_node(obj); }
- });
- }, this))
- .bind("delete_node.jstree", $.proxy(function (event, data) {
- var s = this._get_settings().ui.select_prev_on_delete,
- obj = this._get_node(data.rslt.obj),
- clk = (obj && obj.length) ? obj.find("a.jstree-clicked") : [],
- _this = this;
- clk.each(function () { _this.deselect_node(this); });
- if(s && clk.length) {
- data.rslt.prev.each(function () {
- if(this.parentNode) { _this.select_node(this); return false; /* if return false is removed all prev nodes will be selected */}
- });
- }
- }, this))
- .bind("move_node.jstree", $.proxy(function (event, data) {
- if(data.rslt.cy) {
- data.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked");
- }
- }, this));
- },
- defaults : {
- select_limit : -1, // 0, 1, 2 ... or -1 for unlimited
- select_multiple_modifier : "ctrl", // on, or ctrl, shift, alt
- select_range_modifier : "shift",
- selected_parent_close : "select_parent", // false, "deselect", "select_parent"
- selected_parent_open : true,
- select_prev_on_delete : true,
- disable_selecting_children : false,
- initially_select : []
- },
- _fn : {
- _get_node : function (obj, allow_multiple) {
- if(typeof obj === "undefined" || obj === null) { return allow_multiple ? this.data.ui.selected : this.data.ui.last_selected; }
- var $obj = $(obj, this.get_container());
- if($obj.is(".jstree") || obj == -1) { return -1; }
- $obj = $obj.closest("li", this.get_container());
- return $obj.length ? $obj : false;
- },
- _ui_notify : function (n, data) {
- if(data.selected) {
- this.select_node(n, false);
- }
- },
- save_selected : function () {
- var _this = this;
- this.data.ui.to_select = [];
- this.data.ui.selected.each(function () { if(this.id) { _this.data.ui.to_select.push("#" + this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")); } });
- this.__callback(this.data.ui.to_select);
- },
- reselect : function () {
- var _this = this,
- s = this.data.ui.to_select;
- s = $.map($.makeArray(s), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); });
- // this.deselect_all(); WHY deselect, breaks plugin state notifier?
- $.each(s, function (i, val) { if(val && val !== "#") { _this.select_node(val); } });
- this.data.ui.selected = this.data.ui.selected.filter(function () { return this.parentNode; });
- this.__callback();
- },
- refresh : function (obj) {
- this.save_selected();
- return this.__call_old();
- },
- hover_node : function (obj) {
- obj = this._get_node(obj);
- if(!obj.length) { return false; }
- //if(this.data.ui.hovered && obj.get(0) === this.data.ui.hovered.get(0)) { return; }
- if(!obj.hasClass("jstree-hovered")) { this.dehover_node(); }
- this.data.ui.hovered = obj.children("a").addClass("jstree-hovered").parent();
- this._fix_scroll(obj);
- this.__callback({ "obj" : obj });
- },
- dehover_node : function () {
- var obj = this.data.ui.hovered, p;
- if(!obj || !obj.length) { return false; }
- p = obj.children("a").removeClass("jstree-hovered").parent();
- if(this.data.ui.hovered[0] === p[0]) { this.data.ui.hovered = null; }
- this.__callback({ "obj" : obj });
- },
- select_node : function (obj, check, e) {
- obj = this._get_node(obj);
- if(obj == -1 || !obj || !obj.length) { return false; }
- var s = this._get_settings().ui,
- is_multiple = (s.select_multiple_modifier == "on" || (s.select_multiple_modifier !== false && e && e[s.select_multiple_modifier + "Key"])),
- is_range = (s.select_range_modifier !== false && e && e[s.select_range_modifier + "Key"] && this.data.ui.last_selected && this.data.ui.last_selected[0] !== obj[0] && this.data.ui.last_selected.parent()[0] === obj.parent()[0]),
- is_selected = this.is_selected(obj),
- proceed = true,
- t = this;
- if(check) {
- if(s.disable_selecting_children && is_multiple &&
- (
- (obj.parentsUntil(".jstree","li").children("a.jstree-clicked").length) ||
- (obj.children("ul").find("a.jstree-clicked:eq(0)").length)
- )
- ) {
- return false;
- }
- proceed = false;
- switch(!0) {
- case (is_range):
- this.data.ui.last_selected.addClass("jstree-last-selected");
- obj = obj[ obj.index() < this.data.ui.last_selected.index() ? "nextUntil" : "prevUntil" ](".jstree-last-selected").addBack();
- if(s.select_limit == -1 || obj.length < s.select_limit) {
- this.data.ui.last_selected.removeClass("jstree-last-selected");
- this.data.ui.selected.each(function () {
- if(this !== t.data.ui.last_selected[0]) { t.deselect_node(this); }
- });
- is_selected = false;
- proceed = true;
- }
- else {
- proceed = false;
- }
- break;
- case (is_selected && !is_multiple):
- this.deselect_all();
- is_selected = false;
- proceed = true;
- break;
- case (!is_selected && !is_multiple):
- if(s.select_limit == -1 || s.select_limit > 0) {
- this.deselect_all();
- proceed = true;
- }
- break;
- case (is_selected && is_multiple):
- this.deselect_node(obj);
- break;
- case (!is_selected && is_multiple):
- if(s.select_limit == -1 || this.data.ui.selected.length + 1 <= s.select_limit) {
- proceed = true;
- }
- break;
- }
- }
- if(proceed && !is_selected) {
- if(!is_range) { this.data.ui.last_selected = obj; }
- obj.children("a").addClass("jstree-clicked");
- if(s.selected_parent_open) {
- obj.parents(".jstree-closed").each(function () { t.open_node(this, false, true); });
- }
- this.data.ui.selected = this.data.ui.selected.add(obj);
- this._fix_scroll(obj.eq(0));
- this.__callback({ "obj" : obj, "e" : e });
- }
- },
- _fix_scroll : function (obj) {
- var c = this.get_container()[0], t;
- if(c.scrollHeight > c.offsetHeight) {
- obj = this._get_node(obj);
- if(!obj || obj === -1 || !obj.length || !obj.is(":visible")) { return; }
- t = obj.offset().top - this.get_container().offset().top;
- if(t < 0) {
- c.scrollTop = c.scrollTop + t - 1;
- }
- if(t + this.data.core.li_height + (c.scrollWidth > c.offsetWidth ? scrollbar_width : 0) > c.offsetHeight) {
- c.scrollTop = c.scrollTop + (t - c.offsetHeight + this.data.core.li_height + 1 + (c.scrollWidth > c.offsetWidth ? scrollbar_width : 0));
- }
- }
- },
- deselect_node : function (obj) {
- obj = this._get_node(obj);
- if(!obj.length) { return false; }
- if(this.is_selected(obj)) {
- obj.children("a").removeClass("jstree-clicked");
- this.data.ui.selected = this.data.ui.selected.not(obj);
- if(this.data.ui.last_selected.get(0) === obj.get(0)) { this.data.ui.last_selected = this.data.ui.selected.eq(0); }
- this.__callback({ "obj" : obj });
- }
- },
- toggle_select : function (obj) {
- obj = this._get_node(obj);
- if(!obj.length) { return false; }
- if(this.is_selected(obj)) { this.deselect_node(obj); }
- else { this.select_node(obj); }
- },
- is_selected : function (obj) { return this.data.ui.selected.index(this._get_node(obj)) >= 0; },
- get_selected : function (context) {
- return context ? $(context).find("a.jstree-clicked").parent() : this.data.ui.selected;
- },
- deselect_all : function (context) {
- var ret = context ? $(context).find("a.jstree-clicked").parent() : this.get_container().find("a.jstree-clicked").parent();
- ret.children("a.jstree-clicked").removeClass("jstree-clicked");
- this.data.ui.selected = $([]);
- this.data.ui.last_selected = false;
- this.__callback({ "obj" : ret });
- }
- }
- });
- // include the selection plugin by default
- $.jstree.defaults.plugins.push("ui");
-})(jQuery);
-//*/
-
-/*
- * jsTree CRRM plugin
- * Handles creating/renaming/removing/moving nodes by user interaction.
- */
-(function ($) {
- $.jstree.plugin("crrm", {
- __init : function () {
- this.get_container()
- .bind("move_node.jstree", $.proxy(function (e, data) {
- if(this._get_settings().crrm.move.open_onmove) {
- var t = this;
- data.rslt.np.parentsUntil(".jstree").addBack().filter(".jstree-closed").each(function () {
- t.open_node(this, false, true);
- });
- }
- }, this));
- },
- defaults : {
- input_width_limit : 200,
- move : {
- always_copy : false, // false, true or "multitree"
- open_onmove : true,
- default_position : "last",
- check_move : function (m) { return true; }
- }
- },
- _fn : {
- _show_input : function (obj, callback) {
- obj = this._get_node(obj);
- var rtl = this._get_settings().core.rtl,
- w = this._get_settings().crrm.input_width_limit,
- w1 = obj.children("ins").width(),
- w2 = obj.find("> a:visible > ins").width() * obj.find("> a:visible > ins").length,
- t = this.get_text(obj),
- h1 = $("", { css : { "position" : "absolute", "top" : "-200px", "left" : (rtl ? "0px" : "-1000px"), "visibility" : "hidden" } }).appendTo("body"),
- h2 = obj.css("position","relative").append(
- $("", {
- "value" : t,
- "class" : "jstree-rename-input",
- // "size" : t.length,
- "css" : {
- "padding" : "0",
- "border" : "1px solid silver",
- "position" : "absolute",
- "left" : (rtl ? "auto" : (w1 + w2 + 4) + "px"),
- "right" : (rtl ? (w1 + w2 + 4) + "px" : "auto"),
- "top" : "0px",
- "height" : (this.data.core.li_height - 2) + "px",
- "lineHeight" : (this.data.core.li_height - 2) + "px",
- "width" : "150px" // will be set a bit further down
- },
- "blur" : $.proxy(function () {
- var i = obj.children(".jstree-rename-input"),
- v = i.val();
- if(v === "") { v = t; }
- h1.remove();
- i.remove(); // rollback purposes
- this.set_text(obj,t); // rollback purposes
- this.rename_node(obj, v);
- callback.call(this, obj, v, t);
- obj.css("position","");
- }, this),
- "keyup" : function (event) {
- var key = event.keyCode || event.which;
- if(key == 27) { this.value = t; this.blur(); return; }
- else if(key == 13) { this.blur(); return; }
- else {
- h2.width(Math.min(h1.text("pW" + this.value).width(),w));
- }
- },
- "keypress" : function(event) {
- var key = event.keyCode || event.which;
- if(key == 13) { return false; }
- }
- })
- ).children(".jstree-rename-input");
- this.set_text(obj, "");
- h1.css({
- fontFamily : h2.css('fontFamily') || '',
- fontSize : h2.css('fontSize') || '',
- fontWeight : h2.css('fontWeight') || '',
- fontStyle : h2.css('fontStyle') || '',
- fontStretch : h2.css('fontStretch') || '',
- fontVariant : h2.css('fontVariant') || '',
- letterSpacing : h2.css('letterSpacing') || '',
- wordSpacing : h2.css('wordSpacing') || ''
- });
- h2.width(Math.min(h1.text("pW" + h2[0].value).width(),w))[0].select();
- },
- rename : function (obj) {
- obj = this._get_node(obj);
- this.__rollback();
- var f = this.__callback;
- this._show_input(obj, function (obj, new_name, old_name) {
- f.call(this, { "obj" : obj, "new_name" : new_name, "old_name" : old_name });
- });
- },
- create : function (obj, position, js, callback, skip_rename) {
- var t, _this = this;
- obj = this._get_node(obj);
- if(!obj) { obj = -1; }
- this.__rollback();
- t = this.create_node(obj, position, js, function (t) {
- var p = this._get_parent(t),
- pos = $(t).index();
- if(callback) { callback.call(this, t); }
- if(p.length && p.hasClass("jstree-closed")) { this.open_node(p, false, true); }
- if(!skip_rename) {
- this._show_input(t, function (obj, new_name, old_name) {
- _this.__callback({ "obj" : obj, "name" : new_name, "parent" : p, "position" : pos });
- });
- }
- else { _this.__callback({ "obj" : t, "name" : this.get_text(t), "parent" : p, "position" : pos }); }
- });
- return t;
- },
- remove : function (obj) {
- obj = this._get_node(obj, true);
- var p = this._get_parent(obj), prev = this._get_prev(obj);
- this.__rollback();
- obj = this.delete_node(obj);
- if(obj !== false) { this.__callback({ "obj" : obj, "prev" : prev, "parent" : p }); }
- },
- check_move : function () {
- if(!this.__call_old()) { return false; }
- var s = this._get_settings().crrm.move;
- if(!s.check_move.call(this, this._get_move())) { return false; }
- return true;
- },
- move_node : function (obj, ref, position, is_copy, is_prepared, skip_check) {
- var s = this._get_settings().crrm.move;
- if(!is_prepared) {
- if(typeof position === "undefined") { position = s.default_position; }
- if(position === "inside" && !s.default_position.match(/^(before|after)$/)) { position = s.default_position; }
- return this.__call_old(true, obj, ref, position, is_copy, false, skip_check);
- }
- // if the move is already prepared
- if(s.always_copy === true || (s.always_copy === "multitree" && obj.rt.get_index() !== obj.ot.get_index() )) {
- is_copy = true;
- }
- this.__call_old(true, obj, ref, position, is_copy, true, skip_check);
- },
-
- cut : function (obj) {
- obj = this._get_node(obj, true);
- if(!obj || !obj.length) { return false; }
- this.data.crrm.cp_nodes = false;
- this.data.crrm.ct_nodes = obj;
- this.__callback({ "obj" : obj });
- },
- copy : function (obj) {
- obj = this._get_node(obj, true);
- if(!obj || !obj.length) { return false; }
- this.data.crrm.ct_nodes = false;
- this.data.crrm.cp_nodes = obj;
- this.__callback({ "obj" : obj });
- },
- paste : function (obj) {
- obj = this._get_node(obj);
- if(!obj || !obj.length) { return false; }
- var nodes = this.data.crrm.ct_nodes ? this.data.crrm.ct_nodes : this.data.crrm.cp_nodes;
- if(!this.data.crrm.ct_nodes && !this.data.crrm.cp_nodes) { return false; }
- if(this.data.crrm.ct_nodes) { this.move_node(this.data.crrm.ct_nodes, obj); this.data.crrm.ct_nodes = false; }
- if(this.data.crrm.cp_nodes) { this.move_node(this.data.crrm.cp_nodes, obj, false, true); }
- this.__callback({ "obj" : obj, "nodes" : nodes });
- }
- }
- });
- // include the crr plugin by default
- // $.jstree.defaults.plugins.push("crrm");
-})(jQuery);
-//*/
-
-/*
- * jsTree themes plugin
- * Handles loading and setting themes, as well as detecting path to themes, etc.
- */
-(function ($) {
- var themes_loaded = [];
- // this variable stores the path to the themes folder - if left as false - it will be autodetected
- $.jstree._themes = false;
- $.jstree.plugin("themes", {
- __init : function () {
- this.get_container()
- .bind("init.jstree", $.proxy(function () {
- var s = this._get_settings().themes;
- this.data.themes.dots = s.dots;
- this.data.themes.icons = s.icons;
- this.set_theme(s.theme, s.url);
- }, this))
- .bind("loaded.jstree", $.proxy(function () {
- // bound here too, as simple HTML tree's won't honor dots & icons otherwise
- if(!this.data.themes.dots) { this.hide_dots(); }
- else { this.show_dots(); }
- if(!this.data.themes.icons) { this.hide_icons(); }
- else { this.show_icons(); }
- }, this));
- },
- defaults : {
- theme : "default",
- url : false,
- dots : true,
- icons : true
- },
- _fn : {
- set_theme : function (theme_name, theme_url) {
- if(!theme_name) { return false; }
- if(!theme_url) { theme_url = $.jstree._themes + theme_name + '/style.css'; }
- if($.inArray(theme_url, themes_loaded) == -1) {
- $.vakata.css.add_sheet({ "url" : theme_url });
- themes_loaded.push(theme_url);
- }
- if(this.data.themes.theme != theme_name) {
- this.get_container().removeClass('jstree-' + this.data.themes.theme);
- this.data.themes.theme = theme_name;
- }
- this.get_container().addClass('jstree-' + theme_name);
- if(!this.data.themes.dots) { this.hide_dots(); }
- else { this.show_dots(); }
- if(!this.data.themes.icons) { this.hide_icons(); }
- else { this.show_icons(); }
- this.__callback();
- },
- get_theme : function () { return this.data.themes.theme; },
-
- show_dots : function () { this.data.themes.dots = true; this.get_container().children("ul").removeClass("jstree-no-dots"); },
- hide_dots : function () { this.data.themes.dots = false; this.get_container().children("ul").addClass("jstree-no-dots"); },
- toggle_dots : function () { if(this.data.themes.dots) { this.hide_dots(); } else { this.show_dots(); } },
-
- show_icons : function () { this.data.themes.icons = true; this.get_container().children("ul").removeClass("jstree-no-icons"); },
- hide_icons : function () { this.data.themes.icons = false; this.get_container().children("ul").addClass("jstree-no-icons"); },
- toggle_icons: function () { if(this.data.themes.icons) { this.hide_icons(); } else { this.show_icons(); } }
- }
- });
- // autodetect themes path
- $(function () {
- if($.jstree._themes === false) {
- $("script").each(function () {
- if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)) {
- $.jstree._themes = this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/, "") + 'themes/';
- return false;
- }
- });
- }
- if($.jstree._themes === false) { $.jstree._themes = "themes/"; }
- });
- // include the themes plugin by default
- $.jstree.defaults.plugins.push("themes");
-})(jQuery);
-//*/
-
-/*
- * jsTree hotkeys plugin
- * Enables keyboard navigation for all tree instances
- * Depends on the jstree ui & jquery hotkeys plugins
- */
-(function ($) {
- var bound = [];
- function exec(i, event) {
- var f = $.jstree._focused(), tmp;
- if(f && f.data && f.data.hotkeys && f.data.hotkeys.enabled) {
- tmp = f._get_settings().hotkeys[i];
- if(tmp) { return tmp.call(f, event); }
- }
- }
- $.jstree.plugin("hotkeys", {
- __init : function () {
- if(typeof $.hotkeys === "undefined") { throw "jsTree hotkeys: jQuery hotkeys plugin not included."; }
- if(!this.data.ui) { throw "jsTree hotkeys: jsTree UI plugin not included."; }
- $.each(this._get_settings().hotkeys, function (i, v) {
- if(v !== false && $.inArray(i, bound) == -1) {
- $(document).bind("keydown", i, function (event) { return exec(i, event); });
- bound.push(i);
- }
- });
- this.get_container()
- .bind("lock.jstree", $.proxy(function () {
- if(this.data.hotkeys.enabled) { this.data.hotkeys.enabled = false; this.data.hotkeys.revert = true; }
- }, this))
- .bind("unlock.jstree", $.proxy(function () {
- if(this.data.hotkeys.revert) { this.data.hotkeys.enabled = true; }
- }, this));
- this.enable_hotkeys();
- },
- defaults : {
- "up" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
- this.hover_node(this._get_prev(o));
- return false;
- },
- "ctrl+up" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
- this.hover_node(this._get_prev(o));
- return false;
- },
- "shift+up" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
- this.hover_node(this._get_prev(o));
- return false;
- },
- "down" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
- this.hover_node(this._get_next(o));
- return false;
- },
- "ctrl+down" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
- this.hover_node(this._get_next(o));
- return false;
- },
- "shift+down" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
- this.hover_node(this._get_next(o));
- return false;
- },
- "left" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected;
- if(o) {
- if(o.hasClass("jstree-open")) { this.close_node(o); }
- else { this.hover_node(this._get_prev(o)); }
- }
- return false;
- },
- "ctrl+left" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected;
- if(o) {
- if(o.hasClass("jstree-open")) { this.close_node(o); }
- else { this.hover_node(this._get_prev(o)); }
- }
- return false;
- },
- "shift+left" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected;
- if(o) {
- if(o.hasClass("jstree-open")) { this.close_node(o); }
- else { this.hover_node(this._get_prev(o)); }
- }
- return false;
- },
- "right" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected;
- if(o && o.length) {
- if(o.hasClass("jstree-closed")) { this.open_node(o); }
- else { this.hover_node(this._get_next(o)); }
- }
- return false;
- },
- "ctrl+right" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected;
- if(o && o.length) {
- if(o.hasClass("jstree-closed")) { this.open_node(o); }
- else { this.hover_node(this._get_next(o)); }
- }
- return false;
- },
- "shift+right" : function () {
- var o = this.data.ui.hovered || this.data.ui.last_selected;
- if(o && o.length) {
- if(o.hasClass("jstree-closed")) { this.open_node(o); }
- else { this.hover_node(this._get_next(o)); }
- }
- return false;
- },
- "space" : function () {
- if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").click(); }
- return false;
- },
- "ctrl+space" : function (event) {
- event.type = "click";
- if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").trigger(event); }
- return false;
- },
- "shift+space" : function (event) {
- event.type = "click";
- if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").trigger(event); }
- return false;
- },
- "f2" : function () { this.rename(this.data.ui.hovered || this.data.ui.last_selected); },
- "del" : function () { this.remove(this.data.ui.hovered || this._get_node(null)); }
- },
- _fn : {
- enable_hotkeys : function () {
- this.data.hotkeys.enabled = true;
- },
- disable_hotkeys : function () {
- this.data.hotkeys.enabled = false;
- }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree JSON plugin
- * The JSON data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions.
- */
-(function ($) {
- $.jstree.plugin("json_data", {
- __init : function() {
- var s = this._get_settings().json_data;
- if(s.progressive_unload) {
- this.get_container().bind("after_close.jstree", function (e, data) {
- data.rslt.obj.children("ul").remove();
- });
- }
- },
- defaults : {
- // `data` can be a function:
- // * accepts two arguments - node being loaded and a callback to pass the result to
- // * will be executed in the current tree's scope & ajax won't be supported
- data : false,
- ajax : false,
- correct_state : true,
- progressive_render : false,
- progressive_unload : false
- },
- _fn : {
- load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_json(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); },
- _is_loaded : function (obj) {
- var s = this._get_settings().json_data;
- obj = this._get_node(obj);
- return obj == -1 || !obj || (!s.ajax && !s.progressive_render && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").length > 0;
- },
- refresh : function (obj) {
- obj = this._get_node(obj);
- var s = this._get_settings().json_data;
- if(obj && obj !== -1 && s.progressive_unload && ($.isFunction(s.data) || !!s.ajax)) {
- obj.removeData("jstree_children");
- }
- return this.__call_old();
- },
- load_node_json : function (obj, s_call, e_call) {
- var s = this.get_settings().json_data, d,
- error_func = function () {},
- success_func = function () {};
- obj = this._get_node(obj);
-
- if(obj && obj !== -1 && (s.progressive_render || s.progressive_unload) && !obj.is(".jstree-open, .jstree-leaf") && obj.children("ul").children("li").length === 0 && obj.data("jstree_children")) {
- d = this._parse_json(obj.data("jstree_children"), obj);
- if(d) {
- obj.append(d);
- if(!s.progressive_unload) { obj.removeData("jstree_children"); }
- }
- this.clean_node(obj);
- if(s_call) { s_call.call(this); }
- return;
- }
-
- if(obj && obj !== -1) {
- if(obj.data("jstree_is_loading")) { return; }
- else { obj.data("jstree_is_loading",true); }
- }
- switch(!0) {
- case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied.";
- // function option added here for easier model integration (also supporting async - see callback)
- case ($.isFunction(s.data)):
- s.data.call(this, obj, $.proxy(function (d) {
- d = this._parse_json(d, obj);
- if(!d) {
- if(obj === -1 || !obj) {
- if(s.correct_state) { this.get_container().children("ul").empty(); }
- }
- else {
- obj.children("a.jstree-loading").removeClass("jstree-loading");
- obj.removeData("jstree_is_loading");
- if(s.correct_state) { this.correct_state(obj); }
- }
- if(e_call) { e_call.call(this); }
- }
- else {
- if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
- else { obj.append(d).children("a.jstree-loading").removeClass("jstree-loading"); obj.removeData("jstree_is_loading"); }
- this.clean_node(obj);
- if(s_call) { s_call.call(this); }
- }
- }, this));
- break;
- case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
- if(!obj || obj == -1) {
- d = this._parse_json(s.data, obj);
- if(d) {
- this.get_container().children("ul").empty().append(d.children());
- this.clean_node();
- }
- else {
- if(s.correct_state) { this.get_container().children("ul").empty(); }
- }
- }
- if(s_call) { s_call.call(this); }
- break;
- case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
- error_func = function (x, t, e) {
- var ef = this.get_settings().json_data.ajax.error;
- if(ef) { ef.call(this, x, t, e); }
- if(obj != -1 && obj.length) {
- obj.children("a.jstree-loading").removeClass("jstree-loading");
- obj.removeData("jstree_is_loading");
- if(t === "success" && s.correct_state) { this.correct_state(obj); }
- }
- else {
- if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); }
- }
- if(e_call) { e_call.call(this); }
- };
- success_func = function (d, t, x) {
- var sf = this.get_settings().json_data.ajax.success;
- if(sf) { d = sf.call(this,d,t,x) || d; }
- if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "") || (!$.isArray(d) && !$.isPlainObject(d))) {
- return error_func.call(this, x, t, "");
- }
- d = this._parse_json(d, obj);
- if(d) {
- if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
- else { obj.append(d).children("a.jstree-loading").removeClass("jstree-loading"); obj.removeData("jstree_is_loading"); }
- this.clean_node(obj);
- if(s_call) { s_call.call(this); }
- }
- else {
- if(obj === -1 || !obj) {
- if(s.correct_state) {
- this.get_container().children("ul").empty();
- if(s_call) { s_call.call(this); }
- }
- }
- else {
- obj.children("a.jstree-loading").removeClass("jstree-loading");
- obj.removeData("jstree_is_loading");
- if(s.correct_state) {
- this.correct_state(obj);
- if(s_call) { s_call.call(this); }
- }
- }
- }
- };
- s.ajax.context = this;
- s.ajax.error = error_func;
- s.ajax.success = success_func;
- if(!s.ajax.dataType) { s.ajax.dataType = "json"; }
- if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
- if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
- $.ajax(s.ajax);
- break;
- }
- },
- _parse_json : function (js, obj, is_callback) {
- var d = false,
- p = this._get_settings(),
- s = p.json_data,
- t = p.core.html_titles,
- tmp, i, j, ul1, ul2;
-
- if(!js) { return d; }
- if(s.progressive_unload && obj && obj !== -1) {
- obj.data("jstree_children", d);
- }
- if($.isArray(js)) {
- d = $('');
- if(!js.length) { return false; }
- for(i = 0, j = js.length; i < j; i++) {
- tmp = this._parse_json(js[i], obj, true);
- if(tmp.length) {
- d = d.append(tmp);
- }
- }
- d = d.children();
- }
- else {
- if(typeof js == "string") { js = { data : js }; }
- if(!js.data && js.data !== "") { return d; }
- d = $("");
- if(js.attr) { d.attr(js.attr); }
- if(js.metadata) { d.data(js.metadata); }
- if(js.state) { d.addClass("jstree-" + js.state); }
- if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); }
- $.each(js.data, function (i, m) {
- tmp = $("");
- if($.isFunction(m)) { m = m.call(this, js); }
- if(typeof m == "string") { tmp.attr('href','#')[ t ? "html" : "text" ](m); }
- else {
- if(!m.attr) { m.attr = {}; }
- if(!m.attr.href) { m.attr.href = '#'; }
- tmp.attr(m.attr)[ t ? "html" : "text" ](m.title);
- if(m.language) { tmp.addClass(m.language); }
- }
- tmp.prepend(" ");
- if(!m.icon && js.icon) { m.icon = js.icon; }
- if(m.icon) {
- if(m.icon.indexOf("/") === -1) { tmp.children("ins").addClass(m.icon); }
- else { tmp.children("ins").css("background","url('" + m.icon + "') center center no-repeat"); }
- }
- var div = $("");
- d.append(tmp);
- });
- d.prepend(" ");
- if(js.children) {
- if(s.progressive_render && js.state !== "open") {
- d.addClass("jstree-closed").data("jstree_children", js.children);
- }
- else {
- if(s.progressive_unload) { d.data("jstree_children", js.children); }
- if($.isArray(js.children) && js.children.length) {
- tmp = this._parse_json(js.children, obj, true);
- if(tmp.length) {
- ul2 = $("
");
- ul2.append(tmp);
- d.append(ul2);
- }
- }
- }
- }
- }
- if(!is_callback) {
- ul1 = $("
");
- ul1.append(d);
- d = ul1;
- }
- return d;
- },
- get_json : function (obj, li_attr, a_attr, is_callback) {
- var result = [],
- s = this._get_settings(),
- _this = this,
- tmp1, tmp2, li, a, t, lang;
- obj = this._get_node(obj);
- if(!obj || obj === -1) { obj = this.get_container().find("> ul > li"); }
- li_attr = $.isArray(li_attr) ? li_attr : [ "id", "class" ];
- if(!is_callback && this.data.types) { li_attr.push(s.types.type_attr); }
- a_attr = $.isArray(a_attr) ? a_attr : [ ];
-
- obj.each(function () {
- li = $(this);
- tmp1 = { data : [] };
- if(li_attr.length) { tmp1.attr = { }; }
- $.each(li_attr, function (i, v) {
- tmp2 = li.attr(v);
- if(tmp2 && tmp2.length && tmp2.replace(/jstree[^ ]*/ig,'').length) {
- tmp1.attr[v] = (" " + tmp2).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");
- }
- });
- if(li.hasClass("jstree-open")) { tmp1.state = "open"; }
- if(li.hasClass("jstree-closed")) { tmp1.state = "closed"; }
- if(li.data()) { tmp1.metadata = li.data(); }
- a = li.children("a");
- a.each(function () {
- t = $(this);
- if(
- a_attr.length ||
- $.inArray("languages", s.plugins) !== -1 ||
- t.children("ins").get(0).style.backgroundImage.length ||
- (t.children("ins").get(0).className && t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').length)
- ) {
- lang = false;
- if($.inArray("languages", s.plugins) !== -1 && $.isArray(s.languages) && s.languages.length) {
- $.each(s.languages, function (l, lv) {
- if(t.hasClass(lv)) {
- lang = lv;
- return false;
- }
- });
- }
- tmp2 = { attr : { }, title : _this.get_text(t, lang) };
- $.each(a_attr, function (k, z) {
- tmp2.attr[z] = (" " + (t.attr(z) || "")).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");
- });
- if($.inArray("languages", s.plugins) !== -1 && $.isArray(s.languages) && s.languages.length) {
- $.each(s.languages, function (k, z) {
- if(t.hasClass(z)) { tmp2.language = z; return true; }
- });
- }
- if(t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length) {
- tmp2.icon = t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");
- }
- if(t.children("ins").get(0).style.backgroundImage.length) {
- tmp2.icon = t.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","");
- }
- }
- else {
- tmp2 = _this.get_text(t);
- }
- if(a.length > 1) { tmp1.data.push(tmp2); }
- else { tmp1.data = tmp2; }
- });
- li = li.find("> ul > li");
- if(li.length) { tmp1.children = _this.get_json(li, li_attr, a_attr, true); }
- result.push(tmp1);
- });
- return result;
- }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree languages plugin
- * Adds support for multiple language versions in one tree
- * This basically allows for many titles coexisting in one node, but only one of them being visible at any given time
- * This is useful for maintaining the same structure in many languages (hence the name of the plugin)
- */
-(function ($) {
- var sh = false;
- $.jstree.plugin("languages", {
- __init : function () { this._load_css(); },
- defaults : [],
- _fn : {
- set_lang : function (i) {
- var langs = this._get_settings().languages,
- st = false,
- selector = ".jstree-" + this.get_index() + ' a';
- if(!$.isArray(langs) || langs.length === 0) { return false; }
- if($.inArray(i,langs) == -1) {
- if(!!langs[i]) { i = langs[i]; }
- else { return false; }
- }
- if(i == this.data.languages.current_language) { return true; }
- st = $.vakata.css.get_css(selector + "." + this.data.languages.current_language, false, sh);
- if(st !== false) { st.style.display = "none"; }
- st = $.vakata.css.get_css(selector + "." + i, false, sh);
- if(st !== false) { st.style.display = ""; }
- this.data.languages.current_language = i;
- this.__callback(i);
- return true;
- },
- get_lang : function () {
- return this.data.languages.current_language;
- },
- _get_string : function (key, lang) {
- var langs = this._get_settings().languages,
- s = this._get_settings().core.strings;
- if($.isArray(langs) && langs.length) {
- lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
- }
- if(s[lang] && s[lang][key]) { return s[lang][key]; }
- if(s[key]) { return s[key]; }
- return key;
- },
- get_text : function (obj, lang) {
- obj = this._get_node(obj) || this.data.ui.last_selected;
- if(!obj.size()) { return false; }
- var langs = this._get_settings().languages,
- s = this._get_settings().core.html_titles;
- if($.isArray(langs) && langs.length) {
- lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
- obj = obj.children("a." + lang);
- }
- else { obj = obj.children("a:eq(0)"); }
- if(s) {
- obj = obj.clone();
- obj.children("INS").remove();
- return obj.html();
- }
- else {
- obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
- return obj.nodeValue;
- }
- },
- set_text : function (obj, val, lang) {
- obj = this._get_node(obj) || this.data.ui.last_selected;
- if(!obj.size()) { return false; }
- var langs = this._get_settings().languages,
- s = this._get_settings().core.html_titles,
- tmp;
- if($.isArray(langs) && langs.length) {
- lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
- obj = obj.children("a." + lang);
- }
- else { obj = obj.children("a:eq(0)"); }
- if(s) {
- tmp = obj.children("INS").clone();
- obj.html(val).prepend(tmp);
- this.__callback({ "obj" : obj, "name" : val, "lang" : lang });
- return true;
- }
- else {
- obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
- this.__callback({ "obj" : obj, "name" : val, "lang" : lang });
- return (obj.nodeValue = val);
- }
- },
- _load_css : function () {
- var langs = this._get_settings().languages,
- str = "/* languages css */",
- selector = ".jstree-" + this.get_index() + ' a',
- ln;
- if($.isArray(langs) && langs.length) {
- this.data.languages.current_language = langs[0];
- for(ln = 0; ln < langs.length; ln++) {
- str += selector + "." + langs[ln] + " {";
- if(langs[ln] != this.data.languages.current_language) { str += " display:none; "; }
- str += " } ";
- }
- sh = $.vakata.css.add_sheet({ 'str' : str, 'title' : "jstree-languages" });
- }
- },
- create_node : function (obj, position, js, callback) {
- var t = this.__call_old(true, obj, position, js, function (t) {
- var langs = this._get_settings().languages,
- a = t.children("a"),
- ln;
- if($.isArray(langs) && langs.length) {
- for(ln = 0; ln < langs.length; ln++) {
- if(!a.is("." + langs[ln])) {
- t.append(a.eq(0).clone().removeClass(langs.join(" ")).addClass(langs[ln]));
- }
- }
- a.not("." + langs.join(", .")).remove();
- }
- if(callback) { callback.call(this, t); }
- });
- return t;
- }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree cookies plugin
- * Stores the currently opened/selected nodes in a cookie and then restores them
- * Depends on the jquery.cookie plugin
- */
-(function ($) {
- $.jstree.plugin("cookies", {
- __init : function () {
- if(typeof $.cookie === "undefined") { throw "jsTree cookie: jQuery cookie plugin not included."; }
-
- var s = this._get_settings().cookies,
- tmp;
- if(!!s.save_loaded) {
- tmp = $.cookie(s.save_loaded);
- if(tmp && tmp.length) { this.data.core.to_load = tmp.split(","); }
- }
- if(!!s.save_opened) {
- tmp = $.cookie(s.save_opened);
- if(tmp && tmp.length) { this.data.core.to_open = tmp.split(","); }
- }
- if(!!s.save_selected) {
- tmp = $.cookie(s.save_selected);
- if(tmp && tmp.length && this.data.ui) { this.data.ui.to_select = tmp.split(","); }
- }
- this.get_container()
- .one( ( this.data.ui ? "reselect" : "reopen" ) + ".jstree", $.proxy(function () {
- this.get_container()
- .bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree", $.proxy(function (e) {
- if(this._get_settings().cookies.auto_save) { this.save_cookie((e.handleObj.namespace + e.handleObj.type).replace("jstree","")); }
- }, this));
- }, this));
- },
- defaults : {
- save_loaded : "jstree_load",
- save_opened : "jstree_open",
- save_selected : "jstree_select",
- auto_save : true,
- cookie_options : {}
- },
- _fn : {
- save_cookie : function (c) {
- if(this.data.core.refreshing) { return; }
- var s = this._get_settings().cookies;
- if(!c) { // if called manually and not by event
- if(s.save_loaded) {
- this.save_loaded();
- $.cookie(s.save_loaded, this.data.core.to_load.join(","), s.cookie_options);
- }
- if(s.save_opened) {
- this.save_opened();
- $.cookie(s.save_opened, this.data.core.to_open.join(","), s.cookie_options);
- }
- if(s.save_selected && this.data.ui) {
- this.save_selected();
- $.cookie(s.save_selected, this.data.ui.to_select.join(","), s.cookie_options);
- }
- return;
- }
- switch(c) {
- case "open_node":
- case "close_node":
- if(!!s.save_opened) {
- this.save_opened();
- $.cookie(s.save_opened, this.data.core.to_open.join(","), s.cookie_options);
- }
- if(!!s.save_loaded) {
- this.save_loaded();
- $.cookie(s.save_loaded, this.data.core.to_load.join(","), s.cookie_options);
- }
- break;
- case "select_node":
- case "deselect_node":
- if(!!s.save_selected && this.data.ui) {
- this.save_selected();
- $.cookie(s.save_selected, this.data.ui.to_select.join(","), s.cookie_options);
- }
- break;
- }
- }
- }
- });
- // include cookies by default
- // $.jstree.defaults.plugins.push("cookies");
-})(jQuery);
-//*/
-
-/*
- * jsTree sort plugin
- * Sorts items alphabetically (or using any other function)
- */
-(function ($) {
- $.jstree.plugin("sort", {
- __init : function () {
- this.get_container()
- .bind("load_node.jstree", $.proxy(function (e, data) {
- var obj = this._get_node(data.rslt.obj);
- obj = obj === -1 ? this.get_container().children("ul") : obj.children("ul");
- this.sort(obj);
- }, this))
- .bind("rename_node.jstree create_node.jstree create.jstree", $.proxy(function (e, data) {
- this.sort(data.rslt.obj.parent());
- }, this))
- .bind("move_node.jstree", $.proxy(function (e, data) {
- var m = data.rslt.np == -1 ? this.get_container() : data.rslt.np;
- this.sort(m.children("ul"));
- }, this));
- },
- defaults : function (a, b) { return this.get_text(a) > this.get_text(b) ? 1 : -1; },
- _fn : {
- sort : function (obj) {
- var s = this._get_settings().sort,
- t = this;
- obj.append($.makeArray(obj.children("li")).sort($.proxy(s, t)));
- obj.find("> li > ul").each(function() { t.sort($(this)); });
- this.clean_node(obj);
- }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree DND plugin
- * Drag and drop plugin for moving/copying nodes
- */
-(function ($) {
- var o = false,
- r = false,
- m = false,
- ml = false,
- sli = false,
- sti = false,
- dir1 = false,
- dir2 = false,
- last_pos = false;
- $.vakata.dnd = {
- is_down : false,
- is_drag : false,
- helper : false,
- scroll_spd : 10,
- init_x : 0,
- init_y : 0,
- threshold : 5,
- helper_left : 5,
- helper_top : 10,
- user_data : {},
-
- drag_start : function (e, data, html) {
- if($.vakata.dnd.is_drag) { $.vakata.drag_stop({}); }
- try {
- e.currentTarget.unselectable = "on";
- e.currentTarget.onselectstart = function() { return false; };
- if(e.currentTarget.style) { e.currentTarget.style.MozUserSelect = "none"; }
- } catch(err) { }
- $.vakata.dnd.init_x = e.pageX;
- $.vakata.dnd.init_y = e.pageY;
- $.vakata.dnd.user_data = data;
- $.vakata.dnd.is_down = true;
- $.vakata.dnd.helper = $("").html(html); //.fadeTo(10,0.25);
- $(document).bind("mousemove", $.vakata.dnd.drag);
- $(document).bind("mouseup", $.vakata.dnd.drag_stop);
- return false;
- },
- drag : function (e) {
- if(!$.vakata.dnd.is_down) { return; }
- if(!$.vakata.dnd.is_drag) {
- if(Math.abs(e.pageX - $.vakata.dnd.init_x) > 5 || Math.abs(e.pageY - $.vakata.dnd.init_y) > 5) {
- $.vakata.dnd.helper.appendTo("body");
- $.vakata.dnd.is_drag = true;
- $(document).triggerHandler("drag_start.vakata", { "event" : e, "data" : $.vakata.dnd.user_data });
- }
- else { return; }
- }
-
- // maybe use a scrolling parent element instead of document?
- if(e.type === "mousemove") { // thought of adding scroll in order to move the helper, but mouse poisition is n/a
- var d = $(document), t = d.scrollTop(), l = d.scrollLeft();
- if(e.pageY - t < 20) {
- if(sti && dir1 === "down") { clearInterval(sti); sti = false; }
- if(!sti) { dir1 = "up"; sti = setInterval(function () { $(document).scrollTop($(document).scrollTop() - $.vakata.dnd.scroll_spd); }, 150); }
- }
- else {
- if(sti && dir1 === "up") { clearInterval(sti); sti = false; }
- }
- if($(window).height() - (e.pageY - t) < 20) {
- if(sti && dir1 === "up") { clearInterval(sti); sti = false; }
- if(!sti) { dir1 = "down"; sti = setInterval(function () { $(document).scrollTop($(document).scrollTop() + $.vakata.dnd.scroll_spd); }, 150); }
- }
- else {
- if(sti && dir1 === "down") { clearInterval(sti); sti = false; }
- }
-
- if(e.pageX - l < 20) {
- if(sli && dir2 === "right") { clearInterval(sli); sli = false; }
- if(!sli) { dir2 = "left"; sli = setInterval(function () { $(document).scrollLeft($(document).scrollLeft() - $.vakata.dnd.scroll_spd); }, 150); }
- }
- else {
- if(sli && dir2 === "left") { clearInterval(sli); sli = false; }
- }
- if($(window).width() - (e.pageX - l) < 20) {
- if(sli && dir2 === "left") { clearInterval(sli); sli = false; }
- if(!sli) { dir2 = "right"; sli = setInterval(function () { $(document).scrollLeft($(document).scrollLeft() + $.vakata.dnd.scroll_spd); }, 150); }
- }
- else {
- if(sli && dir2 === "right") { clearInterval(sli); sli = false; }
- }
- }
-
- $.vakata.dnd.helper.css({ left : (e.pageX + $.vakata.dnd.helper_left) + "px", top : (e.pageY + $.vakata.dnd.helper_top) + "px" });
- $(document).triggerHandler("drag.vakata", { "event" : e, "data" : $.vakata.dnd.user_data });
- },
- drag_stop : function (e) {
- if(sli) { clearInterval(sli); }
- if(sti) { clearInterval(sti); }
- $(document).unbind("mousemove", $.vakata.dnd.drag);
- $(document).unbind("mouseup", $.vakata.dnd.drag_stop);
- $(document).triggerHandler("drag_stop.vakata", { "event" : e, "data" : $.vakata.dnd.user_data });
- $.vakata.dnd.helper.remove();
- $.vakata.dnd.init_x = 0;
- $.vakata.dnd.init_y = 0;
- $.vakata.dnd.user_data = {};
- $.vakata.dnd.is_down = false;
- $.vakata.dnd.is_drag = false;
- }
- };
- $(function() {
- var css_string = '#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ';
- $.vakata.css.add_sheet({ str : css_string, title : "vakata" });
- });
-
- $.jstree.plugin("dnd", {
- __init : function () {
- this.data.dnd = {
- active : false,
- after : false,
- inside : false,
- before : false,
- off : false,
- prepared : false,
- w : 0,
- to1 : false,
- to2 : false,
- cof : false,
- cw : false,
- ch : false,
- i1 : false,
- i2 : false,
- mto : false
- };
- this.get_container()
- .bind("mouseenter.jstree", $.proxy(function (e) {
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
- if(this.data.themes) {
- m.attr("class", "jstree-" + this.data.themes.theme);
- if(ml) { ml.attr("class", "jstree-" + this.data.themes.theme); }
- $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme);
- }
- //if($(e.currentTarget).find("> ul > li").length === 0) {
- if(e.currentTarget === e.target && $.vakata.dnd.user_data.obj && $($.vakata.dnd.user_data.obj).length && $($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0] !== e.target) { // node should not be from the same tree
- var tr = $.jstree._reference(e.target), dc;
- if(tr.data.dnd.foreign) {
- dc = tr._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : tr.get_container(), is_root : true });
- if(dc === true || dc.inside === true || dc.before === true || dc.after === true) {
- $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
- }
- }
- else {
- tr.prepare_move(o, tr.get_container(), "last");
- if(tr.check_move()) {
- $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
- }
- }
- }
- }
- }, this))
- .bind("mouseup.jstree", $.proxy(function (e) {
- //if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && $(e.currentTarget).find("> ul > li").length === 0) {
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && e.currentTarget === e.target && $.vakata.dnd.user_data.obj && $($.vakata.dnd.user_data.obj).length && $($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0] !== e.target) { // node should not be from the same tree
- var tr = $.jstree._reference(e.currentTarget), dc;
- if(tr.data.dnd.foreign) {
- dc = tr._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : tr.get_container(), is_root : true });
- if(dc === true || dc.inside === true || dc.before === true || dc.after === true) {
- tr._get_settings().dnd.drag_finish.call(this, { "o" : o, "r" : tr.get_container(), is_root : true });
- }
- }
- else {
- tr.move_node(o, tr.get_container(), "last", e[tr._get_settings().dnd.copy_modifier + "Key"]);
- }
- }
- }, this))
- .bind("mouseleave.jstree", $.proxy(function (e) {
- if(e.relatedTarget && e.relatedTarget.id && e.relatedTarget.id === "jstree-marker-line") {
- return false;
- }
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
- if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
- if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
- if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
- if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
- if($.vakata.dnd.helper.children("ins").hasClass("jstree-ok")) {
- $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
- }
- }
- }, this))
- .bind("mousemove.jstree", $.proxy(function (e) {
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
- var cnt = this.get_container()[0];
-
- // Horizontal scroll
- if(e.pageX + 24 > this.data.dnd.cof.left + this.data.dnd.cw) {
- if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
- this.data.dnd.i1 = setInterval($.proxy(function () { this.scrollLeft += $.vakata.dnd.scroll_spd; }, cnt), 100);
- }
- else if(e.pageX - 24 < this.data.dnd.cof.left) {
- if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
- this.data.dnd.i1 = setInterval($.proxy(function () { this.scrollLeft -= $.vakata.dnd.scroll_spd; }, cnt), 100);
- }
- else {
- if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
- }
-
- // Vertical scroll
- if(e.pageY + 24 > this.data.dnd.cof.top + this.data.dnd.ch) {
- if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
- this.data.dnd.i2 = setInterval($.proxy(function () { this.scrollTop += $.vakata.dnd.scroll_spd; }, cnt), 100);
- }
- else if(e.pageY - 24 < this.data.dnd.cof.top) {
- if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
- this.data.dnd.i2 = setInterval($.proxy(function () { this.scrollTop -= $.vakata.dnd.scroll_spd; }, cnt), 100);
- }
- else {
- if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
- }
-
- }
- }, this))
- .bind("scroll.jstree", $.proxy(function (e) {
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && m && ml) {
- m.hide();
- ml.hide();
- }
- }, this))
- .delegate("a", "mousedown.jstree", $.proxy(function (e) {
- if(e.which === 1) {
- this.start_drag(e.currentTarget, e);
- return false;
- }
- }, this))
- .delegate("a", "mouseenter.jstree", $.proxy(function (e) {
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
- this.dnd_enter(e.currentTarget);
- }
- }, this))
- .delegate("a", "mousemove.jstree", $.proxy(function (e) {
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
- if(!r || !r.length || r.children("a")[0] !== e.currentTarget) {
- this.dnd_enter(e.currentTarget);
- }
- if(typeof this.data.dnd.off.top === "undefined") { this.data.dnd.off = $(e.target).offset(); }
- this.data.dnd.w = (e.pageY - (this.data.dnd.off.top || 0)) % this.data.core.li_height;
- if(this.data.dnd.w < 0) { this.data.dnd.w += this.data.core.li_height; }
- this.dnd_show();
- }
- }, this))
- .delegate("a", "mouseleave.jstree", $.proxy(function (e) {
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
- if(e.relatedTarget && e.relatedTarget.id && e.relatedTarget.id === "jstree-marker-line") {
- return false;
- }
- if(m) { m.hide(); }
- if(ml) { ml.hide(); }
- /*
- var ec = $(e.currentTarget).closest("li"),
- er = $(e.relatedTarget).closest("li");
- if(er[0] !== ec.prev()[0] && er[0] !== ec.next()[0]) {
- if(m) { m.hide(); }
- if(ml) { ml.hide(); }
- }
- */
- this.data.dnd.mto = setTimeout(
- (function (t) { return function () { t.dnd_leave(e); }; })(this),
- 0);
- }
- }, this))
- .delegate("a", "mouseup.jstree", $.proxy(function (e) {
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
- this.dnd_finish(e);
- }
- }, this));
-
- $(document)
- .bind("drag_stop.vakata", $.proxy(function () {
- if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
- if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
- if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
- if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
- this.data.dnd.after = false;
- this.data.dnd.before = false;
- this.data.dnd.inside = false;
- this.data.dnd.off = false;
- this.data.dnd.prepared = false;
- this.data.dnd.w = false;
- this.data.dnd.to1 = false;
- this.data.dnd.to2 = false;
- this.data.dnd.i1 = false;
- this.data.dnd.i2 = false;
- this.data.dnd.active = false;
- this.data.dnd.foreign = false;
- if(m) { m.css({ "top" : "-2000px" }); }
- if(ml) { ml.css({ "top" : "-2000px" }); }
- }, this))
- .bind("drag_start.vakata", $.proxy(function (e, data) {
- if(data.data.jstree) {
- var et = $(data.event.target);
- if(et.closest(".jstree").hasClass("jstree-" + this.get_index())) {
- this.dnd_enter(et);
- }
- }
- }, this));
- /*
- .bind("keydown.jstree-" + this.get_index() + " keyup.jstree-" + this.get_index(), $.proxy(function(e) {
- if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && !this.data.dnd.foreign) {
- var h = $.vakata.dnd.helper.children("ins");
- if(e[this._get_settings().dnd.copy_modifier + "Key"] && h.hasClass("jstree-ok")) {
- h.parent().html(h.parent().html().replace(/ \(Copy\)$/, "") + " (Copy)");
- }
- else {
- h.parent().html(h.parent().html().replace(/ \(Copy\)$/, ""));
- }
- }
- }, this)); */
-
-
-
- var s = this._get_settings().dnd;
- if(s.drag_target) {
- $(document)
- .delegate(s.drag_target, "mousedown.jstree-" + this.get_index(), $.proxy(function (e) {
- o = e.target;
- $.vakata.dnd.drag_start(e, { jstree : true, obj : e.target }, "" + $(e.target).text() );
- if(this.data.themes) {
- if(m) { m.attr("class", "jstree-" + this.data.themes.theme); }
- if(ml) { ml.attr("class", "jstree-" + this.data.themes.theme); }
- $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme);
- }
- $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
- var cnt = this.get_container();
- this.data.dnd.cof = cnt.offset();
- this.data.dnd.cw = parseInt(cnt.width(),10);
- this.data.dnd.ch = parseInt(cnt.height(),10);
- this.data.dnd.foreign = true;
- e.preventDefault();
- }, this));
- }
- if(s.drop_target) {
- $(document)
- .delegate(s.drop_target, "mouseenter.jstree-" + this.get_index(), $.proxy(function (e) {
- if(this.data.dnd.active && this._get_settings().dnd.drop_check.call(this, { "o" : o, "r" : $(e.target), "e" : e })) {
- $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
- }
- }, this))
- .delegate(s.drop_target, "mouseleave.jstree-" + this.get_index(), $.proxy(function (e) {
- if(this.data.dnd.active) {
- $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
- }
- }, this))
- .delegate(s.drop_target, "mouseup.jstree-" + this.get_index(), $.proxy(function (e) {
- if(this.data.dnd.active && $.vakata.dnd.helper.children("ins").hasClass("jstree-ok")) {
- this._get_settings().dnd.drop_finish.call(this, { "o" : o, "r" : $(e.target), "e" : e });
- }
- }, this));
- }
- },
- defaults : {
- copy_modifier : "ctrl",
- check_timeout : 100,
- open_timeout : 500,
- drop_target : ".jstree-drop",
- drop_check : function (data) { return true; },
- drop_finish : $.noop,
- drag_target : ".jstree-draggable",
- drag_finish : $.noop,
- drag_check : function (data) { return { after : false, before : false, inside : true }; }
- },
- _fn : {
- dnd_prepare : function () {
- if(!r || !r.length) { return; }
- this.data.dnd.off = r.offset();
- if(this._get_settings().core.rtl) {
- this.data.dnd.off.right = this.data.dnd.off.left + r.width();
- }
- if(this.data.dnd.foreign) {
- var a = this._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : r });
- this.data.dnd.after = a.after;
- this.data.dnd.before = a.before;
- this.data.dnd.inside = a.inside;
- this.data.dnd.prepared = true;
- return this.dnd_show();
- }
- this.prepare_move(o, r, "before");
- this.data.dnd.before = this.check_move();
- this.prepare_move(o, r, "after");
- this.data.dnd.after = this.check_move();
- if(this._is_loaded(r)) {
- this.prepare_move(o, r, "inside");
- this.data.dnd.inside = this.check_move();
- }
- else {
- this.data.dnd.inside = false;
- }
- this.data.dnd.prepared = true;
- return this.dnd_show();
- },
- dnd_show : function () {
- if(!this.data.dnd.prepared) { return; }
- var o = ["before","inside","after"],
- r = false,
- rtl = this._get_settings().core.rtl,
- pos;
- if(this.data.dnd.w < this.data.core.li_height/3) { o = ["before","inside","after"]; }
- else if(this.data.dnd.w <= this.data.core.li_height*2/3) {
- o = this.data.dnd.w < this.data.core.li_height/2 ? ["inside","before","after"] : ["inside","after","before"];
- }
- else { o = ["after","inside","before"]; }
- $.each(o, $.proxy(function (i, val) {
- if(this.data.dnd[val]) {
- $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
- r = val;
- return false;
- }
- }, this));
- if(r === false) { $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"); }
-
- pos = rtl ? (this.data.dnd.off.right - 18) : (this.data.dnd.off.left + 10);
- switch(r) {
- case "before":
- m.css({ "left" : pos + "px", "top" : (this.data.dnd.off.top - 6) + "px" }).show();
- if(ml) { ml.css({ "left" : (pos + 8) + "px", "top" : (this.data.dnd.off.top - 1) + "px" }).show(); }
- break;
- case "after":
- m.css({ "left" : pos + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height - 6) + "px" }).show();
- if(ml) { ml.css({ "left" : (pos + 8) + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height - 1) + "px" }).show(); }
- break;
- case "inside":
- m.css({ "left" : pos + ( rtl ? -4 : 4) + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height/2 - 5) + "px" }).show();
- if(ml) { ml.hide(); }
- break;
- default:
- m.hide();
- if(ml) { ml.hide(); }
- break;
- }
- last_pos = r;
- return r;
- },
- dnd_open : function () {
- this.data.dnd.to2 = false;
- this.open_node(r, $.proxy(this.dnd_prepare,this), true);
- },
- dnd_finish : function (e) {
- if(this.data.dnd.foreign) {
- if(this.data.dnd.after || this.data.dnd.before || this.data.dnd.inside) {
- this._get_settings().dnd.drag_finish.call(this, { "o" : o, "r" : r, "p" : last_pos });
- }
- }
- else {
- this.dnd_prepare();
- this.move_node(o, r, last_pos, e[this._get_settings().dnd.copy_modifier + "Key"]);
- }
- o = false;
- r = false;
- m.hide();
- if(ml) { ml.hide(); }
- },
- dnd_enter : function (obj) {
- if(this.data.dnd.mto) {
- clearTimeout(this.data.dnd.mto);
- this.data.dnd.mto = false;
- }
- var s = this._get_settings().dnd;
- this.data.dnd.prepared = false;
- r = this._get_node(obj);
- if(s.check_timeout) {
- // do the calculations after a minimal timeout (users tend to drag quickly to the desired location)
- if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
- this.data.dnd.to1 = setTimeout($.proxy(this.dnd_prepare, this), s.check_timeout);
- }
- else {
- this.dnd_prepare();
- }
- if(s.open_timeout) {
- if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
- if(r && r.length && r.hasClass("jstree-closed")) {
- // if the node is closed - open it, then recalculate
- this.data.dnd.to2 = setTimeout($.proxy(this.dnd_open, this), s.open_timeout);
- }
- }
- else {
- if(r && r.length && r.hasClass("jstree-closed")) {
- this.dnd_open();
- }
- }
- },
- dnd_leave : function (e) {
- this.data.dnd.after = false;
- this.data.dnd.before = false;
- this.data.dnd.inside = false;
- $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
- m.hide();
- if(ml) { ml.hide(); }
- if(r && r[0] === e.target.parentNode) {
- if(this.data.dnd.to1) {
- clearTimeout(this.data.dnd.to1);
- this.data.dnd.to1 = false;
- }
- if(this.data.dnd.to2) {
- clearTimeout(this.data.dnd.to2);
- this.data.dnd.to2 = false;
- }
- }
- },
- start_drag : function (obj, e) {
- o = this._get_node(obj);
- if(this.data.ui && this.is_selected(o)) { o = this._get_node(null, true); }
- var dt = o.length > 1 ? this._get_string("multiple_selection") : this.get_text(o),
- cnt = this.get_container();
- if(!this._get_settings().core.html_titles) { dt = dt.replace(//ig,">"); }
- $.vakata.dnd.drag_start(e, { jstree : true, obj : o }, "" + dt );
- if(this.data.themes) {
- if(m) { m.attr("class", "jstree-" + this.data.themes.theme); }
- if(ml) { ml.attr("class", "jstree-" + this.data.themes.theme); }
- $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme);
- }
- this.data.dnd.cof = cnt.offset();
- this.data.dnd.cw = parseInt(cnt.width(),10);
- this.data.dnd.ch = parseInt(cnt.height(),10);
- this.data.dnd.active = true;
- }
- }
- });
- $(function() {
- var css_string = '' +
- '#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; ' +
- ' -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; ' +
- '} ' +
- '#vakata-dragged .jstree-ok { background:green; } ' +
- '#vakata-dragged .jstree-invalid { background:red; } ' +
- '#jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } ' +
- '#jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; ' +
- ' cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; ' +
- ' -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; ' +
- '}' +
- '';
- $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
- m = $("").attr({ id : "jstree-marker" }).hide().html("»")
- .bind("mouseleave mouseenter", function (e) {
- m.hide();
- ml.hide();
- e.preventDefault();
- e.stopImmediatePropagation();
- return false;
- })
- .appendTo("body");
- ml = $("").attr({ id : "jstree-marker-line" }).hide()
- .bind("mouseup", function (e) {
- if(r && r.length) {
- r.children("a").trigger(e);
- e.preventDefault();
- e.stopImmediatePropagation();
- return false;
- }
- })
- .bind("mouseleave", function (e) {
- var rt = $(e.relatedTarget);
- if(rt.is(".jstree") || rt.closest(".jstree").length === 0) {
- if(r && r.length) {
- r.children("a").trigger(e);
- m.hide();
- ml.hide();
- e.preventDefault();
- e.stopImmediatePropagation();
- return false;
- }
- }
- })
- .appendTo("body");
- $(document).bind("drag_start.vakata", function (e, data) {
- if(data.data.jstree) { m.show(); if(ml) { ml.show(); } }
- });
- $(document).bind("drag_stop.vakata", function (e, data) {
- if(data.data.jstree) { m.hide(); if(ml) { ml.hide(); } }
- });
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree checkbox plugin
- * Inserts checkboxes in front of every node
- * Depends on the ui plugin
- * DOES NOT WORK NICELY WITH MULTITREE DRAG'N'DROP
- */
-(function ($) {
- $.jstree.plugin("checkbox", {
- __init : function () {
- this.data.checkbox.noui = this._get_settings().checkbox.override_ui;
- if(this.data.ui && this.data.checkbox.noui) {
- this.select_node = this.deselect_node = this.deselect_all = $.noop;
- this.get_selected = this.get_checked;
- }
-
- this.get_container()
- .bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree", $.proxy(function (e, data) {
- this._prepare_checkboxes(data.rslt.obj);
- }, this))
- .bind("loaded.jstree", $.proxy(function (e) {
- this._prepare_checkboxes();
- }, this))
- .delegate( (this.data.ui && this.data.checkbox.noui ? "a" : "ins.jstree-checkbox") , "click.jstree", $.proxy(function (e) {
- e.preventDefault();
- if(this._get_node(e.target).hasClass("jstree-checked")) { this.uncheck_node(e.target); }
- else { this.check_node(e.target); }
- if(this.data.ui && this.data.checkbox.noui) {
- this.save_selected();
- if(this.data.cookies) { this.save_cookie("select_node"); }
- }
- else {
- e.stopImmediatePropagation();
- return false;
- }
- }, this));
- },
- defaults : {
- override_ui : false,
- two_state : false,
- real_checkboxes : false,
- checked_parent_open : true,
- real_checkboxes_names : function (n) { return [ ("check_" + (n[0].id || Math.ceil(Math.random() * 10000))) , 1]; }
- },
- __destroy : function () {
- this.get_container()
- .find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end()
- .find("ins.jstree-checkbox").remove();
- },
- _fn : {
- _checkbox_notify : function (n, data) {
- if(data.checked) {
- this.check_node(n, false);
- }
- },
- _prepare_checkboxes : function (obj) {
- obj = !obj || obj == -1 ? this.get_container().find("> ul > li") : this._get_node(obj);
- if(obj === false) { return; } // added for removing root nodes
- var c, _this = this, t, ts = this._get_settings().checkbox.two_state, rc = this._get_settings().checkbox.real_checkboxes, rcn = this._get_settings().checkbox.real_checkboxes_names;
- obj.each(function () {
- t = $(this);
- c = t.is("li") && (t.hasClass("jstree-checked") || (rc && t.children(":checked").length)) ? "jstree-checked" : "jstree-unchecked";
- t.find("li").addBack().each(function () {
- var $t = $(this), nm;
- $t.children("a" + (_this.data.languages ? "" : ":eq(0)") ).not(":has(.jstree-checkbox)").prepend(" ").parent().not(".jstree-checked, .jstree-unchecked").addClass( ts ? "jstree-unchecked" : c );
- if(rc) {
- if(!$t.children(":checkbox").length) {
- nm = rcn.call(_this, $t);
- $t.prepend("");
- }
- else {
- $t.children(":checkbox").addClass("jstree-real-checkbox");
- }
- }
- if(!ts) {
- if(c === "jstree-checked" || $t.hasClass("jstree-checked") || $t.children(':checked').length) {
- $t.find("li").addBack().addClass("jstree-checked").children(":checkbox").prop("checked", true);
- }
- }
- else {
- if($t.hasClass("jstree-checked") || $t.children(':checked').length) {
- $t.addClass("jstree-checked").children(":checkbox").prop("checked", true);
- }
- }
- });
- });
- if(!ts) {
- obj.find(".jstree-checked").parent().parent().each(function () { _this._repair_state(this); });
- }
- },
- change_state : function (obj, state) {
- obj = this._get_node(obj);
- var coll = false, rc = this._get_settings().checkbox.real_checkboxes;
- if(!obj || obj === -1) { return false; }
- state = (state === false || state === true) ? state : obj.hasClass("jstree-checked");
- if(this._get_settings().checkbox.two_state) {
- if(state) {
- obj.removeClass("jstree-checked").addClass("jstree-unchecked");
- if(rc) { obj.children(":checkbox").prop("checked", false); }
- }
- else {
- obj.removeClass("jstree-unchecked").addClass("jstree-checked");
- if(rc) { obj.children(":checkbox").prop("checked", true); }
- }
- }
- else {
- if(state) {
- coll = obj.find("li").addBack();
- if(!coll.filter(".jstree-checked, .jstree-undetermined").length) { return false; }
- coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
- if(rc) { coll.children(":checkbox").prop("checked", false); }
- }
- else {
- coll = obj.find("li").addBack();
- if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length) { return false; }
- coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
- if(rc) { coll.children(":checkbox").prop("checked", true); }
- if(this.data.ui) { this.data.ui.last_selected = obj; }
- this.data.checkbox.last_selected = obj;
- }
- obj.parentsUntil(".jstree", "li").each(function () {
- var $this = $(this);
- if(state) {
- if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length) {
- $this.parentsUntil(".jstree", "li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
- if(rc) { $this.parentsUntil(".jstree", "li").addBack().children(":checkbox").prop("checked", false); }
- return false;
- }
- else {
- $this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
- if(rc) { $this.children(":checkbox").prop("checked", false); }
- }
- }
- else {
- if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length) {
- $this.parentsUntil(".jstree", "li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
- if(rc) { $this.parentsUntil(".jstree", "li").addBack().children(":checkbox").prop("checked", false); }
- return false;
- }
- else {
- $this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
- if(rc) { $this.children(":checkbox").prop("checked", true); }
- }
- }
- });
- }
- if(this.data.ui && this.data.checkbox.noui) { this.data.ui.selected = this.get_checked(); }
- this.__callback(obj);
- return true;
- },
- check_node : function (obj) {
- if(this.change_state(obj, false)) {
- obj = this._get_node(obj);
- if(this._get_settings().checkbox.checked_parent_open) {
- var t = this;
- obj.parents(".jstree-closed").each(function () { t.open_node(this, false, true); });
- }
- this.__callback({ "obj" : obj });
- }
- },
- uncheck_node : function (obj) {
- if(this.change_state(obj, true)) { this.__callback({ "obj" : this._get_node(obj) }); }
- },
- check_all : function () {
- var _this = this,
- coll = this._get_settings().checkbox.two_state ? this.get_container_ul().find("li") : this.get_container_ul().children("li");
- coll.each(function () {
- _this.change_state(this, false);
- });
- this.__callback();
- },
- uncheck_all : function () {
- var _this = this,
- coll = this._get_settings().checkbox.two_state ? this.get_container_ul().find("li") : this.get_container_ul().children("li");
- coll.each(function () {
- _this.change_state(this, true);
- });
- this.__callback();
- },
-
- is_checked : function(obj) {
- obj = this._get_node(obj);
- return obj.length ? obj.is(".jstree-checked") : false;
- },
- get_checked : function (obj, get_all) {
- obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj);
- return get_all || this._get_settings().checkbox.two_state ? obj.find(".jstree-checked") : obj.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked");
- },
- get_unchecked : function (obj, get_all) {
- obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj);
- return get_all || this._get_settings().checkbox.two_state ? obj.find(".jstree-unchecked") : obj.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked");
- },
-
- show_checkboxes : function () { this.get_container().children("ul").removeClass("jstree-no-checkboxes"); },
- hide_checkboxes : function () { this.get_container().children("ul").addClass("jstree-no-checkboxes"); },
-
- _repair_state : function (obj) {
- obj = this._get_node(obj);
- if(!obj.length) { return; }
- if(this._get_settings().checkbox.two_state) {
- obj.find('li').addBack().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':checkbox').prop('checked', true);
- return;
- }
- var rc = this._get_settings().checkbox.real_checkboxes,
- a = obj.find("> ul > .jstree-checked").length,
- b = obj.find("> ul > .jstree-undetermined").length,
- c = obj.find("> ul > li").length;
- if(c === 0) { if(obj.hasClass("jstree-undetermined")) { this.change_state(obj, false); } }
- else if(a === 0 && b === 0) { this.change_state(obj, true); }
- else if(a === c) { this.change_state(obj, false); }
- else {
- obj.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
- if(rc) { obj.parentsUntil(".jstree", "li").addBack().children(":checkbox").prop("checked", false); }
- }
- },
- reselect : function () {
- if(this.data.ui && this.data.checkbox.noui) {
- var _this = this,
- s = this.data.ui.to_select;
- s = $.map($.makeArray(s), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); });
- this.deselect_all();
- $.each(s, function (i, val) { _this.check_node(val); });
- this.__callback();
- }
- else {
- this.__call_old();
- }
- },
- save_loaded : function () {
- var _this = this;
- this.data.core.to_load = [];
- this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function () {
- if(this.id) { _this.data.core.to_load.push("#" + this.id); }
- });
- }
- }
- });
- $(function() {
- var css_string = '.jstree .jstree-real-checkbox { display:none; } ';
- $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree XML plugin
- * The XML data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions.
- */
-(function ($) {
- $.vakata.xslt = function (xml, xsl, callback) {
- var r = false, p, q, s;
- // IE9
- if(r === false && window.ActiveXObject) {
- try {
- r = new ActiveXObject("Msxml2.XSLTemplate");
- q = new ActiveXObject("Msxml2.DOMDocument");
- q.loadXML(xml);
- s = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
- s.loadXML(xsl);
- r.stylesheet = s;
- p = r.createProcessor();
- p.input = q;
- p.transform();
- r = p.output;
- }
- catch (e) { }
- }
- xml = $.parseXML(xml);
- xsl = $.parseXML(xsl);
- // FF, Chrome
- if(r === false && typeof (XSLTProcessor) !== "undefined") {
- p = new XSLTProcessor();
- p.importStylesheet(xsl);
- r = p.transformToFragment(xml, document);
- r = $('').append(r).html();
- }
- // OLD IE
- if(r === false && typeof (xml.transformNode) !== "undefined") {
- r = xml.transformNode(xsl);
- }
- callback.call(null, r);
- };
- var xsl = {
- 'nest' : '<' + '?xml version="1.0" encoding="utf-8" ?>' +
- '' +
- ' ' +
- '' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- '' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' - ' +
- '
' +
- ' jstree-last ' +
- ' ' +
- ' jstree-open ' +
- ' jstree-closed ' +
- ' jstree-leaf ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' # ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' jstree-icon ' +
- ' ' +
- ' ' +
- ' background:url( ) center center no-repeat; ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- '
' +
- ' ' +
- ' ',
-
- 'flat' : '<' + '?xml version="1.0" encoding="utf-8" ?>' +
- '' +
- ' ' +
- '' +
- ' ' +
- ' ' + /* the last `or` may be removed */
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- '
' +
- ' ' +
- '' +
- ' ' +
- ' ' +
- ' ' +
- ' - ' +
- '
' +
- ' jstree-last ' +
- ' ' +
- ' jstree-open ' +
- ' jstree-closed ' +
- ' jstree-leaf ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' # ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' jstree-icon ' +
- ' ' +
- ' ' +
- ' background:url( ) center center no-repeat; ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- '
' +
- ' ' +
- ' ' +
- ' ' +
- ' '
- },
- escape_xml = function(string) {
- return string
- .toString()
- .replace(/&/g, '&')
- .replace(//g, '>')
- .replace(/"/g, '"')
- .replace(/'/g, ''');
- };
- $.jstree.plugin("xml_data", {
- defaults : {
- data : false,
- ajax : false,
- xsl : "flat",
- clean_node : false,
- correct_state : true,
- get_skip_empty : false,
- get_include_preamble : true
- },
- _fn : {
- load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_xml(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); },
- _is_loaded : function (obj) {
- var s = this._get_settings().xml_data;
- obj = this._get_node(obj);
- return obj == -1 || !obj || (!s.ajax && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0;
- },
- load_node_xml : function (obj, s_call, e_call) {
- var s = this.get_settings().xml_data,
- error_func = function () {},
- success_func = function () {};
-
- obj = this._get_node(obj);
- if(obj && obj !== -1) {
- if(obj.data("jstree_is_loading")) { return; }
- else { obj.data("jstree_is_loading",true); }
- }
- switch(!0) {
- case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied.";
- case ($.isFunction(s.data)):
- s.data.call(this, obj, $.proxy(function (d) {
- this.parse_xml(d, $.proxy(function (d) {
- if(d) {
- d = d.replace(/ ?xmlns="[^"]*"/ig, "");
- if(d.length > 10) {
- d = $(d);
- if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
- else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d); obj.removeData("jstree_is_loading"); }
- if(s.clean_node) { this.clean_node(obj); }
- if(s_call) { s_call.call(this); }
- }
- else {
- if(obj && obj !== -1) {
- obj.children("a.jstree-loading").removeClass("jstree-loading");
- obj.removeData("jstree_is_loading");
- if(s.correct_state) {
- this.correct_state(obj);
- if(s_call) { s_call.call(this); }
- }
- }
- else {
- if(s.correct_state) {
- this.get_container().children("ul").empty();
- if(s_call) { s_call.call(this); }
- }
- }
- }
- }
- }, this));
- }, this));
- break;
- case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
- if(!obj || obj == -1) {
- this.parse_xml(s.data, $.proxy(function (d) {
- if(d) {
- d = d.replace(/ ?xmlns="[^"]*"/ig, "");
- if(d.length > 10) {
- d = $(d);
- this.get_container().children("ul").empty().append(d.children());
- if(s.clean_node) { this.clean_node(obj); }
- if(s_call) { s_call.call(this); }
- }
- }
- else {
- if(s.correct_state) {
- this.get_container().children("ul").empty();
- if(s_call) { s_call.call(this); }
- }
- }
- }, this));
- }
- break;
- case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
- error_func = function (x, t, e) {
- var ef = this.get_settings().xml_data.ajax.error;
- if(ef) { ef.call(this, x, t, e); }
- if(obj !== -1 && obj.length) {
- obj.children("a.jstree-loading").removeClass("jstree-loading");
- obj.removeData("jstree_is_loading");
- if(t === "success" && s.correct_state) { this.correct_state(obj); }
- }
- else {
- if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); }
- }
- if(e_call) { e_call.call(this); }
- };
- success_func = function (d, t, x) {
- d = x.responseText;
- var sf = this.get_settings().xml_data.ajax.success;
- if(sf) { d = sf.call(this,d,t,x) || d; }
- if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "")) {
- return error_func.call(this, x, t, "");
- }
- this.parse_xml(d, $.proxy(function (d) {
- if(d) {
- d = d.replace(/ ?xmlns="[^"]*"/ig, "");
- if(d.length > 10) {
- d = $(d);
- if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
- else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d); obj.removeData("jstree_is_loading"); }
- if(s.clean_node) { this.clean_node(obj); }
- if(s_call) { s_call.call(this); }
- }
- else {
- if(obj && obj !== -1) {
- obj.children("a.jstree-loading").removeClass("jstree-loading");
- obj.removeData("jstree_is_loading");
- if(s.correct_state) {
- this.correct_state(obj);
- if(s_call) { s_call.call(this); }
- }
- }
- else {
- if(s.correct_state) {
- this.get_container().children("ul").empty();
- if(s_call) { s_call.call(this); }
- }
- }
- }
- }
- }, this));
- };
- s.ajax.context = this;
- s.ajax.error = error_func;
- s.ajax.success = success_func;
- if(!s.ajax.dataType) { s.ajax.dataType = "xml"; }
- if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
- if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
- $.ajax(s.ajax);
- break;
- }
- },
- parse_xml : function (xml, callback) {
- var s = this._get_settings().xml_data;
- $.vakata.xslt(xml, xsl[s.xsl], callback);
- },
- get_xml : function (tp, obj, li_attr, a_attr, is_callback) {
- var result = "",
- s = this._get_settings(),
- _this = this,
- tmp1, tmp2, li, a, lang;
- if(!tp) { tp = "flat"; }
- if(!is_callback) { is_callback = 0; }
- obj = this._get_node(obj);
- if(!obj || obj === -1) { obj = this.get_container().find("> ul > li"); }
- li_attr = $.isArray(li_attr) ? li_attr : [ "id", "class" ];
- if(!is_callback && this.data.types && $.inArray(s.types.type_attr, li_attr) === -1) { li_attr.push(s.types.type_attr); }
-
- a_attr = $.isArray(a_attr) ? a_attr : [ ];
-
- if(!is_callback) {
- if(s.xml_data.get_include_preamble) {
- result += '<' + '?xml version="1.0" encoding="UTF-8"?' + '>';
- }
- result += "";
- }
- obj.each(function () {
- result += "- ";
- result += "
";
- a = li.children("a");
- a.each(function () {
- tmp1 = $(this);
- lang = false;
- result += "";
- result += "";
- result += " ";
- });
- result += " ";
- tmp2 = li[0].id || true;
- li = li.find("> ul > li");
- if(li.length) { tmp2 = _this.get_xml(tp, li, li_attr, a_attr, tmp2); }
- else { tmp2 = ""; }
- if(tp == "nest") { result += tmp2; }
- result += " ";
- if(tp == "flat") { result += tmp2; }
- });
- if(!is_callback) { result += " "; }
- return result;
- }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree search plugin
- * Enables both sync and async search on the tree
- * DOES NOT WORK WITH JSON PROGRESSIVE RENDER
- */
-(function ($) {
- if($().jquery.split('.')[1] >= 8) {
- $.expr[':'].jstree_contains = $.expr.createPseudo(function(search) {
- return function(a) {
- return (a.textContent || a.innerText || "").toLowerCase().indexOf(search.toLowerCase())>=0;
- };
- });
- $.expr[':'].jstree_title_contains = $.expr.createPseudo(function(search) {
- return function(a) {
- return (a.getAttribute("title") || "").toLowerCase().indexOf(search.toLowerCase())>=0;
- };
- });
- }
- else {
- $.expr[':'].jstree_contains = function(a,i,m){
- return (a.textContent || a.innerText || "").toLowerCase().indexOf(m[3].toLowerCase())>=0;
- };
- $.expr[':'].jstree_title_contains = function(a,i,m) {
- return (a.getAttribute("title") || "").toLowerCase().indexOf(m[3].toLowerCase())>=0;
- };
- }
- $.jstree.plugin("search", {
- __init : function () {
- this.data.search.str = "";
- this.data.search.result = $();
- if(this._get_settings().search.show_only_matches) {
- this.get_container()
- .bind("search.jstree", function (e, data) {
- $(this).children("ul").find("li").hide().removeClass("jstree-last");
- data.rslt.nodes.parentsUntil(".jstree").addBack().show()
- .filter("ul").each(function () { $(this).children("li:visible").eq(-1).addClass("jstree-last"); });
- })
- .bind("clear_search.jstree", function () {
- $(this).children("ul").find("li").css("display","").end().end().jstree("clean_node", -1);
- });
- }
- },
- defaults : {
- ajax : false,
- search_method : "jstree_contains", // for case insensitive - jstree_contains
- show_only_matches : false
- },
- _fn : {
- search : function (str, skip_async) {
- if($.trim(str) === "") { this.clear_search(); return; }
- var s = this.get_settings().search,
- t = this,
- error_func = function () { },
- success_func = function () { };
- this.data.search.str = str;
-
- if(!skip_async && s.ajax !== false && this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length > 0) {
- this.search.supress_callback = true;
- error_func = function () { };
- success_func = function (d, t, x) {
- var sf = this.get_settings().search.ajax.success;
- if(sf) { d = sf.call(this,d,t,x) || d; }
- this.data.search.to_open = d;
- this._search_open();
- };
- s.ajax.context = this;
- s.ajax.error = error_func;
- s.ajax.success = success_func;
- if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, str); }
- if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, str); }
- if(!s.ajax.data) { s.ajax.data = { "search_string" : str }; }
- if(!s.ajax.dataType || /^json/.exec(s.ajax.dataType)) { s.ajax.dataType = "json"; }
- $.ajax(s.ajax);
- return;
- }
- if(this.data.search.result.length) { this.clear_search(); }
- this.data.search.result = this.get_container().find("a" + (this.data.languages ? "." + this.get_lang() : "" ) + ":" + (s.search_method) + "(" + this.data.search.str + ")");
- this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function () {
- t.open_node(this, false, true);
- });
- this.__callback({ nodes : this.data.search.result, str : str });
- },
- clear_search : function (str) {
- this.data.search.result.removeClass("jstree-search");
- this.__callback(this.data.search.result);
- this.data.search.result = $();
- },
- _search_open : function (is_callback) {
- var _this = this,
- done = true,
- current = [],
- remaining = [];
- if(this.data.search.to_open.length) {
- $.each(this.data.search.to_open, function (i, val) {
- if(val == "#") { return true; }
- if($(val).length && $(val).is(".jstree-closed")) { current.push(val); }
- else { remaining.push(val); }
- });
- if(current.length) {
- this.data.search.to_open = remaining;
- $.each(current, function (i, val) {
- _this.open_node(val, function () { _this._search_open(true); });
- });
- done = false;
- }
- }
- if(done) { this.search(this.data.search.str, true); }
- }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree contextmenu plugin
- */
-(function ($) {
- $.vakata.context = {
- hide_on_mouseleave : false,
-
- cnt : $(""),
- vis : false,
- tgt : false,
- par : false,
- func : false,
- data : false,
- rtl : false,
- show : function (s, t, x, y, d, p, rtl) {
- $.vakata.context.rtl = !!rtl;
- var html = $.vakata.context.parse(s), h, w;
- if(!html) { return; }
- $.vakata.context.vis = true;
- $.vakata.context.tgt = t;
- $.vakata.context.par = p || t || null;
- $.vakata.context.data = d || null;
- $.vakata.context.cnt
- .html(html)
- .css({ "visibility" : "hidden", "display" : "block", "left" : 0, "top" : 0 });
-
- if($.vakata.context.hide_on_mouseleave) {
- $.vakata.context.cnt
- .one("mouseleave", function(e) { $.vakata.context.hide(); });
- }
-
- h = $.vakata.context.cnt.height();
- w = $.vakata.context.cnt.width();
- if(x + w > $(document).width()) {
- x = $(document).width() - (w + 5);
- $.vakata.context.cnt.find("li > ul").addClass("right");
- }
- if(y + h > $(document).height()) {
- y = y - (h + t[0].offsetHeight);
- $.vakata.context.cnt.find("li > ul").addClass("bottom");
- }
-
- $.vakata.context.cnt
- .css({ "left" : x, "top" : y })
- .find("li:has(ul)")
- .bind("mouseenter", function (e) {
- var w = $(document).width(),
- h = $(document).height(),
- ul = $(this).children("ul").show();
- if(w !== $(document).width()) { ul.toggleClass("right"); }
- if(h !== $(document).height()) { ul.toggleClass("bottom"); }
- })
- .bind("mouseleave", function (e) {
- $(this).children("ul").hide();
- })
- .end()
- .css({ "visibility" : "visible" })
- .show();
- $(document).triggerHandler("context_show.vakata");
- },
- hide : function () {
- $.vakata.context.vis = false;
- $.vakata.context.cnt.attr("class","").css({ "visibility" : "hidden" });
- $(document).triggerHandler("context_hide.vakata");
- },
- parse : function (s, is_callback) {
- if(!s) { return false; }
- var str = "",
- tmp = false,
- was_sep = true;
- if(!is_callback) { $.vakata.context.func = {}; }
- str += "";
- $.each(s, function (i, val) {
- if(!val) { return true; }
- $.vakata.context.func[i] = val.action;
- if(!was_sep && val.separator_before) {
- str += "";
- }
- was_sep = false;
- str += "";
- if(val.separator_after) {
- str += "";
- was_sep = true;
- }
- });
- str = str.replace(/- <\/li\>$/,"");
- str += "
";
- $(document).triggerHandler("context_parse.vakata");
- return str.length > 10 ? str : false;
- },
- exec : function (i) {
- if($.isFunction($.vakata.context.func[i])) {
- // if is string - eval and call it!
- $.vakata.context.func[i].call($.vakata.context.data, $.vakata.context.par);
- return true;
- }
- else { return false; }
- }
- };
- $(function () {
- var css_string = '' +
- '#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } ' +
- '#vakata-contextmenu ul { min-width:180px; *width:180px; } ' +
- '#vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } ' +
- '#vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } ' +
- '#vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } ' +
- '#vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } ' +
- '#vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } ' +
- '#vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } ' +
- '#vakata-contextmenu .right { right:100%; left:auto; } ' +
- '#vakata-contextmenu .bottom { bottom:-1px; top:auto; } ' +
- '#vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ';
- $.vakata.css.add_sheet({ str : css_string, title : "vakata" });
- $.vakata.context.cnt
- .delegate("a","click", function (e) { e.preventDefault(); })
- .delegate("a","mouseup", function (e) {
- if(!$(this).parent().hasClass("jstree-contextmenu-disabled") && $.vakata.context.exec($(this).attr("rel"))) {
- $.vakata.context.hide();
- }
- else { $(this).blur(); }
- })
- .delegate("a","mouseover", function () {
- $.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover");
- })
- .appendTo("body");
- $(document).bind("mousedown", function (e) { if($.vakata.context.vis && !$.contains($.vakata.context.cnt[0], e.target)) { $.vakata.context.hide(); } });
- if(typeof $.hotkeys !== "undefined") {
- $(document)
- .bind("keydown", "up", function (e) {
- if($.vakata.context.vis) {
- var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();
- if(!o.length) { o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last(); }
- o.addClass("vakata-hover");
- e.stopImmediatePropagation();
- e.preventDefault();
- }
- })
- .bind("keydown", "down", function (e) {
- if($.vakata.context.vis) {
- var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();
- if(!o.length) { o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first(); }
- o.addClass("vakata-hover");
- e.stopImmediatePropagation();
- e.preventDefault();
- }
- })
- .bind("keydown", "right", function (e) {
- if($.vakata.context.vis) {
- $.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover");
- e.stopImmediatePropagation();
- e.preventDefault();
- }
- })
- .bind("keydown", "left", function (e) {
- if($.vakata.context.vis) {
- $.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover");
- e.stopImmediatePropagation();
- e.preventDefault();
- }
- })
- .bind("keydown", "esc", function (e) {
- $.vakata.context.hide();
- e.preventDefault();
- })
- .bind("keydown", "space", function (e) {
- $.vakata.context.cnt.find(".vakata-hover").last().children("a").click();
- e.preventDefault();
- });
- }
- });
-
- $.jstree.plugin("contextmenu", {
- __init : function () {
- this.get_container()
- .delegate("a", "contextmenu.jstree", $.proxy(function (e) {
- e.preventDefault();
- if(!$(e.currentTarget).hasClass("jstree-loading")) {
- this.show_contextmenu(e.currentTarget, e.pageX, e.pageY);
- }
- }, this))
- .delegate("a", "click.jstree", $.proxy(function (e) {
- if(this.data.contextmenu) {
- $.vakata.context.hide();
- }
- }, this))
- .bind("destroy.jstree", $.proxy(function () {
- // TODO: move this to descruct method
- if(this.data.contextmenu) {
- $.vakata.context.hide();
- }
- }, this));
- $(document).bind("context_hide.vakata", $.proxy(function () { this.data.contextmenu = false; }, this));
- },
- defaults : {
- select_node : false, // requires UI plugin
- show_at_node : true,
- items : { // Could be a function that should return an object like this one
- "create" : {
- "separator_before" : false,
- "separator_after" : true,
- "label" : "Create",
- "action" : function (obj) { this.create(obj); }
- },
- "rename" : {
- "separator_before" : false,
- "separator_after" : false,
- "label" : "Rename",
- "action" : function (obj) { this.rename(obj); }
- },
- "remove" : {
- "separator_before" : false,
- "icon" : false,
- "separator_after" : false,
- "label" : "Delete",
- "action" : function (obj) { if(this.is_selected(obj)) { this.remove(); } else { this.remove(obj); } }
- },
- "ccp" : {
- "separator_before" : true,
- "icon" : false,
- "separator_after" : false,
- "label" : "Edit",
- "action" : false,
- "submenu" : {
- "cut" : {
- "separator_before" : false,
- "separator_after" : false,
- "label" : "Cut",
- "action" : function (obj) { this.cut(obj); }
- },
- "copy" : {
- "separator_before" : false,
- "icon" : false,
- "separator_after" : false,
- "label" : "Copy",
- "action" : function (obj) { this.copy(obj); }
- },
- "paste" : {
- "separator_before" : false,
- "icon" : false,
- "separator_after" : false,
- "label" : "Paste",
- "action" : function (obj) { this.paste(obj); }
- }
- }
- }
- }
- },
- _fn : {
- show_contextmenu : function (obj, x, y) {
- obj = this._get_node(obj);
- var s = this.get_settings().contextmenu,
- a = obj.children("a:visible:eq(0)"),
- o = false,
- i = false;
- if(s.select_node && this.data.ui && !this.is_selected(obj)) {
- this.deselect_all();
- this.select_node(obj, true);
- }
- if(s.show_at_node || typeof x === "undefined" || typeof y === "undefined") {
- o = a.offset();
- x = o.left;
- y = o.top + this.data.core.li_height;
- }
- i = obj.data("jstree") && obj.data("jstree").contextmenu ? obj.data("jstree").contextmenu : s.items;
- if($.isFunction(i)) { i = i.call(this, obj); }
- this.data.contextmenu = true;
- $.vakata.context.show(i, a, x, y, this, obj, this._get_settings().core.rtl);
- if(this.data.themes) { $.vakata.context.cnt.attr("class", "jstree-" + this.data.themes.theme + "-context"); }
- }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree types plugin
- * Adds support types of nodes
- * You can set an attribute on each li node, that represents its type.
- * According to the type setting the node may get custom icon/validation rules
- */
-(function ($) {
- $.jstree.plugin("types", {
- __init : function () {
- var s = this._get_settings().types;
- this.data.types.attach_to = [];
- this.get_container()
- .bind("init.jstree", $.proxy(function () {
- var types = s.types,
- attr = s.type_attr,
- icons_css = "",
- _this = this;
-
- $.each(types, function (i, tp) {
- $.each(tp, function (k, v) {
- if(!/^(max_depth|max_children|icon|valid_children)$/.test(k)) { _this.data.types.attach_to.push(k); }
- });
- if(!tp.icon) { return true; }
- if( tp.icon.image || tp.icon.position) {
- if(i == "default") { icons_css += '.jstree-' + _this.get_index() + ' a > .jstree-icon { '; }
- else { icons_css += '.jstree-' + _this.get_index() + ' li[' + attr + '="' + i + '"] > a > .jstree-icon { '; }
- if(tp.icon.image) { icons_css += ' background-image:url(' + tp.icon.image + '); '; }
- if(tp.icon.position){ icons_css += ' background-position:' + tp.icon.position + '; '; }
- else { icons_css += ' background-position:0 0; '; }
- icons_css += '} ';
- }
- });
- if(icons_css !== "") { $.vakata.css.add_sheet({ 'str' : icons_css, title : "jstree-types" }); }
- }, this))
- .bind("before.jstree", $.proxy(function (e, data) {
- var s, t,
- o = this._get_settings().types.use_data ? this._get_node(data.args[0]) : false,
- d = o && o !== -1 && o.length ? o.data("jstree") : false;
- if(d && d.types && d.types[data.func] === false) { e.stopImmediatePropagation(); return false; }
- if($.inArray(data.func, this.data.types.attach_to) !== -1) {
- if(!data.args[0] || (!data.args[0].tagName && !data.args[0].jquery)) { return; }
- s = this._get_settings().types.types;
- t = this._get_type(data.args[0]);
- if(
- (
- (s[t] && typeof s[t][data.func] !== "undefined") ||
- (s["default"] && typeof s["default"][data.func] !== "undefined")
- ) && this._check(data.func, data.args[0]) === false
- ) {
- e.stopImmediatePropagation();
- return false;
- }
- }
- }, this));
- if(is_ie6) {
- this.get_container()
- .bind("load_node.jstree set_type.jstree", $.proxy(function (e, data) {
- var r = data && data.rslt && data.rslt.obj && data.rslt.obj !== -1 ? this._get_node(data.rslt.obj).parent() : this.get_container_ul(),
- c = false,
- s = this._get_settings().types;
- $.each(s.types, function (i, tp) {
- if(tp.icon && (tp.icon.image || tp.icon.position)) {
- c = i === "default" ? r.find("li > a > .jstree-icon") : r.find("li[" + s.type_attr + "='" + i + "'] > a > .jstree-icon");
- if(tp.icon.image) { c.css("backgroundImage","url(" + tp.icon.image + ")"); }
- c.css("backgroundPosition", tp.icon.position || "0 0");
- }
- });
- }, this));
- }
- },
- defaults : {
- // defines maximum number of root nodes (-1 means unlimited, -2 means disable max_children checking)
- max_children : -1,
- // defines the maximum depth of the tree (-1 means unlimited, -2 means disable max_depth checking)
- max_depth : -1,
- // defines valid node types for the root nodes
- valid_children : "all",
-
- // whether to use $.data
- use_data : false,
- // where is the type stores (the rel attribute of the LI element)
- type_attr : "rel",
- // a list of types
- types : {
- // the default type
- "default" : {
- "max_children" : -1,
- "max_depth" : -1,
- "valid_children": "all"
-
- // Bound functions - you can bind any other function here (using boolean or function)
- //"select_node" : true
- }
- }
- },
- _fn : {
- _types_notify : function (n, data) {
- if(data.type && this._get_settings().types.use_data) {
- this.set_type(data.type, n);
- }
- },
- _get_type : function (obj) {
- obj = this._get_node(obj);
- return (!obj || !obj.length) ? false : obj.attr(this._get_settings().types.type_attr) || "default";
- },
- set_type : function (str, obj) {
- obj = this._get_node(obj);
- var ret = (!obj.length || !str) ? false : obj.attr(this._get_settings().types.type_attr, str);
- if(ret) { this.__callback({ obj : obj, type : str}); }
- return ret;
- },
- _check : function (rule, obj, opts) {
- obj = this._get_node(obj);
- var v = false, t = this._get_type(obj), d = 0, _this = this, s = this._get_settings().types, data = false;
- if(obj === -1) {
- if(!!s[rule]) { v = s[rule]; }
- else { return; }
- }
- else {
- if(t === false) { return; }
- data = s.use_data ? obj.data("jstree") : false;
- if(data && data.types && typeof data.types[rule] !== "undefined") { v = data.types[rule]; }
- else if(!!s.types[t] && typeof s.types[t][rule] !== "undefined") { v = s.types[t][rule]; }
- else if(!!s.types["default"] && typeof s.types["default"][rule] !== "undefined") { v = s.types["default"][rule]; }
- }
- if($.isFunction(v)) { v = v.call(this, obj); }
- if(rule === "max_depth" && obj !== -1 && opts !== false && s.max_depth !== -2 && v !== 0) {
- // also include the node itself - otherwise if root node it is not checked
- obj.children("a:eq(0)").parentsUntil(".jstree","li").each(function (i) {
- // check if current depth already exceeds global tree depth
- if(s.max_depth !== -1 && s.max_depth - (i + 1) <= 0) { v = 0; return false; }
- d = (i === 0) ? v : _this._check(rule, this, false);
- // check if current node max depth is already matched or exceeded
- if(d !== -1 && d - (i + 1) <= 0) { v = 0; return false; }
- // otherwise - set the max depth to the current value minus current depth
- if(d >= 0 && (d - (i + 1) < v || v < 0) ) { v = d - (i + 1); }
- // if the global tree depth exists and it minus the nodes calculated so far is less than `v` or `v` is unlimited
- if(s.max_depth >= 0 && (s.max_depth - (i + 1) < v || v < 0) ) { v = s.max_depth - (i + 1); }
- });
- }
- return v;
- },
- check_move : function () {
- if(!this.__call_old()) { return false; }
- var m = this._get_move(),
- s = m.rt._get_settings().types,
- mc = m.rt._check("max_children", m.cr),
- md = m.rt._check("max_depth", m.cr),
- vc = m.rt._check("valid_children", m.cr),
- ch = 0, d = 1, t;
-
- if(vc === "none") { return false; }
- if($.isArray(vc) && m.ot && m.ot._get_type) {
- m.o.each(function () {
- if($.inArray(m.ot._get_type(this), vc) === -1) { d = false; return false; }
- });
- if(d === false) { return false; }
- }
- if(s.max_children !== -2 && mc !== -1) {
- ch = m.cr === -1 ? this.get_container().find("> ul > li").not(m.o).length : m.cr.find("> ul > li").not(m.o).length;
- if(ch + m.o.length > mc) { return false; }
- }
- if(s.max_depth !== -2 && md !== -1) {
- d = 0;
- if(md === 0) { return false; }
- if(typeof m.o.d === "undefined") {
- // TODO: deal with progressive rendering and async when checking max_depth (how to know the depth of the moved node)
- t = m.o;
- while(t.length > 0) {
- t = t.find("> ul > li");
- d ++;
- }
- m.o.d = d;
- }
- if(md - m.o.d < 0) { return false; }
- }
- return true;
- },
- create_node : function (obj, position, js, callback, is_loaded, skip_check) {
- if(!skip_check && (is_loaded || this._is_loaded(obj))) {
- var p = (typeof position == "string" && position.match(/^before|after$/i) && obj !== -1) ? this._get_parent(obj) : this._get_node(obj),
- s = this._get_settings().types,
- mc = this._check("max_children", p),
- md = this._check("max_depth", p),
- vc = this._check("valid_children", p),
- ch;
- if(typeof js === "string") { js = { data : js }; }
- if(!js) { js = {}; }
- if(vc === "none") { return false; }
- if($.isArray(vc)) {
- if(!js.attr || !js.attr[s.type_attr]) {
- if(!js.attr) { js.attr = {}; }
- js.attr[s.type_attr] = vc[0];
- }
- else {
- if($.inArray(js.attr[s.type_attr], vc) === -1) { return false; }
- }
- }
- if(s.max_children !== -2 && mc !== -1) {
- ch = p === -1 ? this.get_container().find("> ul > li").length : p.find("> ul > li").length;
- if(ch + 1 > mc) { return false; }
- }
- if(s.max_depth !== -2 && md !== -1 && (md - 1) < 0) { return false; }
- }
- return this.__call_old(true, obj, position, js, callback, is_loaded, skip_check);
- }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree HTML plugin
- * The HTML data store. Datastores are build by replacing the `load_node` and `_is_loaded` functions.
- */
-(function ($) {
- $.jstree.plugin("html_data", {
- __init : function () {
- // this used to use html() and clean the whitespace, but this way any attached data was lost
- this.data.html_data.original_container_html = this.get_container().find(" > ul > li").clone(true);
- // remove white space from LI node - otherwise nodes appear a bit to the right
- this.data.html_data.original_container_html.find("li").addBack().contents().filter(function() { return this.nodeType == 3; }).remove();
- },
- defaults : {
- data : false,
- ajax : false,
- correct_state : true
- },
- _fn : {
- load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_html(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); },
- _is_loaded : function (obj) {
- obj = this._get_node(obj);
- return obj == -1 || !obj || (!this._get_settings().html_data.ajax && !$.isFunction(this._get_settings().html_data.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0;
- },
- load_node_html : function (obj, s_call, e_call) {
- var d,
- s = this.get_settings().html_data,
- error_func = function () {},
- success_func = function () {};
- obj = this._get_node(obj);
- if(obj && obj !== -1) {
- if(obj.data("jstree_is_loading")) { return; }
- else { obj.data("jstree_is_loading",true); }
- }
- switch(!0) {
- case ($.isFunction(s.data)):
- s.data.call(this, obj, $.proxy(function (d) {
- if(d && d !== "" && d.toString && d.toString().replace(/^[\s\n]+$/,"") !== "") {
- d = $(d);
- if(!d.is("ul")) { d = $("
").append(d); }
- if(obj == -1 || !obj) { this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); }
- else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d).children("ul").find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); obj.removeData("jstree_is_loading"); }
- this.clean_node(obj);
- if(s_call) { s_call.call(this); }
- }
- else {
- if(obj && obj !== -1) {
- obj.children("a.jstree-loading").removeClass("jstree-loading");
- obj.removeData("jstree_is_loading");
- if(s.correct_state) {
- this.correct_state(obj);
- if(s_call) { s_call.call(this); }
- }
- }
- else {
- if(s.correct_state) {
- this.get_container().children("ul").empty();
- if(s_call) { s_call.call(this); }
- }
- }
- }
- }, this));
- break;
- case (!s.data && !s.ajax):
- if(!obj || obj == -1) {
- this.get_container()
- .children("ul").empty()
- .append(this.data.html_data.original_container_html)
- .find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend(" ").end()
- .filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
- this.clean_node();
- }
- if(s_call) { s_call.call(this); }
- break;
- case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
- if(!obj || obj == -1) {
- d = $(s.data);
- if(!d.is("ul")) { d = $("
").append(d); }
- this.get_container()
- .children("ul").empty().append(d.children())
- .find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend(" ").end()
- .filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
- this.clean_node();
- }
- if(s_call) { s_call.call(this); }
- break;
- case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
- obj = this._get_node(obj);
- error_func = function (x, t, e) {
- var ef = this.get_settings().html_data.ajax.error;
- if(ef) { ef.call(this, x, t, e); }
- if(obj != -1 && obj.length) {
- obj.children("a.jstree-loading").removeClass("jstree-loading");
- obj.removeData("jstree_is_loading");
- if(t === "success" && s.correct_state) { this.correct_state(obj); }
- }
- else {
- if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); }
- }
- if(e_call) { e_call.call(this); }
- };
- success_func = function (d, t, x) {
- var sf = this.get_settings().html_data.ajax.success;
- if(sf) { d = sf.call(this,d,t,x) || d; }
- if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "")) {
- return error_func.call(this, x, t, "");
- }
- if(d) {
- d = $(d);
- if(!d.is("ul")) { d = $("
").append(d); }
- if(obj == -1 || !obj) { this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); }
- else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d).children("ul").find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend(" ").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); obj.removeData("jstree_is_loading"); }
- this.clean_node(obj);
- if(s_call) { s_call.call(this); }
- }
- else {
- if(obj && obj !== -1) {
- obj.children("a.jstree-loading").removeClass("jstree-loading");
- obj.removeData("jstree_is_loading");
- if(s.correct_state) {
- this.correct_state(obj);
- if(s_call) { s_call.call(this); }
- }
- }
- else {
- if(s.correct_state) {
- this.get_container().children("ul").empty();
- if(s_call) { s_call.call(this); }
- }
- }
- }
- };
- s.ajax.context = this;
- s.ajax.error = error_func;
- s.ajax.success = success_func;
- if(!s.ajax.dataType) { s.ajax.dataType = "html"; }
- if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
- if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
- $.ajax(s.ajax);
- break;
- }
- }
- }
- });
- // include the HTML data plugin by default
- $.jstree.defaults.plugins.push("html_data");
-})(jQuery);
-//*/
-
-/*
- * jsTree themeroller plugin
- * Adds support for jQuery UI themes. Include this at the end of your plugins list, also make sure "themes" is not included.
- */
-(function ($) {
- $.jstree.plugin("themeroller", {
- __init : function () {
- var s = this._get_settings().themeroller;
- this.get_container()
- .addClass("ui-widget-content")
- .addClass("jstree-themeroller")
- .delegate("a","mouseenter.jstree", function (e) {
- if(!$(e.currentTarget).hasClass("jstree-loading")) {
- $(this).addClass(s.item_h);
- }
- })
- .delegate("a","mouseleave.jstree", function () {
- $(this).removeClass(s.item_h);
- })
- .bind("init.jstree", $.proxy(function (e, data) {
- data.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh");
- this._themeroller(data.inst.get_container().find("> ul > li"));
- }, this))
- .bind("open_node.jstree create_node.jstree", $.proxy(function (e, data) {
- this._themeroller(data.rslt.obj);
- }, this))
- .bind("loaded.jstree refresh.jstree", $.proxy(function (e) {
- this._themeroller();
- }, this))
- .bind("close_node.jstree", $.proxy(function (e, data) {
- this._themeroller(data.rslt.obj);
- }, this))
- .bind("delete_node.jstree", $.proxy(function (e, data) {
- this._themeroller(data.rslt.parent);
- }, this))
- .bind("correct_state.jstree", $.proxy(function (e, data) {
- data.rslt.obj
- .children("ins.jstree-icon").removeClass(s.opened + " " + s.closed + " ui-icon").end()
- .find("> a > ins.ui-icon")
- .filter(function() {
- return this.className.toString()
- .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
- .indexOf("ui-icon-") === -1;
- }).removeClass(s.item_open + " " + s.item_clsd).addClass(s.item_leaf || "jstree-no-icon");
- }, this))
- .bind("select_node.jstree", $.proxy(function (e, data) {
- data.rslt.obj.children("a").addClass(s.item_a);
- }, this))
- .bind("deselect_node.jstree deselect_all.jstree", $.proxy(function (e, data) {
- this.get_container()
- .find("a." + s.item_a).removeClass(s.item_a).end()
- .find("a.jstree-clicked").addClass(s.item_a);
- }, this))
- .bind("dehover_node.jstree", $.proxy(function (e, data) {
- data.rslt.obj.children("a").removeClass(s.item_h);
- }, this))
- .bind("hover_node.jstree", $.proxy(function (e, data) {
- this.get_container()
- .find("a." + s.item_h).not(data.rslt.obj).removeClass(s.item_h);
- data.rslt.obj.children("a").addClass(s.item_h);
- }, this))
- .bind("move_node.jstree", $.proxy(function (e, data) {
- this._themeroller(data.rslt.o);
- this._themeroller(data.rslt.op);
- }, this));
- },
- __destroy : function () {
- var s = this._get_settings().themeroller,
- c = [ "ui-icon" ];
- $.each(s, function (i, v) {
- v = v.split(" ");
- if(v.length) { c = c.concat(v); }
- });
- this.get_container()
- .removeClass("ui-widget-content")
- .find("." + c.join(", .")).removeClass(c.join(" "));
- },
- _fn : {
- _themeroller : function (obj) {
- var s = this._get_settings().themeroller;
- obj = (!obj || obj == -1) ? this.get_container_ul() : this._get_node(obj);
- obj = (!obj || obj == -1) ? this.get_container_ul() : obj.parent();
- obj
- .find("li.jstree-closed")
- .children("ins.jstree-icon").removeClass(s.opened).addClass("ui-icon " + s.closed).end()
- .children("a").addClass(s.item)
- .children("ins.jstree-icon").addClass("ui-icon")
- .filter(function() {
- return this.className.toString()
- .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
- .indexOf("ui-icon-") === -1;
- }).removeClass(s.item_leaf + " " + s.item_open).addClass(s.item_clsd || "jstree-no-icon")
- .end()
- .end()
- .end()
- .end()
- .find("li.jstree-open")
- .children("ins.jstree-icon").removeClass(s.closed).addClass("ui-icon " + s.opened).end()
- .children("a").addClass(s.item)
- .children("ins.jstree-icon").addClass("ui-icon")
- .filter(function() {
- return this.className.toString()
- .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
- .indexOf("ui-icon-") === -1;
- }).removeClass(s.item_leaf + " " + s.item_clsd).addClass(s.item_open || "jstree-no-icon")
- .end()
- .end()
- .end()
- .end()
- .find("li.jstree-leaf")
- .children("ins.jstree-icon").removeClass(s.closed + " ui-icon " + s.opened).end()
- .children("a").addClass(s.item)
- .children("ins.jstree-icon").addClass("ui-icon")
- .filter(function() {
- return this.className.toString()
- .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
- .indexOf("ui-icon-") === -1;
- }).removeClass(s.item_clsd + " " + s.item_open).addClass(s.item_leaf || "jstree-no-icon");
- }
- },
- defaults : {
- "opened" : "ui-icon-triangle-1-se",
- "closed" : "ui-icon-triangle-1-e",
- "item" : "ui-state-default",
- "item_h" : "ui-state-hover",
- "item_a" : "ui-state-active",
- "item_open" : "ui-icon-folder-open",
- "item_clsd" : "ui-icon-folder-collapsed",
- "item_leaf" : "ui-icon-document"
- }
- });
- $(function() {
- var css_string = '' +
- '.jstree-themeroller .ui-icon { overflow:visible; } ' +
- '.jstree-themeroller a { padding:0 2px; } ' +
- '.jstree-themeroller .jstree-no-icon { display:none; }';
- $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree unique plugin
- * Forces different names amongst siblings (still a bit experimental)
- * NOTE: does not check language versions (it will not be possible to have nodes with the same title, even in different languages)
- */
-(function ($) {
- $.jstree.plugin("unique", {
- __init : function () {
- this.get_container()
- .bind("before.jstree", $.proxy(function (e, data) {
- var nms = [], res = true, p, t;
- if(data.func == "move_node") {
- // obj, ref, position, is_copy, is_prepared, skip_check
- if(data.args[4] === true) {
- if(data.args[0].o && data.args[0].o.length) {
- data.args[0].o.children("a").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); });
- res = this._check_unique(nms, data.args[0].np.find("> ul > li").not(data.args[0].o), "move_node");
- }
- }
- }
- if(data.func == "create_node") {
- // obj, position, js, callback, is_loaded
- if(data.args[4] || this._is_loaded(data.args[0])) {
- p = this._get_node(data.args[0]);
- if(data.args[1] && (data.args[1] === "before" || data.args[1] === "after")) {
- p = this._get_parent(data.args[0]);
- if(!p || p === -1) { p = this.get_container(); }
- }
- if(typeof data.args[2] === "string") { nms.push(data.args[2]); }
- else if(!data.args[2] || !data.args[2].data) { nms.push(this._get_string("new_node")); }
- else { nms.push(data.args[2].data); }
- res = this._check_unique(nms, p.find("> ul > li"), "create_node");
- }
- }
- if(data.func == "rename_node") {
- // obj, val
- nms.push(data.args[1]);
- t = this._get_node(data.args[0]);
- p = this._get_parent(t);
- if(!p || p === -1) { p = this.get_container(); }
- res = this._check_unique(nms, p.find("> ul > li").not(t), "rename_node");
- }
- if(!res) {
- e.stopPropagation();
- return false;
- }
- }, this));
- },
- defaults : {
- error_callback : $.noop
- },
- _fn : {
- _check_unique : function (nms, p, func) {
- var cnms = [], ok = true;
- p.children("a").each(function () { cnms.push($(this).text().replace(/^\s+/g,"")); });
- if(!cnms.length || !nms.length) { return true; }
- $.each(nms, function (i, v) {
- if($.inArray(v, cnms) !== -1) {
- ok = false;
- return false;
- }
- });
- if(!ok) {
- this._get_settings().unique.error_callback.call(null, nms, p, func);
- }
- return ok;
- },
- check_move : function () {
- if(!this.__call_old()) { return false; }
- var p = this._get_move(), nms = [];
- if(p.o && p.o.length) {
- p.o.children("a").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); });
- return this._check_unique(nms, p.np.find("> ul > li").not(p.o), "check_move");
- }
- return true;
- }
- }
- });
-})(jQuery);
-//*/
-
-/*
- * jsTree wholerow plugin
- * Makes select and hover work on the entire width of the node
- * MAY BE HEAVY IN LARGE DOM
- */
-(function ($) {
- $.jstree.plugin("wholerow", {
- __init : function () {
- if(!this.data.ui) { throw "jsTree wholerow: jsTree UI plugin not included."; }
- this.data.wholerow.html = false;
- this.data.wholerow.to = false;
- this.get_container()
- .bind("init.jstree", $.proxy(function (e, data) {
- this._get_settings().core.animation = 0;
- }, this))
- .bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree", $.proxy(function (e, data) {
- this._prepare_wholerow_span( data && data.rslt && data.rslt.obj ? data.rslt.obj : -1 );
- }, this))
- .bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree", $.proxy(function (e, data) {
- if(this.data.to) { clearTimeout(this.data.to); }
- this.data.to = setTimeout( (function (t, o) { return function() { t._prepare_wholerow_ul(o); }; })(this, data && data.rslt && data.rslt.obj ? data.rslt.obj : -1), 0);
- }, this))
- .bind("deselect_all.jstree", $.proxy(function (e, data) {
- this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked " + (this.data.themeroller ? this._get_settings().themeroller.item_a : "" ));
- }, this))
- .bind("select_node.jstree deselect_node.jstree ", $.proxy(function (e, data) {
- data.rslt.obj.each(function () {
- var ref = data.inst.get_container().find(" > .jstree-wholerow li:visible:eq(" + ( parseInt((($(this).offset().top - data.inst.get_container().offset().top + data.inst.get_container()[0].scrollTop) / data.inst.data.core.li_height),10)) + ")");
- // ref.children("a")[e.type === "select_node" ? "addClass" : "removeClass"]("jstree-clicked");
- ref.children("a").attr("class",data.rslt.obj.children("a").attr("class"));
- });
- }, this))
- .bind("hover_node.jstree dehover_node.jstree", $.proxy(function (e, data) {
- this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered " + (this.data.themeroller ? this._get_settings().themeroller.item_h : "" ));
- if(e.type === "hover_node") {
- var ref = this.get_container().find(" > .jstree-wholerow li:visible:eq(" + ( parseInt(((data.rslt.obj.offset().top - this.get_container().offset().top + this.get_container()[0].scrollTop) / this.data.core.li_height),10)) + ")");
- // ref.children("a").addClass("jstree-hovered");
- ref.children("a").attr("class",data.rslt.obj.children(".jstree-hovered").attr("class"));
- }
- }, this))
- .delegate(".jstree-wholerow-span, ins.jstree-icon, li", "click.jstree", function (e) {
- var n = $(e.currentTarget);
- if(e.target.tagName === "A" || (e.target.tagName === "INS" && n.closest("li").is(".jstree-open, .jstree-closed"))) { return; }
- n.closest("li").children("a:visible:eq(0)").click();
- e.stopImmediatePropagation();
- })
- .delegate("li", "mouseover.jstree", $.proxy(function (e) {
- e.stopImmediatePropagation();
- if($(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length) { return false; }
- this.hover_node(e.currentTarget);
- return false;
- }, this))
- .delegate("li", "mouseleave.jstree", $.proxy(function (e) {
- if($(e.currentTarget).children("a").hasClass("jstree-hovered").length) { return; }
- this.dehover_node(e.currentTarget);
- }, this));
- if(is_ie7 || is_ie6) {
- $.vakata.css.add_sheet({ str : ".jstree-" + this.get_index() + " { position:relative; } ", title : "jstree" });
- }
- },
- defaults : {
- },
- __destroy : function () {
- this.get_container().children(".jstree-wholerow").remove();
- this.get_container().find(".jstree-wholerow-span").remove();
- },
- _fn : {
- _prepare_wholerow_span : function (obj) {
- obj = !obj || obj == -1 ? this.get_container().find("> ul > li") : this._get_node(obj);
- if(obj === false) { return; } // added for removing root nodes
- obj.each(function () {
- $(this).find("li").addBack().each(function () {
- var $t = $(this);
- if($t.children(".jstree-wholerow-span").length) { return true; }
- $t.prepend(" ");
- });
- });
- },
- _prepare_wholerow_ul : function () {
- var o = this.get_container().children("ul").eq(0), h = o.html();
- o.addClass("jstree-wholerow-real");
- if(this.data.wholerow.last_html !== h) {
- this.data.wholerow.last_html = h;
- this.get_container().children(".jstree-wholerow").remove();
- this.get_container().append(
- o.clone().removeClass("jstree-wholerow-real")
- .wrapAll("").parent()
- .width(o.parent()[0].scrollWidth)
- .css("top", (o.height() + ( is_ie7 ? 5 : 0)) * -1 )
- .find("li[id]").each(function () { this.removeAttribute("id"); }).end()
- );
- }
- }
- }
- });
- $(function() {
- var css_string = '' +
- '.jstree .jstree-wholerow-real { position:relative; z-index:1; } ' +
- '.jstree .jstree-wholerow-real li { cursor:pointer; } ' +
- '.jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } ' +
- '.jstree .jstree-wholerow { position:relative; z-index:0; height:0; } ' +
- '.jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } ' +
- '.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } ' +
- '.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }' +
- '.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }' +
- '.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } ' +
- '.jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }';
- if(is_ff2) {
- css_string += '' +
- '.jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } ' +
- '.jstree .jstree-wholerow-real a { border-color:transparent !important; } ';
- }
- if(is_ie7 || is_ie6) {
- css_string += '' +
- '.jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } ' +
- '.jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } ';
- }
- $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
- });
-})(jQuery);
-//*/
-
-/*
-* jsTree model plugin
-* This plugin gets jstree to use a class model to retrieve data, creating great dynamism
-*/
-(function ($) {
- var nodeInterface = ["getChildren","getChildrenCount","getAttr","getName","getProps"],
- validateInterface = function(obj, inter) {
- var valid = true;
- obj = obj || {};
- inter = [].concat(inter);
- $.each(inter, function (i, v) {
- if(!$.isFunction(obj[v])) { valid = false; return false; }
- });
- return valid;
- };
- $.jstree.plugin("model", {
- __init : function () {
- if(!this.data.json_data) { throw "jsTree model: jsTree json_data plugin not included."; }
- this._get_settings().json_data.data = function (n, b) {
- var obj = (n == -1) ? this._get_settings().model.object : n.data("jstree_model");
- if(!validateInterface(obj, nodeInterface)) { return b.call(null, false); }
- if(this._get_settings().model.async) {
- obj.getChildren($.proxy(function (data) {
- this.model_done(data, b);
- }, this));
- }
- else {
- this.model_done(obj.getChildren(), b);
- }
- };
- },
- defaults : {
- object : false,
- id_prefix : false,
- async : false
- },
- _fn : {
- model_done : function (data, callback) {
- var ret = [],
- s = this._get_settings(),
- _this = this;
-
- if(!$.isArray(data)) { data = [data]; }
- $.each(data, function (i, nd) {
- var r = nd.getProps() || {};
- r.attr = nd.getAttr() || {};
- if(nd.getChildrenCount()) { r.state = "closed"; }
- r.data = nd.getName();
- if(!$.isArray(r.data)) { r.data = [r.data]; }
- if(_this.data.types && $.isFunction(nd.getType)) {
- r.attr[s.types.type_attr] = nd.getType();
- }
- if(r.attr.id && s.model.id_prefix) { r.attr.id = s.model.id_prefix + r.attr.id; }
- if(!r.metadata) { r.metadata = { }; }
- r.metadata.jstree_model = nd;
- ret.push(r);
- });
- callback.call(null, ret);
- }
- }
- });
-})(jQuery);
-//*/
-
-})();
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/themes/ansible/d.gif b/awx/ui/static/lib/jstree/themes/ansible/d.gif
deleted file mode 100644
index 6eb0004ce3..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/ansible/d.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/ansible/d.png b/awx/ui/static/lib/jstree/themes/ansible/d.png
deleted file mode 100644
index 275daeca2d..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/ansible/d.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/ansible/dot_for_ie.gif b/awx/ui/static/lib/jstree/themes/ansible/dot_for_ie.gif
deleted file mode 100644
index c0cc5fda7c..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/ansible/dot_for_ie.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/ansible/style.css b/awx/ui/static/lib/jstree/themes/ansible/style.css
deleted file mode 100644
index 18a9dae786..0000000000
--- a/awx/ui/static/lib/jstree/themes/ansible/style.css
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * jsTree classic theme 1.0
- * Supported features: dots/no-dots, icons/no-icons, focused, loading
- * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
- */
-
-.jstree-ansible li,
-.jstree-ansible ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
-
-.jstree-ansible li {
- overflow: hidden;
- background-position:-90px 0;
- background-repeat:repeat-y;
- }
-
-.jstree-ansible li.jstree-last { background:transparent; }
-.jstree-ansible .jstree-open > ins { background-position:-72px 0; }
-.jstree-ansible .jstree-closed > ins { background-position:-54px 0; }
-.jstree-ansible .jstree-leaf > ins { background-position:-36px 0; }
-
-.jstree-ansible li a { height: 19px; }
-.jstree-ansible .jstree-hovered { background:#d9edf7; border:1px solid #e7f4f9; padding:0 2px 0 1px; }
-.jstree-ansible .jstree-clicked { background:#d9edf7; border:1px solid #3a87ad; padding:0 2px 0 1px; color: #000; }
-/* 3a87ad */
-/* if data-failures=true (set usng has_active_failures on hosts, groups, inventory), link color is red */
-.jstree-ansible li[data-failures="true"] .jstree-clicked { color: #000; }
-.jstree-ansible li[data-failures="false"] .jstree-clicked { color: #000; }
-.jstree-ansible li[data-failures="true"] a { color: #000; }
-.jstree-ansible li[data-failures="false"] a { color: #000; }
-
-.jstree-ansible a .jstree-icon { background-position:-56px -19px; }
-.jstree-ansible .jstree-open > a .jstree-icon { background-position:-56px -36px; }
-.jstree-ansible a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
-
-/*.jstree-ansible.jstree-focused { background:white; }*/
-
-.jstree-ansible .jstree-no-dots li,
-.jstree-ansible .jstree-no-dots .jstree-leaf > ins { background:transparent; }
-.jstree-ansible .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
-.jstree-ansible .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
-
-.jstree-ansible .jstree-no-icons a .jstree-icon { display:none; }
-
-.jstree-ansible .jstree-search { font-style:italic; }
-
-.jstree-ansible .jstree-no-icons .jstree-checkbox { display:inline-block; }
-.jstree-ansible .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
-.jstree-ansible .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
-.jstree-ansible .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
-.jstree-ansible .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
-.jstree-ansible .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
-.jstree-ansible .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
-.jstree-ansible .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
-
-#vakata-dragged.jstree-ansible ins { background:transparent !important; }
-#vakata-dragged.jstree-ansible .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
-#vakata-dragged.jstree-ansible .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
-#jstree-marker.jstree-ansible { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
-
-.jstree-ansible a.jstree-search { color:aqua; }
-.jstree-ansible .jstree-locked a { color:silver; cursor:default; }
-
-#vakata-contextmenu.jstree-ansible-context,
-#vakata-contextmenu.jstree-ansible-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
-#vakata-contextmenu.jstree-ansible-context li { }
-#vakata-contextmenu.jstree-ansible-context a { color:black; }
-#vakata-contextmenu.jstree-ansible-context a:hover,
-#vakata-contextmenu.jstree-ansible-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
-#vakata-contextmenu.jstree-ansible-context li.jstree-contextmenu-disabled a,
-#vakata-contextmenu.jstree-ansible-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
-#vakata-contextmenu.jstree-ansible-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
-#vakata-contextmenu.jstree-ansible-context li ul { margin-left:-4px; }
-
-/* IE6 BEGIN */
-.jstree-ansible li,
-.jstree-ansible ins,
-#vakata-dragged.jstree-ansible .jstree-invalid,
-#vakata-dragged.jstree-ansible .jstree-ok,
-#jstree-marker.jstree-ansible { _background-image:url("d.gif"); }
-.jstree-ansible .jstree-open ins { _background-position:-72px 0; }
-.jstree-ansible .jstree-closed ins { _background-position:-54px 0; }
-.jstree-ansible .jstree-leaf ins { _background-position:-36px 0; }
-.jstree-ansible .jstree-open a ins.jstree-icon { _background-position:-56px -36px; }
-.jstree-ansible .jstree-closed a ins.jstree-icon { _background-position:-56px -19px; }
-.jstree-ansible .jstree-leaf a ins.jstree-icon { _background-position:-56px -19px; }
-#vakata-contextmenu.jstree-ansible-context ins { _display:none; }
-#vakata-contextmenu.jstree-ansible-context li { _zoom:1; }
-.jstree-ansible .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
-.jstree-ansible .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
-.jstree-ansible .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
-/* IE6 END */
-
-
diff --git a/awx/ui/static/lib/jstree/themes/ansible/throbber.gif b/awx/ui/static/lib/jstree/themes/ansible/throbber.gif
deleted file mode 100644
index 5b33f7e54f..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/ansible/throbber.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/apple/bg.jpg b/awx/ui/static/lib/jstree/themes/apple/bg.jpg
deleted file mode 100644
index 3aad05d8fa..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/apple/bg.jpg and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/apple/d.png b/awx/ui/static/lib/jstree/themes/apple/d.png
deleted file mode 100644
index 2463ba6df9..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/apple/d.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/apple/dot_for_ie.gif b/awx/ui/static/lib/jstree/themes/apple/dot_for_ie.gif
deleted file mode 100644
index c0cc5fda7c..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/apple/dot_for_ie.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/apple/style.css b/awx/ui/static/lib/jstree/themes/apple/style.css
deleted file mode 100644
index d0c4163cef..0000000000
--- a/awx/ui/static/lib/jstree/themes/apple/style.css
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * jsTree apple theme 1.0
- * Supported features: dots/no-dots, icons/no-icons, focused, loading
- * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
- */
-
-.jstree-apple > ul { background:url("bg.jpg") left top repeat; }
-.jstree-apple li,
-.jstree-apple ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
-.jstree-apple li { background-position:-90px 0; background-repeat:repeat-y; }
-.jstree-apple li.jstree-last { background:transparent; }
-.jstree-apple .jstree-open > ins { background-position:-72px 0; }
-.jstree-apple .jstree-closed > ins { background-position:-54px 0; }
-.jstree-apple .jstree-leaf > ins { background-position:-36px 0; }
-
-.jstree-apple a { border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; text-shadow:1px 1px 1px white; }
-.jstree-apple .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 3px 0 1px; text-shadow:1px 1px 1px silver; }
-.jstree-apple .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 3px 0 1px; }
-.jstree-apple a .jstree-icon { background-position:-56px -20px; }
-.jstree-apple a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
-
-.jstree-apple.jstree-focused { background:white; }
-
-.jstree-apple .jstree-no-dots li,
-.jstree-apple .jstree-no-dots .jstree-leaf > ins { background:transparent; }
-.jstree-apple .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
-.jstree-apple .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
-
-.jstree-apple .jstree-no-icons a .jstree-icon { display:none; }
-
-.jstree-apple .jstree-search { font-style:italic; }
-
-.jstree-apple .jstree-no-icons .jstree-checkbox { display:inline-block; }
-.jstree-apple .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
-.jstree-apple .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
-.jstree-apple .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
-.jstree-apple .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
-.jstree-apple .jstree-checked > a > .checkbox:hover { background-position:-38px -37px; }
-.jstree-apple .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
-.jstree-apple .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
-
-#vakata-dragged.jstree-apple ins { background:transparent !important; }
-#vakata-dragged.jstree-apple .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
-#vakata-dragged.jstree-apple .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
-#jstree-marker.jstree-apple { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
-
-.jstree-apple a.jstree-search { color:aqua; }
-.jstree-apple .jstree-locked a { color:silver; cursor:default; }
-
-#vakata-contextmenu.jstree-apple-context,
-#vakata-contextmenu.jstree-apple-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
-#vakata-contextmenu.jstree-apple-context li { }
-#vakata-contextmenu.jstree-apple-context a { color:black; }
-#vakata-contextmenu.jstree-apple-context a:hover,
-#vakata-contextmenu.jstree-apple-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
-#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a,
-#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
-#vakata-contextmenu.jstree-apple-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
-#vakata-contextmenu.jstree-apple-context li ul { margin-left:-4px; }
-
-/* TODO: IE6 support - the `>` selectors */
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/themes/apple/throbber.gif b/awx/ui/static/lib/jstree/themes/apple/throbber.gif
deleted file mode 100644
index 5b33f7e54f..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/apple/throbber.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/classic/d.gif b/awx/ui/static/lib/jstree/themes/classic/d.gif
deleted file mode 100644
index 6eb0004ce3..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/classic/d.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/classic/d.png b/awx/ui/static/lib/jstree/themes/classic/d.png
deleted file mode 100644
index 275daeca2d..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/classic/d.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/classic/dot_for_ie.gif b/awx/ui/static/lib/jstree/themes/classic/dot_for_ie.gif
deleted file mode 100644
index c0cc5fda7c..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/classic/dot_for_ie.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/classic/style.css b/awx/ui/static/lib/jstree/themes/classic/style.css
deleted file mode 100644
index 0351b4cef5..0000000000
--- a/awx/ui/static/lib/jstree/themes/classic/style.css
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * jsTree classic theme 1.0
- * Supported features: dots/no-dots, icons/no-icons, focused, loading
- * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
- */
-
-.jstree-classic li,
-.jstree-classic ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
-.jstree-classic li { background-position:-90px 0; background-repeat:repeat-y; }
-.jstree-classic li.jstree-last { background:transparent; }
-.jstree-classic .jstree-open > ins { background-position:-72px 0; }
-.jstree-classic .jstree-closed > ins { background-position:-54px 0; }
-.jstree-classic .jstree-leaf > ins { background-position:-36px 0; }
-
-.jstree-classic .jstree-hovered { background:#e7f4f9; border:1px solid #e7f4f9; padding:0 2px 0 1px; }
-.jstree-classic .jstree-clicked { background:navy; border:1px solid navy; padding:0 2px 0 1px; color:white; }
-.jstree-classic a .jstree-icon { background-position:-56px -19px; }
-.jstree-classic .jstree-open > a .jstree-icon { background-position:-56px -36px; }
-.jstree-classic a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
-
-.jstree-classic.jstree-focused { background:white; }
-
-.jstree-classic .jstree-no-dots li,
-.jstree-classic .jstree-no-dots .jstree-leaf > ins { background:transparent; }
-.jstree-classic .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
-.jstree-classic .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
-
-.jstree-classic .jstree-no-icons a .jstree-icon { display:none; }
-
-.jstree-classic .jstree-search { font-style:italic; }
-
-.jstree-classic .jstree-no-icons .jstree-checkbox { display:inline-block; }
-.jstree-classic .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
-.jstree-classic .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
-.jstree-classic .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
-.jstree-classic .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
-.jstree-classic .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
-.jstree-classic .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
-.jstree-classic .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
-
-#vakata-dragged.jstree-classic ins { background:transparent !important; }
-#vakata-dragged.jstree-classic .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
-#vakata-dragged.jstree-classic .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
-#jstree-marker.jstree-classic { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
-
-.jstree-classic a.jstree-search { color:aqua; }
-.jstree-classic .jstree-locked a { color:silver; cursor:default; }
-
-#vakata-contextmenu.jstree-classic-context,
-#vakata-contextmenu.jstree-classic-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
-#vakata-contextmenu.jstree-classic-context li { }
-#vakata-contextmenu.jstree-classic-context a { color:black; }
-#vakata-contextmenu.jstree-classic-context a:hover,
-#vakata-contextmenu.jstree-classic-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
-#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a,
-#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
-#vakata-contextmenu.jstree-classic-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
-#vakata-contextmenu.jstree-classic-context li ul { margin-left:-4px; }
-
-/* IE6 BEGIN */
-.jstree-classic li,
-.jstree-classic ins,
-#vakata-dragged.jstree-classic .jstree-invalid,
-#vakata-dragged.jstree-classic .jstree-ok,
-#jstree-marker.jstree-classic { _background-image:url("d.gif"); }
-.jstree-classic .jstree-open ins { _background-position:-72px 0; }
-.jstree-classic .jstree-closed ins { _background-position:-54px 0; }
-.jstree-classic .jstree-leaf ins { _background-position:-36px 0; }
-.jstree-classic .jstree-open a ins.jstree-icon { _background-position:-56px -36px; }
-.jstree-classic .jstree-closed a ins.jstree-icon { _background-position:-56px -19px; }
-.jstree-classic .jstree-leaf a ins.jstree-icon { _background-position:-56px -19px; }
-#vakata-contextmenu.jstree-classic-context ins { _display:none; }
-#vakata-contextmenu.jstree-classic-context li { _zoom:1; }
-.jstree-classic .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
-.jstree-classic .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
-.jstree-classic .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
-/* IE6 END */
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/themes/classic/throbber.gif b/awx/ui/static/lib/jstree/themes/classic/throbber.gif
deleted file mode 100644
index 5b33f7e54f..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/classic/throbber.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/default-rtl/d.gif b/awx/ui/static/lib/jstree/themes/default-rtl/d.gif
deleted file mode 100644
index d85aba049b..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/default-rtl/d.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/default-rtl/d.png b/awx/ui/static/lib/jstree/themes/default-rtl/d.png
deleted file mode 100644
index 5179cf64e4..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/default-rtl/d.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/default-rtl/dots.gif b/awx/ui/static/lib/jstree/themes/default-rtl/dots.gif
deleted file mode 100644
index 00433648c0..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/default-rtl/dots.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/default-rtl/style.css b/awx/ui/static/lib/jstree/themes/default-rtl/style.css
deleted file mode 100644
index 1343cf343e..0000000000
--- a/awx/ui/static/lib/jstree/themes/default-rtl/style.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * jsTree default-rtl theme 1.0
- * Supported features: dots/no-dots, icons/no-icons, focused, loading
- * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
- */
-
-.jstree-default-rtl li,
-.jstree-default-rtl ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
-.jstree-default-rtl li { background-position:-90px 0; background-repeat:repeat-y; }
-.jstree-default-rtl li.jstree-last { background:transparent; }
-.jstree-default-rtl .jstree-open > ins { background-position:-72px 0; }
-.jstree-default-rtl .jstree-closed > ins { background-position:-54px 0; }
-.jstree-default-rtl .jstree-leaf > ins { background-position:-36px 0; }
-
-.jstree-default-rtl .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
-.jstree-default-rtl .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
-.jstree-default-rtl a .jstree-icon { background-position:-56px -19px; }
-.jstree-default-rtl a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
-
-.jstree-default-rtl.jstree-focused { background:#ffffee; }
-
-.jstree-default-rtl .jstree-no-dots li,
-.jstree-default-rtl .jstree-no-dots .jstree-leaf > ins { background:transparent; }
-.jstree-default-rtl .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
-.jstree-default-rtl .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
-
-.jstree-default-rtl .jstree-no-icons a .jstree-icon { display:none; }
-
-.jstree-default-rtl .jstree-search { font-style:italic; }
-
-.jstree-default-rtl .jstree-no-icons .jstree-checkbox { display:inline-block; }
-.jstree-default-rtl .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
-.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
-.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
-.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
-.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
-.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
-.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
-
-#vakata-dragged.jstree-default-rtl ins { background:transparent !important; }
-#vakata-dragged.jstree-default-rtl .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
-#vakata-dragged.jstree-default-rtl .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
-#jstree-marker.jstree-default-rtl { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
-
-.jstree-default-rtl a.jstree-search { color:aqua; }
-.jstree-default-rtl .jstree-locked a { color:silver; cursor:default; }
-
-#vakata-contextmenu.jstree-default-rtl-context,
-#vakata-contextmenu.jstree-default-rtl-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
-#vakata-contextmenu.jstree-default-rtl-context li { }
-#vakata-contextmenu.jstree-default-rtl-context a { color:black; }
-#vakata-contextmenu.jstree-default-rtl-context a:hover,
-#vakata-contextmenu.jstree-default-rtl-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
-#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a,
-#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
-#vakata-contextmenu.jstree-default-rtl-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
-#vakata-contextmenu.jstree-default-rtl-context li ul { margin-left:-4px; }
-
-/* IE6 BEGIN */
-.jstree-default-rtl li,
-.jstree-default-rtl ins,
-#vakata-dragged.jstree-default-rtl .jstree-invalid,
-#vakata-dragged.jstree-default-rtl .jstree-ok,
-#jstree-marker.jstree-default-rtl { _background-image:url("d.gif"); }
-.jstree-default-rtl .jstree-open ins { _background-position:-72px 0; }
-.jstree-default-rtl .jstree-closed ins { _background-position:-54px 0; }
-.jstree-default-rtl .jstree-leaf ins { _background-position:-36px 0; }
-.jstree-default-rtl a ins.jstree-icon { _background-position:-56px -19px; }
-#vakata-contextmenu.jstree-default-rtl-context ins { _display:none; }
-#vakata-contextmenu.jstree-default-rtl-context li { _zoom:1; }
-.jstree-default-rtl .jstree-undetermined a .jstree-checkbox { _background-position:-18px -19px; }
-.jstree-default-rtl .jstree-checked a .jstree-checkbox { _background-position:-36px -19px; }
-.jstree-default-rtl .jstree-unchecked a .jstree-checkbox { _background-position:0px -19px; }
-/* IE6 END */
-
-/* RTL part */
-.jstree-default-rtl .jstree-hovered, .jstree-default-rtl .jstree-clicked { padding:0 1px 0 2px; }
-.jstree-default-rtl li { background-image:url("dots.gif"); background-position: 100% 0px; }
-.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-36px -19px; margin-left:2px; }
-.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:0px -19px; margin-left:2px; }
-.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-18px -19px; margin-left:2px; }
-.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-36px -37px; }
-.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:0px -37px; }
-.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-18px -37px; }
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/themes/default-rtl/throbber.gif b/awx/ui/static/lib/jstree/themes/default-rtl/throbber.gif
deleted file mode 100644
index 5b33f7e54f..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/default-rtl/throbber.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/default/d.gif b/awx/ui/static/lib/jstree/themes/default/d.gif
deleted file mode 100644
index 0e958d3871..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/default/d.gif and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/default/d.png b/awx/ui/static/lib/jstree/themes/default/d.png
deleted file mode 100644
index 8540175a04..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/default/d.png and /dev/null differ
diff --git a/awx/ui/static/lib/jstree/themes/default/style.css b/awx/ui/static/lib/jstree/themes/default/style.css
deleted file mode 100644
index 7ef6a04308..0000000000
--- a/awx/ui/static/lib/jstree/themes/default/style.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * jsTree default theme 1.0
- * Supported features: dots/no-dots, icons/no-icons, focused, loading
- * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
- */
-
-.jstree-default li,
-.jstree-default ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
-.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; }
-.jstree-default li.jstree-last { background:transparent; }
-.jstree-default .jstree-open > ins { background-position:-72px 0; }
-.jstree-default .jstree-closed > ins { background-position:-54px 0; }
-.jstree-default .jstree-leaf > ins { background-position:-36px 0; }
-
-.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
-.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
-.jstree-default a .jstree-icon { background-position:-56px -19px; }
-.jstree-default a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
-
-.jstree-default.jstree-focused { background:#ffffee; }
-
-.jstree-default .jstree-no-dots li,
-.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; }
-.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
-.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
-
-.jstree-default .jstree-no-icons a .jstree-icon { display:none; }
-
-.jstree-default .jstree-search { font-style:italic; }
-
-.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; }
-.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
-.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
-.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
-.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
-.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
-.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
-.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
-
-#vakata-dragged.jstree-default ins { background:transparent !important; }
-#vakata-dragged.jstree-default .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
-#vakata-dragged.jstree-default .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
-#jstree-marker.jstree-default { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
-
-.jstree-default a.jstree-search { color:aqua; }
-.jstree-default .jstree-locked a { color:silver; cursor:default; }
-
-#vakata-contextmenu.jstree-default-context,
-#vakata-contextmenu.jstree-default-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
-#vakata-contextmenu.jstree-default-context li { }
-#vakata-contextmenu.jstree-default-context a { color:black; }
-#vakata-contextmenu.jstree-default-context a:hover,
-#vakata-contextmenu.jstree-default-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
-#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a,
-#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
-#vakata-contextmenu.jstree-default-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
-#vakata-contextmenu.jstree-default-context li ul { margin-left:-4px; }
-
-/* IE6 BEGIN */
-.jstree-default li,
-.jstree-default ins,
-#vakata-dragged.jstree-default .jstree-invalid,
-#vakata-dragged.jstree-default .jstree-ok,
-#jstree-marker.jstree-default { _background-image:url("d.gif"); }
-.jstree-default .jstree-open ins { _background-position:-72px 0; }
-.jstree-default .jstree-closed ins { _background-position:-54px 0; }
-.jstree-default .jstree-leaf ins { _background-position:-36px 0; }
-.jstree-default a ins.jstree-icon { _background-position:-56px -19px; }
-#vakata-contextmenu.jstree-default-context ins { _display:none; }
-#vakata-contextmenu.jstree-default-context li { _zoom:1; }
-.jstree-default .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
-.jstree-default .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
-.jstree-default .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
-/* IE6 END */
\ No newline at end of file
diff --git a/awx/ui/static/lib/jstree/themes/default/throbber.gif b/awx/ui/static/lib/jstree/themes/default/throbber.gif
deleted file mode 100644
index 5b33f7e54f..0000000000
Binary files a/awx/ui/static/lib/jstree/themes/default/throbber.gif and /dev/null differ
diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html
index c831ee5c66..6ed1c18dd0 100644
--- a/awx/ui/templates/ui/index.html
+++ b/awx/ui/templates/ui/index.html
@@ -372,7 +372,6 @@
-