Add an infirmation panel for archived projects
This commit is contained in:
@@ -254,7 +254,7 @@ function initProject(sProjectCodeName, oFocusPost){
|
||||
|
||||
//Show/Hide Poster Panel
|
||||
var bHistoMode = (self.vars(['project', 'mode']) == self.consts.modes.histo);
|
||||
self.tmp('$Poster').toggle(!bHistoMode);
|
||||
self.tmp('$Poster').toggleClass('histo-mode', bHistoMode);
|
||||
|
||||
//Feed auto-update
|
||||
updateFeed(true, false, function(){focusOnPost(oFocusPost);});
|
||||
@@ -264,12 +264,10 @@ function initProject(sProjectCodeName, oFocusPost){
|
||||
|
||||
function initPosts() {
|
||||
//Add post form
|
||||
var asPoster = {
|
||||
type: 'poster',
|
||||
formatted_time: '',
|
||||
relative_time: oSpot.lang('post_new_message')
|
||||
};
|
||||
self.tmp('$Poster').append(getPost(asPoster));
|
||||
self.tmp('$Poster').append(getPost({type: 'poster', formatted_time: '', relative_time: oSpot.lang('post_new_message')}));
|
||||
|
||||
//Add archived Project Notice
|
||||
self.tmp('$Poster').append(getPost({type: 'archived', headerless: true}));
|
||||
|
||||
//Auto-adjust text area height
|
||||
autosize($('#post'));
|
||||
@@ -797,9 +795,14 @@ function focusOnPost(oFocusPost) {
|
||||
var bGetToTop = (oSpot.tmp('$PostList').height() - (($Post.length > 0)?$Post.position().top:0) >= $(window).height());
|
||||
if($Post.length > 0 && (bGetToTop || self.tmp('out-of-data'))) {
|
||||
self.tmp('simple-bar').getScrollElement().scrollTop = Math.round(
|
||||
$Post.position().top +
|
||||
parseInt($Post.css('margin-top')) +
|
||||
(self.tmp('$Poster').is(':visible')?self.tmp('$Poster').outerHeight(true):0)
|
||||
$Post.offset().top
|
||||
- parseInt($('#feed-panel').css('padding-top'))
|
||||
/*
|
||||
$Post.position().top
|
||||
+ parseInt($Post.css('margin-top'))
|
||||
+ self.tmp('$Poster').outerHeight(true)
|
||||
+ parseInt($('#feed-panel').css('padding-top'))
|
||||
*/
|
||||
);
|
||||
|
||||
if(oFocusPost.type=='media' || oFocusPost.type=='message') $Post.find('a.drill').click();
|
||||
@@ -895,6 +898,11 @@ function getPost(asPost) {
|
||||
.append($('<input>', {type:'text', id:'name', name:'name', placeholder:oSpot.lang('post_name')}))
|
||||
.append($('<button>', {type:'button', id:'submit', name:'submit'}).addIcon('fa-send'));
|
||||
break;
|
||||
case 'archived':
|
||||
$Body = $('<div>')
|
||||
.append($('<p>').addIcon('fa-success'))
|
||||
.append($('<p>').text(oSpot.lang('mode_histo')));
|
||||
break;
|
||||
case 'loading':
|
||||
$Body = $('<p>', {'class':'flicker'}).addIcon('fa-post');
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user