| 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 |
<body>
|
| 7 |
<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 |
<p><input type=submit value="作成" class=create></p></form>
|
| 17 |
|
| 18 |
<section>
|
| 19 |
<html lang=en class=account-user-info>
|
| 20 |
<title>さん</title>
|
| 21 |
|
| 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 |
|
| 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 |
<p><input type=submit value="変更"></p>
|
| 43 |
|
| 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 |
section, article, menu {
|
| 57 |
display: block;
|
| 58 |
margin: 0;
|
| 59 |
padding: 0;
|
| 60 |
}
|
| 61 |
|
| 62 |
.sbs-container {
|
| 63 |
display: block;
|
| 64 |
position: absolute;
|
| 65 |
}
|
| 66 |
|
| 67 |
.sbs-container.sbs-without-refelement {
|
| 68 |
position: fixed;
|
| 69 |
bottom: 1em;
|
| 70 |
right: 1em;
|
| 71 |
}
|
| 72 |
|
| 73 |
.sbs-selected {
|
| 74 |
outline: 2px blue dotted !important;
|
| 75 |
}
|
| 76 |
|
| 77 |
.mm-container {
|
| 78 |
display: block;
|
| 79 |
padding-bottom: 2em;
|
| 80 |
background-color: white;
|
| 81 |
width: 20em;
|
| 82 |
min-height: 5em;
|
| 83 |
}
|
| 84 |
|
| 85 |
.mm-container menu {
|
| 86 |
position: absolute;
|
| 87 |
bottom: 0;
|
| 88 |
left: 0;
|
| 89 |
right: 0;
|
| 90 |
text-align: center;
|
| 91 |
}
|
| 92 |
</style>
|
| 93 |
|
| 94 |
</p>
|
| 95 |
|
| 96 |
<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 |
<script src="../../css/noderect/NodeRect.js"></script>
|
| 101 |
|
| 102 |
<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 |
var SimpleBalloon = new JSTE.Class (function (messageContainer, refElement) {
|
| 160 |
if (!messageContainer) return;
|
| 161 |
|
| 162 |
this.element = document.createElement ('article');
|
| 163 |
this.element.className = 'sbs-container';
|
| 164 |
document.body.appendChild (this.element);
|
| 165 |
|
| 166 |
this.contentElement = messageContainer;
|
| 167 |
this.element.appendChild (messageContainer);
|
| 168 |
|
| 169 |
this._renderBorder ();
|
| 170 |
|
| 171 |
this.refElement = refElement;
|
| 172 |
if (refElement) {
|
| 173 |
JSTE.Element.addClassName (refElement, 'sbs-selected');
|
| 174 |
this._renderPointer ();
|
| 175 |
|
| 176 |
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 |
|
| 188 |
remove: function () {
|
| 189 |
if (this.refElement) {
|
| 190 |
JSTE.Element.deleteClassName (this.refElement, 'sbs-selected');
|
| 191 |
}
|
| 192 |
}, // remove
|
| 193 |
|
| 194 |
_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 |
|
| 239 |
'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 |
|
| 275 |
var bb = this.getComputedStyle ();
|
| 276 |
|
| 277 |
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 |
|
| 281 |
this.element.style.top = top + 'px';
|
| 282 |
this.element.style.left = left + 'px';
|
| 283 |
|
| 284 |
var pointerSVGElement = document.createElementNS (this.SVGNS, 'svg');
|
| 285 |
pointerSVGElement.setAttribute ('width', bb.manakaiPointerWidth);
|
| 286 |
pointerSVGElement.setAttribute ('height', bb.manakaiPointerHeight);
|
| 287 |
pointerSVGElement.style.display = 'block';
|
| 288 |
pointerSVGElement.style.position = 'absolute';
|
| 289 |
pointerSVGElement.style.top = -(bb.manakaiPointerHeight + bb.paddingTop) + 'px';
|
| 290 |
pointerSVGElement.style.left = (bb.manakaiPointerSource - bb.manakaiPointerWidth / 2) + 'px';
|
| 291 |
|
| 292 |
var pointerElement = document.createElementNS (this.SVGNS, 'path');
|
| 293 |
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 |
|
| 303 |
pointerSVGElement.appendChild (pointerElement);
|
| 304 |
|
| 305 |
this.element.appendChild (pointerSVGElement);
|
| 306 |
}, // _renderPointer
|
| 307 |
|
| 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 |
|
| 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 |
}); // 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 |
var a = document.createElement ('_vml_:shape');
|
| 453 |
var b = document.createElement ('_vml_:path');
|
| 454 |
a.appendChild (b);
|
| 455 |
|
| 456 |
// box.appendChild (boxBorder);
|
| 457 |
|
| 458 |
this.element.insertBefore (box, this.element.firstChild);
|
| 459 |
}, // _renderBorder
|
| 460 |
_renderPointer: function () {
|
| 461 |
return;
|
| 462 |
var rects = NR.Element.getRects (this.refElement, window);
|
| 463 |
var rbb = rects.borderBox;
|
| 464 |
|
| 465 |
var bb = this.getComputedStyle ();
|
| 466 |
|
| 467 |
var left = rbb.left + rbb.width * 3 / 4 - bb.manakaiPointerSource;
|
| 468 |
if (left < 0) left = bb.borderLeftWidth + bb.paddingLeft;
|
| 469 |
var top = rbb.bottom + bb.manakaiPointerOffset + bb.manakaiPointerHeight + bb.paddingTop;
|
| 470 |
|
| 471 |
this.element.style.top = top + 'px';
|
| 472 |
this.element.style.left = left + 'px';
|
| 473 |
|
| 474 |
var pointerSVGElement = document.createElementNS (this.SVGNS, 'svg');
|
| 475 |
pointerSVGElement.setAttribute ('width', bb.manakaiPointerWidth);
|
| 476 |
pointerSVGElement.setAttribute ('height', bb.manakaiPointerHeight);
|
| 477 |
pointerSVGElement.style.display = 'block';
|
| 478 |
pointerSVGElement.style.position = 'absolute';
|
| 479 |
pointerSVGElement.style.top = -(bb.manakaiPointerHeight + bb.paddingTop) + 'px';
|
| 480 |
pointerSVGElement.style.left = (bb.manakaiPointerSource - bb.manakaiPointerWidth / 2) + 'px';
|
| 481 |
|
| 482 |
var pointerElement = document.createElementNS (this.SVGNS, 'path');
|
| 483 |
pointerElement.setAttribute ('d', [
|
| 484 |
'M', bb.manakaiPointerWidth, bb.manakaiPointerHeight,
|
| 485 |
'Q', bb.manakaiPointerWidth * 3 / 4, bb.manakaiPointerHeight,
|
| 486 |
bb.manakaiPointerWidth / 2, 0,
|
| 487 |
'Q', bb.manakaiPointerWidth / 4, bb.manakaiPointerHeight,
|
| 488 |
0, bb.manakaiPointerHeight].join (' '));
|
| 489 |
pointerElement.setAttribute ('stroke', bb.borderColor);
|
| 490 |
pointerElement.setAttribute ('stroke-width', bb.borderWidth);
|
| 491 |
pointerElement.setAttribute ('fill', bb.backgroundColor);
|
| 492 |
|
| 493 |
pointerSVGElement.appendChild (pointerElement);
|
| 494 |
|
| 495 |
this.element.appendChild (pointerSVGElement);
|
| 496 |
} // _renderPointer
|
| 497 |
|
| 498 |
}); // SimpleBalloonVML
|
| 499 |
|
| 500 |
var MyMessage = new JSTE.Subclass (function () {
|
| 501 |
return this._super.apply (this, arguments);
|
| 502 |
}, JSTE.Message, {
|
| 503 |
_render: function (msgContainer, buttonContainer) {
|
| 504 |
var doc = this._targetDocument;
|
| 505 |
|
| 506 |
var container = doc.createElement ('section');
|
| 507 |
container.className = 'mm-container';
|
| 508 |
|
| 509 |
container.appendChild (msgContainer);
|
| 510 |
container.appendChild (buttonContainer);
|
| 511 |
|
| 512 |
var refElement = JSTE.Node.querySelector (document, this.select);
|
| 513 |
if (document.all) {
|
| 514 |
this._simpleBalloon = new SimpleBalloonVML (container, refElement);
|
| 515 |
} else {
|
| 516 |
this._simpleBalloon = new SimpleBalloon (container, refElement);
|
| 517 |
}
|
| 518 |
|
| 519 |
return this._simpleBalloon.element;
|
| 520 |
}, // _render
|
| 521 |
_remove: function () {
|
| 522 |
this._simpleBalloon.remove ();
|
| 523 |
} // _remove
|
| 524 |
});
|
| 525 |
|
| 526 |
var xhr = new XMLHttpRequest ();
|
| 527 |
xhr.open ('GET', 'test.xml', false);
|
| 528 |
xhr.send (null);
|
| 529 |
|
| 530 |
|
| 531 |
document.a =
|
| 532 |
JSTE.Course.createFromDocument (xhr.responseXML, document);
|
| 533 |
|
| 534 |
document.b =
|
| 535 |
new JSTE.Tutorial (document, document.a, {messageClass: MyMessage});
|
| 536 |
|
| 537 |
</script>
|
| 538 |
|
| 539 |
<!--
|
| 540 |
/* ***** BEGIN LICENSE BLOCK *****
|
| 541 |
* Copyright 2008-2009 Wakaba <[email protected]>. All rights reserved.
|
| 542 |
*
|
| 543 |
* This program is free software; you can redistribute it and/or
|
| 544 |
* modify it under the same terms as Perl itself.
|
| 545 |
*
|
| 546 |
* Alternatively, the contents of this file may be used
|
| 547 |
* under the following terms (the "MPL/GPL/LGPL"),
|
| 548 |
* in which case the provisions of the MPL/GPL/LGPL are applicable instead
|
| 549 |
* of those above. If you wish to allow use of your version of this file only
|
| 550 |
* under the terms of the MPL/GPL/LGPL, and not to allow others to
|
| 551 |
* use your version of this file under the terms of the Perl, indicate your
|
| 552 |
* decision by deleting the provisions above and replace them with the notice
|
| 553 |
* and other provisions required by the MPL/GPL/LGPL. If you do not delete
|
| 554 |
* the provisions above, a recipient may use your version of this file under
|
| 555 |
* the terms of any one of the Perl or the MPL/GPL/LGPL.
|
| 556 |
*
|
| 557 |
* "MPL/GPL/LGPL":
|
| 558 |
*
|
| 559 |
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
| 560 |
*
|
| 561 |
* The contents of this file are subject to the Mozilla Public License Version
|
| 562 |
* 1.1 (the "License"); you may not use this file except in compliance with
|
| 563 |
* the License. You may obtain a copy of the License at
|
| 564 |
* <http://www.mozilla.org/MPL/>
|
| 565 |
*
|
| 566 |
* Software distributed under the License is distributed on an "AS IS" basis,
|
| 567 |
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
| 568 |
* for the specific language governing rights and limitations under the
|
| 569 |
* License.
|
| 570 |
*
|
| 571 |
* The Original Code is JSTE code.
|
| 572 |
*
|
| 573 |
* The Initial Developer of the Original Code is Wakaba.
|
| 574 |
* Portions created by the Initial Developer are Copyright (C) 2008
|
| 575 |
* the Initial Developer. All Rights Reserved.
|
| 576 |
*
|
| 577 |
* Contributor(s):
|
| 578 |
* Wakaba <[email protected]>
|
| 579 |
*
|
| 580 |
* Alternatively, the contents of this file may be used under the terms of
|
| 581 |
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
| 582 |
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
| 583 |
* in which case the provisions of the GPL or the LGPL are applicable instead
|
| 584 |
* of those above. If you wish to allow use of your version of this file only
|
| 585 |
* under the terms of either the GPL or the LGPL, and not to allow others to
|
| 586 |
* use your version of this file under the terms of the MPL, indicate your
|
| 587 |
* decision by deleting the provisions above and replace them with the notice
|
| 588 |
* and other provisions required by the LGPL or the GPL. If you do not delete
|
| 589 |
* the provisions above, a recipient may use your version of this file under
|
| 590 |
* the terms of any one of the MPL, the GPL or the LGPL.
|
| 591 |
*
|
| 592 |
* ***** END LICENSE BLOCK ***** */
|
| 593 |
-->
|