/[pub]/suikawiki/script/misc/plugins/Obsolete.wp2
Suika

Contents of /suikawiki/script/misc/plugins/Obsolete.wp2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sun Feb 1 12:10:29 2004 UTC (20 years, 9 months ago) by wakaba
Branch: MAIN
Changes since 1.1: +75 -2 lines
Some new rules

1 wakaba 1.1 #?SuikaWikiConfig/2.0
2    
3     Plugin:
4     @Name: Obsolete
5     @Description:
6     @@@: Obsoleted formatting rules
7     @@lang:en
8     @License: %%GPL%%
9     @Author:
10     @@Name:
11     @@@@: Wakaba
12     @@@lang:ja
13     @@@script:Latn
14     @@Mail[list]: w@suika.fam.cx
15 wakaba 1.2 @Date.RCS: $Date: 2004/01/16 07:56:13 $
16 wakaba 1.1 @RequiredPlugin[list]:
17     Error
18     WikiResource
19    
20     PluginConst:
21     @NS_XHTML1:
22     http://www.w3.org/1999/xhtml
23    
24     FormattingRule:
25     @Category[list]:form-input
26     @Name: n
27     @Formatting:
28     SuikaWiki::Plugin->module_package ('Error')
29     ->report_error_simple ($o->{wiki},
30     WikiForm => SuikaWiki::Plugin->module_package ('WikiResource')->get_text
31     (name => 'Obsolete:WikiForm:n',
32     param => $o,
33     wiki => $o->{wiki}));
34     $p->{-parent}->append_new_node (type => '#element',
35     namespace_uri => $NS_XHTML1,
36     local_name => 'br')
37     ->option (use_EmptyElemTag => 1);
38     $p->{-parent}->append_text ("\n");
39    
40     FormattingRule:
41     @Category[list]:form-template
42     @Name: n
43     @After:
44     SuikaWiki::Plugin->module_package ('Error')
45     ->report_error_simple ($o->{wiki},
46     WikiForm => SuikaWiki::Plugin->module_package ('WikiResource')->get_text
47     (name => 'Obsolete:WikiForm:n',
48     param => $o,
49     wiki => $o->{wiki}));
50     $p->{-result} .= "\n";
51    
52 wakaba 1.2 FormattingRule:
53     @Category[list]: form-input
54     @Name: radio
55     @Description:
56     @@@: One of one-from-many selection
57     @@lang: en
58     @Parameter:
59     @@Name: default
60     @@Type: boolean
61     @@Default: "0"
62     @@Description:
63     @@@@: Initial value
64     @@@lang: en
65     @Parameter:
66     @@Name: desription
67     @@Type: text
68     @@Default: (none)
69     @@Description:
70     @@@@: Human readable description about this selection
71     @@@lang: en
72     @Parameter:
73     @@Name: label
74     @@Type: text
75     @@Default: (none)
76     @@Description:
77     @@@@: A label descripting the selection
78     @@@lang: en
79     @Parameter:
80     @@Name: value
81     @@Type: text
82     @@Default: (auto)
83     @@Description:
84     @@@@: Form control value returned when selected
85     @@@lang: en
86     @Formatting:
87     SuikaWiki::Plugin->module_package ('Error')
88     ->report_error_simple ($o->{wiki},
89     WikiForm => SuikaWiki::Plugin->module_package ('WikiResource')->get_text
90     (name => 'Obsolete:WikiForm:%radio',
91     param => $o,
92     wiki => $o->{wiki}));
93     my $id = SuikaWiki::Plugin->module_package ('WikiFormCore')
94     ->control_id ($o,
95     local_id => $p->{id},
96     require_local_id => 1);
97     my $check = $p->{-parent}->append_new_node
98     (type => '#element',
99     namespace_uri => $NS_XHTML1,
100     local_name => 'input');
101     $check->set_attribute (type => 'radio');
102     $check->set_attribute (name => $id->{local_id});
103     __ATTRTEXT:%value__;__ATTRTEXT:%default__;__ATTRTEXT:%description__;
104     $check->set_attribute (checked => 'checked') if $p->{default};
105     $check->set_attribute (value => $p->{value}) if length $p->{value};
106     $check->set_attribute (disabled => 'disabled') if $o->{form}->{disabled};
107     $check->set_attribute (title => $p->{description})
108     if length $p->{description};
109    
110     __ATTRNODE:%label__;
111     if ($p->{label}->count) {
112     $check->set_attribute (id => $id->{global_id});
113     my $label = $p->{-parent}->append_new_node
114     (type => '#element',
115     namespace_uri => $NS_XHTML1,
116     local_name => 'label');
117     $label->set_attribute (for => $id->{global_id});
118     $label->append_node ($p->{label});
119     $label->set_attribute (title => $p->{description})
120     if length $p->{description};
121     }
122    
123 wakaba 1.1 Resource:
124     @Obsolete:WikiForm:n:
125     @@@: Formatting rule "n" is obsolete. Use "line" instead.
126     @@lang:en
127 wakaba 1.2 @Obsolete:WikiForm:%radio:
128     @@@: Formatting rule "radio" is obsolete.
129     @@lang: en
130 wakaba 1.1
131    
132    

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24