• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-jp-ancient: Commit

Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用


Commit MetaInfo

Revisione127201e9955cdba5c7bf7ec813aff25f59c8b5a (tree)
Zeit2005-03-23 15:08:46
Autorkimitake <kimitake@1ca2...>
Commiterkimitake

Log Message

updated correct file

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/branches/branch-3-15@73 1ca29b6e-896d-4ea0-84a5-967f57386b96

Ändern Zusammenfassung

Diff

--- a/euc/nucleus/javascript/edit.js
+++ b/euc/nucleus/javascript/edit.js
@@ -125,7 +125,7 @@ function ahrefThis() {
125125 }
126126
127127 function execAndUpdate(action) {
128- lastSelected.caretPos.execCommand(action);
128+ lastCaretPos.execCommand(action);
129129 updAllPreviews();
130130 }
131131
@@ -204,6 +204,7 @@ function includeOtherMedia(collection, filename) {
204204 // function to prevent submitting form data twice
205205 var submitcount=0;
206206 function checkSubmit() {
207+
207208 if (submitcount == 0) {
208209 submitcount++;
209210 return true;
@@ -218,6 +219,7 @@ function checkSubmit() {
218219 // http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
219220
220221 // stores the caret
222+var lastSelected, lastCaretPos;
221223 function storeCaret (textEl) {
222224
223225 // store caret
@@ -231,13 +233,13 @@ function storeCaret (textEl) {
231233 nonie_FormType = textEl.name;
232234 }
233235
234-var lastSelected;
236+//var lastSelected;
235237
236238 // inserts text at caret (overwriting selection)
237239 function insertAtCaret (text) {
238240 var textEl = lastSelected;
239- if (textEl && textEl.createTextRange && textEl.caretPos) {
240- var caretPos = textEl.caretPos;
241+ if (textEl && textEl.createTextRange && lastCaretPos) {
242+ var caretPos = lastCaretPos;
241243 caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
242244 } else if (!document.all && document.getElementById) {
243245 mozReplace(document.getElementById('input' + nonie_FormType), text);
@@ -253,8 +255,8 @@ function insertAtCaret (text) {
253255 function insertAroundCaret (textpre, textpost) {
254256 var textEl = lastSelected;
255257
256- if (textEl && textEl.createTextRange && textEl.caretPos) {
257- var caretPos = textEl.caretPos;
258+ if (textEl && textEl.createTextRange && lastCaretPos) {
259+ var caretPos = lastCaretPos;
258260 caretPos.text = textpre + caretPos.text + textpost;
259261 } else if (!document.all && document.getElementById) {
260262 mozWrap(document.getElementById('input' + nonie_FormType), textpre, textpost);
@@ -299,12 +301,12 @@ function getCaretText() {
299301 if (!document.all && document.getElementById)
300302 return mozSelectedText();
301303 else
302- return lastSelected.caretPos.text;
304+ return lastCaretPos.text;
303305 }
304306
305307 function isCaretEmpty() {
306- if (lastSelected && lastSelected.createTextRange && lastSelected.caretPos)
307- return (lastSelected.caretPos.text == '');
308+ if (lastSelected && lastSelected.createTextRange && lastCaretPos)
309+ return (lastCaretPos.text == '');
308310 else if (!document.all && document.getElementById)
309311 return (mozSelectedText() == '');
310312 else
--- a/utf8/nucleus/javascript/edit.js
+++ b/utf8/nucleus/javascript/edit.js
@@ -125,7 +125,7 @@ function ahrefThis() {
125125 }
126126
127127 function execAndUpdate(action) {
128- lastSelected.caretPos.execCommand(action);
128+ lastCaretPos.execCommand(action);
129129 updAllPreviews();
130130 }
131131
@@ -204,6 +204,7 @@ function includeOtherMedia(collection, filename) {
204204 // function to prevent submitting form data twice
205205 var submitcount=0;
206206 function checkSubmit() {
207+
207208 if (submitcount == 0) {
208209 submitcount++;
209210 return true;
@@ -218,6 +219,7 @@ function checkSubmit() {
218219 // http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
219220
220221 // stores the caret
222+var lastSelected, lastCaretPos;
221223 function storeCaret (textEl) {
222224
223225 // store caret
@@ -231,13 +233,13 @@ function storeCaret (textEl) {
231233 nonie_FormType = textEl.name;
232234 }
233235
234-var lastSelected;
236+//var lastSelected;
235237
236238 // inserts text at caret (overwriting selection)
237239 function insertAtCaret (text) {
238240 var textEl = lastSelected;
239- if (textEl && textEl.createTextRange && textEl.caretPos) {
240- var caretPos = textEl.caretPos;
241+ if (textEl && textEl.createTextRange && lastCaretPos) {
242+ var caretPos = lastCaretPos;
241243 caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
242244 } else if (!document.all && document.getElementById) {
243245 mozReplace(document.getElementById('input' + nonie_FormType), text);
@@ -253,8 +255,8 @@ function insertAtCaret (text) {
253255 function insertAroundCaret (textpre, textpost) {
254256 var textEl = lastSelected;
255257
256- if (textEl && textEl.createTextRange && textEl.caretPos) {
257- var caretPos = textEl.caretPos;
258+ if (textEl && textEl.createTextRange && lastCaretPos) {
259+ var caretPos = lastCaretPos;
258260 caretPos.text = textpre + caretPos.text + textpost;
259261 } else if (!document.all && document.getElementById) {
260262 mozWrap(document.getElementById('input' + nonie_FormType), textpre, textpost);
@@ -299,12 +301,12 @@ function getCaretText() {
299301 if (!document.all && document.getElementById)
300302 return mozSelectedText();
301303 else
302- return lastSelected.caretPos.text;
304+ return lastCaretPos.text;
303305 }
304306
305307 function isCaretEmpty() {
306- if (lastSelected && lastSelected.createTextRange && lastSelected.caretPos)
307- return (lastSelected.caretPos.text == '');
308+ if (lastSelected && lastSelected.createTextRange && lastCaretPos)
309+ return (lastCaretPos.text == '');
308310 else if (!document.all && document.getElementById)
309311 return (mozSelectedText() == '');
310312 else
Show on old repository browser