Skip to content

Commit

Permalink
Merge pull request #101 from bu-ist/hotfix/update-jstree
Browse files Browse the repository at this point in the history
Hotfix/update jstree
  • Loading branch information
DannyCrews committed Aug 31, 2021
2 parents bbee7d8 + 9a6423b commit ab1abc9
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 5,736 deletions.
4 changes: 2 additions & 2 deletions bu-navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: Boston University (IS&T)
* Author URI: http://sites.bu.edu/web/
* Description: Provides alternative navigation elements designed for blogs with large page counts
* Version: 1.3.2
* Version: 1.3.3
* Text Domain: bu-navigation
* Domain Path: /languages
* License: GPL2+
Expand Down Expand Up @@ -91,7 +91,7 @@ class BU_Navigation_Plugin {
*
* @var string
*/
const VERSION = '1.3.2';
const VERSION = '1.3.3';

/**
* Plugin class constructor.
Expand Down
10 changes: 5 additions & 5 deletions includes/class-tree-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BU_Navigation_Tree_View {
private $plugin;

private $query;

public $hierarchy;

/**
Expand Down Expand Up @@ -84,7 +84,7 @@ public function register_scripts() {

// Vendor scripts
wp_register_script( 'bu-jquery-cookie', $vendor_url . '/jquery.cookie' . $suffix . '.js', array( 'jquery' ), '00168770', true );
wp_register_script( 'bu-jquery-tree', $vendor_url . '/jstree/jquery.jstree' . $suffix . '.js', array( 'jquery', 'bu-jquery-cookie' ), '1.0-rc3', true );
wp_register_script( 'bu-jquery-tree', $vendor_url . '/jstree/jquery.jstree' . $suffix . '.js', array( 'jquery', 'bu-jquery-cookie' ), '1.0-rc4', true );

// Main navigation scripts & styles
wp_register_script( 'bu-navigation', $scripts_url . '/bu-navigation' . $suffix . '.js', array( 'jquery', 'bu-jquery-tree', 'bu-jquery-cookie', 'json2' ), BU_Navigation_Plugin::VERSION, true );
Expand Down Expand Up @@ -320,7 +320,7 @@ public function add_node_prefix( $id ) {
}

/**
* Collection of methods that allow the page hierarchy be represented as
* Collection of methods that allow the page hierarchy be represented as
* a hash value. By comparing two hash values, we can tell if there were
* any changes in the hierarchy.
*/
Expand All @@ -341,7 +341,7 @@ class BU_Navigation_Tree_Hierarchy {
* By taking the posts structure and leaving only hierarchy-related
* preperties of it, we get the object that stays the same as long as
* the post hierarchy stays the same.
*
*
* @return array Object that represents post tree hierarchy
*/
private function as_object() {
Expand Down Expand Up @@ -369,7 +369,7 @@ public function __construct( BU_Navigation_Tree_Query $tree_query ) {
/**
* Gets hashed representation of the BU_Navigation_Tree_Query instance
* passed into the constructor of this class.
*
*
* @return String hashed representation of the post hierarchy
*/
public function as_hash() {
Expand Down
12 changes: 0 additions & 12 deletions js/bu-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,6 @@ bu.plugins.navigation = {};
'deselectOnDocumentClick': true
};

// DOM ready -- browser classes
$(document).ready(function () {
if($.browser && $.browser.msie){
if( $.browser.msie === true && parseInt($.browser.version, 10) === 7 )
$(document.body).addClass('ie7');
if( $.browser.msie === true && parseInt($.browser.version, 10) === 8 )
$(document.body).addClass('ie8');
if( $.browser.msie === true && parseInt($.browser.version, 10) === 9 )
$(document.body).addClass('ie9');
}
});

// Tree constructor
Nav.tree = function( type, config ) {
if (typeof type === 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion js/bu-navigation.min.js

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions js/vendor/jstree/jquery.jstree.js
Original file line number Diff line number Diff line change
Expand Up @@ -2539,9 +2539,9 @@
}
}, this));
}

$.vakata.dnd.drag_container = s.drag_container;

},
defaults : {
copy_modifier : "ctrl",
Expand Down Expand Up @@ -4913,12 +4913,6 @@
tree = t.get_container(),
sections, remaining;

// Lazy loading causes huge performance issues in IE < 8
if ($.browser.msie === true && parseInt($.browser.version, 10) < 8) {
s.lazy_load = false;
return;
}

if (!tree.data('lazy-loaded')) {
tree.data('lazy-loading', true );
sections = tree.find('ul > .jstree-closed');
Expand Down
227 changes: 1 addition & 226 deletions js/vendor/jstree/jquery.jstree.min.js

Large diffs are not rendered by default.

0 comments on commit ab1abc9

Please sign in to comment.