From 538ab5631ef18640d1d9cac6e25ed2f9f2ef11cd Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 10 Jun 2013 12:14:15 -0400 Subject: [PATCH] Bug 2774 - Path to theme is hard-coded in many places This patch corrects more places in Koha where the path to the "prog" theme is hard-coded in templates, CSS, and scripts. Staff client home page: Paths to the Koha logo background image and the module image sprite have been corrected. Inactive and hover states of the module links (circulation, patrons, etc) should look correct. addbiblio.pl: An tag is replaced with a text link and an additional CSS class. CSS uses an image-replacement technique to display the image as before. To test, open a blank or existing bibliographic record for editing. Confirm that the "tag editor" icon displays correctly in two cases: 1) tags linked to plugin editors and 2) tags linked to authorities. Both should look correct and work correctly. System preferences: The system preferences editor appends a "loading" image to system preference submit buttons when they are clicked. This patch changes ajax.js to insert a styled with a background-image instead. To test, open system preferences and modify any preference. Submit the change and confirm that the "loading" image appears correctly. Background jobs: Any place in Koha where a background job is used displays a progress bar. This patch corrects the path in CSS to the progress bar image. To test, perform an action which triggers the display of a progress bar. For instance, batch modification of items. Confirm that the progress bar image displays correctly. blue.css: I don't know if this is still used by anyone, but a couple of image paths in this CSS file have been corrected. Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Passes all tests, QA script and test plan. Signed-off-by: Galen Charlton --- cataloguing/addbiblio.pl | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/css/blue.css | 6 +++--- .../intranet-tmpl/prog/en/css/mainpage.css | 4 ++-- .../intranet-tmpl/prog/en/css/preferences.css | 9 +++++++++ .../intranet-tmpl/prog/en/css/staff-global.css | 18 +++++++++++++----- koha-tmpl/intranet-tmpl/prog/en/js/ajax.js | 10 +++++----- 6 files changed, 35 insertions(+), 18 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index bc1b700ce1..5e050aee3b 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -391,8 +391,8 @@ sub create_input { maxlength=\"".$subfield_data{maxlength}."\"". ($is_readonly ? "readonly=\"readonly\"" : ""). "\/> - {$tag}->{$subfield}->{authtypecode}."','biblio'); return false;\" tabindex=\"1\" title=\"Tag Editor\">\"Tag + {$tag}->{$subfield}->{authtypecode}."','biblio'); return false;\" tabindex=\"1\">Tag editor "; # it's a plugin field } @@ -421,7 +421,7 @@ sub create_input { size=\"67\" maxlength=\"".$subfield_data{maxlength}."\" onblur=\"Blur$function_name($index_tag); \" \/> - \"Tag + Tag editor $javascript"; } else { warn "Plugin Failed: $plugin"; diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/blue.css b/koha-tmpl/intranet-tmpl/prog/en/css/blue.css index 4155b14a54..1f28d27b29 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/blue.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/blue.css @@ -39,7 +39,7 @@ h4 { h5 { font-size : 100%; font-weight : bold; - background: url( /intranet-tmpl/prog/img/css_header.png ); + background: url( ../../img/css_header.png ); background-repeat:repeat-x; color:white;} @@ -54,7 +54,7 @@ h6 { th { color:white; - background: url( /intranet-tmpl/prog/img/css_header.png ); + background: url( ../../img/css_header.png ); background-repeat:repeat-x; border-bottom : 1px solid #BCBCBC; border-left : 1px solid #BCBCBC; @@ -66,7 +66,7 @@ border: 1px solid #bbbbbb; } input[type=submit], input[type=button], input[type=reset] { - background: url( /intranet-tmpl/prog/img/css_header.png ); + background: url( ../../img/css_header.png ); color:white; border:1px inset; margin-top:10px; diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/mainpage.css b/koha-tmpl/intranet-tmpl/prog/en/css/mainpage.css index 064668d173..169f2a06eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/mainpage.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/mainpage.css @@ -13,7 +13,7 @@ #doc3 { /* Contains the news + both columns of links + pending box + userblock box */ - background-image:url('/intranet-tmpl/prog/img/background_koha_logo.png'); + background-image:url('../../img/background_koha_logo.png'); background-repeat:no-repeat; background-position:left top; padding-top: 12px; @@ -72,7 +72,7 @@ ul.biglinks-list li { ul.biglinks-list li a.icon_general { /* Class used for each module link */ - background-image:url('/intranet-tmpl/prog/img/staff-home-icons-sprite.png'); + background-image:url('../../img/staff-home-icons-sprite.png'); display: block; float: left; diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/preferences.css b/koha-tmpl/intranet-tmpl/prog/en/css/preferences.css index c58e9a5097..d9f8e161b7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/preferences.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/preferences.css @@ -73,4 +73,13 @@ h3.collapsed { #toolbar.floating { box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.5); border-radius: 0; +} + +.loading { + display: inline-block; + height : 16px; + width: 16px; + background: transparent url("../../img/spinner-small.gif") top left no-repeat; + padding : 0 4px; + vertical-align: middle; } \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index f5d5bc2caf..0fa93abf16 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1859,10 +1859,6 @@ span.permissiondesc { font-weight: normal; } -img.spinner { - vertical-align: middle; - padding-right: 0.3em; -} ul.budget_hierarchy { margin-left: 0px; padding-left: 0px; @@ -2565,7 +2561,7 @@ fieldset.rows table.mceListBox { #jobpanel,#jobstatus,#jobfailed { display : none; } #jobstatus { margin:.4em; } -#jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; } +#jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('../../img/progress.png') -300px 0px no-repeat; } #selections { width : 100%; white-space : normal; } #selections span { margin:3px;padding:3px;background-color:#EBF3FF;-moz-border-radius:5px;border-radius:5px;white-space:nowrap;line-height:240%;font-size:75%; } #selections span.selected { background-color : #CCE0FC; } @@ -2582,3 +2578,15 @@ fieldset.rows table.mceListBox { -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5); box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5); } + +.tag_editor { + background: transparent url("../../img/edit-tag.png") top left no-repeat; + display : block; + float : left; + width : 16px; + height: 16px; + margin : 4px; + text-indent: 100%; + white-space: nowrap; + overflow: hidden; +} \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js b/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js index c9a45c0bfd..a8a9241d2d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js @@ -36,7 +36,7 @@ KOHA.AJAX = { $( selector ) .attr( 'disabled', 'disabled' ) .each( function () { - var $image = $( '' ); + var $spinner = $( '' ); var selector_type = this.localName; if (selector_type === undefined) selector_type = this.nodeName; // IE only switch ( selector_type.toLowerCase() ) { @@ -48,14 +48,14 @@ KOHA.AJAX = { $( this ) .data( 'original-text', $( this ).text ) .text( text ) - .before( $image ) + .before( $spinner ) .bind( 'click.disabled', function () { return false; } ); break; case 'button': $( this ) .data( 'original-text', $( this ).text() ) .text( text ) - .prepend( $image ); + .prepend( $spinner ); break; } } ); @@ -74,12 +74,12 @@ KOHA.AJAX = { $( this ) .text( $( this ).data( 'original-text' ) ) .unbind( 'click.disabled' ) - .prevAll( 'img.spinner' ).remove(); + .prevAll( 'span.loading' ).remove(); break; case 'button': $( this ) .text( $( this ).data( 'original-text' ) ) - .find( 'img.spinner' ).remove(); + .find( 'span.loading' ).remove(); break; } } ) -- 2.39.5