mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-02 03:08:53 +00:00
Possible fixes, search should work now as intended.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,17 +1,6 @@
|
||||
// event bindings
|
||||
jQuery(function ($) {
|
||||
|
||||
var vortexStates = Array();
|
||||
vortexStates[0] = 'Waiting';
|
||||
vortexStates[1] = 'Downloading';
|
||||
vortexStates[2] = 'Downloaded';
|
||||
vortexStates[3] = 'Saving';
|
||||
vortexStates[4] = 'Saved';
|
||||
vortexStates[5] = 'Skipped';
|
||||
|
||||
//fix for autosizing plugin
|
||||
$('.autosize').autosize({append: "\n"});
|
||||
|
||||
// browse.tpl, search.tpl -- show icons on hover
|
||||
var orig_opac = $('table.data tr').children('td.icons').children('div.icon').css('opacity');
|
||||
$('table.data tr').hover(
|
||||
@@ -39,29 +28,24 @@ jQuery(function ($) {
|
||||
|
||||
$(".check").click(function (e) {
|
||||
if (!$(e.target).is('input'))
|
||||
$(this).children(".nzb_check").attr('checked', !$(this).children(".nzb_check").attr('checked'));
|
||||
$(this).children(".nzb_check").prop('checked', !$(this).children(".nzb_check").prop('checked'));
|
||||
});
|
||||
|
||||
$(".descmore").click(function (e) {
|
||||
$(this).prev(".descinitial").hide();
|
||||
$(this).next(".descfull").show();
|
||||
$(this).hide();
|
||||
$(".descinitial").hide();
|
||||
$(".descfull").show();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.nzb_check_all').change(function () {
|
||||
if ($(this).attr('checked')) {
|
||||
$('table.data tr td input:checkbox').attr('checked', $(this).attr('checked'));
|
||||
} else {
|
||||
$('table.data tr td input:checkbox').removeAttr('checked');
|
||||
}
|
||||
$('table.data tr td input:checkbox').prop('checked', $(this).prop('checked'));
|
||||
});
|
||||
|
||||
$('.nzb_check_all_season').change(function () {
|
||||
var season = $(this).attr('name');
|
||||
$('table.data tr td input:checkbox').each(function (i, row) {
|
||||
if ($(row).attr('name') == season) {
|
||||
$(row).attr('checked', !$(row).attr('checked'));
|
||||
$(row).prop('checked', !$(row).prop('checked'));
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -76,114 +60,10 @@ jQuery(function ($) {
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.icon_nzbvortex').click(function (event) {
|
||||
if ($(this).hasClass('icon_nzbvortex_clicked')) return false;
|
||||
var guid = $(this).parent().parent().attr('id').substring(4);
|
||||
|
||||
if (guid && guid.length > 0) {
|
||||
$.ajax
|
||||
({
|
||||
url: SERVERROOT + '/nzbvortex?addQueue=' + guid + '&isAjax',
|
||||
cache: false
|
||||
}).done(function (html) {
|
||||
var message = 'Added ' + guid + ' to queue.';
|
||||
$(event.target).addClass('icon_nzbvortex_clicked').attr('title', message);
|
||||
createGrowl(message);
|
||||
}).fail(function (response) {
|
||||
alert(response.responseText);
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.vortex-resume').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#vortex-overlay-' + $(this).attr('href')).show();
|
||||
$.get(SERVERROOT + "nzbvortex?resume=" + $(this).attr('href') + '&isAjax');
|
||||
$(this).removeAttr('href');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.vortex-pause').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#vortex-overlay-' + $(this).attr('href')).show();
|
||||
$.get(SERVERROOT + "nzbvortex?pause=" + $(this).attr('href') + '&isAjax');
|
||||
$(this).removeAttr('href');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.vortex-moveup').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#vortex-overlay-' + $(this).attr('href')).show();
|
||||
$.get(SERVERROOT + "nzbvortex?moveup=" + $(this).attr('href') + '&isAjax');
|
||||
$(this).removeAttr('href');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.vortex-movedown').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#vortex-overlay-' + $(this).attr('href')).show();
|
||||
$.get(SERVERROOT + "nzbvortex?movedown=" + $(this).attr('href') + '&isAjax');
|
||||
$(this).removeAttr('href');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.vortex-movetop').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#vortex-overlay-' + $(this).attr('href')).show();
|
||||
$.get(SERVERROOT + "nzbvortex?movetop=" + $(this).attr('href') + '&isAjax');
|
||||
$(this).removeAttr('href');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.vortex-movebottom').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#vortex-overlay-' + $(this).attr('href')).show();
|
||||
$.get(SERVERROOT + "nzbvortex?movebottom=" + $(this).attr('href') + '&isAjax');
|
||||
$(this).removeAttr('href');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.vortex-trash').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
$('#vortex-overlay-' + $(this).attr('href')).show();
|
||||
$.get(SERVERROOT + "nzbvortex?delete=" + $(this).attr('href') + '&isAjax');
|
||||
$(this).removeAttr('href');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.vortex-filelist').live('click', function (event) {
|
||||
event.preventDefault();
|
||||
var id = $(this).attr('href');
|
||||
$('#vortex-overlay-' + id).show();
|
||||
|
||||
$.colorbox({});
|
||||
|
||||
$.ajax
|
||||
({
|
||||
url: SERVERROOT + '/nzbvortex?filelist=' + id + '&isAjax',
|
||||
cache: false
|
||||
}).done(function (response) {
|
||||
$('#cboxLoadingGraphic').hide();
|
||||
var json = $.parseJSON(response);
|
||||
console.log(json);
|
||||
$.each(json.files, function (k, v) {
|
||||
|
||||
$('#cboxContent').append('<strong>' + v.fileName + '</strong> (' + vortexStates[v.state] + ')<br />');
|
||||
});
|
||||
|
||||
}).fail(function (response) {
|
||||
alert('Unable to retrieve filelist: ' + response.responseText);
|
||||
});
|
||||
|
||||
$(this).removeAttr('href');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.icon_sab').click(function (e) { // replace with cookies?
|
||||
if ($(this).hasClass('icon_sab_clicked')) return false;
|
||||
if ($(this).hasClass('icon_sab_clicked')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var guid = $(this).parent().parent().attr('id').substring(4);
|
||||
var nzburl = SERVERROOT + "sendtoqueue/" + guid;
|
||||
@@ -216,7 +96,7 @@ jQuery(function ($) {
|
||||
innerWidth: "800px", innerHeight: "90%", initialWidth: "800px", initialHeight: "90%", speed: 0, opacity: 0.7
|
||||
});
|
||||
// Screenshot modal
|
||||
$("table.data a.modal_prev").colorbox({scrolling: false, maxWidth: "800px", maxHeight: "450px"});
|
||||
$("table.data a.modal_prev").colorbox({maxWidth: "800px", maxHeight: "800x"});
|
||||
|
||||
$("table.data a.modal_imdb").colorbox({ // IMDB modal
|
||||
href: function () {
|
||||
@@ -230,19 +110,6 @@ jQuery(function ($) {
|
||||
$('#colorbox').removeClass().addClass('cboxMovie');
|
||||
});
|
||||
|
||||
$("a.modal_imdbtrailer").colorbox({ // IMDB trailer modal
|
||||
href: function () {
|
||||
return SERVERROOT + "movietrailer/" + $(this).attr('name').substring(4) + '&modal';
|
||||
},
|
||||
title: function () {
|
||||
return $(this).parent().parent().children('a.title').text();
|
||||
},
|
||||
innerWidth: "800px", innerHeight: "450px", initialWidth: "800px", initialHeight: "450px", speed: 0, opacity: 0.7
|
||||
}).click(function () {
|
||||
$('#colorbox').removeClass().addClass('cboxMovie');
|
||||
});
|
||||
|
||||
|
||||
$("table.data a.modal_music").colorbox({ // Music modal
|
||||
href: function () {
|
||||
return SERVERROOT + "musicmodal/" + $(this).attr('name').substring(4) + '&modal';
|
||||
@@ -282,14 +149,14 @@ jQuery(function ($) {
|
||||
return false;
|
||||
});
|
||||
$('input.nzb_multi_operations_download').click(function () {
|
||||
var newFormName = 'nzbmulti' + Math.round(+new Date() / 1000);
|
||||
var newForm = $("<form />", {'action': SERVERROOT + 'getnzb?zip=1', 'method': 'post', 'target': '_top', 'id': newFormName});
|
||||
var ids = "";
|
||||
$("table.data INPUT[type='checkbox']:checked").each(function (i, row) {
|
||||
if ($(row).val() != "on")
|
||||
$("<input />", {'name': 'id[]', 'value': $(row).val(), 'type': 'hidden'}).appendTo(newForm);
|
||||
ids += $(row).val() + ',';
|
||||
});
|
||||
newForm.appendTo($('body'));
|
||||
$('#' + newFormName).submit();
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
if (ids)
|
||||
window.location = SERVERROOT + "getnzb?zip=1&id=" + ids;
|
||||
});
|
||||
$('input.nzb_multi_operations_cart').click(function () {
|
||||
var guids = new Array();
|
||||
@@ -301,9 +168,9 @@ jQuery(function ($) {
|
||||
guids.push(guid);
|
||||
createGrowl('Added to Cart');
|
||||
}
|
||||
$(this).attr('checked', false);
|
||||
$(this).prop('checked', false);
|
||||
});
|
||||
$.post(SERVERROOT + "cart?add", { 'add': guids });
|
||||
$.post(SERVERROOT + "cart?add=" + guids);
|
||||
});
|
||||
$('input.nzb_multi_operations_sab').click(function () {
|
||||
$("table.data INPUT[type='checkbox']:checked").each(function (i, row) {
|
||||
@@ -316,7 +183,7 @@ jQuery(function ($) {
|
||||
createGrowl('Added to Queue');
|
||||
});
|
||||
}
|
||||
$(this).attr('checked', false);
|
||||
$(this).prop('checked', false);
|
||||
});
|
||||
});
|
||||
//front end admin functions
|
||||
@@ -348,19 +215,6 @@ jQuery(function ($) {
|
||||
});
|
||||
}
|
||||
});
|
||||
$('input.nzb_multi_operations_rebuild').click(function () {
|
||||
var ids = "";
|
||||
$("table.data INPUT[type='checkbox']:checked").each(function (i, row) {
|
||||
if ($(row).val() != "on")
|
||||
ids += '&id[]=' + $(row).val();
|
||||
});
|
||||
if (ids)
|
||||
if (confirm('Are you sure you want to rebuild the selected releases?')) {
|
||||
$.post(SERVERROOT + "ajax_release-admin?action=dorebuild" + ids, function (resp) {
|
||||
window.location = window.location;
|
||||
});
|
||||
}
|
||||
});
|
||||
//cart functions
|
||||
$('input.nzb_multi_operations_cartdelete').click(function () {
|
||||
var ids = new Array();
|
||||
@@ -376,36 +230,22 @@ jQuery(function ($) {
|
||||
}
|
||||
}
|
||||
});
|
||||
$('input.nzb_multi_operations_cartsab').click(function () {
|
||||
var ids = new Array();
|
||||
$("table.data INPUT[type='checkbox']:checked").each(function (i, row) {
|
||||
var guid = $(row).val();
|
||||
var nzburl = SERVERROOT + "sendtoqueue/" + guid;
|
||||
$.post(nzburl, function (resp) {
|
||||
createGrowl('Added to Queue');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// headermenu.tpl
|
||||
$('#headsearch')
|
||||
.focus(function () {
|
||||
if (this.value == 'Enter keywords') this.value = ''; else this.select();
|
||||
if (this.value == 'Enter keywords') this.value = '';
|
||||
})
|
||||
.blur(function () {
|
||||
if (this.value == '') this.value = 'Enter keywords';
|
||||
});
|
||||
if (this.value == '') this.value = 'Enter keywords';
|
||||
});
|
||||
$('#headsearch_form').submit(function () {
|
||||
$('#headsearch_go').trigger('click');
|
||||
$('headsearch_go').trigger('click');
|
||||
return false;
|
||||
});
|
||||
$('#headsearch_go').click(function () {
|
||||
if ($('#headsearch').val() && $('#headsearch').val() != 'Enter keywords') {
|
||||
|
||||
var sText = $('#headsearch').val();
|
||||
var sCat = ($("#headcat").val() != -1 ? "?t=" + $("#headcat").val() : "");
|
||||
document.location = WWW_TOP + "/search/" + sText + sCat;
|
||||
document.location = WWW_TOP + "/search/" + $('#headsearch').val() + ($("#headcat").val() != -1 ? "?t=" + $("#headcat").val() : "");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -416,23 +256,6 @@ jQuery(function ($) {
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#search')
|
||||
.focus(function () {
|
||||
this.select();
|
||||
})
|
||||
|
||||
// searchraw.tpl
|
||||
$('#searchraw_search_button').click(function () {
|
||||
if ($('#search').val())
|
||||
document.location = WWW_TOP + "/searchraw/" + $('#search').val();
|
||||
return false;
|
||||
});
|
||||
$('#searchraw_download_selected').click(function () {
|
||||
if ($('#dl input:checked').length)
|
||||
$('#dl').trigger('submit');
|
||||
return false;
|
||||
});
|
||||
|
||||
// login.tpl, register.tpl, search.tpl, searchraw.tpl
|
||||
if ($('#username').length)
|
||||
$('#username').focus();
|
||||
@@ -451,28 +274,6 @@ jQuery(function ($) {
|
||||
return confirm('Are you sure?');
|
||||
});
|
||||
|
||||
// play audio preview
|
||||
$('.audioprev').click(function () {
|
||||
var a = document.getElementById($(this).next('audio').attr('ID'));
|
||||
if (a != null) {
|
||||
if ($(this).text() == "Listen") {
|
||||
a.play();
|
||||
$(this).text("Stop");
|
||||
}
|
||||
else {
|
||||
a.pause();
|
||||
a.currentTime = 0;
|
||||
$(this).text("Listen");
|
||||
}
|
||||
}
|
||||
|
||||
a.addEventListener('ended', function () {
|
||||
$(this).prev().text("Listen");
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// mmenu
|
||||
$('.mmenu').click(function () {
|
||||
document.location = $(this).children('a').attr('href');
|
||||
@@ -489,24 +290,24 @@ jQuery(function ($) {
|
||||
// selections
|
||||
var last1, last2;
|
||||
$(".checkbox_operations .select_all").click(function () {
|
||||
$("table.data INPUT[type='checkbox']").attr('checked', true).trigger('change');
|
||||
$("table.data INPUT[type='checkbox']").prop('checked', true).trigger('change');
|
||||
return false;
|
||||
});
|
||||
$(".checkbox_operations .select_none").click(function () {
|
||||
$("table.data INPUT[type='checkbox']").attr('checked', false).trigger('change');
|
||||
$("table.data INPUT[type='checkbox']").prop('checked', false).trigger('change');
|
||||
return false;
|
||||
});
|
||||
$(".checkbox_operations .select_invert").click(function () {
|
||||
$("table.data INPUT[type='checkbox']").each(function () {
|
||||
$(this).attr('checked', !$(this).attr('checked')).trigger('change');
|
||||
$(this).prop('checked', !$(this).prop('checked')).trigger('change');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$(".checkbox_operations .select_range").click(function () {
|
||||
if (last1 && last2 && last1 < last2)
|
||||
$("table.data INPUT[type='checkbox']").slice(last1, last2).attr('checked', true).trigger('change');
|
||||
$("table.data INPUT[type='checkbox']").slice(last1, last2).prop('checked', true).trigger('change');
|
||||
else if (last1 && last2)
|
||||
$("table.data INPUT[type='checkbox']").slice(last2, last1).attr('checked', true).trigger('change');
|
||||
$("table.data INPUT[type='checkbox']").slice(last2, last1).prop('checked', true).trigger('change');
|
||||
return false;
|
||||
});
|
||||
$('table.data td.check INPUT[type="checkbox"]').click(function (e) {
|
||||
@@ -518,9 +319,9 @@ jQuery(function ($) {
|
||||
// perform range selection
|
||||
if (e.shiftKey && last1 && last2) {
|
||||
if (last1 < last2)
|
||||
$("table.data INPUT[type='checkbox']").slice(last1, last2).attr('checked', true).trigger('change');
|
||||
$("table.data INPUT[type='checkbox']").slice(last1, last2).prop('checked', true).trigger('change');
|
||||
else
|
||||
$("table.data INPUT[type='checkbox']").slice(last2, last1).attr('checked', true).trigger('change');
|
||||
$("table.data INPUT[type='checkbox']").slice(last2, last1).prop('checked', true).trigger('change');
|
||||
}
|
||||
});
|
||||
$('table.data a.data_filename').click(function (e) { // click filenames to select
|
||||
@@ -530,19 +331,11 @@ jQuery(function ($) {
|
||||
last1 = rowNum;
|
||||
|
||||
var $checkbox = $('table.data tr:nth-child(' + (rowNum + 1) + ') td.selection INPUT[type="checkbox"]');
|
||||
$checkbox.attr('checked', !$checkbox.attr('checked'));
|
||||
$checkbox.prop('checked', !$checkbox.prop('checked'));
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// show/hide previews
|
||||
$('#showmoviepreviews').click(function () {
|
||||
$('#moviepreviews').next('form').toggle('fast');
|
||||
$('#moviepreviews').toggle('fast', function () {
|
||||
$('#showmoviepreviews').text(($('#moviepreviews').is(":visible") ? "Hide" : "Show") + " previews");
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// show/hide invite form
|
||||
$('#lnkSendInvite').click(function () {
|
||||
@@ -555,8 +348,9 @@ jQuery(function ($) {
|
||||
if (isValidEmailAddress(inputEmailto)) {
|
||||
|
||||
// no caching of results
|
||||
var rand_no = Math.random();
|
||||
$.ajax({
|
||||
url: WWW_TOP + '/ajax_profile?action=1&rand=' + $.now(),
|
||||
url: WWW_TOP + '/ajax_profile?action=1&rand=' + rand_no,
|
||||
data: { emailto: inputEmailto},
|
||||
dataType: "html",
|
||||
success: function (data) {
|
||||
@@ -588,8 +382,9 @@ jQuery(function ($) {
|
||||
$('#frmMyMovieLookup').submit(function () {
|
||||
var movSearchText = $("#txtsearch").val();
|
||||
// no caching of results
|
||||
var rand_no = Math.random();
|
||||
$.ajax({
|
||||
url: WWW_TOP + '/ajax_mymovies?rand=' + $.now(),
|
||||
url: WWW_TOP + '/ajax_mymovies?rand=' + rand_no,
|
||||
data: { id: movSearchText},
|
||||
dataType: "html",
|
||||
success: function (data) {
|
||||
@@ -603,18 +398,6 @@ jQuery(function ($) {
|
||||
return false;
|
||||
});
|
||||
|
||||
// season selector in TV
|
||||
$('a[id^="seas_"]').click(function () {
|
||||
seas = $(this).attr("ID").replace("seas_", "");
|
||||
|
||||
$('table[class^="tb_"]').hide();
|
||||
$('.tb_' + seas).show();
|
||||
|
||||
$("li", $(this).closest("ul")).removeClass("active");
|
||||
$(this).closest("li").addClass("active");
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// file list tooltip
|
||||
$(".rarfilelist").each(function () {
|
||||
@@ -624,11 +407,11 @@ jQuery(function ($) {
|
||||
title: {
|
||||
text: 'rar archive contains...'
|
||||
},
|
||||
text: 'loading...',
|
||||
text: 'loading...', // The text to use whilst the AJAX request is loading
|
||||
ajax: {
|
||||
url: SERVERROOT + 'ajax_rarfilelist',
|
||||
type: 'GET',
|
||||
data: { id: guid },
|
||||
url: SERVERROOT + 'ajax_rarfilelist', // URL to the local file
|
||||
type: 'GET', // POST or GET
|
||||
data: { id: guid }, // Data to pass along with your request
|
||||
success: function (data, status) {
|
||||
this.set('content.text', data);
|
||||
}
|
||||
@@ -636,16 +419,16 @@ jQuery(function ($) {
|
||||
},
|
||||
position: {
|
||||
my: 'top right',
|
||||
at: 'bottom left'
|
||||
at: 'bottom left',
|
||||
},
|
||||
style: {
|
||||
classes: 'ui-tooltip-newznab',
|
||||
classes: 'qtip-dark qtip-shadow qtip-rounded',
|
||||
width: { max: 500 },
|
||||
tip: {
|
||||
corner: 'topRight',
|
||||
tip: { // Now an object instead of a string
|
||||
corner: 'topRight', // We declare our corner within the object using the corner sub-option
|
||||
size: {
|
||||
x: 8,
|
||||
y: 8
|
||||
x: 8, // Be careful that the x and y values refer to coordinates on screen, not height or width.
|
||||
y: 8 // Depending on which corner your tooltip is at, x and y could mean either height or width!
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -658,20 +441,20 @@ jQuery(function ($) {
|
||||
$(this).qtip({
|
||||
content: {
|
||||
title: {
|
||||
text: 'Episode Info'
|
||||
text: 'episode info...'
|
||||
},
|
||||
text: 'loading...',
|
||||
text: 'loading...', // The text to use whilst the AJAX request is loading
|
||||
ajax: {
|
||||
url: SERVERROOT + 'ajax_tvinfo',
|
||||
type: 'GET',
|
||||
data: { id: guid },
|
||||
url: SERVERROOT + 'ajax_tvinfo', // URL to the local file
|
||||
type: 'GET', // POST or GET
|
||||
data: { id: guid }, // Data to pass along with your request
|
||||
success: function (data, status) {
|
||||
this.set('content.text', data);
|
||||
}
|
||||
}
|
||||
},
|
||||
style: {
|
||||
classes: 'ui-tooltip-newznab'
|
||||
classes: 'qtip-dark qtip-shadow qtip-rounded'
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -682,26 +465,26 @@ jQuery(function ($) {
|
||||
$(this).qtip({
|
||||
content: {
|
||||
title: {
|
||||
text: 'Extended Media Info'
|
||||
text: 'extended media info...'
|
||||
},
|
||||
text: 'loading...',
|
||||
text: 'loading...', // The text to use whilst the AJAX request is loading
|
||||
ajax: {
|
||||
url: SERVERROOT + 'ajax_mediainfo',
|
||||
type: 'GET',
|
||||
data: { id: guid },
|
||||
url: SERVERROOT + 'ajax_mediainfo', // URL to the local file
|
||||
type: 'GET', // POST or GET
|
||||
data: { id: guid }, // Data to pass along with your request
|
||||
success: function (data, status) {
|
||||
this.set('content.text', data);
|
||||
}
|
||||
}
|
||||
},
|
||||
style: {
|
||||
classes: 'ui-tooltip-newznab',
|
||||
classes: 'qtip-dark qtip-shadow qtip-rounded',
|
||||
width: { max: 500 },
|
||||
tip: {
|
||||
corner: 'topLeft',
|
||||
tip: { // Now an object instead of a string
|
||||
corner: 'topLeft', // We declare our corner within the object using the corner sub-option
|
||||
size: {
|
||||
x: 8,
|
||||
y: 8
|
||||
x: 8, // Be careful that the x and y values refer to coordinates on screen, not height or width.
|
||||
y: 8 // Depending on which corner your tooltip is at, x and y could mean either height or width!
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -710,45 +493,64 @@ jQuery(function ($) {
|
||||
|
||||
// preinfo tooltip
|
||||
$(".preinfo").each(function () {
|
||||
var searchname = $(this).attr('title');
|
||||
var preid = $(this).attr('title');
|
||||
$(this).qtip({
|
||||
content: {
|
||||
title: {
|
||||
text: 'Pre Info'
|
||||
text: 'PreDB info...'
|
||||
},
|
||||
text: 'loading...',
|
||||
text: 'loading...', // The text to use whilst the AJAX request is loading
|
||||
ajax: {
|
||||
url: SERVERROOT + 'ajax_preinfo',
|
||||
type: 'GET',
|
||||
data: { searchname: searchname },
|
||||
url: SERVERROOT + 'ajax_preinfo', // URL to the local file
|
||||
type: 'GET', // POST or GET
|
||||
data: { id: preid }, // Data to pass along with your request
|
||||
success: function (data, status) {
|
||||
this.set('content.text', data);
|
||||
}
|
||||
}
|
||||
},
|
||||
style: {
|
||||
classes: 'ui-tooltip-newznab'
|
||||
classes: 'qtip-dark qtip-shadow qtip-rounded',
|
||||
width: { max: 500 },
|
||||
tip: { // Now an object instead of a string
|
||||
corner: 'topLeft', // We declare our corner within the object using the corner sub-option
|
||||
size: {
|
||||
x: 8, // Be careful that the x and y values refer to coordinates on screen, not height or width.
|
||||
y: 8 // Depending on which corner your tooltip is at, x and y could mean either height or width!
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// prehashinfo tooltip
|
||||
$(".prehashinfo").each(function () {
|
||||
var prehashID = $(this).attr('title');
|
||||
// titleinfo tooltip
|
||||
$(".titleinfo").each(function () {
|
||||
var guid = $(this).attr('title');
|
||||
$(this).qtip({
|
||||
content: {
|
||||
title: {
|
||||
text: 'Prehash info'
|
||||
text: 'Release info...'
|
||||
},
|
||||
text: 'loading...', // The text to use whilst the AJAX request is loading
|
||||
ajax: {
|
||||
url: SERVERROOT + 'ajax_prehashinfo', // URL to the local file
|
||||
url: SERVERROOT + 'ajax_titleinfo', // URL to the local file
|
||||
type: 'GET', // POST or GET
|
||||
data: { ID: prehashID }, // Data to pass along with your request
|
||||
data: { id: guid }, // Data to pass along with your request
|
||||
success: function (data, status) {
|
||||
this.set('content.text', data);
|
||||
}
|
||||
}
|
||||
},
|
||||
style: {
|
||||
classes: 'qtip-dark qtip-shadow qtip-rounded',
|
||||
width: { max: 500 },
|
||||
tip: { // Now an object instead of a string
|
||||
corner: 'topLeft', // We declare our corner within the object using the corner sub-option
|
||||
size: {
|
||||
x: 8, // Be careful that the x and y values refer to coordinates on screen, not height or width.
|
||||
y: 8 // Depending on which corner your tooltip is at, x and y could mean either height or width!
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -756,9 +558,6 @@ jQuery(function ($) {
|
||||
|
||||
|
||||
$.extend({ // http://plugins.jquery.com/project/URLEncode
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
URLEncode: function (c) {
|
||||
var o = '';
|
||||
var x = 0;
|
||||
@@ -799,10 +598,11 @@ function isValidEmailAddress(emailAddress) {
|
||||
return pattern.test(emailAddress);
|
||||
}
|
||||
|
||||
function mymovie_del(imdbID, btn) {
|
||||
function mymovie_del(imdbid, btn) {
|
||||
var rand_no = Math.random();
|
||||
$.ajax({
|
||||
url: WWW_TOP + '/ajax_mymovies?rand=' + $.now(),
|
||||
data: { del: imdbID},
|
||||
url: WWW_TOP + '/ajax_mymovies?rand=' + rand_no,
|
||||
data: { del: imdbid},
|
||||
dataType: "html",
|
||||
success: function (data) {
|
||||
$(btn).hide();
|
||||
@@ -815,13 +615,14 @@ function mymovie_del(imdbID, btn) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function mymovie_add(imdbID, btn) {
|
||||
function mymovie_add(imdbid, btn) {
|
||||
$(btn).hide();
|
||||
$(btn).next("a").show();
|
||||
|
||||
var rand_no = Math.random();
|
||||
$.ajax({
|
||||
url: WWW_TOP + '/ajax_mymovies?rand=' + $.now(),
|
||||
data: { add: imdbID},
|
||||
url: WWW_TOP + '/ajax_mymovies?rand=' + rand_no,
|
||||
data: { add: imdbid},
|
||||
dataType: "html",
|
||||
success: function (data) {
|
||||
},
|
||||
@@ -835,13 +636,16 @@ function mymovie_add(imdbID, btn) {
|
||||
|
||||
// qtip growl
|
||||
$(document).ready(function () {
|
||||
window.createGrowl = function (tipText) {
|
||||
|
||||
window.createGrowl = function (tipText /*, tipTitle, persistent*/) {
|
||||
// Use the last visible jGrowl qtip as our positioning target
|
||||
var target = $('.qtip.jgrowl:visible:last');
|
||||
var tipTitle = 'Attention!';
|
||||
var persistent = false;
|
||||
|
||||
// Create your jGrowl qTip...
|
||||
$(document.body).qtip({
|
||||
// Any content config you want here really.... go wild!
|
||||
content: {
|
||||
text: tipText,
|
||||
title: {
|
||||
@@ -850,35 +654,41 @@ $(document).ready(function () {
|
||||
}
|
||||
},
|
||||
position: {
|
||||
my: 'top right',
|
||||
at: (target.length ? 'bottom' : 'top') + ' right',
|
||||
target: target.length ? target : $(document.body),
|
||||
adjust: { y: 5 }
|
||||
my: 'top right', // Not really important...
|
||||
at: (target.length ? 'bottom' : 'top') + ' right', // If target is window use 'top right' instead of 'bottom right'
|
||||
target: target.length ? target : $(document.body), // Use our target declared above
|
||||
adjust: { y: 5 } // Add some vertical spacing
|
||||
},
|
||||
show: {
|
||||
event: false,
|
||||
ready: true,
|
||||
event: false, // Don't show it on a regular event
|
||||
ready: true, // Show it when ready (rendered)
|
||||
effect: function () {
|
||||
$(this).stop(0, 1).fadeIn(400);
|
||||
},
|
||||
}, // Matches the hide effect
|
||||
|
||||
// Custom option for use with the .get()/.set() API, awesome!
|
||||
persistent: persistent
|
||||
},
|
||||
hide: {
|
||||
event: false,
|
||||
event: false, // Don't hide it on a regular event
|
||||
effect: function (api) {
|
||||
// Do a regular fadeOut, but add some spice!
|
||||
$(this).stop(0, 1).fadeOut(400).queue(function () {
|
||||
// Destroy this tooltip after fading out
|
||||
api.destroy();
|
||||
|
||||
// Update positions
|
||||
updateGrowls();
|
||||
})
|
||||
}
|
||||
},
|
||||
style: {
|
||||
classes: 'jgrowl ui-tooltip-newznab ui-tooltip-rounded',
|
||||
tip: false
|
||||
classes: 'jgrowl qtip-dark qtip-shadow qtip-rounded', // Some nice visual classes
|
||||
tip: false // No tips for this one (optional ofcourse)
|
||||
},
|
||||
events: {
|
||||
render: function (event, api) {
|
||||
// Trigger the timer (below) on render
|
||||
timer.call(api.elements.tooltip, event);
|
||||
}
|
||||
}
|
||||
@@ -886,35 +696,36 @@ $(document).ready(function () {
|
||||
.removeData('qtip');
|
||||
};
|
||||
|
||||
// Make it a window property see we can call it outside via updateGrowls() at any point
|
||||
window.updateGrowls = function () {
|
||||
// Loop over each jGrowl qTip
|
||||
var each = $('.qtip.jgrowl:not(:animated)');
|
||||
each.each(function (i) {
|
||||
var api = $(this).data('qtip');
|
||||
|
||||
// Set the target option directly to prevent reposition() from being called twice.
|
||||
api.options.position.target = !i ? $(document.body) : each.eq(i - 1);
|
||||
api.set('position.at', (!i ? 'top' : 'bottom') + ' right');
|
||||
});
|
||||
};
|
||||
|
||||
// Setup our timer function
|
||||
function timer(event) {
|
||||
var api = $(this).data('qtip'),
|
||||
lifespan = 5000;
|
||||
lifespan = 5000; // 5 second lifespan
|
||||
|
||||
// If persistent is set to true, don't do anything.
|
||||
if (api.get('show.persistent') === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, start/clear the timer depending on event type
|
||||
clearTimeout(api.timer);
|
||||
if (event.type !== 'mouseover') {
|
||||
api.timer = setTimeout(api.hide, lifespan);
|
||||
}
|
||||
}
|
||||
|
||||
// Utilise delegate so we don't have to rebind for every qTip!
|
||||
$(document).delegate('.qtip.jgrowl', 'mouseover mouseout', timer);
|
||||
});
|
||||
|
||||
//reset users api counts
|
||||
function resetapireq(uid, type) {
|
||||
$.post(SERVERROOT + "ajax_resetusergrabs-admin?id=" + uid + "&action=" + type, function (resp) {
|
||||
});
|
||||
}
|
||||
@@ -19,13 +19,13 @@
|
||||
{/if}
|
||||
<!-- Included CSS files - Bootstrap 2.3.2 - Font Awesome 3.2.0 - plugins master style.css -->
|
||||
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.css" rel="stylesheet" media="screen">
|
||||
<!--<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.css" rel="stylesheet" media="screen">-->
|
||||
<link href="{$smarty.const.WWW_TOP}/templates/nntmux/styles/jquery.qtip.css" rel="stylesheet" media="screen">
|
||||
<!-- <link href="{$smarty.const.WWW_TOP}/themes_shared/styles/subnav.css" rel="stylesheet" media="screen"> -->
|
||||
<link href="{$smarty.const.WWW_TOP}/templates/nntmux/styles/posterwall.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<link href="{$smarty.const.WWW_TOP}/templates/nntmux/styles/style.css" rel="stylesheet" media="screen">
|
||||
<link rel="shortcut icon" type="image/ico" href="{$smarty.const.WWW_TOP}/templates/nntmux/images/favicon.ico"/>
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="{$smarty.const.WWW_TOP}/opensearch" title="{$site->title|escape}" />
|
||||
<!--<link rel="search" type="application/opensearchdescription+xml" href="{$smarty.const.WWW_TOP}/opensearch" title="{$site->title|escape}" />-->
|
||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="{$smarty.const.WWW_TOP}/templates/nntmux/scripts/jquery.colorbox-min.js"></script>
|
||||
<script type="text/javascript" src="{$smarty.const.WWW_TOP}/templates/nntmux/scripts/jquery.autosize-min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user