• R/O
  • HTTP
  • SSH
  • HTTPS

feedblog: 提交

JavaScriptのみで記述されたブログツール・ソフトウェアです。


Commit MetaInfo

修訂10280b6009f38b79825ccd5a1bd6540a916b7322 (tree)
時間2013-09-17 23:27:22
作者Kureha Hisame <kureha@gmai...>
CommiterKureha Hisame

Log Message

- add jquery-te editor to generator.

Change Summary

差異

--- a/generator.html
+++ b/generator.html
@@ -4,14 +4,21 @@
44 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
55 <title>記事更新アプリケーション</title>
66 <script type="text/javascript" src="./js/jquery/jquery-1.9.1.js"></script>
7+ <script type="text/javascript" src="./js/jquery-te/jquery-te-1.4.0.min.js"></script>
78 <script type="text/javascript" src="./js/lunardial/feedblog_generator.js"></script>
89 <link rel="stylesheet" href="./js/lunardial/css/reset.css" type="text/css"/>
910 <link rel="stylesheet" href="./js/lunardial/css/base.css" type="text/css"/>
11+ <link rel="stylesheet" href="./js/jquery-te/jquery-te-1.4.0.css" type="text/css"/>
12+ <style>
13+ .jqte {
14+ margin: 0px;
15+ }
16+ </style>
1017 </head>
1118 <body>
1219 <!-- feedblog generator用の定数値です ここから -->
1320 <input type="hidden" id="feedblog_loglistxmlurl" value="./xml/loglist.xml">
14- <input type="hidden" id="feedblog_inputvalidatemode" value="1">
21+ <input type="hidden" id="feedblog_inputvalidatemode" value="0">
1522 <input type="hidden" id="feedblog_outputvalidatemode" value="1">
1623 <input type="hidden" id="feedblog_tagdefine" value="music,音楽|active,ダイエット|game,娯楽">
1724 <!-- feedblog generator用の定数値です ここまで -->
--- /dev/null
+++ b/js/jquery-te/jquery-te-1.4.0.css
@@ -0,0 +1,457 @@
1+/*!
2+ *
3+ * jQuery TE 1.4.0 , http://jqueryte.com/
4+ * Copyright (C) 2013, Fatih Koca (fattih@fattih.com), (http://jqueryte.com/about)
5+
6+ * jQuery TE is provided under the MIT LICENSE.
7+ *
8+*/
9+
10+/* editor's general field */
11+.jqte {
12+ margin:30px 0;
13+ border:#000 1px solid;
14+ border-radius:5px; -webkit-border-radius:5px; -moz-border-radius:5px;
15+ box-shadow:0 0 3px #999; -webkit-box-shadow:0 0 3px #999; -moz-box-shadow:0 0 3px #999;
16+ overflow:hidden;
17+ transition:box-shadow 0.4s, border 0.4s; -webkit-transition:-webkit-box-shadow 0.4s, border 0.4s; -moz-transition:-moz-box-shadow 0.4s, border 0.4s; -o-transition:-o-box-shadow 0.4s, border 0.4s;
18+}
19+.jqte * {
20+ color:#333;
21+ font-family:Arial, Helvetica, sans-serif;
22+ font-size:14px;
23+}
24+.jqte_focused {
25+ border-color:#00AAE7;
26+ box-shadow:0 0 10px #00BDFF; -webkit-box-shadow:0 0 10px #00BDFF; -moz-box-shadow:0 0 10px #00BDFF;
27+}
28+/* toolbar */
29+.jqte_toolbar {
30+ overflow:auto;
31+ padding:3px 4px;
32+ background:#EEE;
33+ border-bottom:#BBB 1px solid;
34+}
35+.jqte_tool {
36+ float:left;
37+ margin:0;
38+ padding:0;
39+ cursor:pointer;
40+}
41+.jqte_tool, .jqte_tool_icon, .jqte_tool_label {
42+ border:#EEE 1px solid;
43+ border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px
44+}
45+.jqte_hiddenField {
46+ display:none
47+}
48+.jqte_tool_icon {
49+ display:block;
50+ width:22px;
51+ height:22px;
52+ background:url(jquery-te.png) no-repeat
53+}
54+.jqte_tool.jqte_tool_1 .jqte_tool_label {
55+ position:relative;
56+ display:block;
57+ padding:3px;
58+ width:70px;
59+ height:16px;
60+ overflow:hidden;
61+}
62+.jqte_tool.jqte_tool_1 .jqte_tool_text {
63+ font:bold 13px Arial,sans-serif;
64+ color:#222;
65+}
66+.jqte_tool.jqte_tool_1 .jqte_tool_icon {
67+ position:absolute;
68+ top:10px;
69+ right:2px;
70+ width:6px;
71+ height:4px;
72+ background-position:-19px -23px;
73+ border:none;
74+ border-radius:none; -webkit-border-radius:none; -moz-border-radius:none
75+}
76+.jqte_tool.jqte_tool_2 .jqte_tool_icon {
77+ background-position:0 0
78+}
79+.jqte_tool.jqte_tool_3 .jqte_tool_icon {
80+ background-position:-22px 0
81+}
82+.jqte_tool.jqte_tool_4 .jqte_tool_icon {
83+ background-position:-44px 0
84+}
85+.jqte_tool.jqte_tool_5 .jqte_tool_icon {
86+ background-position:-66px 0
87+}
88+.jqte_tool.jqte_tool_6 .jqte_tool_icon {
89+ background-position:-88px 0
90+}
91+.jqte_tool.jqte_tool_7 .jqte_tool_icon {
92+ background-position:-110px 0
93+}
94+.jqte_tool.jqte_tool_8 .jqte_tool_icon {
95+ background-position:-132px 0
96+}
97+.jqte_tool.jqte_tool_9 .jqte_tool_icon {
98+ background-position:-154px 0
99+}
100+.jqte_tool.jqte_tool_10 .jqte_tool_icon {
101+ background-position:-176px 0
102+}
103+.jqte_tool.jqte_tool_11 .jqte_tool_icon {
104+ background-position:-198px 0
105+}
106+.jqte_tool.jqte_tool_12 .jqte_tool_icon {
107+ background-position:-220px 0
108+}
109+.jqte_tool.jqte_tool_13 .jqte_tool_icon {
110+ background-position:-242px 0
111+}
112+.jqte_tool.jqte_tool_14 .jqte_tool_icon {
113+ background-position:-264px 0
114+}
115+.jqte_tool.jqte_tool_15 .jqte_tool_icon {
116+ background-position:-286px 0
117+}
118+.jqte_tool.jqte_tool_16 .jqte_tool_icon {
119+ background-position:-308px 0
120+}
121+.jqte_tool.jqte_tool_17 .jqte_tool_icon {
122+ background-position:-330px 0
123+}
124+.jqte_tool.jqte_tool_18 .jqte_tool_icon {
125+ background-position:-352px 0
126+}
127+.jqte_tool.jqte_tool_19 .jqte_tool_icon {
128+ background-position:-374px 0
129+}
130+.jqte_tool.jqte_tool_20 .jqte_tool_icon {
131+ background-position:-396px 0
132+}
133+.jqte_tool.jqte_tool_21 .jqte_tool_icon {
134+ background-position:-418px 0
135+}
136+.jqte_tool:hover {
137+ background-color:#FFF;
138+ border-color:#FFF
139+}
140+.jqte_tool:hover .jqte_tool_icon, .jqte_tool:hover .jqte_tool_label {
141+ border:#AAA 1px solid
142+}
143+.jqte_tool:active .jqte_tool_icon, .jqte_tool:active .jqte_tool_label {
144+ border:#777 1px solid
145+}
146+.jqte_tool.jqte_tool_1:hover .jqte_tool_icon, .jqte_tool.jqte_tool_1:active .jqte_tool_icon {
147+ border:none
148+}
149+.jqte_tool_depressed {
150+ background-color:#DDD;
151+ border-color:#CCC
152+}
153+.jqte_tool_depressed .jqte_tool_icon {
154+ border-color:#AAA
155+}
156+.jqte_tool_depressed:hover {
157+ background-color:#EEE
158+}
159+/* link form area */
160+.jqte_linkform {
161+ padding:5px 10px;
162+ background:#DDD;
163+ border-bottom:#BBB 1px solid;
164+}
165+.jqte_linktypeselect {
166+ position:relative;
167+ float:left;
168+ width:130px;
169+ background:#EEE;
170+ cursor:pointer
171+}
172+.jqte_linktypeselect:Active {
173+ background:#FFF
174+}
175+.jqte_linktypeview {
176+ padding:3px 5px;
177+ border:#333 1px solid;
178+ color:#777;
179+ border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px;
180+ outline:none
181+}
182+.jqte_linktypetext {
183+ font-size:12px;
184+}
185+.jqte_linktypearrow {
186+ position:absolute;
187+ bottom:8px; right:6px;
188+ width:7px;
189+ height:6px;
190+ margin:0 auto;
191+ background:url(jquery-te.png) -7px -23px no-repeat;
192+}
193+.jqte_linktypes {
194+ display:none;
195+ position:absolute;
196+ top:22px; left:1px;
197+ width:125px;
198+ background:#FFF;
199+ border:#333 1px solid;
200+ box-shadow:0 1px 4px #AAA; -webkit-box-shadow:0 1px 4px #AAA; -moz-box-shadow:0 1px 4px #AAA
201+}
202+.jqte_linktypes a {
203+ display:block;
204+ padding:4px 5px;
205+ font-size:12px;
206+}
207+.jqte_linktypes a:hover {
208+ background:#DDD
209+}
210+.jqte_linkinput {
211+ float:left;
212+ margin:0 5px;
213+ padding:3px 5px;
214+ width:300px;
215+ background:#EEE;
216+ border:#333 1px solid;
217+ color:#777;
218+ font-size:12px;
219+ border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px;
220+ outline:none;
221+}
222+.jqte_linkinput:focus, .jqte_linkinput:hover {
223+ background:#FFF;
224+ border-color:#000;
225+}
226+.jqte_linkbutton {
227+ float:left;
228+ padding:3px 12px;
229+ background:#AAA;
230+ border:#333 1px solid;
231+ color:#FFF;
232+ font-size:12px;
233+ font-weight:bold;
234+ cursor:pointer;
235+ border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px;
236+ box-shadow:inset 0 1px #EEE; -webkit-box-shadow:inset 0 1px #EEE; -moz-box-shadow:inset 0 1px #EEE;
237+}
238+.jqte_linkbutton:hover {
239+ background:#A1A1A1
240+}
241+.jqte_linkbutton:active {
242+ box-shadow:inset 0 1px #CCC; -webkit-box-shadow:inset 0 1px #CCC; -moz-box-shadow:inset 0 1px #CCC;
243+ background:#888;
244+}
245+
246+/* text format menu */
247+.jqte_formats {
248+ display:none;
249+ position:absolute;
250+ width:180px;
251+ oveflow-x:hidden;
252+ overflow-y:auto;
253+ background:#FFF;
254+ border:#AAA 1px solid;
255+ box-shadow:0 0 5px #AAA; -webkit-box-shadow:0 0 5px #AAA; -moz-box-shadow:0 0 5px #AAA;
256+ z-index:100;
257+}
258+.jqte_format {
259+ display:block;
260+ padding:4px 7px;
261+ font-size:13px
262+}
263+.jqte_format:hover {
264+ background:#DDD
265+}
266+.jqte_format_1, .jqte_format_2, .jqte_format_3, .jqte_format_4, .jqte_format_5, .jqte_format_6 {
267+ font-weight:bold
268+}
269+.jqte_format_1 {
270+ font-size:22px
271+}
272+.jqte_format_2 {
273+ font-size:20px
274+}
275+.jqte_format_3 {
276+ font-size:18px
277+}
278+.jqte_format_4 {
279+ font-size:16px
280+}
281+.jqte_format_5 {
282+ font-size:14px
283+}
284+.jqte_format_6 {
285+ font-size:12px
286+}
287+.jqte_format_7 {
288+ font-family:"Courier New", Courier, monospace
289+}
290+
291+/* font size menu */
292+.jqte_fontsizes {
293+ display:none;
294+ position:absolute;
295+ width:180px;
296+ height:198px;
297+ oveflow-x:hidden;
298+ overflow-y:auto;
299+ background:#FFF;
300+ border:#AAA 1px solid;
301+ box-shadow:0 0 5px #AAA; -webkit-box-shadow:0 0 5px #AAA; -moz-box-shadow:0 0 5px #AAA
302+}
303+.jqte_fontsize {
304+ display:block;
305+ padding:3px 7px;
306+}
307+.jqte_fontsize:hover {
308+ background:#DDD
309+}
310+
311+/* color pallette */
312+.jqte_cpalette {
313+ display:none;
314+ position:absolute;
315+ padding:6px;
316+ width:144px;
317+ background:#FFF;
318+ border:#AAA 1px solid;
319+ box-shadow:0 0 5px #AAA; -webkit-box-shadow:0 0 5px #AAA; -moz-box-shadow:0 0 5px #AAA
320+}
321+.jqte_color {
322+ display:block;
323+ float:left;
324+ width:16px;
325+ height:16px;
326+ border:#FFF 1px solid;
327+}
328+.jqte_color:hover {
329+ border-color:#000
330+}
331+.jqte_colorSeperator {
332+ float:none;
333+ clear:both;
334+ height:7px;
335+}
336+
337+/* editor area */
338+.jqte_editor, .jqte_source {
339+ padding:10px;
340+ background:#FFF;
341+ min-height:100px;
342+ max-height:900px;
343+ overflow:auto;
344+ outline:none;
345+ word-wrap:break-word; -ms-word-wrap:break-word;
346+ resize:vertical
347+}
348+.jqte_editor div, .jqte_editor p {
349+ margin:0 0 7px
350+}
351+.jqte_editor a:link, .jqte_editor a:link * {
352+ color:#0066FF !important;
353+ text-decoration:underline;
354+}
355+.jqte_editor blockquote {
356+ margin-top:0;
357+ margin-bottom:7px
358+}
359+.jqte_editor img {
360+ float:left;
361+ margin:0 10px 5px 0
362+}
363+.jqte_editor a[jqte-setlink], .jqte_editor a[jqte-setlink] * {
364+ background:#3297FD !important;
365+ color:#FFF !important
366+}
367+.jqte_editor h1, .jqte_editor h2, .jqte_editor h3, .jqte_editor h4, .jqte_editor h5, .jqte_editor h6, .jqte_editor pre {
368+ display:block;
369+ margin:0 0 3px;
370+}
371+.jqte_editor h1, .jqte_editor h1 * {
372+ font-size:26px
373+}
374+.jqte_editor h2, .jqte_editor h2 * {
375+ font-size:24px
376+}
377+.jqte_editor h3, .jqte_editor h3 * {
378+ font-size:22px
379+}
380+.jqte_editor h4, .jqte_editor h4 * {
381+ font-size:20px
382+}
383+.jqte_editor h5, .jqte_editor h5 * {
384+ font-size:18px
385+}
386+.jqte_editor h6, .jqte_editor h6 * {
387+ font-size:15px
388+}
389+.jqte_editor pre, .jqte_editor pre * {
390+ font-family:"Courier New", Courier, monospace
391+}
392+
393+/* source area */
394+.jqte_source, .jqte_source textarea {
395+ background:#FFF1E8
396+}
397+.jqte_source textarea {
398+ margin:0 !important;
399+ padding:0 !important;
400+ display:block !important;
401+ width:100% !important;
402+ min-height:100px;
403+ font-family:Courier, Arial, sans-serif !important;
404+ font-weight:normal;
405+ font-size:15px;
406+ overflow:hidden !important;
407+ outline:none;
408+ resize:none;
409+}
410+.jqte_source textarea, .jqte_source textarea:focus {
411+ css_shadow:none !important;
412+ background:none !important;
413+ border:none !important;
414+}
415+
416+/* title box */
417+.jqte_title {
418+ display:none;
419+ position:absolute;
420+ z-index:9999;
421+}
422+.jqte_titleArrow {
423+ position:relative;
424+}
425+.jqte_titleArrowIcon {
426+ width:7px;
427+ height:6px;
428+ margin:0 auto;
429+ background:url(jquery-te.png) 0 -23px no-repeat;
430+}
431+.jqte_titleText {
432+ padding:5px 7px;
433+ margin-top:0;
434+ min-width:5px;
435+ min-height:1px;
436+ max-width:400px;
437+ background:#000;
438+ border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px;
439+ word-wrap:break-word; -ms-word-wrap:break-word
440+}
441+.jqte_titleText, .jqte_titleText * {
442+ color:#FFF;
443+ font-size:11px
444+}
445+
446+/* placeholder */
447+.jqte_placeholder {
448+ position:relative;
449+ display:none;
450+}
451+.jqte_placeholder_text {
452+ position:absolute;
453+ top:43px;
454+ left:10px;
455+ font-size:14px;
456+ color:#CCC;
457+}
\ No newline at end of file
--- /dev/null
+++ b/js/jquery-te/jquery-te-1.4.0.min.js
@@ -0,0 +1,9 @@
1+/*!
2+ *
3+ * jQuery TE 1.4.0 , http://jqueryte.com/
4+ * Copyright (C) 2013, Fatih Koca (fattih@fattih.com), (http://jqueryte.com/about)
5+
6+ * jQuery TE is provided under the MIT LICENSE.
7+ *
8+*/
9+(function(e){e.fn.jqte=function(t){function l(e,t,n,r,i){var s=f.length+1;return f.push({name:e,cls:s,command:t,key:n,tag:r,emphasis:i})}var n=[{title:"Text Format"},{title:"Font Size"},{title:"Color"},{title:"Bold",hotkey:"B"},{title:"Italic",hotkey:"I"},{title:"Underline",hotkey:"U"},{title:"Ordered List",hotkey:"."},{title:"Unordered List",hotkey:","},{title:"Subscript",hotkey:"down arrow"},{title:"Superscript",hotkey:"up arrow"},{title:"Outdent",hotkey:"left arrow"},{title:"Indent",hotkey:"right arrow"},{title:"Justify Left"},{title:"Justify Center"},{title:"Justify Right"},{title:"Strike Through",hotkey:"K"},{title:"Add Link",hotkey:"L"},{title:"Remove Link"},{title:"Cleaner Style",hotkey:"Delete"},{title:"Horizontal Rule",hotkey:"H"},{title:"Source"}];var r=[["p","Normal"],["h1","Header 1"],["h2","Header 2"],["h3","Header 3"],["h4","Header 4"],["h5","Header 5"],["h6","Header 6"],["pre","Preformatted"]];var i=["10","12","16","18","20","24","28"];var s=["0,0,0","68,68,68","102,102,102","153,153,153","204,204,204","238,238,238","243,243,243","255,255,255",null,"255,0,0","255,153,0","255,255,0","0,255,0","0,255,255","0,0,255","153,0,255","255,0,255",null,"244,204,204","252,229,205","255,242,204","217,234,211","208,224,227","207,226,243","217,210,233","234,209,220","234,153,153","249,203,156","255,229,153","182,215,168","162,196,201","159,197,232","180,167,214","213,166,189","224,102,102","246,178,107","255,217,102","147,196,125","118,165,175","111,168,220","142,124,195","194,123,160","204,0,0","230,145,56","241,194,50","106,168,79","69,129,142","61,133,198","103,78,167","166,77,121","153,0,0","180,95,6","191,144,0","56,118,29","19,79,92","11,83,148","53,28,117","116,27,71","102,0,0","120,63,4","127,96,0","39,78,19","12,52,61","7,55,99","32,18,77","76,17,48"];var o=["Web Address","E-mail Address","Picture URL"];var u=e.extend({status:true,css:"jqte",title:true,titletext:n,button:"OK",format:true,formats:r,fsize:true,fsizes:i,funit:"px",color:true,linktypes:o,b:true,i:true,u:true,ol:true,ul:true,sub:true,sup:true,outdent:true,indent:true,left:true,center:true,right:true,strike:true,link:true,unlink:true,remove:true,rule:true,source:true,placeholder:false,br:true,p:true,change:"",focus:"",blur:""},t);e.fn.jqteVal=function(t){e(this).closest("."+u.css).find("."+u.css+"_editor").html(t)};var a=navigator.userAgent.toLowerCase();if(/msie [1-7]./.test(a))u.title=false;var f=[];l("format","formats","","",false);l("fsize","fSize","","",false);l("color","colors","","",false);l("b","Bold","B",["b","strong"],true);l("i","Italic","I",["i","em"],true);l("u","Underline","U",["u"],true);l("ol","insertorderedlist","¾",["ol"],true);l("ul","insertunorderedlist","¼",["ul"],true);l("sub","subscript","(",["sub"],true);l("sup","superscript","&",["sup"],true);l("outdent","outdent","%",["blockquote"],false);l("indent","indent","'",["blockquote"],true);l("left","justifyLeft","","",false);l("center","justifyCenter","","",false);l("right","justifyRight","","",false);l("strike","strikeThrough","K",["strike"],true);l("link","linkcreator","L",["a"],true);l("unlink","unlink","",["a"],false);l("remove","removeformat",".","",false);l("rule","inserthorizontalrule","H",["hr"],false);l("source","displaysource","","",false);return this.each(function(){function B(){if(window.getSelection)return window.getSelection();else if(document.selection&&document.selection.createRange&&document.selection.type!="None")return document.selection.createRange()}function j(e,t){var n,r=B();if(window.getSelection){if(r.anchorNode&&r.getRangeAt)n=r.getRangeAt(0);if(n){r.removeAllRanges();r.addRange(n)}if(!a.match(/msie/))document.execCommand("StyleWithCSS",false,false);document.execCommand(e,false,t)}else if(document.selection&&document.selection.createRange&&document.selection.type!="None"){n=document.selection.createRange();n.execCommand(e,false,t)}q(false,false)}function F(t,n,r){if(v.not(":focus"))v.focus();if(window.getSelection){var i=B(),s,o,u;if(i.anchorNode&&i.getRangeAt){s=i.getRangeAt(0);o=document.createElement(t);e(o).attr(n,r);u=s.extractContents();o.appendChild(u);s.insertNode(o);i.removeAllRanges();if(n=="style")q(e(o),r);else q(e(o),false)}}else if(document.selection&&document.selection.createRange&&document.selection.type!="None"){var a=document.selection.createRange();var f=a.htmlText;var l="<"+t+" "+n+'="'+r+'">'+f+"</"+t+">";document.selection.createRange().pasteHTML(l)}}function q(e,t){var n=I();n=n?n:e;if(n&&t==false){if(n.parent().is("[style]"))n.attr("style",n.parent().attr("style"));if(n.is("[style]"))n.find("*").attr("style",n.attr("style"))}else if(e&&t&&e.is("[style]")){var r=t.split(";");r=r[0].split(":");if(e.is("[style*="+r[0]+"]"))e.find("*").css(r[0],r[1]);R(e)}}function R(t){if(t){var t=t[0];if(document.body.createTextRange){var n=document.body.createTextRange();n.moveToElementText(t);n.select()}else if(window.getSelection){var r=window.getSelection();var n=document.createRange();if(t!="undefined"&&t!=null){n.selectNodeContents(t);r.removeAllRanges();r.addRange(n);if(e(t).is(":empty")){e(t).append(" ");R(e(t))}}}}}function U(){if(!p.data("sourceOpened")){var t=I();var n="http://";W(true);if(t){var r=t.prop("tagName").toLowerCase();if(r=="a"&&t.is("[href]")){n=t.attr("href");t.attr(S,"")}else F("a",S,"")}else y.val(n).focus();g.click(function(t){if(e(t.target).hasClass(u.css+"_linktypetext")||e(t.target).hasClass(u.css+"_linktypearrow"))X(true)});w.find("a").click(function(){var t=e(this).attr(u.css+"-linktype");w.data("linktype",t);E.find("."+u.css+"_linktypetext").html(w.find("a:eq("+w.data("linktype")+")").text());V(n);X()});V(n);y.focus().val(n).bind("keypress keyup",function(e){if(e.keyCode==13){z(h.find("["+S+"]"));return false}});b.click(function(){z(h.find("["+S+"]"))})}else W(false)}function z(t){y.focus();R(t);t.removeAttr(S);if(w.data("linktype")!="2")j("createlink",y.val());else{j("insertImage",y.val());v.find("img").each(function(){var t=e(this).prev("a");var n=e(this).next("a");if(t.length>0&&t.html()=="")t.remove();else if(n.length>0&&n.html()=="")n.remove()})}W();v.trigger("change")}function W(e){Q("["+S+"]:not([href])");h.find("["+S+"][href]").removeAttr(S);if(e){p.data("linkOpened",true);d.show()}else{p.data("linkOpened",false);d.hide()}X()}function X(e){if(e)w.show();else w.hide()}function V(e){var t=w.data("linktype");if(t=="1"&&(y.val()=="http://"||y.is("[value^=http://]")||!y.is("[value^=mailto]")))y.val("mailto:");else if(t!="1"&&!y.is("[value^=http://]"))y.val("http://");else y.val(e)}function J(t){if(!p.data("sourceOpened")){if(t=="fSize")styleField=P;else if(t=="colors")styleField=H;K(styleField,true);styleField.find("a").unbind("click").click(function(){var n=e(this).attr(u.css+"-styleval");if(t=="fSize"){styleType="font-size";n=n+u.funit}else if(t=="colors"){styleType="color";n="rgb("+n+")"}var r=G(styleType);F("span","style",styleType+":"+n+";"+r);K("",false);e("."+u.css+"_title").remove();v.trigger("change")})}else K(styleField,false);W(false)}function K(e,t){var n="",r=[{d:"fsizeOpened",f:P},{d:"cpallOpened",f:H}];if(e!=""){for(var i=0;i<r.length;i++){if(e==r[i]["f"])n=r[i]}}if(t){p.data(n["d"],true);n["f"].slideDown(100);for(var i=0;i<r.length;i++){if(n["d"]!=r[i]["d"]){p.data(r[i]["d"],false);r[i]["f"].slideUp(100)}}}else{for(var i=0;i<r.length;i++){p.data(r[i]["d"],false);r[i]["f"].slideUp(100)}}}function Q(t){h.find(t).each(function(){e(this).before(e(this).html()).remove()})}function G(e){var t=I();if(t&&t.is("[style]")&&t.css(e)!=""){var n=t.css(e);t.css(e,"");var r=t.attr("style");t.css(e,n);return r}else return""}function Y(){Z(true);D.find("a").click(function(){e("*",this).click(function(e){e.preventDefault();return false});et(e(this).text());var t=e(this).attr(u.css+"-formatval");j("formatBlock","<"+t+">");Z(false)})}function Z(e){var t=e?true:false;t=e&&D.data("status")?true:false;if(t||!e)D.data("status",false).slideUp(200);else D.data("status",true).slideDown(200)}function et(e){var t=D.closest("."+u.css+"_tool").find("."+u.css+"_tool_label").find("."+u.css+"_tool_text");if(e.length>10)e=e.substr(0,7)+"...";t.html(e)}function tt(e){var t,n,r;t=e.replace(/\n/gim,"").replace(/\r/gim,"").replace(/\t/gim,"").replace(/ /gim," ");n=[/\<span(|\s+.*?)><span(|\s+.*?)>(.*?)<\/span><\/span>/gim,/<(\w*[^p])\s*[^\/>]*>\s*<\/\1>/gim,/\<div(|\s+.*?)>(.*?)\<\/div>/gim,/\<strong(|\s+.*?)>(.*?)\<\/strong>/gim,/\<em(|\s+.*?)>(.*?)\<\/em>/gim];r=["<span$2>$3</span>","","<p$1>$2</p>","<b$1>$2</b>","<i$1>$2</i>"];for(A=0;A<5;A++){for(var i=0;i<n.length;i++){t=t.replace(n[i],r[i])}}if(!u.p)t=t.replace(/\<p(|\s+.*?)>(.*?)\<\/p>/ig,"<br/>$2");if(!u.br){n=[/\<br>(.*?)/ig,/\<br\/>(.*?)/ig];r=["<p>$1</p>","<p>$1</p>"];for(var i=0;i<n.length;i++){t=t.replace(n[i],r[i])}}if(!u.p&&!u.br)t=t.replace(/\<p>(.*?)\<\/p>/ig,"<div>$1</div>");return t}function nt(){var e=v.text()==""&&v.html().length<12?"":v.html();l.val(tt(e))}function rt(){v.html(tt(l.val()))}function it(t){var n=false,r=I(),i;if(r){e.each(t,function(t,s){i=r.prop("tagName").toLowerCase();if(i==s)n=true;else{r.parents().each(function(){i=e(this).prop("tagName").toLowerCase();if(i==s)n=true})}});return n}else return false}function st(t){for(var n=0;n<f.length;n++){if(u[f[n].name]&&f[n].emphasis&&f[n].tag!="")it(f[n].tag)?p.find("."+u.css+"_tool_"+f[n].cls).addClass(m):e("."+u.css+"_tool_"+f[n].cls).removeClass(m)}if(u.format&&e.isArray(u.formats)){var r=false;for(var i=0;i<u.formats.length;i++){var s=[];s[0]=u.formats[i][0];if(u.formats[i][0].length>0&&it(s)){et(u.formats[i][1]);r=true;break}}if(!r)et(u.formats[0][1])}K("",false);Z(false)}if(!e(this).data("jqte")||e(this).data("jqte")==null||e(this).data("jqte")=="undefined")e(this).data("jqte",true);else e(this).data("jqte",false);if(!u.status||!e(this).data("jqte")){if(e(this).closest("."+u.css).length>0){var t=e(this).closest("."+u.css).find("."+u.css+"_editor").html();var n="";e(e(this)[0].attributes).each(function(){if(this.nodeName!="style")n=n+" "+this.nodeName+'="'+this.nodeValue+'"'});var r=e(this).is("[data-origin]")&&e(this).attr("data-origin")!=""?e(this).attr("data-origin"):"textarea";var i=">"+t;if(r=="input"||r=="option"){t=t.replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"<").replace(/>/g,">");i='value="'+t+'">'}var o=e(this).clone();e(this).data("jqte",false).closest("."+u.css).before(o).remove();o.replaceWith("<"+r+n+i+"</"+r+">")}return}var l=e(this);var r=e(this).prop("tagName").toLowerCase();e(this).attr("data-origin",r);var c=e(this).is("[value]")||r=="textarea"?e(this).val():e(this).html();c=c.replace(/&#34;/g,'"').replace(/&#39;/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&");e(this).after('<div class="'+u.css+'"></div>');var h=e(this).next("."+u.css);h.html('<div class="'+u.css+"_toolbar"+'" role="toolbar" unselectable></div><div class="'+u.css+'_linkform" style="display:none" role="dialog"></div><div class="'+u.css+"_editor"+'"></div>');var p=h.find("."+u.css+"_toolbar");var d=h.find("."+u.css+"_linkform");var v=h.find("."+u.css+"_editor");var m=u.css+"_tool_depressed";d.append('<div class="'+u.css+'_linktypeselect" unselectable></div><input class="'+u.css+'_linkinput" type="text/css" value=""><div class="'+u.css+'_linkbutton" unselectable>'+u.button+'</div> <div style="height:1px;float:none;clear:both"></div>');var g=d.find("."+u.css+"_linktypeselect");var y=d.find("."+u.css+"_linkinput");var b=d.find("."+u.css+"_linkbutton");g.append('<div class="'+u.css+'_linktypeview" unselectable></div><div class="'+u.css+'_linktypes" role="menu" unselectable></div>');var w=g.find("."+u.css+"_linktypes");var E=g.find("."+u.css+"_linktypeview");var S=u.css+"-setlink";v.after('<div class="'+u.css+"_source "+u.css+'_hiddenField"></div>');var x=h.find("."+u.css+"_source");l.appendTo(x);if(r!="textarea"){var n="";e(l[0].attributes).each(function(){if(this.nodeName!="type"&&this.nodeName!="value")n=n+" "+this.nodeName+'="'+this.nodeValue+'"'});l.replaceWith("<textarea "+n+">"+c+"</textarea>");l=x.find("textarea")}v.attr("contenteditable","true").html(c);for(var T=0;T<f.length;T++){if(u[f[T].name]){var N=f[T].key.length>0?u.titletext[T].hotkey!=null&&u.titletext[T].hotkey!="undefined"&&u.titletext[T].hotkey!=""?" (Ctrl+"+u.titletext[T].hotkey+")":"":"";var C=u.titletext[T].title!=null&&u.titletext[T].title!="undefined"&&u.titletext[T].title!=""?u.titletext[T].title+N:"";p.append('<div class="'+u.css+"_tool "+u.css+"_tool_"+f[T].cls+'" role="button" data-tool="'+T+'" unselectable><a class="'+u.css+'_tool_icon" unselectable></a></div>');p.find("."+u.css+"_tool[data-tool="+T+"]").data({tag:f[T].tag,command:f[T].command,emphasis:f[T].emphasis,title:C});if(f[T].name=="format"&&e.isArray(u.formats)){var k=u.formats[0][1].length>0&&u.formats[0][1]!="undefined"?u.formats[0][1]:"";p.find("."+u.css+"_tool_"+f[T].cls).find("."+u.css+"_tool_icon").replaceWith('<a class="'+u.css+'_tool_label" unselectable><span class="'+u.css+'_tool_text" unselectable>'+k+'</span><span class="'+u.css+'_tool_icon" unselectable></span></a>');p.find("."+u.css+"_tool_"+f[T].cls).append('<div class="'+u.css+'_formats" unselectable></div>');for(var L=0;L<u.formats.length;L++){p.find("."+u.css+"_formats").append("<a "+u.css+'-formatval="'+u.formats[L][0]+'" class="'+u.css+"_format"+" "+u.css+"_format_"+L+'" role="menuitem" unselectable>'+u.formats[L][1]+"</a>")}p.find("."+u.css+"_formats").data("status",false)}else if(f[T].name=="fsize"&&e.isArray(u.fsizes)){p.find("."+u.css+"_tool_"+f[T].cls).append('<div class="'+u.css+'_fontsizes" unselectable></div>');for(var L=0;L<u.fsizes.length;L++){p.find("."+u.css+"_fontsizes").append("<a "+u.css+'-styleval="'+u.fsizes[L]+'" class="'+u.css+"_fontsize"+'" style="font-size:'+u.fsizes[L]+u.funit+'" role="menuitem" unselectable>Abcdefgh...</a>')}}else if(f[T].name=="color"&&e.isArray(s)){p.find("."+u.css+"_tool_"+f[T].cls).append('<div class="'+u.css+'_cpalette" unselectable></div>');for(var A=0;A<s.length;A++){if(s[A]!=null)p.find("."+u.css+"_cpalette").append("<a "+u.css+'-styleval="'+s[A]+'" class="'+u.css+"_color"+'" style="background-color: rgb('+s[A]+')" role="gridcell" unselectable></a>');else p.find("."+u.css+"_cpalette").append('<div class="'+u.css+"_colorSeperator"+'"></div>')}}}}w.data("linktype","0");for(var T=0;T<3;T++){w.append("<a "+u.css+'-linktype="'+T+'" unselectable>'+u.linktypes[T]+"</a>");E.html('<div class="'+u.css+'_linktypearrow" unselectable></div><div class="'+u.css+'_linktypetext">'+w.find("a:eq("+w.data("linktype")+")").text()+"</div>")}var O="";if(/msie/.test(a))O="-ms-";else if(/chrome/.test(a)||/safari/.test(a)||/yandex/.test(a))O="-webkit-";else if(/mozilla/.test(a))O="-moz-";else if(/opera/.test(a))O="-o-";else if(/konqueror/.test(a))O="-khtml-";else O="";if(u.placeholder&&u.placeholder!=""){h.prepend('<div class="'+u.css+'_placeholder" unselectable><div class="'+u.css+'_placeholder_text">'+u.placeholder+"</div></div>");var M=h.find("."+u.css+"_placeholder");M.click(function(){v.focus()})}h.find("[unselectable]").css(O+"user-select","none").addClass("unselectable").attr("unselectable","on").on("selectstart mousedown",false);var _=p.find("."+u.css+"_tool");var D=p.find("."+u.css+"_formats");var P=p.find("."+u.css+"_fontsizes");var H=p.find("."+u.css+"_cpalette");var I=function(){var t,n;if(window.getSelection){n=getSelection();t=n.anchorNode}if(!t&&document.selection&&document.selection.createRange&&document.selection.type!="None"){n=document.selection;var r=n.getRangeAt?n.getRangeAt(0):n.createRange();t=r.commonAncestorContainer?r.commonAncestorContainer:r.parentElement?r.parentElement():r.item(0)}if(t){return t.nodeName=="#text"?e(t.parentNode):e(t)}else return false};_.unbind("click").click(function(t){if(e(this).data("command")=="displaysource"&&!p.data("sourceOpened")){p.find("."+u.css+"_tool").addClass(u.css+"_hiddenField");e(this).removeClass(u.css+"_hiddenField");p.data("sourceOpened",true);l.css("height",v.outerHeight());x.removeClass(u.css+"_hiddenField");v.addClass(u.css+"_hiddenField");l.focus();W(false);K("",false);Z();if(u.placeholder&&u.placeholder!="")M.hide()}else{if(!p.data("sourceOpened")){if(e(this).data("command")=="linkcreator"){if(!p.data("linkOpened"))U();else{W(false);Z(false)}}else if(e(this).data("command")=="formats"){if(e(this).data("command")=="formats"&&!e(t.target).hasClass(u.css+"_format"))Y();K("",false);if(v.not(":focus"))v.focus()}else if(e(this).data("command")=="fSize"||e(this).data("command")=="colors"){if(e(this).data("command")=="fSize"&&!e(t.target).hasClass(u.css+"_fontsize")||e(this).data("command")=="colors"&&!e(t.target).hasClass(u.css+"_color"))J(e(this).data("command"));Z(false);if(v.not(":focus"))v.focus()}else{if(v.not(":focus"))v.focus();j(e(this).data("command"),null);K("",false);Z(false);X();e(this).data("emphasis")==true&&!e(this).hasClass(m)?e(this).addClass(m):e(this).removeClass(m);x.addClass(u.css+"_hiddenField");v.removeClass(u.css+"_hiddenField")}}else{p.data("sourceOpened",false);p.find("."+u.css+"_tool").removeClass(u.css+"_hiddenField");x.addClass(u.css+"_hiddenField");v.removeClass(u.css+"_hiddenField")}if(u.placeholder&&u.placeholder!="")v.html()!=""?M.hide():M.show()}v.trigger("change")}).hover(function(t){if(u.title&&e(this).data("title")!=""&&(e(t.target).hasClass(u.css+"_tool")||e(t.target).hasClass(u.css+"_tool_icon"))){e("."+u.css+"_title").remove();h.append('<div class="'+u.css+'_title"><div class="'+u.css+'_titleArrow"><div class="'+u.css+'_titleArrowIcon"></div></div><div class="'+u.css+'_titleText">'+e(this).data("title")+"</div></div>");var n=e("."+u.css+"_title:first");var r=n.find("."+u.css+"_titleArrowIcon");var i=e(this).position();var s=i.left+e(this).outerWidth()-n.outerWidth()/2-e(this).outerWidth()/2;var o=i.top+e(this).outerHeight()+5;n.delay(400).css({top:o,left:s}).fadeIn(200)}},function(){e("."+u.css+"_title").remove()});var ot=null;v.bind("keypress keyup keydown drop cut copy paste DOMCharacterDataModified DOMSubtreeModified",function(){if(!p.data("sourceOpened"))e(this).trigger("change");X();if(e.isFunction(u.change))u.change();if(u.placeholder&&u.placeholder!="")e(this).text()!=""?M.hide():M.show()}).bind("change",function(){if(!p.data("sourceOpened")){clearTimeout(ot);ot=setTimeout(nt,10)}}).keydown(function(e){if(e.ctrlKey){for(var t=0;t<f.length;t++){if(u[f[t].name]&&e.keyCode==f[t].key.charCodeAt(0)){if(f[t].command!=""&&f[t].command!="linkcreator")j(f[t].command,null);else if(f[t].command=="linkcreator")U();return false}}}}).bind("mouseup keyup",st).focus(function(){if(e.isFunction(u.focus))u.focus();h.addClass(u.css+"_focused");if(/opera/.test(a)){var t=document.createRange();t.selectNodeContents(v[0]);t.collapse(false);var n=window.getSelection();n.removeAllRanges();n.addRange(t)}}).focusout(function(){_.removeClass(m);K("",false);Z(false);X();if(e.isFunction(u.blur))u.blur();h.removeClass(u.css+"_focused");if(e.isArray(u.formats))et(u.formats[0][1])});l.bind("keydown keyup",function(){setTimeout(rt,0);e(this).height(e(this)[0].scrollHeight);if(e(this).val()=="")e(this).height(0)}).focus(function(){h.addClass(u.css+"_focused")}).focusout(function(){h.removeClass(u.css+"_focused")})})}})(jQuery)
\ No newline at end of file
Binary files /dev/null and b/js/jquery-te/jquery-te.png differ
--- a/js/lunardial/feedblog_generator.js
+++ b/js/lunardial/feedblog_generator.js
@@ -159,7 +159,9 @@ function removeEntry(index) {
159159
160160 document.getElementById("stdout").value = "";
161161 document.getElementById("entry_title").value = "";
162+ $("#entry_stdin").jqte();
162163 document.getElementById("entry_stdin").value = "";
164+ $("#entry_stdin").jqte();
163165 }
164166 if (editIndex > 0) {
165167 var prevIndex = document.getElementById("logBox").selectedIndex - 1;
@@ -186,7 +188,9 @@ function allRemoveEntry() {
186188
187189 document.getElementById("stdout").value = "";
188190 document.getElementById("entry_title").value = "";
191+ $("#entry_stdin").jqte();
189192 document.getElementById("entry_stdin").value = "";
193+ $("#entry_stdin").jqte();
190194 }
191195
192196 /**
@@ -211,6 +215,9 @@ $(document).ready(function() {
211215 // 初期処理を実施
212216 initialize();
213217
218+ // jquery-teを初期として適用します
219+ $("#entry_stdin").jqte();
220+
214221 // ログ一覧のXMLをロードします
215222 logXMLLoader();
216223 });
@@ -285,7 +292,9 @@ function analyzeTargetXml(xmlData) {
285292
286293 refleshEntrylistBox();
287294 document.getElementById("entry_title").value = "";
295+ $("#entry_stdin").jqte();
288296 document.getElementById("entry_stdin").value = "";
297+ $("#entry_stdin").jqte();
289298 document.getElementById("entry_category").innerHTML = "";
290299 document.getElementById("stdout").value = "";
291300 editIndex = -1;
@@ -333,12 +342,16 @@ function applyFeedinfo() {
333342 function entryLoader(index) {
334343 if (index < 0) {
335344 document.getElementById("entry_title").value = "";
345+ $("#entry_stdin").jqte();
336346 document.getElementById("entry_stdin").value = "";
347+ $("#entry_stdin").jqte();
337348 addTagSelectBoxFromCategory([]);
338349 editIndex = -1;
339350 } else {
340351 document.getElementById("entry_title").value = entryList[index].title;
352+ $("#entry_stdin").jqte();
341353 document.getElementById("entry_stdin").value = entryList[index].content;
354+ $("#entry_stdin").jqte();
342355 addTagSelectBoxFromCategory(entryList[index].category);
343356 editIndex = index;
344357 }
Show on old repository browser