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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sun May 16 23:05:49 2010 UTC (14 years, 5 months ago) by wakaba
Branch: MAIN
CVS Tags: suikawiki3-redirect, HEAD
Branch point for: helowiki-2005
added latest .pm files

1 wakaba 1.1 use strict;
2     package SuikaWiki::Plugin::Registry;
3    
4    
5     our %Info;
6     $Info{q#Obsolete#}->{Name} = q#Obsolete#;
7     $Info{q#Obsolete#}->{q#Version#} = q#2004.0831.0328#;
8     $Info{q#Obsolete#}->{q#InterfaceVersion#} = q#2.9.1#;
9     $Info{q#Obsolete#}->{q#mkpluginVersion#} = q#2.1.19#;
10     $Info{q#Obsolete#}->{q#module_name#} = q#SuikaWiki::Plugin::plugin::Obsolete1040731032805HJGd#;
11     $Info{q#Obsolete#}->{q#Date.RCS#} = q#$Date: 2004/03/13 12:29:21 $#;
12     $Info{q#Obsolete#}->{RequiredPlugin} = [q#Error#, q#WikiResource#];
13     $Info{q#Obsolete#}->{Description} = [[q#Obsoleted formatting rules#, q#en#, q##]];
14     $Info{q#Obsolete#}->{License} = [[q#%%Perl%%#, q##, q##]];
15     $Info{q#Obsolete#}->{Author} = [[[[q#Wakaba#, q#ja#, q#Latn#]], [[q#w@suika.fam.cx#]], [q##]]];
16    
17     package SuikaWiki::Plugin::plugin::Obsolete1040731032805HJGd;
18    
19     $SuikaWiki::Plugin::Rule{form_input}->{n} = {q#Parameter#, {}, q#Description#, [], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_;
20    
21     #line 1 "(WikiPlugin module source Obsolete.wp2, block FormattingRule[name()='[q#form-input#]/n']/Formatting)"
22     SuikaWiki::Plugin->module_package ('Error')
23     ->report_error_simple ($o->{wiki},
24     WikiForm => SuikaWiki::Plugin->module_package ('WikiResource')->get_text
25     (name => 'Obsolete:WikiForm:n',
26     param => $o,
27     wiki => $o->{wiki}));
28     $p->{-parent}->append_new_node (type => '#element',
29     namespace_uri => q#http://www.w3.org/1999/xhtml#,
30     local_name => 'br')
31     ->option (use_EmptyElemTag => 1);
32     $p->{-parent}->append_text ("\n");}}
33     #line 1 "(WikiPlugin module Obsolete, chunk 1)"
34     ;
35    
36     $SuikaWiki::Plugin::Rule{form_template}->{n} = {q#after#, sub {my ($f, $rule_name, $p, $o, %opt) = @_;
37    
38     #line 1 "(WikiPlugin module source Obsolete.wp2, block FormattingRule[name()='[q#form-template#]/n']/After)"
39     SuikaWiki::Plugin->module_package ('Error')
40     ->report_error_simple ($o->{wiki},
41     WikiForm => SuikaWiki::Plugin->module_package ('WikiResource')->get_text
42     (name => 'Obsolete:WikiForm:n',
43     param => $o,
44     wiki => $o->{wiki}));
45     $p->{-result} .= "\n";}, q#Parameter#, {}, q#Description#, []}
46     #line 1 "(WikiPlugin module Obsolete, chunk 3)"
47     ;
48    
49     $SuikaWiki::Plugin::Rule{form_input}->{radio} = {q#Parameter#, {q#value#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#Form control value returned when selected#, q#en#, q##]]}, q#label#, {q#Type#, q#text#, q#Default#, q#(none)#, q#Description#, [[q#A label descripting the selection#, q#en#, q##]]}, q#default#, {q#Type#, q#boolean#, q#Default#, q#"0"#, q#Description#, [[q#Initial value#, q#en#, q##]]}, q#desription#, {q#Type#, q#text#, q#Default#, q#(none)#, q#Description#, [[q#Human readable description about this selection#, q#en#, q##]]}}, q#Description#, [[q#One of one-from-many selection#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_;
50    
51     #line 1 "(WikiPlugin module source Obsolete.wp2, block FormattingRule[name()='[q#form-input#]/radio']/Formatting)"
52     SuikaWiki::Plugin->module_package ('Error')
53     ->report_error_simple ($o->{wiki},
54     WikiForm => SuikaWiki::Plugin->module_package ('WikiResource')->get_text
55     (name => 'Obsolete:WikiForm:%radio',
56     param => $o,
57     wiki => $o->{wiki}));
58     my $id = SuikaWiki::Plugin->module_package ('WikiFormCore')
59     ->control_id ($o,
60     local_id => $p->{id},
61     require_local_id => 1);
62     my $check = $p->{-parent}->append_new_node
63     (type => '#element',
64     namespace_uri => q#http://www.w3.org/1999/xhtml#,
65     local_name => 'input');
66     $check->set_attribute (type => 'radio');
67     $check->set_attribute (name => $id->{local_id});
68     $p->{q#value#} = do { my $r = $f->parse_attr ($p=>q#value#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r};$p->{q#default#} = do { my $r = $f->parse_attr ($p=>q#default#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r};$p->{q#description#} = do { my $r = $f->parse_attr ($p=>q#description#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r};
69     $check->set_attribute (checked => 'checked') if $p->{default};
70     $check->set_attribute (value => $p->{value}) if length $p->{value};
71     $check->set_attribute (disabled => 'disabled') if $o->{form}->{disabled};
72     $check->set_attribute (title => $p->{description})
73     if length $p->{description};
74     $f->parse_attr ($p=>q#label#, $o, -non_parsed_to_node => 1, %opt);
75     if ($p->{label}->count) {
76     $check->set_attribute (id => $id->{global_id});
77     my $label = $p->{-parent}->append_new_node
78     (type => '#element',
79     namespace_uri => q#http://www.w3.org/1999/xhtml#,
80     local_name => 'label');
81     $label->set_attribute (for => $id->{global_id});
82     $label->append_node ($p->{label});
83     $label->set_attribute (title => $p->{description})
84     if length $p->{description};
85     }}}
86     #line 1 "(WikiPlugin module Obsolete, chunk 5)"
87     ;
88    
89     {my $def = {q#Parameter#, {q#content#, {q#Type#, q#text#, q#Default#, q#""#, q#Description#, [[q#Content of the line#, q#en#, q##]]}, q#class#, {q#Type#, q#classes#, q#Default#, q#(none)#, q#Description#, [[q#Class of section#, q#en#, q##]]}}, q#Description#, [[q#A semantic line#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_;
90    
91     #line 1 "(WikiPlugin module source Obsolete.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/form_line']/Formatting)"
92     $f->parse_attr ($p=>q#content#, $o, -non_parsed_to_node => 1, %opt);
93     SuikaWiki::Plugin->module_package ('Error')
94     ->report_error_simple ($o->{wiki},
95     WikiForm => SuikaWiki::Plugin->module_package ('WikiResource')->get_text
96     (name => 'Obsolete:WikiForm:%form-line',
97     param => $o,
98     wiki => $o->{wiki}));
99     if ($p->{content}->count) {
100     $p->{-parent}->append_node ($p->{content}, node_or_text => 1);
101     $p->{-parent}->append_new_node
102     (type => '#element', namespace_uri => q#http://www.w3.org/1999/xhtml#, local_name => 'br')
103     ->option (use_EmptyElemTag => 1);
104     }}}
105     #line 1 "(WikiPlugin module Obsolete, chunk 7)"
106     ;
107     $SuikaWiki::Plugin::Rule{view}->{form_line} = $def;
108     $SuikaWiki::Plugin::Rule{view_resource}->{form_line} = $def;
109     $SuikaWiki::Plugin::Rule{form_input}->{form_line} = $def;
110     };
111    
112     package SuikaWiki::Plugin::Resource;
113    
114     our $BaseResource;
115     $BaseResource->{q#en#}->{q##}->{q#Obsolete:WikiForm:%form-line#} = q#Formatting rule "form-line" is obsolete. Use "line" instead.#;
116     $BaseResource->{q#en#}->{q##}->{q#Obsolete:WikiForm:n#} = q#Formatting rule "n" is obsolete. Use "line" instead.#;
117     $BaseResource->{q#en#}->{q##}->{q#Obsolete:WikiForm:%radio#} = q#Formatting rule "radio" is obsolete.#;
118     package SuikaWiki::Plugin::Registry;
119    
120     $Info{q#Obsolete#}->{provide} = {q#rule#, {q#form_input#, [q#n#, q#radio#, q#form_line#], q#view#, [q#form_line#], q#form_template#, [q#n#], q#view_resource#, [q#form_line#]}};
121    
122     1;

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24