From 539d817bf93805ab0144989149d9780a9e73e69e Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Tue, 27 Aug 2019 15:41:59 +0300 Subject: [PATCH] Removed todos from library javascript --- .../vendor/bootstrap/js/bootstrap.bundle.js | 3 - .../plan/web/vendor/bootstrap/js/bootstrap.js | 3 - .../vendor/datatables/jquery.dataTables.js | 65 +------------------ .../assets/plan/web/vendor/jquery/jquery.js | 6 +- .../plan/web/vendor/jquery/jquery.slim.js | 5 +- 5 files changed, 4 insertions(+), 78 deletions(-) diff --git a/Plan/common/src/main/resources/assets/plan/web/vendor/bootstrap/js/bootstrap.bundle.js b/Plan/common/src/main/resources/assets/plan/web/vendor/bootstrap/js/bootstrap.bundle.js index beb888880..897e31130 100644 --- a/Plan/common/src/main/resources/assets/plan/web/vendor/bootstrap/js/bootstrap.bundle.js +++ b/Plan/common/src/main/resources/assets/plan/web/vendor/bootstrap/js/bootstrap.bundle.js @@ -175,7 +175,6 @@ triggerTransitionEnd: function triggerTransitionEnd(element) { $(element).trigger(TRANSITION_END); }, - // TODO: Remove in v5 supportsTransitionEnd: function supportsTransitionEnd() { return Boolean(TRANSITION_END); }, @@ -4986,7 +4985,6 @@ } }; // ---------------------------------------------------------------------- // the following methods are used to handle overflowing modals - // todo (fat): these should probably be refactored out of modal.js // ---------------------------------------------------------------------- @@ -6130,7 +6128,6 @@ var targetBCR = target.getBoundingClientRect(); if (targetBCR.width || targetBCR.height) { - // TODO (fat): remove sketch reliance on jQuery position/offset return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; } } diff --git a/Plan/common/src/main/resources/assets/plan/web/vendor/bootstrap/js/bootstrap.js b/Plan/common/src/main/resources/assets/plan/web/vendor/bootstrap/js/bootstrap.js index da7c350f1..7961becc1 100644 --- a/Plan/common/src/main/resources/assets/plan/web/vendor/bootstrap/js/bootstrap.js +++ b/Plan/common/src/main/resources/assets/plan/web/vendor/bootstrap/js/bootstrap.js @@ -176,7 +176,6 @@ triggerTransitionEnd: function triggerTransitionEnd(element) { $(element).trigger(TRANSITION_END); }, - // TODO: Remove in v5 supportsTransitionEnd: function supportsTransitionEnd() { return Boolean(TRANSITION_END); }, @@ -2417,7 +2416,6 @@ } }; // ---------------------------------------------------------------------- // the following methods are used to handle overflowing modals - // todo (fat): these should probably be refactored out of modal.js // ---------------------------------------------------------------------- @@ -3561,7 +3559,6 @@ var targetBCR = target.getBoundingClientRect(); if (targetBCR.width || targetBCR.height) { - // TODO (fat): remove sketch reliance on jQuery position/offset return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; } } diff --git a/Plan/common/src/main/resources/assets/plan/web/vendor/datatables/jquery.dataTables.js b/Plan/common/src/main/resources/assets/plan/web/vendor/datatables/jquery.dataTables.js index d532b6987..e4fa858c1 100644 --- a/Plan/common/src/main/resources/assets/plan/web/vendor/datatables/jquery.dataTables.js +++ b/Plan/common/src/main/resources/assets/plan/web/vendor/datatables/jquery.dataTables.js @@ -1138,11 +1138,6 @@ var features = oSettings.oFeatures; var loadedInit = function () { - /* - * Sorting - * @todo For modularisation (1.11) this needs to do into a sort start up handler - */ - // If aaSorting is not defined, then we use the first indicator in asSorting // in case that has been altered, so the default sort reflects that option if (oInit.aaSorting === undefined) { @@ -2707,10 +2702,6 @@ * @param {int} [colIdx] Column index to invalidate. If undefined the whole * row will be invalidated * @memberof DataTable#oApi - * - * @todo For the modularisation of v1.11 this will need to become a callback, so - * the sort and filter methods can subscribe to it. That will required - * initialisation options for sorting, which is why it is not already baked in */ function _fnInvalidate(settings, rowIdx, src, colIdx) { var row = settings.aoData[rowIdx]; @@ -3372,7 +3363,6 @@ j++; } - /* Replace jQuery UI constants @todo depreciated */ if (sAttr == "H") { sAttr = classes.sJUIHeader; } else if (sAttr == "F") { @@ -3401,7 +3391,6 @@ /* End container div */ insert = insert.parent(); } - // @todo Move options into their own plugins? else if (cOption == 'l' && features.bPaginate && features.bLengthChange) { /* Length */ featureNode = _fnFeatureHtmlLength(oSettings); @@ -3992,7 +3981,6 @@ }; // Resolve any column types that are unknown due to addition or invalidation - // @todo As per sort - can this be moved into an event handler? _fnColumnTypes(oSettings); /* In server-side processing all filtering is done by the server, so no point hanging around here */ @@ -5547,7 +5535,6 @@ * Change the order of the table * @param {object} oSettings dataTables settings object * @memberof DataTable#oApi - * @todo This really needs split up! */ function _fnSort(oSettings) { var @@ -5563,9 +5550,6 @@ displayMaster = oSettings.aiDisplayMaster, aSort; - // Resolve any column types that are unknown due to addition or invalidation - // @todo Can this be moved into a 'data-ready' handler which is called when - // data is going to be used in the table? _fnColumnTypes(oSettings); aSort = _fnSortFlatten(oSettings); @@ -5978,8 +5962,6 @@ // Store the saved state so it might be accessed at any time settings.oLoadedState = $.extend(true, {}, s); - // Restore key features - todo - for 1.11 this needs to be done by - // subscribed events if (s.start !== undefined) { settings._iDisplayStart = s.start; settings.iInitDisplayStart = s.start; @@ -6141,7 +6123,6 @@ * references * @returns {object} out Reference, just for convenience - out === the return. * @memberof DataTable#oApi - * @todo This doesn't take account of arrays inside the deep copied objects. */ function _fnExtend(out, extender, breakRefs) { var val; @@ -6778,40 +6759,6 @@ } }; - - // @todo - Is there need for an augment function? - // _Api.augment = function ( inst, name ) - // { - // // Find src object in the structure from the name - // var parts = name.split('.'); - - // _Api.extend( inst, obj ); - // }; - - - // [ - // { - // name: 'data' -- string - Property name - // val: function () {}, -- function - Api method (or undefined if just an object - // methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result - // propExt: [ ... ] -- array - Array of Api object definitions to extend the property - // }, - // { - // name: 'row' - // val: {}, - // methodExt: [ ... ], - // propExt: [ - // { - // name: 'data' - // val: function () {}, - // methodExt: [ ... ], - // propExt: [ ... ] - // }, - // ... - // ] - // } - // ] - _Api.register = _api_register = function (name, val) { if ($.isArray(name)) { for (var j = 0, jen = name.length; j < jen; j++) { @@ -12440,13 +12387,6 @@ * NOT be manipulated outside of DataTables. Any configuration should be done * through the initialisation options. * @namespace - * @todo Really should attach the settings object to individual instances so we - * don't need to create new instances on each $().dataTable() call (if the - * table already exists). It would also save passing oSettings around and - * into every single function. However, this is a very significant - * architecture change for DataTables and will almost certainly break - * backwards compatibility with older installations. This is something that - * will be done in 2.0. */ DataTable.models.oSettings = { /** @@ -12769,7 +12709,6 @@ * Note that this parameter will be set by the initialisation routine. To * set a default use {@link DataTable.defaults}. * @type array - * @todo These inner arrays should really be objects */ "aaSorting": null, @@ -14778,6 +14717,6 @@ */ return $.fn.dataTable; -}) +}); ) -; + diff --git a/Plan/common/src/main/resources/assets/plan/web/vendor/jquery/jquery.js b/Plan/common/src/main/resources/assets/plan/web/vendor/jquery/jquery.js index 2125c8ee4..b8bd65602 100644 --- a/Plan/common/src/main/resources/assets/plan/web/vendor/jquery/jquery.js +++ b/Plan/common/src/main/resources/assets/plan/web/vendor/jquery/jquery.js @@ -752,7 +752,6 @@ if ((elem = context.getElementById(m))) { // Support: IE, Opera, Webkit - // TODO: identify versions // getElementById can match elements by name instead of ID if (elem.id === m) { results.push(elem); @@ -766,7 +765,6 @@ } else { // Support: IE, Opera, Webkit - // TODO: identify versions // getElementById can match elements by name instead of ID if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && @@ -4161,7 +4159,7 @@ // 2. Improve the module's maintainability by reducing the storage // paths to a single mechanism. // 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 4. _Never_ expose "private" data to user code // 5. Avoid exposing implementation details on user objects (eg. expando properties) // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 @@ -4230,8 +4228,6 @@ dataUser.remove(elem, name); }, - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. _data: function (elem, name, data) { return dataPriv.access(elem, name, data); }, diff --git a/Plan/common/src/main/resources/assets/plan/web/vendor/jquery/jquery.slim.js b/Plan/common/src/main/resources/assets/plan/web/vendor/jquery/jquery.slim.js index 8b27b4552..5d3c8e64c 100644 --- a/Plan/common/src/main/resources/assets/plan/web/vendor/jquery/jquery.slim.js +++ b/Plan/common/src/main/resources/assets/plan/web/vendor/jquery/jquery.slim.js @@ -752,7 +752,6 @@ if ((elem = context.getElementById(m))) { // Support: IE, Opera, Webkit - // TODO: identify versions // getElementById can match elements by name instead of ID if (elem.id === m) { results.push(elem); @@ -766,7 +765,6 @@ } else { // Support: IE, Opera, Webkit - // TODO: identify versions // getElementById can match elements by name instead of ID if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && @@ -4161,7 +4159,7 @@ // 2. Improve the module's maintainability by reducing the storage // paths to a single mechanism. // 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 4. _Never_ expose "private" data to user code // 5. Avoid exposing implementation details on user objects (eg. expando properties) // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 @@ -4230,7 +4228,6 @@ dataUser.remove(elem, name); }, - // TODO: Now that all calls to _data and _removeData have been replaced // with direct calls to dataPriv methods, these can be deprecated. _data: function (elem, name, data) { return dataPriv.access(elem, name, data);