From 285fa8acbceebf5dc87c5c3befe42a2917a3b844 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Wed, 11 Mar 2020 11:30:51 +0100 Subject: Grammar: replaces 'indexes' by 'indices' Grammar-nazi ran git grep -l 'indexes' | xargs sed -i '' -e 's/indexes/indices/g' to prevent future wincing when reading the source code. Unfortunatly, Qt itself is infected as in QModelIndexList QItemSelection::indexes() const Signed-off-by: Robert C. Helling --- theme/list_lib.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'theme') diff --git a/theme/list_lib.js b/theme/list_lib.js index 05ac98d2a..4761e2bb5 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -1,9 +1,9 @@ -var itemsToShow = new Array(); //list of indexes to all dives to view +var itemsToShow = new Array(); //list of indices to all dives to view var items = new Array(); var start; //index of first element viewed in itemsToShow var sizeofpage; //size of viewed page var numberofwords = 0; //just for stats -var olditemstoshow; //to reference the indexes to all dives if changed +var olditemstoshow; //to reference the indices to all dives if changed ////////////////////////////////// // // // View Model // @@ -40,8 +40,8 @@ function viewInPage() } /** -*addHTML this Method puts the HTML of items of given indexes -*@param {array} indexes array of indexes to put in HTML +*addHTML this Method puts the HTML of items of given indices +*@param {array} indices array of indices to put in HTML */ function updateView(start, end) { @@ -56,17 +56,17 @@ function updateView(start, end) } /** -*addHTML this Method puts the HTML of items of given indexes -*@param {array} indexes array of indexes to put in HTML +*addHTML this Method puts the HTML of items of given indices +*@param {array} indices array of indices to put in HTML */ -function addHTML(indexes) +function addHTML(indices) { var divelist = document.getElementById('diveslist'); divelist.innerHTML = ""; - for (var i = 0; i < indexes.length; i++) { - divelist.innerHTML += ''; - expand(document.getElementById(indexes[i])); - itemsToShow[indexes[i]].expanded = true; + for (var i = 0; i < indices.length; i++) { + divelist.innerHTML += ''; + expand(document.getElementById(indices[i])); + itemsToShow[indices[i]].expanded = true; }; } -- cgit v1.2.3-70-g09d2