/[drupal]/contributions/modules/pay2publish/pay2publish.js
ViewVC logotype

Diff of /contributions/modules/pay2publish/pay2publish.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.4.1, Fri May 16 13:48:32 2008 UTC revision 1.1.4.2, Tue Jun 10 16:12:34 2008 UTC
# Line 0  Line 1 
1    function pay2publish_checkstate(def) {
2      if (def==undefined) return;
3      for(i=0;i<document.getElementsByName('pay2publish').length;i++) {
4        if (document.getElementsByName('pay2publish')[i].checked) {
5          enb = (document.getElementsByName('pay2publish')[i].value == def);
6        }
7      }
8      vall = false;
9      for(i=0;i<document.getElementsByName('pay2publish_duration').length;i++) {
10        if (document.getElementsByName('pay2publish_duration')[i].value != 0) {
11          if (document.getElementsByName('pay2publish_duration')[i].checked) vall = true;
12        }
13      }
14    
15      for(i=0;i<document.getElementsByName('pay2publish_duration').length;i++)      {
16        if (document.getElementsByName('pay2publish_duration')[i].value == 0) {
17                document.getElementsByName('pay2publish_duration')[i].disabled=!enb;
18            document.getElementsByName('pay2publish_duration')[i].checked=enb;
19        }
20        else {
21            document.getElementsByName('pay2publish_duration')[i].disabled=enb;
22            if (!vall) document.getElementsByName('pay2publish_duration')[i].checked=!enb;
23        }
24      }
25    }
26    

Legend:
Removed from v.1.1.4.1  
changed lines
  Added in v.1.1.4.2

  ViewVC Help
Powered by ViewVC 1.1.2