Merge branch '0.8.x' into attachment-fixup
* 0.8.x: Added functionality to remove the notice data attachment max public page
This commit is contained in:
commit
b47a1b3b57
@ -35,6 +35,10 @@ require_once INSTALLDIR.'/lib/publicgroupnav.php';
|
||||
require_once INSTALLDIR.'/lib/noticelist.php';
|
||||
require_once INSTALLDIR.'/lib/feedlist.php';
|
||||
|
||||
// Farther than any human will go
|
||||
|
||||
define('MAX_PUBLIC_PAGE', 100);
|
||||
|
||||
/**
|
||||
* Action for displaying the public stream
|
||||
*
|
||||
@ -74,6 +78,10 @@ class PublicAction extends Action
|
||||
parent::prepare($args);
|
||||
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
|
||||
|
||||
if ($this->page > MAX_PUBLIC_PAGE) {
|
||||
$this->clientError(sprintf(_("Beyond the page limit (%s)"), MAX_PUBLIC_PAGE));
|
||||
}
|
||||
|
||||
common_set_returnto($this->selfUrl());
|
||||
|
||||
return true;
|
||||
|
14
js/util.js
14
js/util.js
@ -222,6 +222,7 @@ $(document).ready(function(){
|
||||
}
|
||||
$("#notice_data-text").val("");
|
||||
$("#notice_data-attach").val("");
|
||||
$('#notice_data-attach_selected').remove();
|
||||
counter();
|
||||
}
|
||||
$("#form_notice").removeClass("processing");
|
||||
@ -233,7 +234,7 @@ $(document).ready(function(){
|
||||
$("#form_notice").each(addAjaxHidden);
|
||||
NoticeReply();
|
||||
NoticeAttachments();
|
||||
NoticeDataAttachSelected();
|
||||
NoticeDataAttach();
|
||||
});
|
||||
|
||||
function NoticeReply() {
|
||||
@ -312,10 +313,15 @@ function NoticeAttachments() {
|
||||
);
|
||||
}
|
||||
|
||||
function NoticeDataAttachSelected() {
|
||||
$('#notice_data-attach').change(function() {
|
||||
S = '<div id="notice_data-attach_selected" class="success">'+$(this).val()+'</div>';
|
||||
function NoticeDataAttach() {
|
||||
NDA = $('#notice_data-attach');
|
||||
NDA.change(function() {
|
||||
S = '<div id="notice_data-attach_selected" class="success"><code>'+$(this).val()+'</code> <button>×</button></div>';
|
||||
NDAS = $('#notice_data-attach_selected');
|
||||
(NDAS.length > 0) ? NDAS.replaceWith(S) : $('#form_notice').append(S);
|
||||
$('#notice_data-attach_selected button').click(function(){
|
||||
$('#notice_data-attach_selected').remove();
|
||||
NDA.val('');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -517,8 +517,19 @@ clear:both;
|
||||
width:81.5%;
|
||||
margin-bottom:0;
|
||||
line-height:1.618;
|
||||
}
|
||||
#form_notice #notice_data-attach_selected code {
|
||||
float:left;
|
||||
width:90%;
|
||||
display:block;
|
||||
font-size:1.1em;
|
||||
line-height:1.8;
|
||||
overflow:auto;
|
||||
}
|
||||
#form_notice #notice_data-attach_selected button {
|
||||
float:right;
|
||||
font-size:0.8em;
|
||||
}
|
||||
|
||||
/* entity_profile */
|
||||
.entity_profile {
|
||||
|
Loading…
Reference in New Issue
Block a user