Skip to content

Commit

Permalink
Remove jquery_ui due to size & limited use
Browse files Browse the repository at this point in the history
Fixes: #21881
  • Loading branch information
syncguru authored and vboctor committed Jan 3, 2017
1 parent ac51f2a commit 14e3d50
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 51 deletions.
4 changes: 1 addition & 3 deletions core/constant_inc.php
Expand Up @@ -605,12 +605,10 @@
define( 'FTP', 1 ); # DISK
define( 'ERROR_FTP_CONNECT_ERROR', 16 ); # N/A

# JQuery and JQuery UI
# JQuery
# hashes acquired with command 'cat file.js | openssl dgst -sha256 -binary | openssl enc -base64 -A'
define( 'JQUERY_VERSION', '2.2.4' );
define( 'JQUERY_HASH', 'sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=' );
define( 'JQUERY_UI_VERSION', '1.11.4' );
define( 'JQUERY_UI_HASH', 'sha256-xNjb53/rY+WmG+4L6tTl9m6PpqknWZvRt0rO1SRnJzw=' );

# Bootstrap & FontAwesome
define( 'BOOTSTRAP_VERSION', '3.3.6' );
Expand Down
9 changes: 0 additions & 9 deletions core/html_api.php
Expand Up @@ -207,13 +207,6 @@ function require_css( $p_stylesheet_path ) {
function html_css() {
global $g_stylesheets_included;
html_css_link( config_get( 'css_include_file' ) );

if ( config_get_global( 'cdn_enabled' ) == ON ) {
html_css_cdn_link( 'https://ajax.googleapis.com/ajax/libs/jqueryui/' . JQUERY_UI_VERSION . '/themes/smoothness/jquery-ui.min.css' );
} else {
html_css_link( 'jquery-ui-' . JQUERY_UI_VERSION . '.min.css' );
}

html_css_link( 'common_config.php' );
# Add right-to-left css if needed
if( lang_get( 'directionality' ) == 'rtl' ) {
Expand Down Expand Up @@ -303,10 +296,8 @@ function html_head_javascript() {

if ( config_get_global( 'cdn_enabled' ) == ON ) {
html_javascript_cdn_link( 'https://ajax.googleapis.com/ajax/libs/jquery/' . JQUERY_VERSION . '/jquery.min.js', JQUERY_HASH );
html_javascript_cdn_link( 'https://ajax.googleapis.com/ajax/libs/jqueryui/' . JQUERY_UI_VERSION . '/jquery-ui.min.js', JQUERY_UI_HASH );
} else {
html_javascript_link( 'jquery-' . JQUERY_VERSION . '.min.js' );
html_javascript_link( 'jquery-ui-' . JQUERY_UI_VERSION . '.min.js' );
}

html_javascript_link( 'dropzone.min.js');
Expand Down
7 changes: 0 additions & 7 deletions css/jquery-ui-1.11.4.min.css

This file was deleted.

19 changes: 0 additions & 19 deletions js/common.js
Expand Up @@ -89,25 +89,6 @@ $(document).ready( function() {
SetCookie("collapse_settings", t_cookie);
});

$('input[type=text].autocomplete').autocomplete({
source: function(request, callback) {
var fieldName = $(this).attr('element').attr('id');
var postData = {};
postData['entrypoint']= fieldName + '_get_with_prefix';
postData[fieldName] = request.term;
$.getJSON('xmlhttprequest.php', postData, function(data) {
var results = [];
$.each(data, function(i, value) {
var item = {};
item.label = $('<div/>').text(value).html();
item.value = value;
results.push(item);
});
callback(results);
});
}
});

$('a.dynamic-filter-expander').click(function(event) {
event.preventDefault();
var fieldID = $(this).attr('id');
Expand Down
13 changes: 0 additions & 13 deletions js/jquery-ui-1.11.4.min.js

This file was deleted.

0 comments on commit 14e3d50

Please sign in to comment.