Internationalization: some more documentation fixes
[openemr.git] / library / js / common.js
blob9a6201b95306eddebdc47a02641ea4c929856277
1 function tabbify() {
3     $('ul.tabNav a').click(function() {
4         var curChildIndex = $(this).parent().prevAll().length + 1;
5         $(this).parent().parent().children('.current').removeClass('current');
6         $(this).parent().addClass('current');
7         $(this).parent().parent().next('.tabContainer').children('.current').each(function() {
8             $(this).removeClass('current');
9             $(this).parent().children('div:nth-child('+curChildIndex+')').each(function() {
10                 $(this).addClass('current');
11             });
12         });
13         return false;
14     });
15     
18 function enable_modals() {
20     // fancy box
21         $(".iframe").fancybox( {
22                 'overlayOpacity' : 0.0,
23                 'showCloseButton' : true,
24         'centerOnScroll' : false
25     });
29 function enable_big_modals() {
30   // Requires fancybox 1.3.4 or better.
31   $(".iframe").fancybox({
32     'width'         : '99%',
33     'height'        : '99%',
34     'autoScale'     : false,
35     'type'          : 'iframe'
36   });
39 //----------------------------------------
40 function PreventIt(evt)//Specially for the browser chrome.
41  {//When focus is on the text box and enter key is pressed the form gets submitted.TO prevent it this function is used.
42         evt = (evt) ? evt : window.event;
43         var charCode = (evt.which) ? evt.which : evt.keyCode;
44         if (charCode == 13)//tab key,enter key
45          {
46                 if (evt.preventDefault) evt.preventDefault();
47                 if (evt.stopPropagation) evt.stopPropagation();
48          }