mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -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 `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 (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))
|
||||
- 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))
|
||||
|
|
|
@ -363,9 +363,6 @@ function initPostImages(context) {
|
|||
$('#preload').append($img);
|
||||
var loading_icon = '<a href="' + src + '" target="_blank"><img src="' + bb_url + 'styles/images/pic_loading.gif" alt="" /></a>';
|
||||
$v.html(loading_icon);
|
||||
if ($.browser.msie) {
|
||||
$v.after('<wbr>');
|
||||
}
|
||||
$img.one('load', function () {
|
||||
imgFit(this, maxW);
|
||||
$v.empty().append(this);
|
||||
|
@ -375,9 +372,6 @@ function initPostImages(context) {
|
|||
imgFit(this, maxW)
|
||||
});
|
||||
$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_POSTS_SHORT}"><em class="med" style="color: grey">{L_POSTS_SHORT}:</em> {c.f.NUM_POSTS}</td>
|
||||
<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 class="small nowrap tCenter"><b>{c.f.PRUNE_DAYS}</b></td>
|
||||
</tr>
|
||||
|
|
|
@ -191,13 +191,6 @@ if (tCont.offsetHeight > 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)
|
||||
{
|
||||
id = f_id + '_' + acl_id;
|
||||
|
|
|
@ -101,11 +101,7 @@ function show_edit_options ()
|
|||
});
|
||||
|
||||
$('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'; });
|
||||
$('#ed-list-desc').hide();
|
||||
|
|
|
@ -39,10 +39,6 @@ ajax.callback.view_post = function(data) {
|
|||
var $links = $('div.post_links', $('#post_'+post_id));
|
||||
$post.css({ maxWidth: maxW, maxHeight: maxH });
|
||||
$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;
|
||||
};
|
||||
</script>
|
||||
|
@ -81,85 +77,76 @@ ajax.callback.view_post = function(data) {
|
|||
|
||||
<!-- IF SHOW_SEARCH_OPT -->
|
||||
<script type="text/javascript">
|
||||
var FSN = {
|
||||
fs_all : '',
|
||||
fs_og : [],
|
||||
fs_lb : [],
|
||||
sel_width : null,
|
||||
scroll : $.browser.mozilla,
|
||||
nav_inited : false,
|
||||
var FSN = {
|
||||
fs_all: '',
|
||||
fs_og: [],
|
||||
fs_lb: [],
|
||||
sel_width: null,
|
||||
nav_inited: false,
|
||||
|
||||
show_nav: function() {
|
||||
$('#fs>legend').empty().append( $('#fs-nav-legend').contents() );
|
||||
},
|
||||
build_nav: function() {
|
||||
show_nav: function () {
|
||||
$('#fs>legend').empty().append($('#fs-nav-legend').contents());
|
||||
},
|
||||
build_nav: function () {
|
||||
|
||||
if (FSN.nav_inited) return;
|
||||
if (FSN.nav_inited) return;
|
||||
|
||||
var $fieldset = $('fieldset#fs');
|
||||
var $select = $('select:last', $fieldset);
|
||||
var $optgroup = $('optgroup', $select);
|
||||
var $fieldset = $('fieldset#fs');
|
||||
var $select = $('select:last', $fieldset);
|
||||
var $optgroup = $('optgroup', $select);
|
||||
|
||||
$optgroup.each(function(i){
|
||||
var $og = $(this);
|
||||
$og.attr({ id: 'og-'+i });
|
||||
FSN.fs_og[i] = $(this).html();
|
||||
FSN.fs_lb[i] = $(this).attr('label');
|
||||
$('#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(){
|
||||
if (FSN.scroll) {
|
||||
$select.scrollTo('#og-'+i);
|
||||
}
|
||||
});
|
||||
$('option', $og).each(function(){
|
||||
var $op = $(this);
|
||||
if ($op[0].className) {
|
||||
$('<li><span class="f">'+ $op.html() +'</span>\n</li>').appendTo('#nav-c-'+ i).click(function(e){
|
||||
e.stopPropagation();
|
||||
if (FSN.scroll) {
|
||||
$select.scrollTo( '#'+$op.attr('id'), { duration:300 } ).scrollTo( '-=3px' );
|
||||
}
|
||||
$('option', $select).removeAttr('selected');
|
||||
$('#'+$op.attr('id')).attr({ selected: 1 });
|
||||
$('#fs-nav-list').fadeOut();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
$optgroup.each(function (i) {
|
||||
var $og = $(this);
|
||||
$og.attr({id: 'og-' + i});
|
||||
FSN.fs_og[i] = $(this).html();
|
||||
FSN.fs_lb[i] = $(this).attr('label');
|
||||
$('#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 () {
|
||||
});
|
||||
$('option', $og).each(function () {
|
||||
var $op = $(this);
|
||||
if ($op[0].className) {
|
||||
$('<li><span class="f">' + $op.html() + '</span>\n</li>').appendTo('#nav-c-' + i).click(function (e) {
|
||||
e.stopPropagation();
|
||||
$('option', $select).removeAttr('selected');
|
||||
$('#' + $op.attr('id')).attr({selected: 1});
|
||||
$('#fs-nav-list').fadeOut();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#fs-nav-ul').treeview({ collapsed: true });
|
||||
$('#fs-nav-ul').treeview({collapsed: true});
|
||||
|
||||
$('#fs-sel-cat').bind('change', function(){
|
||||
var i = $(this).val();
|
||||
if (FSN.sel_width == null) {
|
||||
FSN.sel_width = $select.width() + 4;
|
||||
}
|
||||
if (i == 'all') {
|
||||
var fs_html = FSN.fs_all;
|
||||
}
|
||||
else {
|
||||
var fs_html = '<optgroup label="'+ FSN.fs_lb[i] +'">'+ FSN.fs_og[i] +'</optgroup>';
|
||||
}
|
||||
$select.html(fs_html).focus();
|
||||
if (i == 'all') {
|
||||
$('#fs-nav-menu').show();
|
||||
}
|
||||
else {
|
||||
$('#fs-nav-menu').hide();
|
||||
}
|
||||
$select.width(FSN.sel_width);
|
||||
});
|
||||
$('#fs-sel-cat').bind('change', function () {
|
||||
var i = $(this).val();
|
||||
if (FSN.sel_width == null) {
|
||||
FSN.sel_width = $select.width() + 4;
|
||||
}
|
||||
if (i == 'all') {
|
||||
var fs_html = FSN.fs_all;
|
||||
} else {
|
||||
var fs_html = '<optgroup label="' + FSN.fs_lb[i] + '">' + FSN.fs_og[i] + '</optgroup>';
|
||||
}
|
||||
$select.html(fs_html).focus();
|
||||
if (i == 'all') {
|
||||
$('#fs-nav-menu').show();
|
||||
} else {
|
||||
$('#fs-nav-menu').hide();
|
||||
}
|
||||
$select.width(FSN.sel_width);
|
||||
});
|
||||
|
||||
FSN.fs_all = $select.html();
|
||||
FSN.fs_all = $select.html();
|
||||
|
||||
FSN.nav_inited = true;
|
||||
}
|
||||
};
|
||||
FSN.nav_inited = true;
|
||||
}
|
||||
};
|
||||
|
||||
$(function(){
|
||||
FSN.show_nav();
|
||||
$('#fs legend').one('mouseenter', FSN.build_nav);
|
||||
});
|
||||
$(function () {
|
||||
FSN.show_nav();
|
||||
$('#fs legend').one('mouseenter', FSN.build_nav);
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="menu-sub" id="fs-nav-list">
|
||||
|
@ -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() {
|
||||
var fs_url = '{TRACKER_URL}';
|
||||
|
|
|
@ -24,11 +24,7 @@
|
|||
});
|
||||
|
||||
$('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';
|
||||
|
|
|
@ -220,10 +220,6 @@ ajax.callback.view_post = function(data) {
|
|||
var $links = $('div.post_links', $('#post_'+topic_id));
|
||||
$post.css({ maxWidth: maxW, maxHeight: maxH });
|
||||
$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;
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue