Bug 8108 - Remove unused images from the OPAC
Summary: Remove unused images from the OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact:
URL:
Keywords:
Depends on: 9278
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-16 13:27 UTC by Owen Leonard
Modified: 2014-05-26 21:04 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8108 - Remove unused images from the OPAC (72.79 KB, patch)
2012-05-16 13:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 8108 - Remove unused images from the OPAC (74.09 KB, patch)
2012-05-19 09:31 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 8108 [Follow-up] Remove unused images from the OPAC (62.00 KB, patch)
2012-11-21 16:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 8108 [Follow-up, revised] Remove unused images from the OPAC (62.15 KB, patch)
2012-12-07 17:08 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 8108 [Follow-up, revised] Remove unused OPAC images (76.95 KB, patch)
2012-12-13 15:37 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 8108 [Follow-up, revised] Remove unused OPAC images (76.97 KB, patch)
2012-12-13 15:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8108 [Follow-up, revised] Remove unused OPAC images (77.08 KB, patch)
2013-01-30 06:15 UTC, Mason James
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2012-05-16 13:27:55 UTC
Now that Bug 7500 is in master there are a lot of individual image files which have been incorporated into a single sprite. There are also many image files which are no longer in use. According to my searches these files can be safely removed from the OPAC:

addtobasket.gif
addtolist-small.gif
addtoshelf.gif
alert.gif
back.gif
bluestars.png
brief.gif
button-background-gradient.png
button-background.png
cart-small.gif
cart.gif
cart2.gif
check.png
checkall.gif
checknone.gif
checkout-bottom-left.gif
checkout-bottom-right.gif
checkout-right.gif
checkout-top-left.gif
checkout-top-right.gif
checks.png
clearbasket.gif
close.gif
delete-shelf-disabled.gif
detail.gif
download.png
empty-small.png
emptystars.png
further-bullet.gif
highlight.gif
ico_b_results.gif
isbd.gif
koha-logo-black.png
koha-logo-blue.png
koha-logo-yellow.png
list.gif
marc.gif
member-menu-background-hover.gif
member-menu-background-link.gif
member-menu-background-logout-hover.gif
member-menu-background-logout.gif
member-menu-background.gif
menu-arrow.gif
new.gif
normal.gif
place-hold-small-disabled.png
place-hold-small.png
placehold-small.gif
placereserve.gif
print-small.png
print.gif
send.gif
send.png
shelf-delete-disabled.gif
shelf-delete.gif
shelf-edit.gif
shelf-new-disabled.gif
shelf-new.gif
star-ratings-empty.png
star-ratings.png
tag.gif
tags-small-disabled.png
tags-small.png
tags.gif
transaction-complete.gif
trash.gif
Comment 1 Owen Leonard 2012-05-16 13:29:57 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2012-05-19 09:31:24 UTC Comment hidden (obsolete)
Comment 3 Paul Poulain 2012-05-28 12:35:08 UTC
Could one of you (chris / owen) let us know how you've got the list of unused images ?

QA comments: remove-file only patch. passed QA

(will push once I can be sure that the images are safely removed)
Comment 4 Owen Leonard 2012-05-28 13:03:43 UTC
(In reply to comment #3)
> Could one of you (chris / owen) let us know how you've got the list of
> unused images ?

I searched for references to each individual file in CSS and TT files.
Comment 5 Paul Poulain 2012-06-05 10:07:11 UTC
I searched remaining references to some (not all) files removed. Could not find any problem. Patch pushed

Patch could be backported to 3.8 but can also wait for 3.10 to avoid any regression in case we missed something
Comment 6 Owen Leonard 2012-11-20 20:13:37 UTC
I'm moving this back to ASSIGNED because I see a couple images which are still present but I think unused. I think the star ratings images can now be safely removed as well now that they're replaced by a sprite.
Comment 7 Owen Leonard 2012-11-21 16:34:30 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2012-12-07 17:08:28 UTC Comment hidden (obsolete)
Comment 9 Kyle M Hall 2012-12-07 17:17:43 UTC
It looks like some of these images are still referenced in some css files. I imagine that's a problem.

$ git grep "addtobasket.gif"
koha-tmpl/opac-tmpl/ccsr/en/css/sanop.css:  background-image: url(../images/addtobasket.gif);
koha-tmpl/opac-tmpl/prog/en/css/sanop.css:      background-image: url(../images/addtobasket.gif);

git grep "cart-small.gif"
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css:        background: transparent url("../../img/cart-small.gif") 0 3px no-repeat;
koha-tmpl/opac-tmpl/ccsr/en/css/sanop.css:        background-image : url(../images/cart-small.gif);
koha-tmpl/opac-tmpl/prog/en/css/sanop.css:      background-image : url(../images/cart-small.gif);
Comment 10 Owen Leonard 2012-12-12 20:55:17 UTC
I have submitted a patch for Bug 9278 which removes sanop.css. This should eliminate the references noted in Comment 9.
Comment 11 Jonathan Druart 2012-12-13 14:10:38 UTC
I found some references to these files:

koha-tmpl/opac-tmpl/ccsr/en/css/opac.css:   background: url(../../images/star-ratings-empty.gif) top left no-repeat;
koha-tmpl/opac-tmpl/prog/en/css/opac.css:       background: url(../../images/star-ratings-empty.gif) top left no-repeat;

koha-tmpl/opac-tmpl/ccsr/en/css/opac.css:   background: url(../../images/star-ratings-empty.gif) top left no-repeat;
koha-tmpl/opac-tmpl/prog/en/css/opac.css:       background: url(../../images/star-ratings-empty.gif) top left no-repeat;

koha-tmpl/opac-tmpl/ccsr/en/css/opac.css: background: url(../../images/star-ratings.gif) top left no-repeat;
koha-tmpl/opac-tmpl/prog/en/css/opac.css:       background: url(../../images/star-ratings.gif) top left no-repeat;

koha-tmpl/opac-tmpl/ccsr/en/css/opac.css:    background-image: url(../../images/tag-small-disabled.png);

koha-tmpl/opac-tmpl/ccsr/en/css/opac.css:    background-image: url(../../images/tag-small.png);
Comment 12 Owen Leonard 2012-12-13 15:37:51 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2012-12-13 15:46:50 UTC Comment hidden (obsolete)
Comment 14 Mason James 2013-01-30 06:15:19 UTC
Created attachment 14932 [details] [review]
Bug 8108 [Follow-up, revised] Remove unused OPAC images

This patch cleans up some loose ends:

- Star ratings images are now in one sprite. Removing
  separate star ratings images.
- Amazon ratings have been removed. Related image files
  are removed by this patch.
- The tag images associated with tag links on the search
  results page were not incorporated into the main sprite.
  Now they are.

Added: The Photoshop file from which the main sprite was
generated, in case that is helpful to others. Each layer
is named, and comments have been added to the CSS
referencing the layer names. The file is GIMP-compatible.

Revisions:
- Rebased on current master
- Ported some changes to CCSR theme
- Removed unused CSS which referred to deleted images

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Comment 15 Mason James 2013-01-30 06:17:26 UTC
(In reply to comment #14)
> Created attachment 14932 [details] [review]
> Bug 8108 [Follow-up, revised] Remove unused OPAC images
> 
> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
> Signed-off-by: Mason James <mtj@kohaaloha.com>

testing 1 commit(s) (applied to f8686e9 'Bug 9116: Remove some useless tmp var')

passing QA - awesome patch Owen :)
Comment 16 Jared Camins-Esakov 2013-01-31 16:08:30 UTC
This patch has been pushed to master.
Comment 17 Chris Cormack 2013-02-02 07:09:43 UTC
Pushed to 3.10.x will be in 3.10.3