diff --git a/client/galaxy/scripts/mvc/history/history-item-li.js b/client/galaxy/scripts/mvc/history/history-item-li.js index 316da595826..b57ef7135c3 100644 --- a/client/galaxy/scripts/mvc/history/history-item-li.js +++ b/client/galaxy/scripts/mvc/history/history-item-li.js @@ -1,14 +1,7 @@ +import Utils from "utils/utils"; + function _templateNametag(tag) { - return ``; -} - -function generateTagColor(tagValue) { - var hash = hashFnv32a(tagValue); - var r = ((hash & 0xf) % 10), - g = (((hash & 0xf0) >> 4) % 10), - b = (((hash & 0xf00) >> 8) % 10); - - return `#${r}${g}${b}`; + return ``; } function nametagTemplate(historyItem) { @@ -23,23 +16,3 @@ function nametagTemplate(historyItem) { export default { nametagTemplate: nametagTemplate }; - -/** - * Calculate a 32 bit FNV-1a hash - * Found here: https://gist.github.com/vaiorabbit/5657561 - * Ref.: http://isthe.com/chongo/tech/comp/fnv/ - * - * @param {string} str the input value - * @returns {integer} - */ -function hashFnv32a(str) { - /*jshint bitwise:false */ - var i, l, - hval = 0x811c9dc5; - - for (i = 0, l = str.length; i < l; i++) { - hval ^= str.charCodeAt(i); - hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24); - } - return hval >>> 0; -} diff --git a/client/galaxy/scripts/mvc/ui/ui-select-default.js b/client/galaxy/scripts/mvc/ui/ui-select-default.js index 67e3370b415..95f867d97fc 100644 --- a/client/galaxy/scripts/mvc/ui/ui-select-default.js +++ b/client/galaxy/scripts/mvc/ui/ui-select-default.js @@ -208,7 +208,7 @@ var View = Backbone.View.extend({ ${_.reduce( filteredTags.slice(0, 5), (memo, tag) => { - return `${memo}