diff options
Diffstat (limited to 'phpBB/adm')
-rw-r--r-- | phpBB/adm/style/acp_icons.html | 4 | ||||
-rw-r--r-- | phpBB/adm/style/acp_main.html | 30 | ||||
-rw-r--r-- | phpBB/adm/style/acp_users.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/admin.css | 8 | ||||
-rw-r--r-- | phpBB/adm/style/editor.js | 68 |
5 files changed, 73 insertions, 39 deletions
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index eedf39b440..a34a91043c 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -74,7 +74,7 @@ <fieldset class="tabulated"> <legend>{L_TITLE}</legend> - <table cellspacing="1"> + <table cellspacing="1" id="smilies"> <thead> <tr> <th colspan="{COLSPAN}">{L_CONFIG}</th> @@ -94,7 +94,7 @@ <td>{L_ORDER}</td> <!-- ENDIF --> <!-- IF S_ADD --> - <td>{L_ADD}</td> + <td>{L_ADD} <a href="#" onclick="marklist('smilies', 'add_img', true); return false;">({L_MARK_ALL})</a></td> <!-- ENDIF --> </tr> </thead> diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 7d3b6945ac..c665c9d893 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -34,6 +34,36 @@ </div> <!-- ENDIF --> + <!-- IF S_MBSTRING_LOADED --> + <!-- IF S_MBSTRING_FUNC_OVERLOAD_FAIL --> + <div class="errorbox"> + <h3>{L_ERROR_MBSTRING_FUNC_OVERLOAD}</h3> + <p>{L_ERROR_MBSTRING_FUNC_OVERLOAD_EXPLAIN}</p> + </div> + <!-- ENDIF --> + + <!-- IF S_MBSTRING_ENCODING_TRANSLATION_FAIL --> + <div class="errorbox"> + <h3>{L_ERROR_MBSTRING_ENCODING_TRANSLATION}</h3> + <p>{L_ERROR_MBSTRING_ENCODING_TRANSLATION_EXPLAIN}</p> + </div> + <!-- ENDIF --> + + <!-- IF S_MBSTRING_HTTP_INPUT_FAIL --> + <div class="errorbox"> + <h3>{L_ERROR_MBSTRING_HTTP_INPUT}</h3> + <p>{L_ERROR_MBSTRING_HTTP_INPUT_EXPLAIN}</p> + </div> + <!-- ENDIF --> + + <!-- IF S_MBSTRING_HTTP_OUTPUT_FAIL --> + <div class="errorbox"> + <h3>{L_ERROR_MBSTRING_HTTP_OUTPUT}</h3> + <p>{L_ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN}</p> + </div> + <!-- ENDIF --> + <!-- ENDIF --> + <!-- IF S_WRITABLE_CONFIG --> <div class="errorbox notice"> <p>{L_WRITABLE_CONFIG}</p> diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index e266654649..d5a29a21cc 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -13,7 +13,7 @@ <fieldset> <legend>{L_SELECT_USER}</legend> <dl> - <dt><label for="username">{L_FIND_USERNAME}:</label></dt> + <dt><label for="username">{L_ENTER_USERNAME}:</label></dt> <dd><input class="text medium" type="text" id="username" name="username" /></dd> <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd> <dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="u" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 4c3fa51af3..666f4921ba 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -899,12 +899,15 @@ html>body dd label input { vertical-align: text-bottom;} /* Tweak for Moz to ali dd input { font-size: 1.00em; max-width: 100%; + margin: 2px 0; } dd select { font-size: 100%; + font-size: 1em; width: auto; max-width: 100%; + margin: 2px 0; } dd textarea { @@ -912,11 +915,6 @@ dd textarea { width: 90%; } -dd select { - width: auto; - font-size: 1.00em; -} - fieldset dl { margin-bottom: 10px; font-size: 0.85em; diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js index 217aa699e2..600fa254cf 100644 --- a/phpBB/adm/style/editor.js +++ b/phpBB/adm/style/editor.js @@ -28,8 +28,8 @@ function helpline(help) /** * Fix a bug involving the TextRange object. From * http://www.frostjedi.com/terra/scripts/demo/caretBug.html -*/ -function initInsertions() +*/ +function initInsertions() { var doc; if(document.forms[form_name]) @@ -66,7 +66,7 @@ function bbstyle(bbnumber) else { insert_text('[*]'); - document.forms[form_name].elements[text_name].focus(); + document.forms[form_name].elements[text_name].focus(); } } @@ -76,7 +76,7 @@ function bbstyle(bbnumber) function bbfontstyle(bbopen, bbclose) { theSelection = false; - + var textarea = document.forms[form_name].elements[text_name]; textarea.focus(); @@ -84,14 +84,10 @@ function bbfontstyle(bbopen, bbclose) if ((clientVer >= 4) && is_ie && is_win) { // Get text selection - theSelection = document.selection.createRange().text; - - if (theSelection) + if (textarea.createTextRange && textarea.caretPos) { - // Add tags around selection - document.selection.createRange().text = bbopen + theSelection + bbclose; - document.forms[form_name].elements[text_name].focus(); - theSelection = ''; + textarea.caretPos.text = bbopen + textarea.caretPos.text + bbclose; + textarea.focus(); return; } } @@ -102,10 +98,10 @@ function bbfontstyle(bbopen, bbclose) theSelection = ''; return; } - + //The new position for the cursor after adding the bbcode var caret_pos = getCaretPosition(textarea).start; - var new_pos = caret_pos + bbopen.length; + var new_pos = caret_pos + bbopen.length; // Open tag insert_text(bbopen + bbclose); @@ -116,12 +112,12 @@ function bbfontstyle(bbopen, bbclose) { textarea.selectionStart = new_pos; textarea.selectionEnd = new_pos; - } + } // IE else if (document.selection) { - var range = textarea.createTextRange(); - range.move("character", new_pos); + var range = textarea.createTextRange(); + range.move("character", bbopen.length); range.select(); storeCaret(textarea); } @@ -136,7 +132,7 @@ function bbfontstyle(bbopen, bbclose) function insert_text(text, spaces, popup) { var textarea; - + if (!popup) { textarea = document.forms[form_name].elements[text_name]; @@ -159,18 +155,18 @@ function insert_text(text, spaces, popup) mozWrap(textarea, text, ''); textarea.selectionStart = sel_start + text.length; textarea.selectionEnd = sel_end + text.length; - } - + } + else if (textarea.createTextRange && textarea.caretPos) { - if (baseHeight != textarea.caretPos.boundingHeight) + if (baseHeight != textarea.caretPos.boundingHeight) { textarea.focus(); storeCaret(textarea); } var caret_pos = textarea.caretPos; caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; - + } else { @@ -233,7 +229,7 @@ function addquote(post_id, username) theSelection = theSelection.replace(/<br\/>/ig, '\n'); theSelection = theSelection.replace(/<\;/ig, '<'); theSelection = theSelection.replace(/>\;/ig, '>'); - theSelection = theSelection.replace(/&\;/ig, '&'); + theSelection = theSelection.replace(/&\;/ig, '&'); theSelection = theSelection.replace(/ \;/ig, ' '); } else if (document.all) @@ -268,7 +264,7 @@ function mozWrap(txtarea, open, close) var selEnd = txtarea.selectionEnd; var scrollTop = txtarea.scrollTop; - if (selEnd == 1 || selEnd == 2) + if (selEnd == 1 || selEnd == 2) { selEnd = selLength; } @@ -292,7 +288,17 @@ function mozWrap(txtarea, open, close) */ function storeCaret(textEl) { - if (textEl.createTextRange) + var keyCode = false; + if (is_ie) + { + keyCode = (event.keyCode) ? event.keyCode : event.charCode; + } + + // Did the user press Shift (16), Ctrl (17) or Alt (18)? + // If so, we do not update the caretPos, so BBCodes can still be applied correctly. + var is_control_key = (keyCode == 16 || keyCode == 17 || keyCode == 18); + + if ((!is_ie || !is_control_key) && (textEl.createTextRange)) { textEl.caretPos = document.selection.createRange().duplicate(); } @@ -328,7 +334,7 @@ function colorPalette(dir, width, height) { document.writeln('<tr>'); } - + for (b = 0; b < 5; b++) { color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); @@ -368,9 +374,9 @@ function caretPosition() function getCaretPosition(txtarea) { var caretPos = new caretPosition(); - + // simple Gecko/Opera way - if (txtarea.selectionStart || txtarea.selectionStart == 0) + if (!is_ie && (txtarea.selectionStart || txtarea.selectionStart == 0)) { caretPos.start = txtarea.selectionStart; caretPos.end = txtarea.selectionEnd; @@ -384,19 +390,19 @@ function getCaretPosition(txtarea) // a new selection of the whole textarea var range_all = document.body.createTextRange(); range_all.moveToElementText(txtarea); - + // calculate selection start point by moving beginning of range_all to beginning of range var sel_start; for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++) { range_all.moveStart('character', 1); } - + txtarea.sel_start = sel_start; - + // we ignore the end value for IE, this is already dirty enough and we don't need it caretPos.start = txtarea.sel_start; - caretPos.end = txtarea.sel_start; + caretPos.end = txtarea.sel_start; } return caretPos; |