diff options
Diffstat (limited to 'ishtar_common/static/js')
-rw-r--r-- | ishtar_common/static/js/JQueryCorporation.js | 14 | ||||
-rw-r--r-- | ishtar_common/static/js/ishtar.js | 14 |
2 files changed, 21 insertions, 7 deletions
diff --git a/ishtar_common/static/js/JQueryCorporation.js b/ishtar_common/static/js/JQueryCorporation.js new file mode 100644 index 000000000..e65001506 --- /dev/null +++ b/ishtar_common/static/js/JQueryCorporation.js @@ -0,0 +1,14 @@ +var current_status = 'corporation'; + +$(function() { + var $radios = $('input:radio[name=person_type]'); + if($radios.is(':checked') === false) { + $radios.filter('[value='+ current_status +']').prop('checked', true); + } + + $radios.change(function(){ + var loc = window.location; + window.location = loc.protocol + '//' + loc.host + loc.pathname + "?status=" + $('input:radio[name=person_type]:checked').val(); + }); + $("#corporation_div").show(); +}); diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 318c17315..dfe59105c 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -48,7 +48,7 @@ var shortcut_menu_show_url = '/show-shortcut-menu/' function init_shortcut_menu(html){ $("#progress").hide(); - $("#context_menu").html(html); + $("#context-menu").html(html); $(".chosen-select").chosen(); if (advanced_menu) { init_advanced_shortcut_fields(); @@ -195,13 +195,12 @@ $(document).ready(function(){ $('#to_bottom_arrow').hide(); $('#to_top_arrow').hide(); } - $('#language_selector').change(function(){ - $('#language_form').submit(); + $('#language-selector a').click(function(){ + $('#language-selector input[name="language"]').val( + $(this).attr("data-lang")); + $('#language-form').submit(); }); load_shortcut_menu(); - if ($.isFunction($(".prettyPhoto a").prettyPhoto)){ - $(".prettyPhoto a").prettyPhoto({'social_tools':''}); - } $('#current_items select').change(function(){ $(this).attr('class', $(this).children("option:selected").attr('class')); }); @@ -271,9 +270,10 @@ function load_window(url, speed, on_success){ cache: false, success:function(html){ $("#progress").hide(); + $(".previous_page").remove(); + $(".next_page").remove(); $("#window").append(html); $("#"+last_window).show(); - $("a[rel^='prettyPhoto']").prettyPhoto({'social_tools':''}); if (on_success) on_success(); }, error:function(XMLHttpRequest, textStatus, errorThrows){ |