##// END OF EJS Templates
JARS Form...
JARS Form git-svn-id: http://jro-dev.igp.gob.pe/svn/jro_hard/radarsys/trunk/webapp@150 aa17d016-51d5-4e8b-934c-7b2bbb1bbe71

File last commit:

r129:41fbe8452e92
r129:41fbe8452e92
Show More
jars_conf_edit.html
102 lines | 2.7 KiB | text/html | HtmlDjangoLexer
/ apps / jars / templates / jars_conf_edit.html
Fiorella Quino
Task #99: Modulo web del JARS...
r118 {% extends "dev_conf_edit.html" %}
{% load bootstrap3 %}
{% load static %}
{% load main_tags %}
{% block extra-js%}
Fiorella Quino
Task #99: Modulo web del JARS...
r123 <script type="text/javascript">
Fiorella Quino
JARS Form...
r129
$(document).ready(function() {
var type = $("#id_exp_type").val();
spectral_number = $("#id_spectral_number")
spectral = $("#id_spectral")
fftpoints = $("#id_fftpoints")
save_ch_dc = $("#id_save_ch_dc")
add_spec_button = $("#add_spectral_button")
del_spec_button = $("#delete_spectral_button")
if (type == 0) {
$(spectral_number).attr('readonly', true);
$(spectral).attr('readonly', true);
$(fftpoints).attr('readonly', true);
$(save_ch_dc).attr('disabled', true);
$(save_ch_dc).attr('readonly', true);
$(add_spec_button).attr('disabled', true);
$(del_spec_button).attr('disabled', true);
}
else {
$(spectral_number).attr('readonly', false);
$(spectral).attr('readonly', false);
$(fftpoints).attr('readonly', false);
$(save_ch_dc).attr('disabled', false);
$(save_ch_dc).attr('readonly', false);
$(add_spec_button).attr('disabled', false);
$(del_spec_button).attr('disabled', false);
}
});
$("#id_exp_type").change(function() {
var type = $("#id_exp_type").val();
spectral_number = $("#id_spectral_number")
spectral = $("#id_spectral")
fftpoints = $("#id_fftpoints")
save_ch_dc = $("#id_save_ch_dc")
add_spec_button = $("#add_spectral_button")
del_spec_button = $("#delete_spectral_button")
if (type == 0) {
$(spectral_number).attr('readonly', true);
$(spectral).attr('readonly', true);
$(fftpoints).attr('readonly', true);
$(save_ch_dc).attr('disabled', true);
$(save_ch_dc).attr('readonly', true);
$(add_spec_button).attr('disabled', true);
$(del_spec_button).attr('disabled', true);
}
else {
$(spectral_number).attr('readonly', false);
$(spectral).attr('readonly', false);
$(fftpoints).attr('readonly', false);
$(save_ch_dc).attr('disabled', false);
$(save_ch_dc).attr('readonly', false);
$(add_spec_button).attr('disabled', false);
$(del_spec_button).attr('disabled', false);
}
Fiorella Quino
Task #99: Modulo web del JARS...
r123 });
Fiorella Quino
Task #99: Modulo web del JARS...
r118
Fiorella Quino
Task #99: Modulo web del JARS...
r123 $("#id_channels_number").on('change', function() {
updateChannelsNumber();
});
function updateChannelsNumber() {
var channels_number = $("#id_channels_number").val();
channels = $("#id_channels")
if (channels_number == 1) {
$(channels).val('1')
}
else if (channels_number == 2){
$(channels).val('1,2')
}
else if (channels_number == 3){
$(channels).val('1,2,3')
}
else if (channels_number == 4){
$(channels).val('1,2,3,4')
}
else if (channels_number == 5){
$(channels).val('1,2,3,4,5')
}
else if (channels_number == 6){
$(channels).val('1,2,3,4,5,6')
}
else if (channels_number == 7){
$(channels).val('1,2,3,5,6,7')
}
else {
$(channels).val('1,2,3,4,5,6,7,8')
}
}
</script>
Fiorella Quino
Task #99: Modulo web del JARS...
r118 {% endblock %}