fix for 1754; fixing I18N BiDi, improvements to handling of language
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / js / staff-global.js
1 // staff-global.js
2
3 function _(s) { return s } // dummy function for gettext
4
5  $(document).ready(function() {
6         $(".focus").focus();
7         $('#toplevelmenu').clickMenu(); 
8         $('#i18nMenu').clickMenu();
9         $('#header_search').tabs({
10                 onShow: function() {
11                 $('#header_search').find('div:visible').find('input').eq(0).focus();
12             }   
13         });
14         $(".close").click(function(){
15                 window.close();
16         });
17  });
18  
19
20 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
21 function verify_patron_images() {
22     for (var i = 0; i < document.images.length; i++) {
23         img = document.images[i];
24         if ((img.src.indexOf('patronimages') >= 0)) {
25                         w = img.width;
26             h = img.height;
27      if ((w == 0) && (h == 0) || ((img.complete != null) && (!img.complete))) {
28                img.src = '/intranet-tmpl/prog/img/patron-blank.png';
29                         }
30         }
31     }
32 }