diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-10-01 15:10:07 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-10-24 12:06:08 +0200 | 
| commit | 95f9959de49ab5271e95451831837c87ead88237 (patch) | |
| tree | 8d6e00ce0a1a19b41869b6b6b2ebc5afbb133b64 /ishtar_common/static/js/ishtar.js | |
| parent | f0e8bab97707a729bada5b7fa17d81202ab8eaa8 (diff) | |
| download | Ishtar-95f9959de49ab5271e95451831837c87ead88237.tar.bz2 Ishtar-95f9959de49ab5271e95451831837c87ead88237.zip | |
Manage site and warehouse in shortcut menu - Many fixes on pin
Diffstat (limited to 'ishtar_common/static/js/ishtar.js')
| -rw-r--r-- | ishtar_common/static/js/ishtar.js | 44 | 
1 files changed, 44 insertions, 0 deletions
| diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 2ff9e07a7..6013afc27 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -128,6 +128,12 @@ function init_shortcut_fields(){                 load_opened_shortcut_menu          );      }); +    $("#current_site").change(function(){ +        $.post('/' + url_path + 'update-current-item/', +               {item:'site', value:$("#current_site").val()}, +               load_opened_shortcut_menu +        ); +    });      $("#current_contextrecord").change(function(){          $.post('/' + url_path + 'update-current-item/',                 {item:'contextrecord', value:$("#current_contextrecord").val()}, @@ -140,6 +146,12 @@ function init_shortcut_fields(){                 load_opened_shortcut_menu          );      }); +    $("#current_warehouse").change(function(){ +        $.post('/' + url_path + 'update-current-item/', +               {item:'warehouse', value:$("#current_warehouse").val()}, +               load_opened_shortcut_menu +        ); +    });      $("#current_treatment").change(function(){          $.post('/' + url_path + 'update-current-item/',                 {item:'treatment', value:$("#current_treatment").val()}, @@ -171,6 +183,14 @@ function init_advanced_shortcut_fields(){                 load_opened_shortcut_menu          );      }); +    $('#id_site-shortcut').change(function(){ +        $("#id_select_site-shortcut").attr( +            'title', $('#id_select_site-shortcut').val()); +        $.post('/' + url_path + 'update-current-item/', +               {item: "site", value:$("#id_site-shortcut").val()}, +               load_opened_shortcut_menu +        ); +    });      $('#id_contextrecord-shortcut').change(function(){          $("#id_select_contextrecord-shortcut").attr(              'title', $('#id_select_contextrecord-shortcut').val()); @@ -187,6 +207,30 @@ function init_advanced_shortcut_fields(){                 load_opened_shortcut_menu          );      }); +    $('#id_warehouse-shortcut').change(function(){ +        $("#id_select_warehouse-shortcut").attr( +            'title', $('#id_select_warehouse-shortcut').val()); +        $.post('/' + url_path + 'update-current-item/', +               {item: "warehouse", value:$("#id_warehouse-shortcut").val()}, +               load_opened_shortcut_menu +        ); +    }); +    $('#id_treatment-shortcut').change(function(){ +        $("#id_select_treatment-shortcut").attr( +            'title', $('#id_select_treatment-shortcut').val()); +        $.post('/' + url_path + 'update-current-item/', +               {item: "treatment", value:$("#id_treatment-shortcut").val()}, +               load_opened_shortcut_menu +        ); +    }); +    $('#id_treatmentfile-shortcut').change(function(){ +        $("#id_select_treatmentfile-shortcut").attr( +            'title', $('#id_select_treatmentfile-shortcut').val()); +        $.post('/' + url_path + 'update-current-item/', +               {item: "treatmentfile", value:$("#id_treatmentfile-shortcut").val()}, +               load_opened_shortcut_menu +        ); +    });  }  function display_info(msg){ | 
