diff --git a/webapp/graphite/static/js/dashboard.js b/webapp/graphite/static/js/dashboard.js index d8e892e420..0e61d32669 100644 --- a/webapp/graphite/static/js/dashboard.js +++ b/webapp/graphite/static/js/dashboard.js @@ -4,7 +4,7 @@ /*global AUTOCOMPLETE_DELAY CALENDAR_ICON CLOCK_ICON CONTEXT_FIELD_WIDTH FINDER_QUERY_DELAY*/ /*global HELP_ICON NEW_DASHBOARD_REMOVE_GRAPHS REFRESH_ICON REMOVE_ICON RESIZE_ICON*/ /*global SHARE_ICON UI_CONFIG initialState initialError permissions queryString userName*/ -/*global permissionsUnauthenticated schemes*/ +/*global UP_ICON DOWN_ICON TRASH_ICON permissionsUnauthenticated schemes*/ // Defined in composer_widgets.js /*global createFunctionsMenu createOptionsMenu updateCheckItems*/ @@ -1922,7 +1922,7 @@ function graphClicked(graphView, graphIndex, element, evt) { width: 30, sortable: false, items: [{ - icon: '/static/img/move_up.png', + icon: UP_ICON, tooltip: 'Move Up', handler: function(grid, rowIndex, colIndex) { var record = targetStore.getAt(rowIndex); @@ -1941,7 +1941,7 @@ function graphClicked(graphView, graphIndex, element, evt) { width: 30, sortable: false, items: [{ - icon: '/static/img/move_down.png', + icon: DOWN_ICON, tooltip: 'Move Down', handler: function(grid, rowIndex, colIndex) { var record = targetStore.getAt(rowIndex); @@ -1960,7 +1960,7 @@ function graphClicked(graphView, graphIndex, element, evt) { width: 30, sortable: false, items: [{ - icon: '/static/img/trash.png', + icon: TRASH_ICON, tooltip: 'Delete Row', handler: function(grid, rowIndex, colIndex) { var record = targetStore.getAt(rowIndex); diff --git a/webapp/graphite/templates/dashboard.html b/webapp/graphite/templates/dashboard.html index 688a3fde21..8a9a15b366 100644 --- a/webapp/graphite/templates/dashboard.html +++ b/webapp/graphite/templates/dashboard.html @@ -19,14 +19,12 @@ var REMOVE_ICON = '{% static "js/ext/resources/icons/fam/cross.gif" %}'; var REFRESH_ICON = '{% static "js/ext/resources/icons/fam/table_refresh.png" %}'; var SHARE_ICON = '{% static "js/ext/resources/icons/fam/application_go.png" %}'; + var HELP_ICON = '{% static "js/ext/resources/icons/fam/information.png" %}'; var CALENDAR_ICON = '{% static "js/ext/resources/images/default/shared/calendar.gif" %}'; var CLOCK_ICON = '{% static "img/clock_16.png" %}'; - var HELP_ICON = '{% static "js/ext/resources/icons/fam/information.png" %}'; - - // Prefetch images for use in Target grid - (new Image()).src = '{% static "img/move_up.png" %}'; - (new Image()).src = '{% static "img/move_down.png" %}'; - (new Image()).src = '{% static "img/trash.png" %}'; + var UP_ICON = '{% static "img/move_up.png" %}'; + var DOWN_ICON = '{% static "img/move_down.png" %}'; + var TRASH_ICON = '{% static "img/trash.png" %}'; {% if initialState %} var initialState = JSON.parse('{{ initialState|escapejs }}');