mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
WIP: Some enhancements in default template (Part 2) (#1322)
* Some enhancements in default template (Part 2)
* Update CHANGELOG.md
* Updated
* Revert "Updated"
This reverts commit decd0afc69
.
* Updated
This commit is contained in:
parent
cdb33ba7a4
commit
8a81eabe30
8 changed files with 71 additions and 113 deletions
|
@ -14,6 +14,7 @@
|
||||||
- Used datastore to show statistic for more performance [\#1309](https://github.com/torrentpier/torrentpier/pull/1309) ([belomaxorka](https://github.com/belomaxorka))
|
- Used datastore to show statistic for more performance [\#1309](https://github.com/torrentpier/torrentpier/pull/1309) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Used `humn_size()` to count average of releases in tr_stats.php [\#1313](https://github.com/torrentpier/torrentpier/pull/1313) ([belomaxorka](https://github.com/belomaxorka))
|
- Used `humn_size()` to count average of releases in tr_stats.php [\#1313](https://github.com/torrentpier/torrentpier/pull/1313) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Some enhancements in default template [\#1312](https://github.com/torrentpier/torrentpier/pull/1312) ([belomaxorka](https://github.com/belomaxorka))
|
- Some enhancements in default template [\#1312](https://github.com/torrentpier/torrentpier/pull/1312) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
- Some enhancements in default template (Part 2) [\#1322](https://github.com/torrentpier/torrentpier/pull/1322) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Set response code in some cases [\#1319](https://github.com/torrentpier/torrentpier/pull/1319) ([belomaxorka](https://github.com/belomaxorka))
|
- Set response code in some cases [\#1319](https://github.com/torrentpier/torrentpier/pull/1319) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Fixed auth(): empty $f_access [\#1329](https://github.com/torrentpier/torrentpier/pull/1329) ([belomaxorka](https://github.com/belomaxorka))
|
- Fixed auth(): empty $f_access [\#1329](https://github.com/torrentpier/torrentpier/pull/1329) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Fixed HTTP 500 while cron running in server-side [\#1321](https://github.com/torrentpier/torrentpier/pull/1321) ([belomaxorka](https://github.com/belomaxorka))
|
- Fixed HTTP 500 while cron running in server-side [\#1321](https://github.com/torrentpier/torrentpier/pull/1321) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
|
|
@ -363,9 +363,6 @@ function initPostImages(context) {
|
||||||
$('#preload').append($img);
|
$('#preload').append($img);
|
||||||
var loading_icon = '<a href="' + src + '" target="_blank"><img src="' + bb_url + 'styles/images/pic_loading.gif" alt="" /></a>';
|
var loading_icon = '<a href="' + src + '" target="_blank"><img src="' + bb_url + 'styles/images/pic_loading.gif" alt="" /></a>';
|
||||||
$v.html(loading_icon);
|
$v.html(loading_icon);
|
||||||
if ($.browser.msie) {
|
|
||||||
$v.after('<wbr>');
|
|
||||||
}
|
|
||||||
$img.one('load', function () {
|
$img.one('load', function () {
|
||||||
imgFit(this, maxW);
|
imgFit(this, maxW);
|
||||||
$v.empty().append(this);
|
$v.empty().append(this);
|
||||||
|
@ -375,9 +372,6 @@ function initPostImages(context) {
|
||||||
imgFit(this, maxW)
|
imgFit(this, maxW)
|
||||||
});
|
});
|
||||||
$v.empty().append($img);
|
$v.empty().append($img);
|
||||||
if ($.browser.msie) {
|
|
||||||
$v.after('<wbr>');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,7 +209,13 @@ function hl (id, on)
|
||||||
<td class="small tCenter" title="{L_TOPICS_SHORT}"><em class="med" style="color: grey">{L_TOPICS_SHORT}:</em> {c.f.NUM_TOPICS}</td>
|
<td class="small tCenter" title="{L_TOPICS_SHORT}"><em class="med" style="color: grey">{L_TOPICS_SHORT}:</em> {c.f.NUM_TOPICS}</td>
|
||||||
<td class="small tCenter" title="{L_POSTS_SHORT}"><em class="med" style="color: grey">{L_POSTS_SHORT}:</em> {c.f.NUM_POSTS}</td>
|
<td class="small tCenter" title="{L_POSTS_SHORT}"><em class="med" style="color: grey">{L_POSTS_SHORT}:</em> {c.f.NUM_POSTS}</td>
|
||||||
<td class="med nowrap tCenter">
|
<td class="med nowrap tCenter">
|
||||||
<a class="med" href="{c.f.U_FORUM_EDIT}">{L_EDIT}</a>·<a class="med" href="{c.f.U_FORUM_PERM}">{L_PERMISSIONS}</a>·<a class="med" href="{c.f.U_FORUM_RESYNC}">{L_SYNC}</a>·<a class="med" href="{c.f.U_FORUM_DELETE}">{L_DELETE}</a>
|
<a class="med" href="{c.f.U_FORUM_EDIT}">{L_EDIT}</a>
|
||||||
|
·
|
||||||
|
<a class="med" href="{c.f.U_FORUM_PERM}">{L_PERMISSIONS}</a>
|
||||||
|
·
|
||||||
|
<a class="med" href="{c.f.U_FORUM_RESYNC}">{L_SYNC}</a>
|
||||||
|
·
|
||||||
|
<a class="med" href="{c.f.U_FORUM_DELETE}">{L_DELETE}</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="small nowrap tCenter"><b>{c.f.PRUNE_DAYS}</b></td>
|
<td class="small nowrap tCenter"><b>{c.f.PRUNE_DAYS}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -191,13 +191,6 @@ if (tCont.offsetHeight > document.body.clientHeight) {
|
||||||
tCont.style.height = document.body.clientHeight;
|
tCont.style.height = document.body.clientHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.browser.mozilla) {
|
|
||||||
if (tBody.offsetHeight > document.body.clientHeight - 65) {
|
|
||||||
tBody.style.height = document.body.clientHeight - 65;
|
|
||||||
}
|
|
||||||
tCont.style.maxWidth = document.body.clientWidth - 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
function flip_perm (f_id, acl_id)
|
function flip_perm (f_id, acl_id)
|
||||||
{
|
{
|
||||||
id = f_id + '_' + acl_id;
|
id = f_id + '_' + acl_id;
|
||||||
|
|
|
@ -101,11 +101,7 @@ function show_edit_options ()
|
||||||
});
|
});
|
||||||
|
|
||||||
$('input.topic-chbox').click(function(){
|
$('input.topic-chbox').click(function(){
|
||||||
if ($.browser.mozilla) {
|
|
||||||
$('#tr-'+this.value+' td').toggleClass('hl-selected-row');
|
|
||||||
} else {
|
|
||||||
$('#tr-'+this.value).toggleClass('hl-selected-row');
|
$('#tr-'+this.value).toggleClass('hl-selected-row');
|
||||||
}
|
|
||||||
});
|
});
|
||||||
$('#pagination a.pg').each(function(){ this.href += '&mod=1'; });
|
$('#pagination a.pg').each(function(){ this.href += '&mod=1'; });
|
||||||
$('#ed-list-desc').hide();
|
$('#ed-list-desc').hide();
|
||||||
|
|
|
@ -39,10 +39,6 @@ ajax.callback.view_post = function(data) {
|
||||||
var $links = $('div.post_links', $('#post_'+post_id));
|
var $links = $('div.post_links', $('#post_'+post_id));
|
||||||
$post.css({ maxWidth: maxW, maxHeight: maxH });
|
$post.css({ maxWidth: maxW, maxHeight: maxH });
|
||||||
$links.css({ maxWidth: maxW });
|
$links.css({ maxWidth: maxW });
|
||||||
if ($.browser.msie) {
|
|
||||||
if ($post.height() > maxH) { $post.height(maxH); }
|
|
||||||
if ($post.width() > maxW) { $post.width(maxW); $links.width(maxW); }
|
|
||||||
}
|
|
||||||
ajax.openedPosts[post_id] = true;
|
ajax.openedPosts[post_id] = true;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -86,7 +82,6 @@ var FSN = {
|
||||||
fs_og: [],
|
fs_og: [],
|
||||||
fs_lb: [],
|
fs_lb: [],
|
||||||
sel_width: null,
|
sel_width: null,
|
||||||
scroll : $.browser.mozilla,
|
|
||||||
nav_inited: false,
|
nav_inited: false,
|
||||||
|
|
||||||
show_nav: function () {
|
show_nav: function () {
|
||||||
|
@ -107,18 +102,12 @@ var FSN = {
|
||||||
FSN.fs_lb[i] = $(this).attr('label');
|
FSN.fs_lb[i] = $(this).attr('label');
|
||||||
$('#fs-sel-cat').append('<option class="cat-title" value="' + i + '"> · ' + FSN.fs_lb[i] + ' </option>\n');
|
$('#fs-sel-cat').append('<option class="cat-title" value="' + i + '"> · ' + FSN.fs_lb[i] + ' </option>\n');
|
||||||
$('<li><span class="b">' + FSN.fs_lb[i] + '</span>\n<ul id="nav-c-' + i + '"></ul>\n</li>').appendTo('#fs-nav-ul').click(function () {
|
$('<li><span class="b">' + FSN.fs_lb[i] + '</span>\n<ul id="nav-c-' + i + '"></ul>\n</li>').appendTo('#fs-nav-ul').click(function () {
|
||||||
if (FSN.scroll) {
|
|
||||||
$select.scrollTo('#og-'+i);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
$('option', $og).each(function () {
|
$('option', $og).each(function () {
|
||||||
var $op = $(this);
|
var $op = $(this);
|
||||||
if ($op[0].className) {
|
if ($op[0].className) {
|
||||||
$('<li><span class="f">' + $op.html() + '</span>\n</li>').appendTo('#nav-c-' + i).click(function (e) {
|
$('<li><span class="f">' + $op.html() + '</span>\n</li>').appendTo('#nav-c-' + i).click(function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (FSN.scroll) {
|
|
||||||
$select.scrollTo( '#'+$op.attr('id'), { duration:300 } ).scrollTo( '-=3px' );
|
|
||||||
}
|
|
||||||
$('option', $select).removeAttr('selected');
|
$('option', $select).removeAttr('selected');
|
||||||
$('#' + $op.attr('id')).attr({selected: 1});
|
$('#' + $op.attr('id')).attr({selected: 1});
|
||||||
$('#fs-nav-list').fadeOut();
|
$('#fs-nav-list').fadeOut();
|
||||||
|
@ -136,15 +125,13 @@ var FSN = {
|
||||||
}
|
}
|
||||||
if (i == 'all') {
|
if (i == 'all') {
|
||||||
var fs_html = FSN.fs_all;
|
var fs_html = FSN.fs_all;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
var fs_html = '<optgroup label="' + FSN.fs_lb[i] + '">' + FSN.fs_og[i] + '</optgroup>';
|
var fs_html = '<optgroup label="' + FSN.fs_lb[i] + '">' + FSN.fs_og[i] + '</optgroup>';
|
||||||
}
|
}
|
||||||
$select.html(fs_html).focus();
|
$select.html(fs_html).focus();
|
||||||
if (i == 'all') {
|
if (i == 'all') {
|
||||||
$('#fs-nav-menu').show();
|
$('#fs-nav-menu').show();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$('#fs-nav-menu').hide();
|
$('#fs-nav-menu').hide();
|
||||||
}
|
}
|
||||||
$select.width(FSN.sel_width);
|
$select.width(FSN.sel_width);
|
||||||
|
@ -513,17 +500,6 @@ $(function(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ($.browser.mozilla) {
|
|
||||||
$('#fs-qs-input').focus().quicksearch('#fs-main option', {
|
|
||||||
delay : 300,
|
|
||||||
onAfter : function(){
|
|
||||||
$('#fs-main optgroup').show();
|
|
||||||
$('#fs-main option:hidden').parent('optgroup').not( $('#fs-main :visible').parent('optgroup') ).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#fs-main').attr( 'size', $('#fs-main').attr('size')-1 );
|
|
||||||
$('#fs-qs-div').show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
function get_fs_link() {
|
function get_fs_link() {
|
||||||
var fs_url = '{TRACKER_URL}';
|
var fs_url = '{TRACKER_URL}';
|
||||||
|
|
|
@ -24,11 +24,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
$('input.topic-chbox').click(function () {
|
$('input.topic-chbox').click(function () {
|
||||||
if ($.browser.mozilla) {
|
|
||||||
$('#tr-' + this.value + ' td').toggleClass('hl-selected-row');
|
|
||||||
} else {
|
|
||||||
$('#tr-' + this.value).toggleClass('hl-selected-row');
|
$('#tr-' + this.value).toggleClass('hl-selected-row');
|
||||||
}
|
|
||||||
});
|
});
|
||||||
$('#pagination a.pg').each(function () {
|
$('#pagination a.pg').each(function () {
|
||||||
this.href += '&mod=1';
|
this.href += '&mod=1';
|
||||||
|
|
|
@ -220,10 +220,6 @@ ajax.callback.view_post = function(data) {
|
||||||
var $links = $('div.post_links', $('#post_'+topic_id));
|
var $links = $('div.post_links', $('#post_'+topic_id));
|
||||||
$post.css({ maxWidth: maxW, maxHeight: maxH });
|
$post.css({ maxWidth: maxW, maxHeight: maxH });
|
||||||
$links.css({ maxWidth: maxW });
|
$links.css({ maxWidth: maxW });
|
||||||
if ($.browser.msie) {
|
|
||||||
if ($post.height() > maxH) { $post.height(maxH); }
|
|
||||||
if ($post.width() > maxW) { $post.width(maxW); $links.width(maxW); }
|
|
||||||
}
|
|
||||||
ajax.openedPosts[topic_id] = true;
|
ajax.openedPosts[topic_id] = true;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue