Diary_editor 2.0

[diary:172233]
[beforeExec]
entry = function(load,offset){
Fx.page = load ? (Fx.loc.match(/page=(\d+)/) ? RegExp.$1 : "") : echo("article");
if(Fx.page.match(/[^0-9]/) || Fx.page == "") Fx.page = 43414;
if(typeof(Fx.page) == "string") Fx.page = Number(Fx.page);
echo("article", Fx.page + offset);
loadEntry();
};
loadEntry = function(){
var str = "/cgi-bin/diary_editor.cgi?type=comments;oid=" + Vis.oid + ";id=" + Fx.page;
echo("nomalUri", "\x3ca href='" + str + "'>nomal_edit\x3c/a>");
var doc = Fx.e(str, false);
echo("eDisp", doc.match(/<textarea[^>]+>(.+?)<\/textarea>/) ? Fx.dec(RegExp.$1) : "");
echo("postUser", doc.match(/\xc3civ>(.+?)\x3c\/div>/) ? RegExp.$1 : "");
eDispCounter();
if(echo("eDisp") == ""){
echo("eDispMsgDisp", [Fx.page,"の記事は削除されています"]);
var o = Fid("article"); o.focus(); o.select();
return;
}
echo("eDispMsgDisp", "done.");
};
upDateEntry = function(){
echo("eDispMsgDisp", "/cgi-bin/diary_editor.cgi submit now...");
Fx.e("diary_editor", diaryEditor(Fx.page,echo("eDisp")), "uE2");
};
Lo.uE2 = function(){
echo("eDispMsgDisp", "update : " + (new Date()).toLocaleString() + " ....done.");
};
eDispCounter = function(){
echo("eDispCountDisp", echo("eDisp").length + "/200(max)");
};
[/beforeExec]
[body]
[form:eForm]

<input type="button" value="before" onclick="entry(false,-1)" /><input type="button"
value="this" onclick="entry(false,0)" /><input type="button"
value="next" onclick="entry(false,1)" />
no:<input type="text" id="article" size="6" value="" />


[form:sep]
<input type="button" value="size" />
[append:1,eDisp]
<input type="button" id="eDispSubmitButton" value="submit" onclick="upDateEntry()" />



[form:sep]
<input type="button" value="done">
[form:end]
[/body]
[exec]
entry(true, 0);
document.title = "Diary_editor 2.0";
[/exec]
[/diary:172233]

■仕様書 2010 04/06 07:10 Wrote