Files
easystream-main/f_scripts/fe/js/browse.init.js
SamiAhmed7777 0b7e2d0a5b feat: Add comprehensive documentation suite and reorganize project structure
- Created complete documentation in docs/ directory
- Added PROJECT_OVERVIEW.md with feature highlights and getting started guide
- Added ARCHITECTURE.md with system design and technical details
- Added SECURITY.md with comprehensive security implementation guide
- Added DEVELOPMENT.md with development workflows and best practices
- Added DEPLOYMENT.md with production deployment instructions
- Added API.md with complete REST API documentation
- Added CONTRIBUTING.md with contribution guidelines
- Added CHANGELOG.md with version history and migration notes
- Reorganized all documentation files into docs/ directory for better organization
- Updated README.md with proper documentation links and quick navigation
- Enhanced project structure with professional documentation standards
2025-10-21 00:39:45 -07:00

183 lines
7.2 KiB
JavaScript

var SizeSetFunctions = function () {};
var ViewModeSizeSetFunctions = function () {};
jQuery(window).resize(function () {
});
jQuery(window).load(function() {
thumbFade();
jQuery(document).on({
click: function () {
var ct = "";
var id = jQuery("#main-content .content-current .main-view-mode.active").attr("id");
var type = jQuery("#main-content .content-current .main-view-mode.active").val();
var nr = id.split("-");
var idnr = nr[3];
var page = parseInt(jQuery(this).attr("rel-page"));
var more = jQuery("#main-view-mode-" + idnr + "-" + type + "-more").parent();// just remove parent for infinite scroll
more.detach();
var more_clone = more.clone(true);
var url = _rel + "?p=0&m="+idnr+"&sort="+type;
if (typeof(jQuery("#categories-accordion li a.selected").attr("rel-name")) != "undefined") {
ct = "&c=" + jQuery("#categories-accordion li a.selected").attr("rel-name");
}
url += ct;
if (typeof(ch_id) != "undefined") {
url += "&u=" + ch_id;
}
url += "&page=" + page;
jQuery("#main-view-mode-" + idnr + "-" + type + "-list ul").mask("");
jQuery("#main-view-mode-" + idnr + "-" + type + "-list span.load-more.loadmask-img").show();
jQuery("#main-view-mode-" + idnr + "-" + type + "-list span.load-more-text").hide();
jQuery.get(url, function(result) {
jQuery("#main-view-mode-" + idnr + "-" + type + "-list ul").append(result).unmask();
jQuery("#main-view-mode-" + idnr + "-" + type + "-list span.load-more.loadmask-img").hide();
more_clone.appendTo("#main-view-mode-" + idnr + "-" + type + "-list").find(".more-button").attr("rel-page", page + 1);
thumbFade();
});
}
}, ".more-button");
jQuery(document).on({
click: function () {
var file_key = jQuery(this).attr("rel-key");
var file_type = jQuery(this).attr("rel-type");
var url = _rel + "?a=cb-watchadd&for=sort-" + file_type;
var _this = jQuery(this);
if (_this.find((jslang["lss"] == "1" ? "icon-check" : "icon-warning")).hasClass("icon-check")) {
return;
}
_this.parent().next().mask("");
_this.next().text(jslang["loading"]);
jQuery.post(url, {"fileid[0]": file_key}, function(result) {
_this.find(".icon-clock").removeClass("icon-clock").addClass((jslang["lss"] == "1" ? "icon-check" : "icon-warning"));
_this.next().text((jslang["lss"] == "1" ? jslang["inwatchlist"] : jslang["nowatchlist"]));
_this.parent().next().unmask();
});
}
}, ".watch_later_wrap");
jQuery(document).on({
click: function () {
if (jQuery(this).hasClass("active")) {
return;
}
var current = jQuery(".main-view-mode.active").attr("id");
var cnr = current.split("-");
var id = jQuery(this).attr("id");
var type = jQuery(this).val();
var nr = id.split("-");
var idnr = nr[3];
jQuery("#section-" + type + " .main-view-mode").removeClass("active");
jQuery("#" + id).addClass("active");
if (jQuery("#main-view-mode-" + idnr + "-" + type + "-list ul").length > 0) {
jQuery("#section-" + type + " .mview").hide();
jQuery("#main-view-mode-" + idnr + "-" + type + "-list").show();
ViewModeSizeSetFunctions();
$.get(_rel + "?p=0&vm=" + id, function(data){});
} else {
var ct = "";
var url = _rel + "?p=0&m="+idnr+"&sort="+type;
if (typeof(jQuery("#categories-accordion li a.selected").attr("rel-name")) != "undefined") {
ct = "&c=" + jQuery("#categories-accordion li a.selected").attr("rel-name");
}
url += ct;
if (typeof(ch_id) != "undefined") {
url += "&u=" + ch_id;
}
jQuery("#main-view-mode-" + cnr[3] + "-" + type + "-list").mask("");
jQuery("#main-view-mode-" + idnr + "-" + type + " span").addClass("spinner icon-spinner");
jQuery("#main-view-mode-" + idnr + "-" + type + "-list").load(url, function(){
jQuery("#section-" + type + " .mview").hide();
jQuery("#main-view-mode-" + idnr + "-" + type + "-list").show();
jQuery("#main-view-mode-" + cnr[3] + "-" + type + "-list").unmask();
jQuery("#main-view-mode-" + idnr + "-" + type + " span").removeClass("spinner icon-spinner");
if (idnr == 2)
$(".comment_h p,p.p-info,.full-details-holder p").linkify({defaultProtocol:"https",validate:{email:function(value){return false}},ignoreTags:["script","style"]});
thumbFade();
});
}
}
}, ".main-view-mode");
jQuery(document).on({
click: function () {
if (jQuery(this).hasClass("active")) {
return;
}
var current = jQuery(".promo-view-mode.active").attr("id").slice(-1);
var id = jQuery(this).attr("id").slice(-1);
jQuery(".promo-view-mode").removeClass("active");
jQuery("#promo-view-mode-" + id).addClass("active");
if (jQuery("#promo-view-mode-" + id + "-list ul").length > 0) {
jQuery('.pview').hide();
jQuery("#promo-view-mode-" + id + "-list").show();
ViewModeSizeSetFunctions();
$.get(_rel + "?p=1&vm=" + id, function(data){});
} else {
var ct = "";
var url = _rel + "?p=1&m="+id;
if (typeof(jQuery("#categories-accordion li a.selected").attr("rel-name")) != "undefined") {
ct = "&c=" + jQuery("#categories-accordion li a.selected").attr("rel-name");
}
url += ct;
if (typeof(ch_id) != "undefined") {
url += "&u=" + ch_id;
}
jQuery("#promo-view-mode-" + current + "-list").mask("");
jQuery("#promo-view-mode-" + id + " span").addClass("spinner icon-spinner");
jQuery("#promo-view-mode-" + id + "-list").load(url, function(){
jQuery('.pview').hide();
jQuery("#promo-view-mode-" + id + "-list").show();
jQuery("#promo-view-mode-" + current + "-list").unmask();
jQuery("#promo-view-mode-" + id + " span").removeClass("spinner icon-spinner");
thumbFade();
ViewModeSizeSetFunctions();
});
}
}
}, ".promo-view-mode");
});