summaryrefslogtreecommitdiff
path: root/ishtar_common/static/js
diff options
context:
space:
mode:
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
commite55d8d335b682f86439457c577c95b1768543f22 (patch)
tree8d6e00ce0a1a19b41869b6b6b2ebc5afbb133b64 /ishtar_common/static/js
parent179b51b530687a6d81c1434d13d12c02afe7abff (diff)
downloadIshtar-e55d8d335b682f86439457c577c95b1768543f22.tar.bz2
Ishtar-e55d8d335b682f86439457c577c95b1768543f22.zip
Manage site and warehouse in shortcut menu - Many fixes on pin
Diffstat (limited to 'ishtar_common/static/js')
-rw-r--r--ishtar_common/static/js/ishtar.js44
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){