X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=qcg%2Ftemplates%2Fqcg%2Fjob_submit.html;h=b25ba06fd5345e51d70d416feeb0c64da2befc35;hb=957dafde8290f3ab8d25f7b96af10e583d50100b;hp=560bd99c70e27ef8aeda8d80abafa378f3e70608;hpb=efdba7ecadc632e65fb58aa819964335dffd56a1;p=qcg-portal.git diff --git a/qcg/templates/qcg/job_submit.html b/qcg/templates/qcg/job_submit.html index 560bd99..b25ba06 100644 --- a/qcg/templates/qcg/job_submit.html +++ b/qcg/templates/qcg/job_submit.html @@ -1,5 +1,5 @@ {% extends 'qcg/base.html' %} -{% load staticfiles bootstrap3 qcg_utils %} +{% load staticfiles bootstrap3 %} {% block extra_css %} @@ -34,7 +34,7 @@ return res; } - $('#id_master_file,#id_executable,#id_input,#id_preprocess_script,#id_postprocess_script').before(function() { + $('#id_master_file,#id_pdb_file,#id_executable,#id_input,#id_preprocess_script,#id_postprocess_script').before(function() { var target = this; return gridftpButton.clone().click(function() { $('#select-btn').off().click(function() { @@ -77,7 +77,7 @@ }); }).wrap('
'); - $('#id_application').selectize(); + $('#id_application,#id_force_field').selectize(); $('#id_arguments,#id_properties,#id_native').selectize({ plugins: ['remove_button'], create: true, @@ -95,10 +95,15 @@ } } }); - $('#id_modules,#id_hosts,#id_master_file,#id_executable,#id_input,#id_stage_in,#id_preprocess_script,#id_postprocess_script').selectize({ + + $('#id_modules,#id_hosts,#id_pdb_file,#id_master_file,#id_executable,#id_input,#id_stage_in,#id_preprocess_script,#id_postprocess_script').selectize({ plugins: ['remove_button'] }); + $('#id_sequence').on("click keyup", function(){ + $(this).val($(this).val().toUpperCase()); + }); + // hide delete checkbox in empty env form $('#env-form-empty').find('div.form-group:last-of-type').hide(); $('#env-controls').find('> div').formset({ @@ -114,8 +119,6 @@ $('input[name="notify_type"],input[name="watch_output_type"],input[name="preprocess_type"],input[name="postprocess_type"]').on('change', function () { $(this).tab('show'); }).each(function() { - $(this).parent().toggleClass('active', this.checked); - if (this.checked) $(this).tab('show'); }); @@ -128,37 +131,18 @@ $('#gridftp').one('show.bs.modal', function() { filex.initialLoad(); + $(this).find('.modal-body').css('height', window.innerHeight - 200 + 'px'); }); $('#template').on('show.bs.modal', function() { - $(this).find('.alert').remove(); this.reset(); }).on('shown.bs.modal', function() { $(this).find('input[type="text"]')[0].focus(); }).on('submit', function(e) { e.preventDefault(); - var $this = $(this), - $btn = $this.find('[type="submit"]'); - - $this.find('.alert-danger').remove(); - $btn.button('loading'); - - $.post(this.action, $('#description,#template').serializeArray(), function(response) { - // FIXME url after redirection - document.open(); - document.write(response); - document.close(); - }).fail(function(xhr) { - var error = (xhr.responseJSON || {}).error || 'Błąd serwera'; - - $('
', { - 'class': 'alert alert-danger', - html: ' ' + error - }).prependTo($this.find('.modal-body')); - - $btn.button('reset'); - }); + // copy this form's fields to description form and send it + $('#description').append($(this).find('input').clone().attr('type', 'hidden')).submit(); }); }); @@ -188,176 +172,7 @@
{% csrf_token %} - - - -
-
- {% bootstrap_field form.application layout="horizontal" %} - {% bootstrap_field form.master_file layout="horizontal" %} - {% bootstrap_field form.executable layout="horizontal" form_group_class="form-group collapse" %} - {% bootstrap_field form.script layout="horizontal" form_group_class="form-group collapse" %} - {% bootstrap_field form.arguments layout="horizontal" %} - {% bootstrap_field form.note layout="horizontal" %} - {% bootstrap_field form.grant layout="horizontal" form_group_class="form-group collapse" %} -
- -
- {% bootstrap_field form.hosts layout="horizontal" %} - {% bootstrap_field form.queue layout="horizontal" %} - {% bootstrap_field form.properties layout="horizontal" form_group_class="form-group collapse" %} - {% bootstrap_field form.modules layout="horizontal" form_group_class="form-group collapse" %} - {% bootstrap_field form.procs layout="horizontal" %} - {% bootstrap_field form.nodes layout="horizontal" form_group_class="form-group collapse" %} - {% bootstrap_field form.wall_time layout="horizontal" form_group_class="form-group timerange" %} - {% bootstrap_field form.memory layout="horizontal" form_group_class="form-group collapse" %} - {% bootstrap_field form.memory_per_slot layout="horizontal" form_group_class="form-group collapse" %} - {% bootstrap_field form.reservation layout="horizontal" form_group_class="form-group collapse" %} -
- -
- {% bootstrap_field form.input layout="horizontal" %} - {% bootstrap_field form.stage_in layout="horizontal" %} -
- -
- {{ env_formset.management_form }} - -
- -
-
- {% for env_form in env_formset %} -
{% bootstrap_form env_form layout='inline' %}
- {% endfor %} -
-
- -
-
-
- -
- {% bootstrap_checkbox form.monitoring %} - -
- -
-
- {% for option in form.notify_type %} - - {% endfor %} -
-
-
- -
-
- -
- {% bootstrap_field form.notify_address layout="horizontal" %} -
-
- -
-
- -
-
- {% for option in form.watch_output_type %} - - {% endfor %} -
-
-
- -
-
- -
- {% bootstrap_field form.watch_output_address layout="horizontal" %} - {% bootstrap_field form.watch_output_pattern layout="horizontal" %} -
-
-
-
- -
-
- -
-
- {% for option in form.preprocess_type %} - - {% endfor %} -
-
-
- -
-
- -
- {% bootstrap_field form.preprocess_cmd layout="horizontal" %} -
- -
- {% bootstrap_field form.preprocess_script layout="horizontal" %} -
-
- -
- -
-
- {% for option in form.postprocess_type %} - - {% endfor %} -
-
-
- -
-
- -
- {% bootstrap_field form.postprocess_cmd layout="horizontal" %} -
- -
- {% bootstrap_field form.postprocess_script layout="horizontal" %} -
-
- - {% bootstrap_field form.native layout="horizontal" %} - {% bootstrap_checkbox form.persistent %} -
-
+ {% include 'qcg/job_submit_form.html' %}