Fix error when sorting Job list by object.
[ganeti_webmgr.git] / ganeti_web / static / js / L18N.js
blob5e8a0e6a49486be2849e80f62c4ce1aaeb80b093
1 /**
2  * Django L18N localization selection.
3  */
5 $(function(){
6     $('#language').click(function(event) {
7         var $language = $(this);
8         var $languages = $('#languages')
9         if (!$language.hasClass('open')) {
10             $language.addClass('open');
11             $languages.show();
12             $('html').click(function(){
13                 $language.removeClass('open');
14                 $languages.hide();
15                 $(this).unbind('click');
16             });
17             event.stopPropagation();
18         }
19     });
21     $('#languages li a').click(function(event) {
22         event.preventDefault();
23         var lang = $(this).html();
24         $("#langsel").val(lang);
25         $("#langform").submit();
26     });
27 });