/[suikacvs]/webroot/www/js/jste/test.html
Suika

Contents of /webroot/www/js/jste/test.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (hide annotations) (download) (as text)
Tue Jan 20 10:28:39 2009 UTC (16 years, 7 months ago) by wakaba
Branch: MAIN
Changes since 1.11: +160 -10 lines
File MIME type: text/html
Prepare ie support using vml

1 wakaba 1.1 <!DOCTYPE HTML>
2     <html lang=en class=account-user-misc>
3     <meta charset=utf-8>
4     <title>新しい利用者アカウントの作成</title>
5     <link rel=stylesheet href="/admin/style/common">
6 wakaba 1.12 <body>
7 wakaba 1.1 <h1>新しい利用者アカウントの作成</h1>
8    
9     <form action=new-user accept-charset=utf-8 method=post>
10    
11     <p><strong>利用者識別子</strong>: <input type=text name=user-id
12     maxlength=20 size=10 required pattern="[0-9a-z-]{4,20}"> (文字「a」〜「z」、「0」〜「9」、「-」を使って 4〜10 文字の文字列を指定してください。)<p><strong>合言葉</strong>: <input type=password name=user-pass
13     size=10 required pattern=".{4,}"> (最低4文字入力してください。)<p><strong>合言葉</strong> (もう一度): <input type=password
14     name=user-pass2 size=10 required pattern=".{4,}">
15    
16 wakaba 1.12 <p><input type=submit value="作成" class=create></p></form>
17 wakaba 1.1
18     <section>
19     <html lang=en class=account-user-info>
20     <title>さん</title>
21 wakaba 1.12
22     <h1>さん</h1><section id=groups><h2>グループ</h2><section id="groups-joined"><h3>参加中のグループ</h3><ul><li><form action="group.admin-groups" accept-charset=utf-8 method=post><a href="../../groups/admin-groups/">admin-groups</a> <input type=hidden name=action value=leave><input type=submit value="このグループから抜ける"></form><li><form action="group.admin-users" accept-charset=utf-8 method=post><a href="../../groups/admin-users/">admin-users</a> <input type=hidden name=action value=leave><input type=submit value="このグループから抜ける"></form><li><form action="group.helo" accept-charset=utf-8 method=post><a href="../../groups/helo/">helo</a> <input type=hidden name=action value=leave><input type=submit value="このグループから抜ける"></form><li><form action="group.helo-admin" accept-charset=utf-8 method=post><a href="../../groups/helo-admin/">helo-admin</a> <input type=hidden name=action value=leave><input type=submit value="このグループから抜ける"></form><li><form action="group.schema-db" accept-charset=utf-8 method=post><a href="../../groups/schema-db/">schema-db</a> <input type=hidden name=action value=leave><input type=submit value="このグループから抜ける"></form><li><form action="group.spec-ja" accept-charset=utf-8 method=post><a href="../../groups/spec-ja/">spec-ja</a> <input type=hidden name=action value=leave><input type=submit value="このグループから抜ける"></form><li><form action="group.spec-ja-admin" accept-charset=utf-8 method=post><a href="../../groups/spec-ja-admin/">spec-ja-admin</a> <input type=hidden name=action value=leave><input type=submit value="このグループから抜ける"></form><li><form action="group.suikawiki" accept-charset=utf-8 method=post><a href="../../groups/suikawiki/">suikawiki</a> <input type=hidden name=action value=leave><input type=submit value="このグループから抜ける"></form><li><form action="group.test-results" accept-charset=utf-8 method=post><a href="../../groups/test-results/">test-results</a> <input type=hidden name=action value=leave><input type=submit value="このグループから抜ける"></form></ul></section><section id="groups-requested"><h3>参加申請中 (未許可) のグループ</h3><ul><li><form action="" accept-charset=utf-8 method=post><a href="../../groups//"></a> <input type=hidden name=action value=leave><input type=submit value="申請取消"></form></ul></section></section><section id=props><h2>特性</h2><p><em>これらの特性は管理者のみが見ることができますが、秘密の情報は記述しないことをお勧めします。</em></p>
23    
24     <form action="prop" accept-charset=utf-8 method=post><input type=hidden name=name value="full_name"><p><label><strong>名前</strong>: <input type="text" name="value" value=""></label> <input type=submit value="保存">
25    
26     </p></form>
27    
28     <form action="prop" accept-charset=utf-8 method=post><input type=hidden name=name value="mail_addr"><p><label><strong>メイル・アドレス</strong>: <input type="email" name="value" value=""></label> <input type=submit value="保存">
29     </p></form>
30    
31     <form action="prop" accept-charset=utf-8 method=post><input type=hidden name=name value="home_url"><p><label><strong>Web サイト URL</strong>: <input type="url" name="value" value=""></label> <input type=submit value="保存">
32     </p>
33    
34     </form></section><section id=password><h2>合言葉</h2>
35 wakaba 1.1
36     <form action=password method=post accept-charset=utf-8>
37    
38     <p>合言葉を変更できます。<p><strong>新しい合言葉</strong>: <input type=password name=user-pass
39     size=10 required pattern=".{4,}"> (最低4文字入力してください。) <p><strong>新しい合言葉</strong> (もう一度): <input type=password
40     name=user-pass2 size=10 required pattern=".{4,}">
41    
42 wakaba 1.12 <p><input type=submit value="変更"></p>
43 wakaba 1.1
44     </form>
45     </section>
46    
47     <section id=disable-account><h2>アカウントの無効化</h2>
48    
49    
50     <p><label><input type=checkbox name=action value=enable checked> このアカウントを有効にする</label>
51    
52     <p><strong>警告!</strong> 自分のアカウントを無効にすると、自分で再度有効にすることはできません。<p><input type=submit value="変更"></form></section></section>
53    
54     <style>
55    
56 wakaba 1.4 section, article, menu {
57     display: block;
58 wakaba 1.5 margin: 0;
59     padding: 0;
60 wakaba 1.4 }
61    
62     .sbs-container {
63 wakaba 1.1 display: block;
64     position: absolute;
65     }
66 wakaba 1.4
67     .sbs-container.sbs-without-refelement {
68     position: fixed;
69     bottom: 1em;
70     right: 1em;
71     }
72    
73 wakaba 1.10 .sbs-selected {
74     outline: 2px blue dotted !important;
75     }
76    
77 wakaba 1.11 .mm-container {
78 wakaba 1.1 display: block;
79 wakaba 1.5 padding-bottom: 2em;
80 wakaba 1.4 background-color: white;
81 wakaba 1.5 width: 20em;
82     min-height: 5em;
83     }
84    
85 wakaba 1.11 .mm-container menu {
86 wakaba 1.5 position: absolute;
87     bottom: 0;
88     left: 0;
89     right: 0;
90     text-align: center;
91 wakaba 1.4 }
92 wakaba 1.1 </style>
93    
94 wakaba 1.12 </p>
95    
96 wakaba 1.1 <script type="text/javascript" src="uupaa-detect.mini.js"></script>
97     <script type="text/javascript" src="uupaa-selector.js"></script>
98     <script type="text/javascript" src="uupaa-selector+.js"></script>
99    
100 wakaba 1.4 <script src="../../css/noderect/NodeRect.js"></script>
101    
102 wakaba 1.1 <script id="uupaa.js" type="text/javascript" src="uupaa/uupaa.js"></script>
103    
104     <script src=tutorial.js></script>
105    
106     <script>
107    
108     window.onload = function () {
109     window.loaded = true;
110     };
111    
112     function showElement (elements) {
113     if (!window.loaded) {
114     new JSTE.Observer ('load', window, function () {
115     showElement (elements);
116     });
117     return;
118     }
119    
120     var top = Infinity;
121     var left = Infinity;
122     var topEl;
123     var leftEl;
124     elements.forEach (function (el) {
125     var rect = uu.element.rect (el);
126     if (rect.y < top) {
127     top = rect.y;
128     topEl = el;
129     }
130     if (rect.x < left) {
131     left = rect.x;
132     leftEl = el;
133     }
134     });
135    
136     var rect = uu.viewport.rect ();
137     if (rect.sh <= top && top <= rect.sh + rect.h) {
138     top = rect.sh;
139     }
140     if (rect.sw <= left && left <= rect.sw + rect.w) {
141     left = rect.sw;
142     }
143    
144     if (leftEl || topEl) {
145     var od = (leftEl || topEl).ownerDocument;
146     var point = od.createElement ('span');
147     point.style.display = 'block';
148     point.style.position = 'absolute';
149     point.style.top = top + 'px';
150     point.style.left = left + 'px';
151     point.style.width = 0;
152     point.style.height = 0;
153     od.documentElement.appendChild (point);
154     point.scrollIntoView (true);
155     point.parentNode.removeChild (point);
156     }
157     }
158    
159 wakaba 1.12 var SimpleBalloon = new JSTE.Class (function (messageContainer, refElement) {
160     if (!messageContainer) return;
161    
162 wakaba 1.5 this.element = document.createElement ('article');
163 wakaba 1.4 this.element.className = 'sbs-container';
164     document.body.appendChild (this.element);
165    
166 wakaba 1.11 this.contentElement = messageContainer;
167     this.element.appendChild (messageContainer);
168    
169 wakaba 1.10 this._renderBorder ();
170 wakaba 1.4
171 wakaba 1.10 this.refElement = refElement;
172     if (refElement) {
173     JSTE.Element.addClassName (refElement, 'sbs-selected');
174     this._renderPointer ();
175 wakaba 1.4
176 wakaba 1.10 JSTE.Element.addClassName (this.element, 'sbs-with-refelement');
177     } else {
178     JSTE.Element.addClassName (this.element, 'sbs-without-refelement');
179     }
180    
181     var self = this;
182     //setTimeout (function () {
183     showElement (new JSTE.List ([refElement]).onlyNonNull ());
184     //}, 2000);
185     }, {
186     SVGNS: 'http://www.w3.org/2000/svg',
187 wakaba 1.4
188 wakaba 1.10 remove: function () {
189     if (this.refElement) {
190     JSTE.Element.deleteClassName (this.refElement, 'sbs-selected');
191     }
192     }, // remove
193 wakaba 1.9
194 wakaba 1.10 _renderBorder: function () {
195     var msgRects = NR.Element.getRects (this.contentElement, window);
196     var msgRect = msgRects.borderBox;
197    
198     var bb = this.getComputedStyle ();
199    
200     var bwDelta = bb.marginLeft + bb.borderLeftWidth + bb.paddingLeft;
201     var bhDelta = bb.marginTop + bb.borderTopWidth + bb.paddingTop;
202     var boxMBWidth = msgRect.width + bwDelta
203     + bb.marginRight + bb.borderRightWidth + bb.paddingRight;
204     var boxMBHeight = msgRect.height + bhDelta
205     + bb.marginBottom + bb.borderBottomWidth + bb.paddingBottom;
206    
207     var box = document.createElementNS (this.SVGNS, 'svg');
208     box.style.display = 'block';
209     box.style.position = 'absolute';
210     box.style.top = -bhDelta + 'px';
211     box.style.left = -bwDelta + 'px';
212    
213     /* This is necessary to render the content element over the border SVG
214     element. */
215     this.contentElement.style.position = 'relative';
216    
217     box.setAttribute ('width', boxMBWidth);
218     box.setAttribute ('height', boxMBHeight);
219    
220     var bbTop = bb.marginTop + bb.borderTopWidth / 2;
221     var bbRight = boxMBWidth - bb.marginLeft - bb.borderLeftWidth / 2
222     - bb.marginRight - bb.borderRightWidth / 2;
223     var bbLeft = bb.marginLeft + bb.borderLeftWidth / 2;
224     var bbBottom = boxMBHeight - bb.marginTop - bb.marginBottom
225     - bb.borderTopWidth / 2 - bb.borderBottomWidth / 2;
226    
227     var boxBorder = document.createElementNS (this.SVGNS, 'path');
228     boxBorder.setAttribute ('d', [
229     'M', bbLeft + bb.manakaiBorderTopLeftRadiusHorizontal, bbTop,
230    
231     'L', bbRight - bb.manakaiBorderTopRightRadiusHorizontal, bbTop,
232    
233     'a',
234     bb.manakaiBorderTopRightRadiusHorizontal,
235     bb.manakaiBorderTopRightRadiusVertical, 0, 0, 1,
236     bb.manakaiBorderTopRightRadiusHorizontal,
237     bb.manakaiBorderTopRightRadiusVertical,
238 wakaba 1.4
239 wakaba 1.10 'L', bbRight, bbBottom - bb.manakaiBorderBottomRightRadiusVertical,
240    
241     'a',
242     bb.manakaiBorderBottomRightRadiusHorizontal,
243     bb.manakaiBorderBottomRightRadiusVertical, 0, 0, 1,
244     -bb.manakaiBorderBottomRightRadiusHorizontal,
245     bb.manakaiBorderBottomRightRadiusVertical,
246    
247     'L', bbLeft + bb.manakaiBorderBottomLeftRadiusHorizontal, bbBottom,
248    
249     'a',
250     bb.manakaiBorderBottomLeftRadiusHorizontal,
251     bb.manakaiBorderBottomLeftRadiusVertical, 0, 0, 1,
252     -bb.manakaiBorderBottomLeftRadiusHorizontal,
253     -bb.manakaiBorderBottomLeftRadiusVertical,
254    
255     'L', bbLeft, bbTop + bb.manakaiBorderTopLeftRadiusVertical,
256    
257     'a',
258     bb.manakaiBorderTopLeftRadiusHorizontal,
259     bb.manakaiBorderTopLeftRadiusVertical, 0, 0, 1,
260     bb.manakaiBorderTopLeftRadiusHorizontal,
261     -bb.manakaiBorderTopLeftRadiusVertical
262     ].join (' '));
263     boxBorder.setAttribute ('stroke', bb.borderColor);
264     boxBorder.setAttribute ('stroke-width', bb.borderWidth);
265     boxBorder.setAttribute ('fill', bb.backgroundColor);
266    
267     box.appendChild (boxBorder);
268    
269     this.element.insertBefore (box, this.element.firstChild);
270     }, // _renderBorder
271     _renderPointer: function () {
272     var rects = NR.Element.getRects (this.refElement, window);
273     var rbb = rects.borderBox;
274 wakaba 1.4
275 wakaba 1.10 var bb = this.getComputedStyle ();
276 wakaba 1.1
277 wakaba 1.9 var left = rbb.left + rbb.width * 3 / 4 - bb.manakaiPointerSource;
278     if (left < 0) left = bb.borderLeftWidth + bb.paddingLeft;
279     var top = rbb.bottom + bb.manakaiPointerOffset + bb.manakaiPointerHeight + bb.paddingTop;
280 wakaba 1.4
281 wakaba 1.1 this.element.style.top = top + 'px';
282     this.element.style.left = left + 'px';
283 wakaba 1.5
284 wakaba 1.10 var pointerSVGElement = document.createElementNS (this.SVGNS, 'svg');
285 wakaba 1.9 pointerSVGElement.setAttribute ('width', bb.manakaiPointerWidth);
286     pointerSVGElement.setAttribute ('height', bb.manakaiPointerHeight);
287 wakaba 1.5 pointerSVGElement.style.display = 'block';
288     pointerSVGElement.style.position = 'absolute';
289 wakaba 1.9 pointerSVGElement.style.top = -(bb.manakaiPointerHeight + bb.paddingTop) + 'px';
290     pointerSVGElement.style.left = (bb.manakaiPointerSource - bb.manakaiPointerWidth / 2) + 'px';
291 wakaba 1.5
292 wakaba 1.10 var pointerElement = document.createElementNS (this.SVGNS, 'path');
293 wakaba 1.9 pointerElement.setAttribute ('d', [
294     'M', bb.manakaiPointerWidth, bb.manakaiPointerHeight,
295     'Q', bb.manakaiPointerWidth * 3 / 4, bb.manakaiPointerHeight,
296     bb.manakaiPointerWidth / 2, 0,
297     'Q', bb.manakaiPointerWidth / 4, bb.manakaiPointerHeight,
298     0, bb.manakaiPointerHeight].join (' '));
299     pointerElement.setAttribute ('stroke', bb.borderColor);
300     pointerElement.setAttribute ('stroke-width', bb.borderWidth);
301     pointerElement.setAttribute ('fill', bb.backgroundColor);
302 wakaba 1.5
303     pointerSVGElement.appendChild (pointerElement);
304    
305     this.element.appendChild (pointerSVGElement);
306 wakaba 1.10 }, // _renderPointer
307 wakaba 1.9
308     getComputedStyle: function (pseudoEl) {
309     if (pseudoEl == null) {
310     var boxMargin = 1;
311     var boxBorderWidth = 5;
312     var boxBorderColor = 'green';
313     var boxBorderRadiusHorizontal = 10;
314     var boxBorderRadiusVertical = 10;
315     var boxPadding = 10;
316     var pointerBoxMargin = 5;
317     var pointerBoxWidth = 20;
318     var pointerBoxHeight = 40;
319     var pointerBoxLeft = 20;
320    
321     return {
322     marginTop: boxMargin, marginRight: boxMargin, marginBottom: boxMargin,
323     marginLeft: boxMargin,
324     borderColor: boxBorderColor,
325     borderTopColor: boxBorderColor, borderRightColor: boxBorderColor,
326     borderBottomColor: boxBorderColor, borderLeftColor: boxBorderColor,
327     borderWidth: boxBorderWidth,
328     borderTopWidth: boxBorderWidth, borderRightWidth: boxBorderWidth,
329     borderBottomWidth: boxBorderWidth, borderLeftWidth: boxBorderWidth,
330     manakaiBorderTopLeftRadiusHorizontal: boxBorderRadiusHorizontal,
331     manakaiBorderTopLeftRadiusVertical: boxBorderRadiusVertical,
332     manakaiBorderTopRightRadiusHorizontal: boxBorderRadiusHorizontal,
333     manakaiBorderTopRightRadiusVertical: boxBorderRadiusVertical,
334     manakaiBorderBottomLeftRadiusHorizontal: boxBorderRadiusHorizontal,
335     manakaiBorderBottomLeftRadiusVertical: boxBorderRadiusVertical,
336     manakaiBorderBottomRightRadiusHorizontal: boxBorderRadiusHorizontal,
337     manakaiBorderBottomRightRadiusVertical: boxBorderRadiusVertical,
338     paddingTop: boxPadding, paddingRight: boxPadding,
339     paddingBottom: boxPadding, paddingLeft: boxPadding,
340     backgroundColor: this.getBackgroundColor (),
341     manakaiPointerWidth: pointerBoxWidth,
342     manakaiPointerHeight: pointerBoxHeight,
343     manakaiPointerOffset: pointerBoxMargin,
344     manakaiPointerSource: pointerBoxLeft
345     };
346     } else {
347     return {};
348     }
349     }, // getComputedStyle
350 wakaba 1.4
351     getBackgroundColor: function () {
352     var el = this.contentElement;
353     if (window.getComputedStyle) {
354     return getComputedStyle (el, null).backgroundColor;
355     } else if (el.currentStyle) {
356     return el.currentStyle.backgroundColor;
357     } else {
358     return 'white';
359     }
360     } // getBackgroundColor
361 wakaba 1.12 }); // SimpleBalloon
362    
363     var SimpleBalloonVML = new JSTE.Subclass (function () {
364     if (document.namespaces._vml_) {
365     document.namespaces.add ('_vml_', 'urn:schemas-microsoft-com:vml');
366     }
367    
368     var ss = document.createStyleSheet ();
369     ss.cssText = '_vml_\\:* { behavior: url(#default#VML) }';
370    
371     this._super.apply (this, arguments);
372     }, SimpleBalloon, {
373     _renderBorder: function () {
374     var msgRects = NR.Element.getRects (this.contentElement, window);
375     var msgRect = msgRects.borderBox;
376    
377     var bb = this.getComputedStyle ();
378    
379     var bwDelta = bb.marginLeft + bb.borderLeftWidth + bb.paddingLeft;
380     var bhDelta = bb.marginTop + bb.borderTopWidth + bb.paddingTop;
381     var boxMBWidth = msgRect.width + bwDelta
382     + bb.marginRight + bb.borderRightWidth + bb.paddingRight;
383     var boxMBHeight = msgRect.height + bhDelta
384     + bb.marginBottom + bb.borderBottomWidth + bb.paddingBottom;
385    
386     var box = document.createElement ('_vml_:shape');
387     box.style.display = 'block';
388     box.style.position = 'absolute';
389     box.style.top = -bhDelta + 'px';
390     box.style.left = -bwDelta + 'px';
391    
392     /* This is necessary to render the content element over the border SVG
393     element. */
394     this.contentElement.style.position = 'relative';
395    
396     box.style.width = boxMBWidth + 'px';
397     box.style.height = boxMBHeight + 'px';
398    
399     var bbTop = bb.marginTop + bb.borderTopWidth / 2;
400     var bbRight = boxMBWidth - bb.marginLeft - bb.borderLeftWidth / 2
401     - bb.marginRight - bb.borderRightWidth / 2;
402     var bbLeft = bb.marginLeft + bb.borderLeftWidth / 2;
403     var bbBottom = boxMBHeight - bb.marginTop - bb.marginBottom
404     - bb.borderTopWidth / 2 - bb.borderBottomWidth / 2;
405    
406     var boxBorder = document.createElement ('_vml_:path');
407     boxBorder.setAttribute ('v', [
408     'm', bbLeft + bb.manakaiBorderTopLeftRadiusHorizontal, bbTop,
409    
410     'l', bbRight - bb.manakaiBorderTopRightRadiusHorizontal, bbTop,
411     /*
412     'a',
413     bb.manakaiBorderTopRightRadiusHorizontal,
414     bb.manakaiBorderTopRightRadiusVertical, 0, 0, 1,
415     bb.manakaiBorderTopRightRadiusHorizontal,
416     bb.manakaiBorderTopRightRadiusVertical,
417     */
418     'l', bbRight, bbBottom - bb.manakaiBorderBottomRightRadiusVertical,
419     /*
420     'a',
421     bb.manakaiBorderBottomRightRadiusHorizontal,
422     bb.manakaiBorderBottomRightRadiusVertical, 0, 0, 1,
423     -bb.manakaiBorderBottomRightRadiusHorizontal,
424     bb.manakaiBorderBottomRightRadiusVertical,
425     */
426     'l', bbLeft + bb.manakaiBorderBottomLeftRadiusHorizontal, bbBottom,
427     /*
428     'a',
429     bb.manakaiBorderBottomLeftRadiusHorizontal,
430     bb.manakaiBorderBottomLeftRadiusVertical, 0, 0, 1,
431     -bb.manakaiBorderBottomLeftRadiusHorizontal,
432     -bb.manakaiBorderBottomLeftRadiusVertical,
433     */
434     'l', bbLeft, bbTop + bb.manakaiBorderTopLeftRadiusVertical,
435     /*
436     'a',
437     bb.manakaiBorderTopLeftRadiusHorizontal,
438     bb.manakaiBorderTopLeftRadiusVertical, 0, 0, 1,
439     bb.manakaiBorderTopLeftRadiusHorizontal,
440     -bb.manakaiBorderTopLeftRadiusVertical,
441     */
442     'e'
443     ].join (' '));
444     boxBorder.setAttribute ('stroke', 'true');
445     boxBorder.setAttribute ('strokecolor', bb.borderColor);
446     boxBorder.setAttribute ('strokeweight', bb.borderWidth);
447     boxBorder.setAttribute ('fill', 'true');
448     boxBorder.setAttribute ('fillcolor', bb.backgroundColor);
449     boxBorder.setAttribute ('coordorigin', '0 0');
450     boxBorder.setAttribute ('coordsize', boxMBWidth + ' ' + boxMBHeight);
451    
452     box.appendChild (boxBorder);
453    
454     this.element.insertBefore (box, this.element.firstChild);
455     }, // _renderBorder
456     _renderPointer: function () {
457     var rects = NR.Element.getRects (this.refElement, window);
458     var rbb = rects.borderBox;
459    
460     var bb = this.getComputedStyle ();
461    
462     var left = rbb.left + rbb.width * 3 / 4 - bb.manakaiPointerSource;
463     if (left < 0) left = bb.borderLeftWidth + bb.paddingLeft;
464     var top = rbb.bottom + bb.manakaiPointerOffset + bb.manakaiPointerHeight + bb.paddingTop;
465    
466     this.element.style.top = top + 'px';
467     this.element.style.left = left + 'px';
468    
469     var pointerSVGElement = document.createElementNS (this.SVGNS, 'svg');
470     pointerSVGElement.setAttribute ('width', bb.manakaiPointerWidth);
471     pointerSVGElement.setAttribute ('height', bb.manakaiPointerHeight);
472     pointerSVGElement.style.display = 'block';
473     pointerSVGElement.style.position = 'absolute';
474     pointerSVGElement.style.top = -(bb.manakaiPointerHeight + bb.paddingTop) + 'px';
475     pointerSVGElement.style.left = (bb.manakaiPointerSource - bb.manakaiPointerWidth / 2) + 'px';
476    
477     var pointerElement = document.createElementNS (this.SVGNS, 'path');
478     pointerElement.setAttribute ('d', [
479     'M', bb.manakaiPointerWidth, bb.manakaiPointerHeight,
480     'Q', bb.manakaiPointerWidth * 3 / 4, bb.manakaiPointerHeight,
481     bb.manakaiPointerWidth / 2, 0,
482     'Q', bb.manakaiPointerWidth / 4, bb.manakaiPointerHeight,
483     0, bb.manakaiPointerHeight].join (' '));
484     pointerElement.setAttribute ('stroke', bb.borderColor);
485     pointerElement.setAttribute ('stroke-width', bb.borderWidth);
486     pointerElement.setAttribute ('fill', bb.backgroundColor);
487    
488     pointerSVGElement.appendChild (pointerElement);
489    
490     this.element.appendChild (pointerSVGElement);
491     } // _renderPointer
492    
493     }); // SimpleBalloonVML
494 wakaba 1.1
495     var MyMessage = new JSTE.Subclass (function () {
496     return this._super.apply (this, arguments);
497     }, JSTE.Message, {
498     _render: function (msgContainer, buttonContainer) {
499     var doc = this._targetDocument;
500    
501     var container = doc.createElement ('section');
502 wakaba 1.11 container.className = 'mm-container';
503 wakaba 1.1
504     container.appendChild (msgContainer);
505     container.appendChild (buttonContainer);
506    
507     var refElement = JSTE.Node.querySelector (document, this.select);
508 wakaba 1.12 if (document.all) {
509     this._simpleBalloon = new SimpleBalloonVML (container, refElement);
510     } else {
511     this._simpleBalloon = new SimpleBalloon (container, refElement);
512     }
513 wakaba 1.1
514     return this._simpleBalloon.element;
515     }, // _render
516     _remove: function () {
517     this._simpleBalloon.remove ();
518     } // _remove
519     });
520    
521     var xhr = new XMLHttpRequest ();
522     xhr.open ('GET', 'test.xml', false);
523     xhr.send (null);
524    
525    
526     document.a =
527     JSTE.Course.createFromDocument (xhr.responseXML, document);
528    
529     document.b =
530     new JSTE.Tutorial (document, document.a, {messageClass: MyMessage});
531    
532     </script>
533    
534 wakaba 1.3 <!--
535     /* ***** BEGIN LICENSE BLOCK *****
536     * Copyright 2008-2009 Wakaba <w@suika.fam.cx>. All rights reserved.
537     *
538     * This program is free software; you can redistribute it and/or
539     * modify it under the same terms as Perl itself.
540     *
541     * Alternatively, the contents of this file may be used
542     * under the following terms (the "MPL/GPL/LGPL"),
543     * in which case the provisions of the MPL/GPL/LGPL are applicable instead
544     * of those above. If you wish to allow use of your version of this file only
545     * under the terms of the MPL/GPL/LGPL, and not to allow others to
546     * use your version of this file under the terms of the Perl, indicate your
547     * decision by deleting the provisions above and replace them with the notice
548     * and other provisions required by the MPL/GPL/LGPL. If you do not delete
549     * the provisions above, a recipient may use your version of this file under
550     * the terms of any one of the Perl or the MPL/GPL/LGPL.
551     *
552     * "MPL/GPL/LGPL":
553     *
554     * Version: MPL 1.1/GPL 2.0/LGPL 2.1
555     *
556     * The contents of this file are subject to the Mozilla Public License Version
557     * 1.1 (the "License"); you may not use this file except in compliance with
558     * the License. You may obtain a copy of the License at
559     * <http://www.mozilla.org/MPL/>
560     *
561     * Software distributed under the License is distributed on an "AS IS" basis,
562     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
563     * for the specific language governing rights and limitations under the
564     * License.
565     *
566     * The Original Code is JSTE code.
567     *
568     * The Initial Developer of the Original Code is Wakaba.
569     * Portions created by the Initial Developer are Copyright (C) 2008
570     * the Initial Developer. All Rights Reserved.
571     *
572     * Contributor(s):
573     * Wakaba <w@suika.fam.cx>
574     *
575     * Alternatively, the contents of this file may be used under the terms of
576     * either the GNU General Public License Version 2 or later (the "GPL"), or
577     * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
578     * in which case the provisions of the GPL or the LGPL are applicable instead
579     * of those above. If you wish to allow use of your version of this file only
580     * under the terms of either the GPL or the LGPL, and not to allow others to
581     * use your version of this file under the terms of the MPL, indicate your
582     * decision by deleting the provisions above and replace them with the notice
583     * and other provisions required by the LGPL or the GPL. If you do not delete
584     * the provisions above, a recipient may use your version of this file under
585     * the terms of any one of the MPL, the GPL or the LGPL.
586     *
587     * ***** END LICENSE BLOCK ***** */
588     -->

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24