Skip to content

Commit

Permalink
ENH Remove code that had been retained for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jan 9, 2025
1 parent 8e1007c commit dd1367b
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 52 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/js/vendor.js

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions client/src/components/Breadcrumb/Breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@ Breadcrumb.propTypes = {
crumbs: PropTypes.arrayOf(PropTypes.shape({
onClick: PropTypes.func,
text: PropTypes.string,
// pass in a single icon (retain backwards compatibility)
icon: PropTypes.shape({
nodeName: PropTypes.string,
className: PropTypes.string,
onClick: PropTypes.func,
action: (props) => { if (props.action) { throw new Error('action: no longer used'); } },
}),
// pass in an array multiple icons (use this going forward)
icons: PropTypes.arrayOf(PropTypes.shape({
nodeName: PropTypes.string,
className: PropTypes.string,
Expand Down
9 changes: 0 additions & 9 deletions client/src/legacy/LeftAndMain.EditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,15 +607,6 @@ $.entwine('ss', function($){
this.hideMembersList(instant);
}
},
// these two functions retained for backwards compatibility
showList: function(instant) {
this.showGroupsList(instant);
this.showMembersList(instant);
},
hideList: function(instant) {
this.hideGroupsList(instant);
this.hideMembersList(instant);
},
showGroupsList: function (instant) {
const holder = this.closest('.field');
this.showListElement(holder, holder.parent().find('.form-group, .field').filter((_, candidate) => this.checkIfHoldsField(candidate, 'Groups')), instant);
Expand Down
8 changes: 0 additions & 8 deletions code/Forms/UsedOnTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,7 @@ public function usage(HTTPRequest $request)
// Exclude classes from being queried and showing in the results via an extension hook
$excludedClasses = [];
$this->extend('updateUsageExcludedClasses', $excludedClasses);

$usage = $record->findAllRelatedData($excludedClasses);

// Legacy extension hook kept for backwards compatibility
// Use 'updateUsageExcludedClasses' extension hook instead which prevents database from being queried
//
// Example: protected function updateUsage(ArrayList &$usage, DataObject &$record)
// $dataObjects = $usage->exclude('ClassName', MyDataObject::class);
$this->extend('updateUsage', $usage, $record);
}

$usageData = [];
Expand Down
25 changes: 0 additions & 25 deletions thirdparty/jquery-entwine/jquery.entwine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2295,28 +2295,3 @@ Sizzle is good for finding elements for a selector, but not so good for telling
});

})(jQuery);


/* src/jquery.entwine.legacy.js */

(function($) {

// Adds back concrete methods for backwards compatibility
$.concrete = $.entwine;
$.fn.concrete = $.fn.entwine;
$.fn.concreteData = $.fn.entwineData;

// Use addHandler to hack in the namespace.$.concrete equivilent to the namespace.$.entwine namespace-injection
$.entwine.Namespace.addHandler({
order: 100,
on: function(selector, k, v) { return false; },

namespaceMethodOverrides: function(namespace){
namespace.$.concrete = namespace.$.entwine;
namespace.injectee.concrete = namespace.injectee.entwine;
namespace.injectee.concreteData = namespace.injectee.entwineData;
return {};
}
});

})(jQuery);

0 comments on commit dd1367b

Please sign in to comment.