1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

Merge branch 'develop' of git://github.com/phpbb/phpbb3 into feature/oauth

This commit is contained in:
Joseph Warner
2013-09-10 16:19:39 -04:00
21 changed files with 253 additions and 169 deletions

View File

@@ -42,19 +42,12 @@ function jumpto() {
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state) {
var parent = document.getElementById(id) || document[id];
if (!parent) {
return;
}
var rb = parent.getElementsByTagName('input');
for (var r = 0; r < rb.length; r++) {
if (rb[r].name.substr(0, name.length) === name) {
rb[r].checked = state;
jQuery('#' + id + ' input[type=checkbox][name]').each(function() {
var $this = jQuery(this);
if ($this.attr('name').substr(0, name.length) == name) {
$this.prop('checked', state);
}
}
});
}
/**
@@ -124,29 +117,15 @@ jQuery(document).ready(function() {
}
function subPanels(p) {
var i, e, t;
var i;
if (typeof(p) === 'string') {
show_panel = p;
}
for (i = 0; i < panels.length; i++) {
e = document.getElementById(panels[i]);
t = document.getElementById(panels[i] + '-tab');
if (e) {
if (panels[i] === show_panel) {
e.style.display = 'block';
if (t) {
t.className = 'activetab';
}
} else {
e.style.display = 'none';
if (t) {
t.className = '';
}
}
}
jQuery('#' + panels[i]).css('display', panels[i] === show_panel ? 'block' : 'none');
jQuery('#' + panels[i] + '-tab').toggleClass('activetab', panels[i] === show_panel);
}
}
});
@@ -255,57 +234,6 @@ function play_qt_file(obj) {
obj.Play();
}
/**
* Check if the nodeName of elem is name
* @author jQuery
*/
function is_node_name(elem, name) {
return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
}
/**
* Check if elem is in array, return position
* @author jQuery
*/
function is_in_array(elem, array) {
for (var i = 0, length = array.length; i < length; i++) {
// === is correct (IE)
if (array[i] === elem) {
return i;
}
}
return -1;
}
/**
* Find Element, type and class in tree
* Not used, but may come in handy for those not using JQuery
* @author jQuery.find, Meik Sievertsen
*/
function find_in_tree(node, tag, type, class_name) {
var result, element, i = 0, length = node.childNodes.length;
for (element = node.childNodes[0]; i < length; element = node.childNodes[++i]) {
if (!element || element.nodeType !== 1) {
continue;
}
if ((!tag || is_node_name(element, tag)) && (!type || element.type === type)
&& (!class_name || is_in_array(class_name, (element.className || element).toString().split(/\s+/)) > -1)) {
return element;
}
if (element.childNodes.length) {
result = find_in_tree(element, tag, type, class_name);
}
if (result) {
return result;
}
}
}
var in_autocomplete = false;
var last_key_entered = '';
@@ -336,47 +264,6 @@ function phpbb_check_key(event) {
return false;
}
/**
* Usually used for onkeypress event, to submit a form on enter
*/
function submit_default_button(event, selector, class_name) {
// Add which for key events
if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode)) {
event.which = event.charCode || event.keyCode;
}
if (phpbb_check_key(event)) {
return true;
}
var current = selector.parentNode;
// Search parent form element
while (current && (!current.nodeName || current.nodeType !== 1 || !is_node_name(current, 'form')) && current !== document) {
current = current.parentNode;
}
// Find the input submit button with the class name
//current = find_in_tree(current, 'input', 'submit', class_name);
var input_tags = current.getElementsByTagName('input');
current = false;
for (var i = 0, element = input_tags[0]; i < input_tags.length; element = input_tags[++i]) {
if (element.type === 'submit' && is_in_array(class_name, (element.className || element).toString().split(/\s+/)) > -1) {
current = element;
}
}
if (!current) {
return true;
}
// Submit form
current.focus();
current.click();
return false;
}
/**
* Apply onkeypress event for forcing default submit button on ENTER key press
* The jQuery snippet used is based on http://greatwebguy.com/programming/dom/default-html-button-submit-on-enter-with-jquery/

View File

@@ -14,7 +14,7 @@
<h3>{L_REPORT_REASON}{L_COLON} {REPORT_REASON_TITLE}</h3>
<p class="author">{L_REPORTED} {L_POST_BY_AUTHOR} {REPORTER_FULL} &laquo; {REPORT_DATE}</p>
<!-- IF not S_POST_REPORTED -->
<p class="rules">{L_REPORT_CLOSED}</p>
<p class="post-notice reported">{L_REPORT_CLOSED}</p>
<!-- ENDIF -->
<div class="content">
<!-- IF REPORT_TEXT -->
@@ -71,7 +71,7 @@
<!-- IF S_POST_UNAPPROVED -->
<form method="post" id="mcp_approve" action="{U_APPROVE_ACTION}">
<p class="rules">
<p class="post-notice unapproved">
<input class="button2" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" /> &nbsp;
<input class="button1" type="submit" value="{L_APPROVE}" name="action[approve]" />
<!-- IF not S_FIRST_POST --><input type="hidden" name="mode" value="unapproved_posts" /><!-- ENDIF -->
@@ -82,7 +82,7 @@
<!-- ELSEIF S_POST_DELETED -->
<form method="post" id="mcp_approve" action="{U_APPROVE_ACTION}">
<p class="rules">
<p class="post-notice deleted">
<input class="button2" type="submit" value="{L_DELETE}" name="action[disapprove]" /> &nbsp;
<input class="button1" type="submit" value="{L_RESTORE}" name="action[restore]" />
<!-- IF not S_FIRST_POST --><input type="hidden" name="mode" value="unapproved_posts" /><!-- ENDIF -->
@@ -93,7 +93,7 @@
<!-- ENDIF -->
<!-- IF S_MESSAGE_REPORTED -->
<p class="rules">
<p class="post-notice reported">
{REPORTED_IMG} <a href="{U_MCP_REPORT}"><strong>{L_MESSAGE_REPORTED}</strong></a>
</p>
<!-- ENDIF -->

View File

@@ -101,11 +101,21 @@
<h3><a href="{postrow.U_POST_DETAILS}">{postrow.POST_SUBJECT}</a></h3>
<p class="author"><a href="#pr{postrow.POST_ID}">{postrow.MINI_POST_IMG}</a> {L_POSTED} {postrow.POST_DATE} {L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong><!-- IF postrow.U_MCP_DETAILS --> [ <a href="{postrow.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF --></p>
<!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_DELETED or postrow.S_POST_REPORTED -->
<p class="rules">
<!-- IF postrow.S_POST_UNAPPROVED -->{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_UNAPPROVED}</strong></a><br /><!-- ENDIF -->
<!-- IF postrow.S_POST_DELETED -->{DELETED_IMG} <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_DELETED}</strong></a><br /><!-- ENDIF -->
<!-- IF postrow.S_POST_REPORTED -->{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a><!-- ENDIF -->
<!-- IF postrow.S_POST_UNAPPROVED -->
<p class="post-notice unapproved">
<a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_UNAPPROVED}</strong></a>
</p>
<!-- ENDIF -->
<!-- IF postrow.S_POST_DELETED -->
<p class="post-notice deleted">
<a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_DELETED}</strong></a>
</p>
<!-- ENDIF -->
<!-- IF postrow.S_POST_REPORTED -->
<p class="post-notice reported">
<a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a>
</p>
<!-- ENDIF -->

View File

@@ -62,7 +62,7 @@
<!-- ENDIF -->
<!-- IF S_DISPLAY_NOTICE -->
<div class="rules">{L_DOWNLOAD_NOTICE}</div>
<div class="post-notice error">{L_DOWNLOAD_NOTICE}</div>
<!-- ENDIF -->
<!-- IF EDITED_MESSAGE or EDIT_REASON -->

View File

@@ -9,6 +9,7 @@
<fieldset>
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
<!-- EVENT ucp_prefs_personal_prepend -->
<dl>
<dt><label for="viewemail0">{L_SHOW_EMAIL}{L_COLON}</label></dt>
<dd>
@@ -71,6 +72,7 @@
</dd>
<dd id="custom_date" style="display:none;"><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="inputbox narrow" style="margin-top: 3px;" /></dd>
</dl>
<!-- EVENT ucp_prefs_personal_append -->
</fieldset>
</div>

View File

@@ -8,6 +8,7 @@
<fieldset>
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
<!-- EVENT ucp_prefs_post_prepend -->
<dl>
<dt><label for="bbcode1">{L_DEFAULT_BBCODE}{L_COLON}</label></dt>
<dd>
@@ -36,6 +37,7 @@
<label for="notify0"><input type="radio" name="notify" id="notify0" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<!-- EVENT ucp_prefs_post_append -->
</fieldset>
</div>

View File

@@ -9,6 +9,7 @@
<fieldset>
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
<!-- EVENT ucp_prefs_view_radio_buttons_prepend -->
<dl>
<dt><label for="images1">{L_VIEW_IMAGES}{L_COLON}</label></dt>
<dd>
@@ -53,7 +54,9 @@
</dd>
</dl>
<!-- ENDIF -->
<!-- EVENT ucp_prefs_view_radio_buttons_append -->
<hr />
<!-- EVENT ucp_prefs_view_select_menu_prepend -->
<dl>
<dt><label>{L_VIEW_TOPICS_DAYS}{L_COLON}</label></dt>
<dd>{S_TOPIC_SORT_DAYS}</dd>
@@ -79,6 +82,7 @@
<dt><label>{L_VIEW_POSTS_DIR}{L_COLON}</label></dt>
<dd>{S_POST_SORT_DIR}</dd>
</dl>
<!-- EVENT ucp_prefs_view_select_menu_append -->
</fieldset>
</div>

View File

@@ -151,29 +151,32 @@
<h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3>
<p class="author"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF -->{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; {postrow.POST_DATE} </p>
<!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_DELETED or postrow.S_POST_REPORTED -->
<!-- IF postrow.S_POST_UNAPPROVED -->
<form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}">
<p class="rules">
<!-- IF postrow.S_POST_UNAPPROVED -->
{UNAPPROVED_IMG} <strong>{L_POST_UNAPPROVED}</strong>
<input class="button2" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" />
<input class="button1" type="submit" value="{L_APPROVE}" name="action[approve]" />
<input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
{S_FORM_TOKEN}
<br />
<!-- ELSEIF postrow.S_POST_DELETED -->
{DELETED_IMG} <strong>{L_POST_DELETED}</strong>
<input class="button2" type="submit" value="{L_DELETE}" name="action[disapprove]" />
<input class="button1" type="submit" value="{L_RESTORE}" name="action[restore]" />
<input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
{S_FORM_TOKEN}
<br />
<!-- ENDIF -->
<!-- IF postrow.S_POST_REPORTED -->
{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a>
<!-- ENDIF -->
<p class="post-notice unapproved">
<strong>{L_POST_UNAPPROVED}</strong>
<input class="button2" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" />
<input class="button1" type="submit" value="{L_APPROVE}" name="action[approve]" />
<input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
{S_FORM_TOKEN}
</p>
</form>
<!-- ELSEIF postrow.S_POST_DELETED -->
<form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}">
<p class="post-notice deleted">
<strong>{L_POST_DELETED}</strong>
<input class="button2" type="submit" value="{L_DELETE}" name="action[disapprove]" />
<input class="button1" type="submit" value="{L_RESTORE}" name="action[restore]" />
<input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
{S_FORM_TOKEN}
</p>
</form>
<!-- ENDIF -->
<!-- IF postrow.S_POST_REPORTED -->
<p class="post-notice reported">
<a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a>
</p>
<!-- ENDIF -->
<div class="content">{postrow.MESSAGE}</div>

View File

@@ -371,6 +371,13 @@
float: right;
}
.rtl p.post-notice:before {
left: auto;
right: 0;
padding-left: 5px;
padding-right: 26px;
}
/* Topic review panel
----------------------------------------*/
.rtl #topicreview {

View File

@@ -214,11 +214,24 @@ div.rules {
color: #BC2A4D;
}
p.rules {
p.post-notice {
background-color: #ECD5D8;
background-image: none;
}
p.post-notice.deleted:before {
background-image: url("./images/icon_topic_deleted.png");
}
p.post-notice.unapproved:before {
background-image: url("./images/icon_topic_unapproved.gif");
}
p.post-notice.reported:before, p.post-notice.error:before {
background-image: url("./images/icon_topic_reported.gif");
}
/*
--------------------------------------------------------------
Colours and backgrounds for links.css

View File

@@ -685,23 +685,28 @@ div.rules ul, div.rules ol {
margin-left: 20px;
}
p.rules {
background-image: none;
p.post-notice {
position: relative;
padding: 5px;
padding-left: 26px;
min-height: 14px;
margin-bottom: 1em;
}
p.rules img {
vertical-align: middle;
p.post-notice:before {
content: '';
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 28px;
background: transparent none 50% 50% no-repeat;
pointer-events: none;
}
p.rules strong {
vertical-align: middle;
padding-top: 5px;
}
p.rules a {
vertical-align: middle;
clear: both;
form > p.post-notice strong {
line-height: 20px;
}
#top {

View File

@@ -29,6 +29,7 @@
<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
</tr>
<!-- ENDIF -->
<!-- EVENT ucp_prefs_personal_prepend -->
<tr>
<td class="row1" width="50%"><b class="genmed">{L_SHOW_EMAIL}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="viewemail" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="viewemail" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
@@ -75,6 +76,7 @@
<div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="post" style="margin-top: 3px;" /></div>
</td>
</tr>
<!-- EVENT ucp_prefs_personal_append -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
</tr>

View File

@@ -9,6 +9,7 @@
<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
</tr>
<!-- ENDIF -->
<!-- EVENT ucp_prefs_post_prepend -->
<tr>
<td class="row1" width="50%"><b class="genmed">{L_DEFAULT_BBCODE}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="bbcode" value="1"<!-- IF S_BBCODE --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="bbcode" value="0"<!-- IF not S_BBCODE --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
@@ -25,6 +26,7 @@
<td class="row1" width="50%"><b class="genmed">{L_DEFAULT_NOTIFY}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="notify" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="notify" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<!-- EVENT ucp_prefs_post_append -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
</tr>

View File

@@ -9,6 +9,7 @@
<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
</tr>
<!-- ENDIF -->
<!-- EVENT ucp_prefs_view_radio_buttons_prepend -->
<tr>
<td class="row1" width="50%"><b class="genmed">{L_VIEW_IMAGES}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="images" value="1"<!-- IF S_IMAGES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="images" value="0"<!-- IF not S_IMAGES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
@@ -35,9 +36,11 @@
<td class="row2"><input type="radio" class="radio" name="wordcensor" value="1"<!-- IF S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="wordcensor" value="0"<!-- IF not S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<!-- ENDIF -->
<!-- EVENT ucp_prefs_view_radio_buttons_append -->
<tr>
<td colspan="2" class="spacer"></td>
</tr>
<!-- EVENT ucp_prefs_view_select_menu_prepend -->
<tr>
<td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_DAYS}{L_COLON}</b></td>
<td class="row2">{S_TOPIC_SORT_DAYS}</td>
@@ -65,6 +68,7 @@
<td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_DIR}{L_COLON}</b></td>
<td class="row2">{S_POST_SORT_DIR}</td>
</tr>
<!-- EVENT ucp_prefs_view_select_menu_append -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
</tr>