/[suikacvs]/test/suikawebwww/style/html/xhtml2-dynamic.xbl
Suika

Contents of /test/suikawebwww/style/html/xhtml2-dynamic.xbl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Jul 25 08:46:14 2005 UTC (19 years, 9 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
xhtml2-dynamic.xbl: New

1 wakaba 1.1 <?xml version="1.0"?>
2     <bindings xmlns="http://www.mozilla.org/xbl">
3     <binding id="expandable-label">
4     <implementation>
5     <constructor>
6     var ol = this.xoxoSubList;
7     if (ol) {
8     this.setAttributeNS ('http://suika.fam.cx/www/style/html/xoxo#',
9     'xoxo:enabled', 'true');
10     if (ol.hasAttribute ('compact')) {
11     this.setAttributeNS ('http://suika.fam.cx/www/style/html/xoxo#',
12     'xoxo:expanded', 'false');
13     } else {
14     this.setAttributeNS ('http://suika.fam.cx/www/style/html/xoxo#',
15     'xoxo:expanded', 'true');
16     }
17     }
18    
19     <!-- From <xhtml2-translate.xbl#href> -->
20     if (this.hasAttributeNS (null, 'href')) {
21     this.setAttributeNS ('http://www.w3.org/1999/xlink', 'xlink:href',
22     this.getAttributeNS (null, 'href'));
23     this.setAttributeNS ('http://www.w3.org/1999/xlink', 'xlink:type',
24     'simple');
25     }
26     </constructor>
27     <property name="xoxoExpanded">
28     <getter>
29     var ol = this.xoxoSubList;
30     if (ol) {
31     if (ol.hasAttributeNS ('http://suika.fam.cx/www/style/html/xoxo#',
32     'compact')) {
33     return false;
34     } else {
35     return true;
36     }
37     } else {
38     return true;
39     }
40     </getter>
41     <setter>
42     var ol = this.xoxoSubList;
43     if (ol) {
44     if (val) {
45     ol.removeAttributeNS ('http://suika.fam.cx/www/style/html/xoxo#',
46     'compact');
47     this.setAttributeNS ('http://suika.fam.cx/www/style/html/xoxo#',
48     'xoxo:expanded', 'true');
49     } else {
50     ol.setAttributeNS ('http://suika.fam.cx/www/style/html/xoxo#',
51     'compact', 'compact');
52     this.setAttributeNS ('http://suika.fam.cx/www/style/html/xoxo#',
53     'xoxo:expanded', 'false');
54     }
55     } else {
56     this.removeAttributeNS ('http://suika.fam.cx/www/style/html/xoxo#',
57     'xoxo:expanded');
58     }
59     </setter>
60     </property>
61     <property name="xoxoSubList" readonly="true">
62     <getter>
63     <!--
64     return this.getElementsByTagNameNS
65     ('http://www.w3.org/2002/06/xhtml2/',
66     'nl')[0];
67     -->
68     return this.parentNode;
69     </getter>
70     </property>
71     </implementation>
72     <handlers>
73     <handler event="click">
74     <!--
75     var target = event.target /* li */;
76     var ol = this.xoxoSubList;
77     if (ol) {
78     var dp = target.compareDocumentPosition (ol);
79     <![CDATA[
80     if (!(dp == 0 /* same node */) &&
81     !(dp & target.DOCUMENT_POSITION_CONTAINS)) {
82     this.xoxoExpanded = !this.xoxoExpanded;
83     }
84     ]]>
85     }
86     -->
87     this.xoxoExpanded = !this.xoxoExpanded;
88     event.stopPropagation ();
89     </handler>
90     </handlers>
91     </binding>
92     <binding id="expandable-label-open-by-hover" extends="#expandable-label">
93     <implementation>
94     <constructor>
95     this.xoxoExpanded = false;
96     </constructor>
97     </implementation>
98     <handlers>
99     <handler event="mouseover">
100     this.xoxoExpanded = true;
101     </handler>
102     </handlers>
103     </binding>
104     </bindings>
105     <!-- ***** BEGIN LICENSE BLOCK *****
106     - Version: MPL 1.1/GPL 2.0/LGPL 2.1
107     -
108     - The contents of this file are subject to the Mozilla Public License Version
109     - 1.1 (the "License"); you may not use this file except in compliance with
110     - the License. You may obtain a copy of the License at
111     - <http://www.mozilla.org/MPL/>
112     -
113     - Software distributed under the License is distributed on an "AS IS" basis,
114     - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
115     - for the specific language governing rights and limitations under the
116     - License.
117     -
118     - The Original Code is <http://suika.fam.cx/www/style/html/xoxo> code.
119     -
120     - The Initial Developer of the Original Code is Wakaba.
121     - Portions created by the Initial Developer are Copyright (C) 2005
122     - the Initial Developer. All Rights Reserved.
123     -
124     - Contributor(s):
125     - Wakaba <w@suika.fam.cx>
126     -
127     - Alternatively, the contents of this file may be used under the terms of
128     - either the GNU General Public License Version 2 or later (the "GPL"), or
129     - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
130     - in which case the provisions of the GPL or the LGPL are applicable instead
131     - of those above. If you wish to allow use of your version of this file only
132     - under the terms of either the GPL or the LGPL, and not to allow others to
133     - use your version of this file under the terms of the MPL, indicate your
134     - decision by deleting the provisions above and replace them with the notice
135     - and other provisions required by the LGPL or the GPL. If you do not delete
136     - the provisions above, a recipient may use your version of this file under
137     - the terms of any one of the MPL, the GPL or the LGPL.
138     -
139     - ***** END LICENSE BLOCK ***** -->

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24  
Google Analytics is used in this page; Cookies are used. 忍者AdMax is used in this page; Cookies are used. Privacy policy.