source: sipes/modules_contrib/workflow_extensions/workflow_schedule.js @ dbb2387

stableversion-3.0
Last change on this file since dbb2387 was 78ed022, checked in by root <root@…>, 8 años ago

se agrego el modulo para editar los comentarios del flujo del trabajo

  • Propiedad mode establecida a 100644
File size: 1.1 KB
Línea 
1
2// Original version contributed by Brian Tully. See http://drupal.org/node/1162632
3// This version handles multiple occurrences of the form on a page.
4
5$(document).ready(function() {
6  var i = 0;
7  // Show/hide schedule fields based on which radio button is clicked.
8  $("input:radio[class=form-radio]").each(function(index) {
9    var radioButton = $(this);
10 
11    if (radioButton.attr("id").substring(0, 23) == "edit-workflow-scheduled") {
12 
13      j = Math.floor(i / 2);
14      var wrappers = (j == 0)
15        ? $("#edit-workflow-scheduled-date-wrapper,           #edit-workflow-scheduled-hour-wrapper")
16        : $("#edit-workflow-scheduled-date-" + j + "-wrapper, #edit-workflow-scheduled-hour-" + j + "-wrapper");
17
18      if (radioButton.is(':checked') && radioButton.val() < 1) {
19        // "Immediately" is pressed upon page entry
20        wrappers.hide();
21      }
22      radioButton.click(function() {
23        if (radioButton.val() < 1) {
24          // "Immediately" is clicked
25          wrappers.hide();
26        }
27        else {
28          // "Schedule for state change" is clicked
29          wrappers.show();
30        }
31      });
32      i++;
33    }
34  });
35
36});
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.