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
This commit is contained in:
38
f_scripts/fe/js/breakpoint-binds.js
Normal file
38
f_scripts/fe/js/breakpoint-binds.js
Normal file
@@ -0,0 +1,38 @@
|
||||
jQuery(function () {
|
||||
jQuery(window).bind('exitMedia320', function () {
|
||||
|
||||
});
|
||||
jQuery(window).bind('enterMedia320', function () {
|
||||
|
||||
});
|
||||
|
||||
jQuery(window).bind('exitMedia480', function () {
|
||||
|
||||
});
|
||||
jQuery(window).bind('enterMedia480', function () {
|
||||
|
||||
});
|
||||
jQuery(window).bind('exitMedia768', function () {
|
||||
|
||||
});
|
||||
jQuery(window).bind('enterMedia768', function () {
|
||||
|
||||
});
|
||||
|
||||
jQuery(window).bind('exitMedia980', function () {
|
||||
|
||||
});
|
||||
jQuery(window).bind('enterMedia980', function () {
|
||||
|
||||
});
|
||||
|
||||
jQuery(window).bind('exitMedia1200', function () {
|
||||
|
||||
});
|
||||
jQuery(window).bind('enterMedia1200', function () {
|
||||
|
||||
});
|
||||
|
||||
jQuery(window).setBreakpoints();
|
||||
|
||||
});
|
||||
90
f_scripts/fe/js/breakpoints.js
Normal file
90
f_scripts/fe/js/breakpoints.js
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
Breakpoints.js
|
||||
version 1.0
|
||||
|
||||
Creates handy events for your responsive design breakpoints
|
||||
|
||||
Copyright 2011 XOXCO, Inc
|
||||
http://xoxco.com/
|
||||
|
||||
Documentation for this plugin lives here:
|
||||
http://xoxco.com/projects/code/breakpoints
|
||||
|
||||
Licensed under the MIT license:
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
var lastSize = 0;
|
||||
var interval = null;
|
||||
|
||||
$.fn.resetBreakpoints = function() {
|
||||
$(window).unbind('resize');
|
||||
if (interval) {
|
||||
clearInterval(interval);
|
||||
}
|
||||
lastSize = 0;
|
||||
};
|
||||
|
||||
$.fn.setBreakpoints = function(settings) {
|
||||
var options = jQuery.extend({
|
||||
distinct: true,
|
||||
breakpoints: new Array(320,480,768,980,1200)
|
||||
},settings);
|
||||
|
||||
|
||||
interval = setInterval(function() {
|
||||
|
||||
var w = $(window).width();
|
||||
var done = false;
|
||||
|
||||
for (var bp in options.breakpoints.sort(function(a,b) { return (b-a) })) {
|
||||
|
||||
// fire onEnter when a browser expands into a new breakpoint
|
||||
// if in distinct mode, remove all other breakpoints first.
|
||||
if (!done && w >= options.breakpoints[bp] && lastSize < options.breakpoints[bp]) {
|
||||
if (options.distinct) {
|
||||
for (var x in options.breakpoints.sort(function(a,b) { return (b-a) })) {
|
||||
if ($('body').hasClass('media-width-' + options.breakpoints[x])) {
|
||||
$('body').removeClass('media-width-' + options.breakpoints[x]);
|
||||
$(window).trigger('exitMedia' + options.breakpoints[x]);
|
||||
}
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
$('body').addClass('media-width-' + options.breakpoints[bp]);
|
||||
$(window).trigger('enterMedia' + options.breakpoints[bp]);
|
||||
|
||||
}
|
||||
|
||||
// fire onExit when browser contracts out of a larger breakpoint
|
||||
if (w < options.breakpoints[bp] && lastSize >= options.breakpoints[bp]) {
|
||||
$('body').removeClass('media-width-' + options.breakpoints[bp]);
|
||||
$(window).trigger('exitMedia' + options.breakpoints[bp]);
|
||||
|
||||
}
|
||||
|
||||
// if in distinct mode, fire onEnter when browser contracts into a smaller breakpoint
|
||||
if (
|
||||
options.distinct && // only one breakpoint at a time
|
||||
w >= options.breakpoints[bp] && // and we are in this one
|
||||
w < options.breakpoints[bp-1] && // and smaller than the bigger one
|
||||
lastSize > w && // and we contracted
|
||||
lastSize >0 && // and this is not the first time
|
||||
!$('body').hasClass('media-width-' + options.breakpoints[bp]) // and we aren't already in this breakpoint
|
||||
) {
|
||||
$('body').addClass('media-width-' + options.breakpoints[bp]);
|
||||
$(window).trigger('enterMedia' + options.breakpoints[bp]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// set up for next call
|
||||
if (lastSize != w) {
|
||||
lastSize = w;
|
||||
}
|
||||
},250);
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
183
f_scripts/fe/js/browse.init.js
Normal file
183
f_scripts/fe/js/browse.init.js
Normal file
@@ -0,0 +1,183 @@
|
||||
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");
|
||||
|
||||
});
|
||||
1
f_scripts/fe/js/channel.init.js
Normal file
1
f_scripts/fe/js/channel.init.js
Normal file
@@ -0,0 +1 @@
|
||||
(function(){[].slice.call(document.querySelectorAll(".tabs")).forEach(function(el){new CBPFWTabs(el)})})();function isOldSafari(){return!!navigator.userAgent.match(" Safari/")&&!navigator.userAgent.match(" Chrome")&&(!!navigator.userAgent.match(" Version/6.0")||!!navigator.userAgent.match(" Version/5."))}function oldSafariCSSfix(){return}(function(){jQuery(document).on({click:function(){}},"#channel-tabs ul:not(#main-content ul):not(.fileThumbs) li")})();jQuery(window).load(function(){oldSafariCSSfix()});jQuery(window).resize(function(){oldSafariCSSfix()});function html2amp(str){return str.replace(/&/g,"&")}
|
||||
145
f_scripts/fe/js/channels.init.js
Normal file
145
f_scripts/fe/js/channels.init.js
Normal file
@@ -0,0 +1,145 @@
|
||||
var SizeSetFunctions = function () {};
|
||||
var ViewModeSizeSetFunctions = function () {};
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
});
|
||||
|
||||
|
||||
jQuery(window).load(function() {
|
||||
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 () {
|
||||
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();
|
||||
} 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");
|
||||
|
||||
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();
|
||||
} 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;
|
||||
|
||||
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();
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".promo-view-mode");
|
||||
|
||||
});
|
||||
80
f_scripts/fe/js/classie.js
Normal file
80
f_scripts/fe/js/classie.js
Normal file
@@ -0,0 +1,80 @@
|
||||
/*!
|
||||
* classie - class helper functions
|
||||
* from bonzo https://github.com/ded/bonzo
|
||||
*
|
||||
* classie.has( elem, 'my-class' ) -> true/false
|
||||
* classie.add( elem, 'my-new-class' )
|
||||
* classie.remove( elem, 'my-unwanted-class' )
|
||||
* classie.toggle( elem, 'my-class' )
|
||||
*/
|
||||
|
||||
/*jshint browser: true, strict: true, undef: true */
|
||||
/*global define: false */
|
||||
|
||||
( function( window ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
// class helper functions from bonzo https://github.com/ded/bonzo
|
||||
|
||||
function classReg( className ) {
|
||||
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
|
||||
}
|
||||
|
||||
// classList support for class management
|
||||
// altho to be fair, the api sucks because it won't accept multiple classes at once
|
||||
var hasClass, addClass, removeClass;
|
||||
|
||||
if ( 'classList' in document.documentElement ) {
|
||||
hasClass = function( elem, c ) {
|
||||
return elem.classList.contains( c );
|
||||
};
|
||||
addClass = function( elem, c ) {
|
||||
elem.classList.add( c );
|
||||
};
|
||||
removeClass = function( elem, c ) {
|
||||
elem.classList.remove( c );
|
||||
};
|
||||
}
|
||||
else {
|
||||
hasClass = function( elem, c ) {
|
||||
return classReg( c ).test( elem.className );
|
||||
};
|
||||
addClass = function( elem, c ) {
|
||||
if ( !hasClass( elem, c ) ) {
|
||||
elem.className = elem.className + ' ' + c;
|
||||
}
|
||||
};
|
||||
removeClass = function( elem, c ) {
|
||||
elem.className = elem.className.replace( classReg( c ), ' ' );
|
||||
};
|
||||
}
|
||||
|
||||
function toggleClass( elem, c ) {
|
||||
var fn = hasClass( elem, c ) ? removeClass : addClass;
|
||||
fn( elem, c );
|
||||
}
|
||||
|
||||
var classie = {
|
||||
// full names
|
||||
hasClass: hasClass,
|
||||
addClass: addClass,
|
||||
removeClass: removeClass,
|
||||
toggleClass: toggleClass,
|
||||
// short names
|
||||
has: hasClass,
|
||||
add: addClass,
|
||||
remove: removeClass,
|
||||
toggle: toggleClass
|
||||
};
|
||||
|
||||
// transport
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( classie );
|
||||
} else {
|
||||
// browser global
|
||||
window.classie = classie;
|
||||
}
|
||||
|
||||
})( window );
|
||||
44
f_scripts/fe/js/cssrelpreload.js
Normal file
44
f_scripts/fe/js/cssrelpreload.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/*! CSS rel=preload polyfill. Depends on loadCSS function. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */
|
||||
(function( w ){
|
||||
// rel=preload support test
|
||||
if( !w.loadCSS ){
|
||||
return;
|
||||
}
|
||||
var rp = loadCSS.relpreload = {};
|
||||
rp.support = function(){
|
||||
try {
|
||||
return w.document.createElement( "link" ).relList.supports( "preload" );
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// loop preload links and fetch using loadCSS
|
||||
rp.poly = function(){
|
||||
var links = w.document.getElementsByTagName( "link" );
|
||||
for( var i = 0; i < links.length; i++ ){
|
||||
var link = links[ i ];
|
||||
if( link.rel === "preload" && link.getAttribute( "as" ) === "style" ){
|
||||
w.loadCSS( link.href, link );
|
||||
link.rel = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// if link[rel=preload] is not supported, we must fetch the CSS manually using loadCSS
|
||||
if( !rp.support() ){
|
||||
rp.poly();
|
||||
var run = w.setInterval( rp.poly, 300 );
|
||||
if( w.addEventListener ){
|
||||
w.addEventListener( "load", function(){
|
||||
rp.poly();
|
||||
w.clearInterval( run );
|
||||
} );
|
||||
}
|
||||
if( w.attachEvent ){
|
||||
w.attachEvent( "onload", function(){
|
||||
w.clearInterval( run );
|
||||
} )
|
||||
}
|
||||
}
|
||||
}( this ));
|
||||
341
f_scripts/fe/js/files.init.js
Normal file
341
f_scripts/fe/js/files.init.js
Normal file
@@ -0,0 +1,341 @@
|
||||
var SizeSetFunctions = function () {};
|
||||
var ViewModeSizeSetFunctions = function () {};
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$( '#entry-action-buttons' ).dlmenu({
|
||||
animationClasses : { classin : 'dl-animate-in-5', classout : 'dl-animate-out-5' }
|
||||
});
|
||||
});
|
||||
|
||||
jQuery(window).load(function() {
|
||||
// jQuery(".mediaThumb").removeAttr("height");
|
||||
thumbFade();
|
||||
SizeSetFunctions();
|
||||
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
var ct = "";
|
||||
var view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
var id = jQuery(".content-current:last .main-view-mode-"+view_mode_type+".active").attr("id");
|
||||
|
||||
var type = jQuery(".content-current:last .main-view-mode-"+view_mode_type+".active").val();
|
||||
var type_all = type + "-" + view_mode_type;
|
||||
var nr = id.split("-");
|
||||
var idnr = nr[3];
|
||||
var page = parseInt(jQuery(this).attr("rel-page"));
|
||||
|
||||
var more = jQuery("#main-view-mode-" + idnr + "-" + type_all + "-more").parent();// just remove parent for infinite scroll
|
||||
more.detach();
|
||||
var more_clone = more.clone(true);
|
||||
|
||||
var url = _rel + "?s="+jQuery(".menu-panel-entry-active").attr("id")+"&p=0&m="+idnr+"&sort="+type+"&t="+view_mode_type;
|
||||
|
||||
if (jQuery(".menu-panel-entry-active").attr("id") == "file-menu-entry6" || $("#section-playlists").hasClass("active") || $("#ch-pl").hasClass("tab-current") || $("#ch-bl").hasClass("tab-current") || $("#wrapper").hasClass("tpl_search")) {//isplaylist
|
||||
var m = idnr == 1 ? 4 : (idnr == 3 ? 6 : (idnr == 2 ? 5 : 4));
|
||||
url = _rel + "?s="+jQuery(".menu-panel-entry-active").attr("id")+"&p=0&m="+m+"&sort="+type+"&t="+view_mode_type;
|
||||
|
||||
if ($("#section-playlists").hasClass("active") || $("#ch-pl").hasClass("tab-current") || $("#wrapper").hasClass("tpl_search")) {//browse playlists section//search section
|
||||
url += "&pp=1";
|
||||
}
|
||||
if (typeof(ch_id) != "undefined") {
|
||||
url += "&u=" + ch_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;
|
||||
url += "&page=" + page;
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list ul:not(.playlist-entries)").mask(" ");
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list span.load-more.loadmask-img").show();
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list span.load-more-text").hide();
|
||||
|
||||
jQuery.get(url, function(result) {
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list ul:not(.playlist-entries)").append(result).unmask();
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list span.load-more.loadmask-img").hide();
|
||||
|
||||
more_clone.appendTo("#main-view-mode-" + idnr + "-" + type_all + "-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 view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
var url = _rel + "?a=cb-watchadd&for=sort-" + file_type + "&t="+view_mode_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 () {
|
||||
var view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
|
||||
if (view_mode_type == 'blog' || view_mode_type == 'live') {
|
||||
s = view_mode_type == 'live' ? "?do=new-broadcast&t=live" : "?do=new-blog&t=blog";
|
||||
url = current_url + menu_section + s;
|
||||
|
||||
$.fancybox({type: "ajax", margin: 50, minWidth: "50%", href: url, height: "auto", autoHeight: "true", autoResize: "true", autoCenter: "true", afterClose: function(){$(".mce-container, .mce-tinymce-inline, .mce-tooltip").detach()}});
|
||||
} else {
|
||||
url = f_lang["upload"] + '?t=' + (view_mode_type == 'doc' ? 'document' : view_mode_type);
|
||||
|
||||
window.location = url;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}, "#new-upload");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
url = current_url + menu_section + "?do=new-blog&t=blog";
|
||||
|
||||
$(".lb-margins").mask(" ");
|
||||
$.post(url, $("#add-new-blog-form").serialize(), function(data) {
|
||||
$("#add-new-blog-response").html(data);
|
||||
$(".lb-margins").unmask();
|
||||
});
|
||||
}
|
||||
}, "#add-new-blog-btn");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
url = current_url + menu_section + "?do=new-broadcast&t=live";
|
||||
|
||||
$(".lb-margins").mask(" ");
|
||||
$.post(url, $("#add-new-live-form").serialize(), function(data) {
|
||||
$("#add-new-live-response").html(data);
|
||||
$(".lb-margins").unmask();
|
||||
});
|
||||
}
|
||||
}, "#add-new-live-btn");
|
||||
|
||||
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
if (jQuery(this).hasClass("active")) {
|
||||
return;
|
||||
}
|
||||
var view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
|
||||
var current = jQuery(".main-view-mode-"+view_mode_type+".active").attr("id");
|
||||
var cnr = current.split("-");
|
||||
|
||||
var id = jQuery(this).attr("id");
|
||||
var type = jQuery(this).val();
|
||||
var type_all = type + "-" + view_mode_type;
|
||||
var nr = id.split("-");
|
||||
var idnr = nr[3];
|
||||
|
||||
jQuery("#section-" + type_all + " .main-view-mode-"+view_mode_type).removeClass("active");
|
||||
jQuery("#" + id).addClass("active");
|
||||
|
||||
if (jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list ul").length > 0) {
|
||||
jQuery("#section-" + type_all + " .mview").hide();
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list").show();
|
||||
|
||||
l1 = jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list ul:first li").length;
|
||||
l2 = jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list ul:first .thumbs-wrappers input:checked").length;
|
||||
|
||||
if (l1 == l2) {
|
||||
$("#select-mode").addClass("active");
|
||||
} else {
|
||||
$("#select-mode").removeClass("active");
|
||||
}
|
||||
|
||||
if ($("#main-view-mode-" + idnr + "-" + type_all + "-list ul .thumbs-wrappers").css("display") == 'block') {
|
||||
$("#edit-mode").addClass("active");
|
||||
} else {
|
||||
$("#edit-mode").removeClass("active");
|
||||
}
|
||||
$.get(_rel + "?p=0&vm=" + idnr, function(data){});
|
||||
} else {
|
||||
var ct = "";
|
||||
var url = _rel + "?s="+jQuery(".menu-panel-entry-active").attr("id")+"&p=0&m="+idnr+"&sort="+type+"&t="+view_mode_type;
|
||||
|
||||
if (jQuery(".menu-panel-entry-active").attr("id") == "file-menu-entry6" || $("#section-playlists").hasClass("active") || $("#ch-pl").hasClass("tab-current") || $("#ch-bl").hasClass("tab-current") || $("#wrapper").hasClass("tpl_search")) {//isplaylist
|
||||
var m = idnr == 1 ? 4 : (idnr == 3 ? 6 : (idnr == 2 ? 5 : 4));
|
||||
url = _rel + "?s="+jQuery(".menu-panel-entry-active").attr("id")+"&p=0&m="+m+"&sort="+type+"&t="+view_mode_type;
|
||||
|
||||
if ($("#section-playlists").hasClass("active") || $("#ch-pl").hasClass("tab-current") || $("#wrapper").hasClass("tpl_search")) {//browse playlists section
|
||||
url += "&pp=1";
|
||||
}
|
||||
|
||||
if (typeof(ch_id) != "undefined") {
|
||||
url += "&u=" + ch_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($("#sq").val()) != "undefined" && $("#sq").val().length > 3) {
|
||||
url += "&sq=" + $("#sq").val();
|
||||
}
|
||||
|
||||
jQuery("#main-view-mode-" + cnr[3] + "-" + type_all + "-list").mask("");
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + " span").addClass("spinner icon-spinner");
|
||||
|
||||
// $("#edit-mode, #select-mode").removeClass("active");
|
||||
$("#select-mode").removeClass("active");
|
||||
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list").load(url, function(){
|
||||
jQuery("#section-" + type_all + " .mview").hide();
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list").show();
|
||||
jQuery("#main-view-mode-" + cnr[3] + "-" + type_all + "-list").unmask();
|
||||
|
||||
thumbFade();
|
||||
jQuery("#main-view-mode-" + idnr + "-" + type_all + " span").removeClass("spinner icon-spinner");
|
||||
$(".comment_h p,p.p-info,pre.hp-pre,.full-details-holder p,.msg-body pre").linkify({defaultProtocol:"https",validate:{email:function(value){return false}},ignoreTags:["script","style"]});
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".main-view-mode-video, .main-view-mode-image, .main-view-mode-audio, .main-view-mode-doc, .main-view-mode-blog, .main-view-mode-live");
|
||||
|
||||
|
||||
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
if (jQuery(this).hasClass("active")) {
|
||||
return;
|
||||
}
|
||||
var this_id = $(this).attr("id");
|
||||
|
||||
var view_mode_type_current = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
jQuery(".view-mode-type").removeClass("active");
|
||||
jQuery("#" + this_id).addClass("active");
|
||||
|
||||
var view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
|
||||
// comments and responses
|
||||
if ($("#file-menu-entry7").hasClass("menu-panel-entry-active") || $("#file-menu-entry8").hasClass("menu-panel-entry-active")) {
|
||||
ico = (view_mode_type == 'doc' ? 'icon-file' : (view_mode_type == 'blog' ? 'icon-pencil2' : 'icon-'+view_mode_type));
|
||||
url = _rel + "?s="+jQuery(".menu-panel-entry-active").attr("id")+"&do=cr-approved&t="+view_mode_type;
|
||||
|
||||
jQuery(".list-cr-tabs").mask("");
|
||||
jQuery("#view-mode-" + view_mode_type + " span").removeClass(ico).addClass("spinner icon-spinner");
|
||||
|
||||
jQuery("#siteContent").load(url, function(){
|
||||
jQuery(".list-cr-tabs").unmask();
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var current = jQuery(".main-view-mode-"+view_mode_type+".active").attr("id");
|
||||
var current_sort = jQuery(".main-view-mode-"+view_mode_type+".active").val();
|
||||
var cnr = current.split("-");
|
||||
var type_all = current_sort + "-" + view_mode_type;
|
||||
|
||||
var ct = "";
|
||||
var url = _rel + "?s="+jQuery(".menu-panel-entry-active").attr("id")+"&p=0&l=1&m="+cnr[3]+"&sort="+current_sort+"&t="+view_mode_type;
|
||||
|
||||
if (jQuery(".menu-panel-entry-active").attr("id") == "file-menu-entry6" || $("#section-playlists").hasClass("active") || $("#ch-pl").hasClass("tab-current") || $("#ch-bl").hasClass("tab-current") || $("#wrapper").hasClass("tpl_search")) {//isplaylist
|
||||
url = _rel + "?s="+jQuery(".menu-panel-entry-active").attr("id")+"&p=0&m=4&sort="+current_sort+"&t="+view_mode_type;
|
||||
|
||||
if ($("#section-playlists").hasClass("active") || $("#ch-pl").hasClass("tab-current") || $("#ch-bl").hasClass("tab-current") || $("#wrapper").hasClass("tpl_search")) {//browse playlists section
|
||||
url += "&pp=1";
|
||||
}
|
||||
if (typeof(ch_id) != "undefined") {
|
||||
url += "&u=" + ch_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($("#sq").val()) != "undefined" && $("#sq").val().length > 3) {
|
||||
url += "&sq=" + $("#sq").val();
|
||||
}
|
||||
|
||||
$(".pl-menu").addClass("hidden");
|
||||
$("#playlist-"+view_mode_type+"-add, #playlist-"+view_mode_type+"-remove").removeClass("hidden");
|
||||
|
||||
|
||||
if (typeof(jQuery("#" + view_mode_type + "-content").html()) != "undefined" && $("#main-view-mode-" + cnr[3] + "-" + type_all + "-list ul:not(.no-content)").length > 0) {
|
||||
var current_tab = $("#tab-"+view_mode_type).val();
|
||||
|
||||
jQuery(".section-h3").hide();
|
||||
jQuery(".section-h3#"+view_mode_type+"-h3").show();
|
||||
jQuery("#"+view_mode_type_current+"-content").hide();
|
||||
jQuery("#"+view_mode_type+"-content").show();
|
||||
jQuery("#section-" + current_tab).addClass("content-current");
|
||||
|
||||
l1 = jQuery("#main-view-mode-" + cnr[3] + "-" + type_all + "-list ul").length;
|
||||
l2 = jQuery("#main-view-mode-" + cnr[3] + "-" + type_all + "-list ul .thumbs-wrappers input:checked").length;
|
||||
|
||||
if (l1 == l2) {
|
||||
$("#select-mode").addClass("active");
|
||||
} else {
|
||||
$("#select-mode").removeClass("active");
|
||||
}
|
||||
|
||||
if ($("#main-view-mode-" + cnr[3] + "-" + type_all + "-list ul .thumbs-wrappers").css("display") == 'block') {
|
||||
$("#edit-mode").addClass("active");
|
||||
} else {
|
||||
$("#edit-mode").removeClass("active");
|
||||
}
|
||||
jQuery("a[href^='#section-"+current_tab+"']").parent().addClass("tab-current").click();
|
||||
} else {
|
||||
ico = (view_mode_type == 'doc' ? 'icon-file' : (view_mode_type == 'blog' ? 'icon-pencil2' : 'icon-'+view_mode_type));
|
||||
|
||||
jQuery("#" + view_mode_type_current + "-content").mask("");
|
||||
jQuery("#view-mode-" + view_mode_type + " span").removeClass(ico).addClass("spinner icon-spinner");
|
||||
$("#edit-mode, #select-mode").removeClass("active");
|
||||
|
||||
jQuery("#main-view-mode-" + cnr[3] + "-" + type_all + "-list").load(url, function(){
|
||||
jQuery("#" + view_mode_type_current + "-content").unmask();
|
||||
jQuery("#"+view_mode_type_current+"-content").hide();
|
||||
jQuery("#"+view_mode_type+"-content").show();
|
||||
jQuery("#"+view_mode_type+"-content > nav > ul > li:first").click();
|
||||
jQuery(".section-h3").hide();
|
||||
jQuery(".section-h3#"+view_mode_type+"-h3").show();
|
||||
|
||||
var current_tab = $("#tab-"+view_mode_type).val();
|
||||
jQuery("#section-" + current_tab).addClass("content-current");
|
||||
if (typeof(jQuery("#main-view-mode-" + cnr[3] + "-" + type_all + "-list ul")) != "undefined") {
|
||||
jQuery("a[href^='#section-"+current_tab+"']").parent().addClass("tab-current").click();
|
||||
}
|
||||
|
||||
thumbFade();
|
||||
|
||||
jQuery("#view-mode-" + view_mode_type + " span").removeClass("spinner icon-spinner").addClass(ico);
|
||||
|
||||
if (typeof f_lang !== "undefined")
|
||||
jQuery("#new-upload").prop("title", f_lang["add_new"].replace("##TYPE##", f_lang[view_mode_type[0]]));
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".view-mode-type");
|
||||
});
|
||||
66
f_scripts/fe/js/fwtabs.channels.init.js
Normal file
66
f_scripts/fe/js/fwtabs.channels.init.js
Normal file
@@ -0,0 +1,66 @@
|
||||
(function () {
|
||||
[].slice.call(document.querySelectorAll('.tabs')).forEach(function (el) {
|
||||
new CBPFWTabs(el);
|
||||
});
|
||||
})();
|
||||
|
||||
function isOldSafari() {
|
||||
return !!navigator.userAgent.match(' Safari/') && !navigator.userAgent.match(' Chrome') && (!!navigator.userAgent.match(' Version/6.0') || !!navigator.userAgent.match(' Version/5.'));
|
||||
}
|
||||
|
||||
function oldSafariCSSfix() {
|
||||
if (isOldSafari()) {
|
||||
var tabnr = 7;
|
||||
var width = jQuery('#siteContent').width() - 32;
|
||||
|
||||
jQuery("#main-content nav ul li").width((width / tabnr) - 1).css("float", "left");
|
||||
jQuery(".tabs nav").css("width", (width + 1));
|
||||
}
|
||||
}
|
||||
|
||||
(function () {
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
var section = jQuery(this).find("a").attr("href").split("-");
|
||||
var sort = section[1];
|
||||
|
||||
var sid = jQuery("#section-" + sort + " .main-view-mode.active").attr("id");
|
||||
var id = sid.split("-");
|
||||
var idnr = id[3];
|
||||
|
||||
if (jQuery("#" + sid + "-list ul").length == 0) {
|
||||
var ct = "";
|
||||
var url = _rel + "?p=0&m="+idnr+"&sort="+sort;
|
||||
|
||||
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("#" + sid + "-list").mask("");
|
||||
jQuery("#main-view-mode-" + idnr + "-" + sort + " span").addClass("spinner icon-spinner");
|
||||
|
||||
jQuery("#" + sid + "-list").load(url, function(){
|
||||
jQuery("#" + sid + "-list").unmask();
|
||||
|
||||
thumbFade();
|
||||
jQuery("#main-view-mode-" + idnr + "-" + sort + " span").removeClass("spinner icon-spinner");
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".tabs ul:not(.fileThumbs):not(.ch-grid):not(.uu) li");
|
||||
})();
|
||||
|
||||
|
||||
jQuery(window).load(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
153
f_scripts/fe/js/fwtabs.files.init.js
Normal file
153
f_scripts/fe/js/fwtabs.files.init.js
Normal file
@@ -0,0 +1,153 @@
|
||||
(function () {
|
||||
[].slice.call(document.querySelectorAll('.tabs')).forEach(function (el) {
|
||||
new CBPFWTabs(el);
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
function oldSafariCSSfix() {
|
||||
if (isOldSafari()) {
|
||||
var tabnr = jQuery(".tab-current").parent().parent().find("ul li").length;
|
||||
var width = jQuery('#siteContent').width();
|
||||
|
||||
jQuery(".tab-current").parent().parent().find("ul li").width((width / tabnr) - 1).css("float", "left");
|
||||
jQuery(".tabs nav").css("width", (width + 1));
|
||||
}
|
||||
}
|
||||
|
||||
(function () {
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
var t = $(this);
|
||||
var section = jQuery(this).find("a").attr("href").split("-");
|
||||
var sort = section[1];
|
||||
var main = $("#file-menu-entry7").hasClass("menu-panel-entry-active") ? "comments" : "responses";
|
||||
var sid = $("#file-menu-entry7").hasClass("menu-panel-entry-active") ? "file-menu-entry7" : "file-menu-entry8";
|
||||
|
||||
if (typeof(sort) == "undefined" || sort.substr(0, 4) == "resp") {
|
||||
return;
|
||||
}
|
||||
|
||||
var view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
|
||||
var url = _rel + "?s="+sid+"&do=cr-"+(sort == 'pending' ? 'suspended' : sort)+"&t="+view_mode_type;
|
||||
|
||||
if (typeof($("#section-"+sort+"-"+view_mode_type+"-"+main).html()) == "undefined") {
|
||||
return;
|
||||
}
|
||||
if ($("#section-"+sort+"-"+view_mode_type+"-"+main).html().length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
jQuery(".list-cr-tabs").mask("");
|
||||
jQuery("#siteContent").load(url, function(){
|
||||
jQuery(".list-cr-tabs").unmask();
|
||||
|
||||
if (sort != 'approved') {
|
||||
$(".cr-tabs .tab-current:first").removeClass("tab-current");
|
||||
$("#main-content").find("section.content-current:first").removeClass("content-current");
|
||||
}
|
||||
t.find("a").parent().addClass("tab-current");
|
||||
});
|
||||
|
||||
}
|
||||
}, ".tabs.list-cr-tabs ul:not(#pag-list) li:not(.cr-tabs)");
|
||||
})();//file comments and responses tabs
|
||||
|
||||
|
||||
(function () {
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
var view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
var section = jQuery(this).find("a").attr("href").split("-");
|
||||
var sort = section[1];
|
||||
|
||||
if (typeof(sort) == "undefined") {
|
||||
return;
|
||||
}
|
||||
|
||||
var sid = jQuery("#section-" + sort + "-"+view_mode_type+" .main-view-mode-"+view_mode_type+".active").attr("id");
|
||||
|
||||
if (typeof(sid) == "undefined") {
|
||||
return;
|
||||
}
|
||||
|
||||
var id = sid.split("-");
|
||||
var idnr = id[3];
|
||||
|
||||
|
||||
|
||||
var current_sort = jQuery("#section-" + sort + "-"+view_mode_type+" .main-view-mode-"+view_mode_type+".active").val();
|
||||
var type_all = current_sort + "-" + view_mode_type;
|
||||
|
||||
jQuery("#tab-"+view_mode_type).val(sort+"-"+view_mode_type);
|
||||
|
||||
if ($("#" + sid + "-list ul:not(.no-content)").length > 0) {
|
||||
l1 = jQuery("#" + sid + "-list ul").length;
|
||||
l2 = jQuery("#" + sid + "-list ul .thumbs-wrappers input:checked").length;
|
||||
|
||||
if (l1 == l2) {
|
||||
$("#select-mode").addClass("active");
|
||||
} else {
|
||||
$("#select-mode").removeClass("active");
|
||||
}
|
||||
|
||||
if ($("#" + sid + "-list ul .thumbs-wrappers").css("display") == 'block') {
|
||||
$("#edit-mode").addClass("active");
|
||||
} else {
|
||||
$("#edit-mode").removeClass("active");
|
||||
}
|
||||
}
|
||||
|
||||
if (jQuery("#" + sid + "-list ul:not(.no-content)").length == 0) {
|
||||
var ct = "";
|
||||
var url = _rel + "?s="+jQuery(".menu-panel-entry-active").attr("id")+"&p=0&m="+idnr+"&sort="+sort+"&t="+view_mode_type;
|
||||
|
||||
if (jQuery(".menu-panel-entry-active").attr("id") == "file-menu-entry6" || $("#section-playlists").hasClass("active") || $("#ch-pl").hasClass("tab-current") || $("#ch-bl").hasClass("tab-current") || $("#wrapper").hasClass("tpl_search")) {//isplaylist
|
||||
var m = idnr == 1 ? 4 : (idnr == 3 ? 6 : (idnr == 2 ? 5 : 4));
|
||||
url = _rel + "?s="+jQuery(".menu-panel-entry-active").attr("id")+"&p=0&m="+m+"&sort="+sort+"&t="+view_mode_type;
|
||||
|
||||
if ($("#section-playlists").hasClass("active") || $("#ch-pl").hasClass("tab-current") || $("#wrapper").hasClass("tpl_search")) {//browse playlists section
|
||||
url += "&pp=1";
|
||||
}
|
||||
|
||||
if (typeof(ch_id) != "undefined") {
|
||||
url += "&u=" + ch_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($("#sq").val()) != "undefined" && $("#sq").val().length > 3) {
|
||||
url += "&sq=" + $("#sq").val();
|
||||
}
|
||||
|
||||
$("#edit-mode, #select-mode").removeClass("active");
|
||||
|
||||
if (typeof(jQuery("#main-view-mode-" + idnr + "-" + type_all + "-list .no-content").html()) == "undefined") {
|
||||
jQuery("#" + sid + "-list").mask("");
|
||||
jQuery("#" + sid + " span").removeClass("icon-thumbs").addClass("spinner icon-spinner");
|
||||
|
||||
jQuery("#" + sid + "-list").load(url, function(){
|
||||
thumbFade();
|
||||
|
||||
jQuery("#" + sid + " span").addClass("icon-thumbs").removeClass("spinner icon-spinner");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}, ".tabs ul:not(#pl-tabs):not(.pl-thumb):not(.fileThumbs):not(#pag-list):not(.cr-tabs):not(.no-content) li:not(li.cr-tabs)");
|
||||
})();
|
||||
|
||||
|
||||
jQuery(window).load(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
63
f_scripts/fe/js/fwtabs.init.js
Normal file
63
f_scripts/fe/js/fwtabs.init.js
Normal file
@@ -0,0 +1,63 @@
|
||||
(function () {
|
||||
[].slice.call(document.querySelectorAll('.tabs')).forEach(function (el) {
|
||||
new CBPFWTabs(el);
|
||||
});
|
||||
})();
|
||||
|
||||
(function () {
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
var section = jQuery(this).find("a").attr("href").split("-");
|
||||
var sort = section[1];
|
||||
|
||||
var sid = jQuery("#section-" + sort + " .main-view-mode.active").attr("id");
|
||||
var id = sid.split("-");
|
||||
var idnr = id[3];
|
||||
|
||||
if (jQuery("#" + sid + "-list ul").length == 0) {
|
||||
var ct = "";
|
||||
var url = _rel + "?p=0&m="+idnr+"&sort="+sort;
|
||||
|
||||
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("#" + sid + "-list").mask("");
|
||||
jQuery("#main-view-mode-" + idnr + "-" + sort + " span").removeClass("icon-thumbs").addClass("spinner icon-spinner");
|
||||
|
||||
jQuery("#" + sid + "-list").load(url, function(){
|
||||
jQuery("#" + sid + "-list").unmask();
|
||||
|
||||
thumbFade();
|
||||
jQuery("#main-view-mode-" + idnr + "-" + sort + " span").addClass("icon-thumbs").removeClass("spinner icon-spinner");
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}, ".tabs ul:not(.fileThumbs):not(.no-content) li");
|
||||
})();
|
||||
|
||||
|
||||
function oldSafariCSSfix() {
|
||||
if (isOldSafari()) {
|
||||
var tabnr = $("#main-content.tabs nav ul li").length;
|
||||
var width = jQuery('#siteContent').width() - 32;
|
||||
|
||||
jQuery("#main-content nav ul li").width((width / tabnr) - 1).css("float", "left");
|
||||
jQuery(".tabs nav").css("width", (width + 1));
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(window).load(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
71
f_scripts/fe/js/fwtabs.js
Normal file
71
f_scripts/fe/js/fwtabs.js
Normal file
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* cbpFWTabs.js v1.0.0
|
||||
* http://www.codrops.com
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Copyright 2014, Codrops
|
||||
* http://www.codrops.com
|
||||
*/
|
||||
;( function( window ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
function extend( a, b ) {
|
||||
for( var key in b ) {
|
||||
if( b.hasOwnProperty( key ) ) {
|
||||
a[key] = b[key];
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
function CBPFWTabs( el, options ) {
|
||||
this.el = el;
|
||||
this.options = extend( {}, this.options );
|
||||
extend( this.options, options );
|
||||
this._init();
|
||||
}
|
||||
|
||||
CBPFWTabs.prototype.options = {
|
||||
start : 0
|
||||
};
|
||||
|
||||
CBPFWTabs.prototype._init = function() {
|
||||
// tabs elems
|
||||
this.tabs = [].slice.call( this.el.querySelectorAll( 'nav > ul > li' ) );
|
||||
// content items
|
||||
this.items = [].slice.call( this.el.querySelectorAll( '.content-wrap > section' ) );
|
||||
// current index
|
||||
this.current = -1;
|
||||
// show current content item
|
||||
this._show();
|
||||
// init events
|
||||
this._initEvents();
|
||||
};
|
||||
|
||||
CBPFWTabs.prototype._initEvents = function() {
|
||||
var self = this;
|
||||
this.tabs.forEach( function( tab, idx ) {
|
||||
tab.addEventListener( 'click', function( ev ) {
|
||||
ev.preventDefault();
|
||||
self._show( idx );
|
||||
} );
|
||||
} );
|
||||
};
|
||||
|
||||
CBPFWTabs.prototype._show = function( idx ) {
|
||||
if( this.current >= 0 ) {
|
||||
this.tabs[ this.current ].className = this.items[ this.current ].className = '';
|
||||
}
|
||||
// change current
|
||||
this.current = idx != undefined ? idx : this.options.start >= 0 && this.options.start < this.items.length ? this.options.start : 0;
|
||||
this.tabs[ this.current ].className = 'tab-current';
|
||||
this.items[ this.current ].className = 'content-current';
|
||||
};
|
||||
|
||||
// add to global namespace
|
||||
window.CBPFWTabs = CBPFWTabs;
|
||||
|
||||
})( window );
|
||||
33
f_scripts/fe/js/fwtabs.view.init.js
Normal file
33
f_scripts/fe/js/fwtabs.view.init.js
Normal file
@@ -0,0 +1,33 @@
|
||||
(function () {
|
||||
[].slice.call(document.querySelectorAll('.tabs')).forEach(function (el) {
|
||||
new CBPFWTabs(el);
|
||||
});
|
||||
})();
|
||||
|
||||
function oldSafariCSSfix() {
|
||||
if (isOldSafari()) {
|
||||
var tabnr = 4;
|
||||
var width = jQuery('#siteContent').width() - 32;
|
||||
|
||||
jQuery("#div-share nav ul li").width((width / tabnr) - 1).css("float", "left");
|
||||
jQuery(".tabs nav").css("width", (width + 1));
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).on("click", ".tabs ul:not(.fileThumbs) li", function() {
|
||||
if ($(this).find("a").attr("href") == "#section-thumb") {
|
||||
$(".save-entry-button").hide();
|
||||
} else {
|
||||
$(".save-entry-button").show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
jQuery(window).load(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
213
f_scripts/fe/js/home.init.js
Normal file
213
f_scripts/fe/js/home.init.js
Normal file
@@ -0,0 +1,213 @@
|
||||
var dinamicSizeSetFunction_view = function () {};
|
||||
function sizeInit(type) {}
|
||||
|
||||
jQuery(window).load(function () {
|
||||
thumbFade();
|
||||
});
|
||||
|
||||
function oldSafariCSSfix() {
|
||||
if (isOldSafari()) {
|
||||
var tabnr = $(".full_width .tabs nav ul li").length;
|
||||
var width = jQuery('.container:first').width() - 32;
|
||||
|
||||
jQuery(".tabs nav ul li").width((width / tabnr) - 1).css("float", "left");
|
||||
jQuery(".tabs nav").css("width", (width + 1));
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(window).load(function () {
|
||||
oldSafariCSSfix();
|
||||
|
||||
$('.recommended_section ul.fileThumbs li').each(function() {
|
||||
if ($(this).is(':hidden')) {
|
||||
$(this).detach();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
var owl = $('.view-list:not(.owl-loaded)');
|
||||
/*
|
||||
owl.mouseover(function(){
|
||||
$(this).addClass('view-on');
|
||||
}).mouseout(function(){
|
||||
$(this).removeClass('view-on');
|
||||
});
|
||||
*/
|
||||
function toggleArrows(t){
|
||||
if(t.find(".owl-item").last().hasClass('active') &&
|
||||
t.find(".owl-item.active").index() == t.find(".owl-item").first().index()){
|
||||
t.find('.owl-nav .owl-next').addClass("off");
|
||||
t.find('.owl-nav .owl-prev').addClass("off");
|
||||
}
|
||||
//disable next
|
||||
else if(t.find(".owl-item").last().hasClass('active')){
|
||||
t.find('.owl-nav .owl-next').addClass("off");
|
||||
t.find('.owl-nav .owl-prev').removeClass("off");
|
||||
}
|
||||
//disable previus
|
||||
else if(t.find(".owl-item.active").index() == t.find(".owl-item").first().index()) {
|
||||
t.find('.owl-nav .owl-next').removeClass("off");
|
||||
t.find('.owl-nav .owl-prev').addClass("off");
|
||||
}
|
||||
else{
|
||||
t.find('.owl-nav .owl-next,.owl-nav .owl-prev').removeClass("off");
|
||||
}
|
||||
}
|
||||
|
||||
owl.each(function() {
|
||||
t = $(this);
|
||||
//turn off buttons if last or first - after change
|
||||
to = 360;
|
||||
owl.on('initialized.owl.carousel', function (event) { t = $(this);toggleArrows(t); });
|
||||
owl.on('translated.owl.carousel', function (event) { t = $(this);toggleArrows(t); });
|
||||
owl.on('translate.owl.carousel', function (event) { setTimeout(function(){thumbFade()}, to) });
|
||||
});
|
||||
|
||||
owlinit(owl);
|
||||
|
||||
});
|
||||
|
||||
|
||||
function owlinit(owl) {
|
||||
if (typeof (owl.html()) !== "undefined" && !owl.hasClass("owl-loaded")) {
|
||||
var hh = document.body.offsetWidth;
|
||||
var it = 5;
|
||||
if (mobileCheck()) {
|
||||
it = hh == 360 ? 1 : (hh == 640 ? 3 : it);
|
||||
}
|
||||
owl.owlCarousel({
|
||||
items: 6,
|
||||
loop: false,
|
||||
margin: 20,
|
||||
navSpeed: 100,
|
||||
autoplay: false,
|
||||
dots: true,
|
||||
scrollPerPage: true,
|
||||
nav: true,
|
||||
navText: [
|
||||
"<i class='iconBe iconBe-chevron-left'></i>",
|
||||
"<i class='iconBe iconBe-chevron-right'></i>"
|
||||
],
|
||||
onInitialized: false,
|
||||
responsive: {
|
||||
0: { items: 1, slideBy: 1 },
|
||||
401: { items: 2, slideBy: 2 },
|
||||
560: { items: 3, slideBy: 3 },
|
||||
768: { items: 3, slideBy: 3 },
|
||||
769: { items: 4, slideBy: 4 },
|
||||
981: { items: 5, slideBy: 5 },
|
||||
1200: { items: it, slideBy: it },
|
||||
1564: { items: 6, slideBy: 6 }
|
||||
}
|
||||
});
|
||||
$(owl).addClass("view-on");
|
||||
owl.on('changed.owl.carousel', function (event) {
|
||||
if (event.item.count - event.page.size == event.item.index) {
|
||||
$(event.target).find('.owl-dots div:last').addClass('active').siblings().removeClass('active');
|
||||
}
|
||||
});
|
||||
owl.on('translated.owl.carousel',function(){setTimeout(function(){thumbFade()},200)});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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() {
|
||||
t = $(this);
|
||||
w = getWidth();
|
||||
n1 = 24;
|
||||
n2 = 12;
|
||||
|
||||
if (w <= 1563) {
|
||||
n1 = 20;
|
||||
n2 = 10;
|
||||
}
|
||||
if (w <= 980) {
|
||||
n1 = 16;
|
||||
n2 = 8;
|
||||
}
|
||||
if (w <= 768) {
|
||||
n1 = 12;
|
||||
n2 = 6;
|
||||
}
|
||||
if (w <= 560) {
|
||||
n1 = 8;
|
||||
n2 = 4;
|
||||
}
|
||||
t.hide();
|
||||
|
||||
if (typeof($('.more-loaded').html()) != "undefined") {
|
||||
$('.more-loaded').show();
|
||||
t.removeClass('more').addClass('less').html(jslang["showless"]).show();
|
||||
return;
|
||||
}
|
||||
|
||||
$('.more-load').css({'margin-top': '-17px', 'margin-right': '10px'}).mask(' ');
|
||||
|
||||
$.get(current_url + "home?rc&rn="+n2, function(data){
|
||||
$(data).insertAfter('#main-view-mode-1-featured-video ul.fileThumbs').addClass('more-loaded');
|
||||
|
||||
t.removeClass('more').addClass('less').html(jslang["showless"]).show();
|
||||
$('.more-load').unmask();
|
||||
thumbFade();
|
||||
});
|
||||
}
|
||||
}, ".more-recommended a.more");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
t = $(this);
|
||||
w = getWidth();
|
||||
n1 = 12;
|
||||
n2 = 24;
|
||||
|
||||
if (w <= 1563) {
|
||||
n1 = 10;
|
||||
n2 = 20;
|
||||
}
|
||||
if (w <= 980) {
|
||||
n1 = 8;
|
||||
n2 = 16;
|
||||
}
|
||||
if (w <= 768) {
|
||||
n1 = 6;
|
||||
n2 = 12;
|
||||
}
|
||||
if (w <= 560) {
|
||||
n1 = 4;
|
||||
n2 = 8;
|
||||
}
|
||||
|
||||
$('.more-loaded').hide();
|
||||
t.removeClass('less').addClass('more').html(jslang["showmore"]);
|
||||
}
|
||||
}, ".more-recommended a.less");
|
||||
|
||||
2
f_scripts/fe/js/jquery-3.7.1.min.js
vendored
Normal file
2
f_scripts/fe/js/jquery-3.7.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
96
f_scripts/fe/js/jquery.cookie.js
Normal file
96
f_scripts/fe/js/jquery.cookie.js
Normal file
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* Cookie plugin
|
||||
*
|
||||
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a cookie with the given name and value and other optional parameters.
|
||||
*
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Set the value of a cookie.
|
||||
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
||||
* @desc Create a cookie with all available options.
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Create a session cookie.
|
||||
* @example $.cookie('the_cookie', null);
|
||||
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
||||
* used when the cookie was set.
|
||||
*
|
||||
* @param String name The name of the cookie.
|
||||
* @param String value The value of the cookie.
|
||||
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
||||
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
||||
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
||||
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
||||
* when the the browser exits.
|
||||
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
||||
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
||||
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
||||
* require a secure protocol (like HTTPS).
|
||||
* @type undefined
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the value of a cookie with the given name.
|
||||
*
|
||||
* @example $.cookie('the_cookie');
|
||||
* @desc Get the value of a cookie.
|
||||
*
|
||||
* @param String name The name of the cookie.
|
||||
* @return The value of the cookie.
|
||||
* @type String
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
jQuery.cookie = function(name, value, options) {
|
||||
if (typeof value != 'undefined') { // name and value given, set cookie
|
||||
options = options || {};
|
||||
if (value === null) {
|
||||
value = '';
|
||||
options.expires = -1;
|
||||
}
|
||||
var expires = '';
|
||||
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
||||
var date;
|
||||
if (typeof options.expires == 'number') {
|
||||
date = new Date();
|
||||
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
||||
} else {
|
||||
date = options.expires;
|
||||
}
|
||||
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
|
||||
}
|
||||
// CAUTION: Needed to parenthesize options.path and options.domain
|
||||
// in the following expressions, otherwise they evaluate to undefined
|
||||
// in the packed version for some reason...
|
||||
var path = options.path ? '; path=' + (options.path) : '';
|
||||
var domain = options.domain ? '; domain=' + (options.domain) : '';
|
||||
var secure = options.secure ? '; secure' : '';
|
||||
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
||||
} else { // only name given, get cookie
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
};
|
||||
8
f_scripts/fe/js/jquery.custom-scrollbar.init.js
Normal file
8
f_scripts/fe/js/jquery.custom-scrollbar.init.js
Normal file
@@ -0,0 +1,8 @@
|
||||
$(window).load(function () {
|
||||
$(".sidebar-container-off").customScrollbar({
|
||||
skin: "default-skin",
|
||||
hScroll: false,
|
||||
updateOnWindowResize: true,
|
||||
preventDefaultScroll: true
|
||||
});
|
||||
});
|
||||
781
f_scripts/fe/js/jquery.custom-scrollbar.js
Normal file
781
f_scripts/fe/js/jquery.custom-scrollbar.js
Normal file
@@ -0,0 +1,781 @@
|
||||
(function ($) {
|
||||
|
||||
$.fn.customScrollbar = function (options, args) {
|
||||
|
||||
var defaultOptions = {
|
||||
skin: undefined,
|
||||
hScroll: true,
|
||||
vScroll: true,
|
||||
updateOnWindowResize: false,
|
||||
animationSpeed: 300,
|
||||
onCustomScroll: undefined,
|
||||
swipeSpeed: 1,
|
||||
wheelSpeed: 40,
|
||||
fixedThumbWidth: undefined,
|
||||
fixedThumbHeight: undefined,
|
||||
preventDefaultScroll: false
|
||||
}
|
||||
|
||||
var Scrollable = function (element, options) {
|
||||
this.$element = $(element);
|
||||
this.options = options;
|
||||
this.addScrollableClass();
|
||||
this.addSkinClass();
|
||||
this.addScrollBarComponents();
|
||||
if (this.options.vScroll)
|
||||
this.vScrollbar = new Scrollbar(this, new VSizing());
|
||||
if (this.options.hScroll)
|
||||
this.hScrollbar = new Scrollbar(this, new HSizing());
|
||||
this.$element.data("scrollable", this);
|
||||
this.initKeyboardScrolling();
|
||||
this.bindEvents();
|
||||
}
|
||||
|
||||
Scrollable.prototype = {
|
||||
|
||||
addScrollableClass: function () {
|
||||
if (!this.$element.hasClass("scrollable")) {
|
||||
this.scrollableAdded = true;
|
||||
this.$element.addClass("scrollable");
|
||||
}
|
||||
},
|
||||
|
||||
removeScrollableClass: function () {
|
||||
if (this.scrollableAdded)
|
||||
this.$element.removeClass("scrollable");
|
||||
},
|
||||
|
||||
addSkinClass: function () {
|
||||
if (typeof(this.options.skin) == "string" && !this.$element.hasClass(this.options.skin)) {
|
||||
this.skinClassAdded = true;
|
||||
this.$element.addClass(this.options.skin);
|
||||
}
|
||||
},
|
||||
|
||||
removeSkinClass: function () {
|
||||
if (this.skinClassAdded)
|
||||
this.$element.removeClass(this.options.skin);
|
||||
},
|
||||
|
||||
addScrollBarComponents: function () {
|
||||
this.assignViewPort();
|
||||
if (this.$viewPort.length == 0) {
|
||||
this.$element.wrapInner("<div class=\"viewport\" />");
|
||||
this.assignViewPort();
|
||||
this.viewPortAdded = true;
|
||||
}
|
||||
this.assignOverview();
|
||||
if (this.$overview.length == 0) {
|
||||
this.$viewPort.wrapInner("<div class=\"overview\" />");
|
||||
this.assignOverview();
|
||||
this.overviewAdded = true;
|
||||
}
|
||||
this.addScrollBar("vertical", "prepend");
|
||||
this.addScrollBar("horizontal", "append");
|
||||
},
|
||||
|
||||
removeScrollbarComponents: function () {
|
||||
this.removeScrollbar("vertical");
|
||||
this.removeScrollbar("horizontal");
|
||||
if (this.overviewAdded)
|
||||
this.$element.unwrap();
|
||||
if (this.viewPortAdded)
|
||||
this.$element.unwrap();
|
||||
},
|
||||
|
||||
removeScrollbar: function (orientation) {
|
||||
if (this[orientation + "ScrollbarAdded"])
|
||||
this.$element.find(".scroll-bar." + orientation).remove();
|
||||
},
|
||||
|
||||
assignViewPort: function () {
|
||||
this.$viewPort = this.$element.find(".viewport");
|
||||
},
|
||||
|
||||
assignOverview: function () {
|
||||
this.$overview = this.$viewPort.find(".overview");
|
||||
},
|
||||
|
||||
addScrollBar: function (orientation, fun) {
|
||||
if (this.$element.find(".scroll-bar." + orientation).length == 0) {
|
||||
this.$element[fun]("<div class='scroll-bar " + orientation + "'><div class='thumb'></div></div>")
|
||||
this[orientation + "ScrollbarAdded"] = true;
|
||||
}
|
||||
},
|
||||
|
||||
resize: function (keepPosition) {
|
||||
if (this.vScrollbar)
|
||||
this.vScrollbar.resize(keepPosition);
|
||||
if (this.hScrollbar)
|
||||
this.hScrollbar.resize(keepPosition);
|
||||
},
|
||||
|
||||
scrollTo: function (element) {
|
||||
if (this.vScrollbar)
|
||||
this.vScrollbar.scrollToElement(element);
|
||||
if (this.hScrollbar)
|
||||
this.hScrollbar.scrollToElement(element);
|
||||
},
|
||||
|
||||
scrollToXY: function (x, y) {
|
||||
this.scrollToX(x);
|
||||
this.scrollToY(y);
|
||||
},
|
||||
|
||||
scrollToX: function (x) {
|
||||
if (this.hScrollbar)
|
||||
this.hScrollbar.scrollOverviewTo(x, true);
|
||||
},
|
||||
|
||||
scrollToY: function (y) {
|
||||
if (this.vScrollbar)
|
||||
this.vScrollbar.scrollOverviewTo(y, true);
|
||||
},
|
||||
|
||||
remove: function () {
|
||||
this.removeScrollableClass();
|
||||
this.removeSkinClass();
|
||||
this.removeScrollbarComponents();
|
||||
this.$element.data("scrollable", null);
|
||||
this.removeKeyboardScrolling();
|
||||
if (this.vScrollbar)
|
||||
this.vScrollbar.remove();
|
||||
if (this.hScrollbar)
|
||||
this.hScrollbar.remove();
|
||||
},
|
||||
|
||||
setAnimationSpeed: function (speed) {
|
||||
this.options.animationSpeed = speed;
|
||||
},
|
||||
|
||||
isInside: function (element, wrappingElement) {
|
||||
var $element = $(element);
|
||||
var $wrappingElement = $(wrappingElement);
|
||||
var elementOffset = $element.offset();
|
||||
var wrappingElementOffset = $wrappingElement.offset();
|
||||
return (elementOffset.top >= wrappingElementOffset.top) && (elementOffset.left >= wrappingElementOffset.left) &&
|
||||
(elementOffset.top + $element.height() <= wrappingElementOffset.top + $wrappingElement.height()) &&
|
||||
(elementOffset.left + $element.width() <= wrappingElementOffset.left + $wrappingElement.width())
|
||||
},
|
||||
|
||||
initKeyboardScrolling: function () {
|
||||
var _this = this;
|
||||
|
||||
this.elementKeydown = function (event) {
|
||||
if (document.activeElement === _this.$element[0]) {
|
||||
if (_this.vScrollbar)
|
||||
_this.vScrollbar.keyScroll(event);
|
||||
if (_this.hScrollbar)
|
||||
_this.hScrollbar.keyScroll(event);
|
||||
}
|
||||
}
|
||||
|
||||
this.$element
|
||||
.attr('tabindex', '-1')
|
||||
.keydown(this.elementKeydown);
|
||||
},
|
||||
|
||||
removeKeyboardScrolling: function () {
|
||||
this.$element
|
||||
.removeAttr('tabindex')
|
||||
.unbind("keydown", this.elementKeydown);
|
||||
},
|
||||
|
||||
bindEvents: function () {
|
||||
if (this.options.onCustomScroll)
|
||||
this.$element.on("customScroll", this.options.onCustomScroll);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var Scrollbar = function (scrollable, sizing) {
|
||||
this.scrollable = scrollable;
|
||||
this.sizing = sizing
|
||||
this.$scrollBar = this.sizing.scrollBar(this.scrollable.$element);
|
||||
this.$thumb = this.$scrollBar.find(".thumb");
|
||||
this.setScrollPosition(0, 0);
|
||||
this.resize();
|
||||
this.initMouseMoveScrolling();
|
||||
this.initMouseWheelScrolling();
|
||||
this.initTouchScrolling();
|
||||
this.initMouseClickScrolling();
|
||||
this.initWindowResize();
|
||||
}
|
||||
|
||||
Scrollbar.prototype = {
|
||||
|
||||
resize: function (keepPosition) {
|
||||
this.scrollable.$viewPort.height(this.scrollable.$element.height());
|
||||
this.sizing.size(this.scrollable.$viewPort, this.sizing.size(this.scrollable.$element));
|
||||
this.viewPortSize = this.sizing.size(this.scrollable.$viewPort);
|
||||
this.overviewSize = this.sizing.size(this.scrollable.$overview);
|
||||
this.ratio = this.viewPortSize / this.overviewSize;
|
||||
this.sizing.size(this.$scrollBar, this.viewPortSize);
|
||||
this.thumbSize = this.calculateThumbSize();
|
||||
this.sizing.size(this.$thumb, this.thumbSize);
|
||||
this.maxThumbPosition = this.calculateMaxThumbPosition();
|
||||
this.maxOverviewPosition = this.calculateMaxOverviewPosition();
|
||||
this.enabled = (this.overviewSize > this.viewPortSize);
|
||||
if (this.scrollPercent === undefined)
|
||||
this.scrollPercent = 0.0;
|
||||
if (this.enabled)
|
||||
this.rescroll(keepPosition);
|
||||
else
|
||||
this.setScrollPosition(0, 0);
|
||||
this.$scrollBar.toggle(this.enabled);
|
||||
},
|
||||
|
||||
calculateThumbSize: function () {
|
||||
var fixedSize = this.sizing.fixedThumbSize(this.scrollable.options)
|
||||
var size;
|
||||
if (fixedSize)
|
||||
size = fixedSize;
|
||||
else
|
||||
size = this.ratio * this.viewPortSize
|
||||
return Math.max(size, this.sizing.minSize(this.$thumb));
|
||||
},
|
||||
|
||||
initMouseMoveScrolling: function () {
|
||||
var _this = this;
|
||||
this.$thumb.mousedown(function (event) {
|
||||
if (_this.enabled)
|
||||
_this.startMouseMoveScrolling(event);
|
||||
});
|
||||
this.documentMouseup = function (event) {
|
||||
_this.stopMouseMoveScrolling(event);
|
||||
};
|
||||
$(document).mouseup(this.documentMouseup);
|
||||
this.documentMousemove = function (event) {
|
||||
_this.mouseMoveScroll(event);
|
||||
};
|
||||
$(document).mousemove(this.documentMousemove);
|
||||
this.$thumb.click(function (event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
},
|
||||
|
||||
removeMouseMoveScrolling: function () {
|
||||
this.$thumb.unbind();
|
||||
$(document).unbind("mouseup", this.documentMouseup);
|
||||
$(document).unbind("mousemove", this.documentMousemove);
|
||||
},
|
||||
|
||||
initMouseWheelScrolling: function () {
|
||||
var _this = this;
|
||||
this.scrollable.$element.mousewheel(function (event, delta, deltaX, deltaY) {
|
||||
if (_this.enabled) {
|
||||
var scrolled = _this.mouseWheelScroll(deltaX, deltaY);
|
||||
_this.stopEventConditionally(event, scrolled);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
removeMouseWheelScrolling: function () {
|
||||
this.scrollable.$element.unbind("mousewheel");
|
||||
},
|
||||
|
||||
initTouchScrolling: function () {
|
||||
if (document.addEventListener) {
|
||||
var _this = this;
|
||||
this.elementTouchstart = function (event) {
|
||||
if (_this.enabled)
|
||||
_this.startTouchScrolling(event);
|
||||
}
|
||||
this.scrollable.$element[0].addEventListener("touchstart", this.elementTouchstart);
|
||||
this.documentTouchmove = function (event) {
|
||||
_this.touchScroll(event);
|
||||
}
|
||||
document.addEventListener("touchmove", this.documentTouchmove);
|
||||
this.elementTouchend = function (event) {
|
||||
_this.stopTouchScrolling(event);
|
||||
}
|
||||
this.scrollable.$element[0].addEventListener("touchend", this.elementTouchend);
|
||||
}
|
||||
},
|
||||
|
||||
removeTouchScrolling: function () {
|
||||
if (document.addEventListener) {
|
||||
this.scrollable.$element[0].removeEventListener("touchstart", this.elementTouchstart);
|
||||
document.removeEventListener("touchmove", this.documentTouchmove);
|
||||
this.scrollable.$element[0].removeEventListener("touchend", this.elementTouchend);
|
||||
}
|
||||
},
|
||||
|
||||
initMouseClickScrolling: function () {
|
||||
var _this = this;
|
||||
this.scrollBarClick = function (event) {
|
||||
_this.mouseClickScroll(event);
|
||||
};
|
||||
this.$scrollBar.click(this.scrollBarClick);
|
||||
},
|
||||
|
||||
removeMouseClickScrolling: function () {
|
||||
this.$scrollBar.unbind("click", this.scrollBarClick);
|
||||
},
|
||||
|
||||
initWindowResize: function () {
|
||||
if (this.scrollable.options.updateOnWindowResize) {
|
||||
var _this = this;
|
||||
this.windowResize = function () {
|
||||
_this.resize();
|
||||
};
|
||||
$(window).resize(this.windowResize);
|
||||
}
|
||||
},
|
||||
|
||||
removeWindowResize: function () {
|
||||
$(window).unbind("resize", this.windowResize);
|
||||
},
|
||||
|
||||
isKeyScrolling: function (key) {
|
||||
return this.keyScrollDelta(key) != null;
|
||||
},
|
||||
|
||||
keyScrollDelta: function (key) {
|
||||
for (var scrollingKey in this.sizing.scrollingKeys)
|
||||
if (scrollingKey == key)
|
||||
return this.sizing.scrollingKeys[key](this.viewPortSize);
|
||||
return null;
|
||||
},
|
||||
|
||||
startMouseMoveScrolling: function (event) {
|
||||
this.mouseMoveScrolling = true;
|
||||
$("html").addClass("not-selectable");
|
||||
this.setUnselectable($("html"), "on");
|
||||
this.setScrollEvent(event);
|
||||
},
|
||||
|
||||
stopMouseMoveScrolling: function (event) {
|
||||
this.mouseMoveScrolling = false;
|
||||
$("html").removeClass("not-selectable");
|
||||
this.setUnselectable($("html"), null);
|
||||
},
|
||||
|
||||
setUnselectable: function (element, value) {
|
||||
if (element.attr("unselectable") != value) {
|
||||
element.attr("unselectable", value);
|
||||
element.find(':not(input)').attr('unselectable', value);
|
||||
}
|
||||
},
|
||||
|
||||
mouseMoveScroll: function (event) {
|
||||
if (this.mouseMoveScrolling) {
|
||||
var delta = this.sizing.mouseDelta(this.scrollEvent, event);
|
||||
this.scrollThumbBy(delta);
|
||||
this.setScrollEvent(event);
|
||||
}
|
||||
},
|
||||
|
||||
startTouchScrolling: function (event) {
|
||||
if (event.touches && event.touches.length == 1) {
|
||||
this.setScrollEvent(event.touches[0]);
|
||||
this.touchScrolling = true;
|
||||
event.stopPropagation();
|
||||
}
|
||||
},
|
||||
|
||||
touchScroll: function (event) {
|
||||
if (this.touchScrolling && event.touches && event.touches.length == 1) {
|
||||
var delta = -this.sizing.mouseDelta(this.scrollEvent, event.touches[0]) * this.scrollable.options.swipeSpeed;
|
||||
var scrolled = this.scrollOverviewBy(delta);
|
||||
if (scrolled)
|
||||
this.setScrollEvent(event.touches[0]);
|
||||
this.stopEventConditionally(event, scrolled);
|
||||
}
|
||||
},
|
||||
|
||||
stopTouchScrolling: function (event) {
|
||||
this.touchScrolling = false;
|
||||
event.stopPropagation();
|
||||
},
|
||||
|
||||
mouseWheelScroll: function (deltaX, deltaY) {
|
||||
var delta = -this.sizing.wheelDelta(deltaX, deltaY) * this.scrollable.options.wheelSpeed;
|
||||
if (delta != 0)
|
||||
return this.scrollOverviewBy(delta);
|
||||
},
|
||||
|
||||
mouseClickScroll: function (event) {
|
||||
var delta = this.viewPortSize - 20;
|
||||
if (event["page" + this.sizing.scrollAxis()] < this.$thumb.offset()[this.sizing.offsetComponent()])
|
||||
// mouse click over thumb
|
||||
delta = -delta;
|
||||
this.scrollOverviewBy(delta);
|
||||
},
|
||||
|
||||
keyScroll: function (event) {
|
||||
var keyDown = event.which;
|
||||
if (this.enabled && this.isKeyScrolling(keyDown)) {
|
||||
var scrolled = this.scrollOverviewBy(this.keyScrollDelta(keyDown));
|
||||
this.stopEventConditionally(event, scrolled);
|
||||
}
|
||||
},
|
||||
|
||||
scrollThumbBy: function (delta) {
|
||||
var thumbPosition = this.thumbPosition();
|
||||
thumbPosition += delta;
|
||||
thumbPosition = this.positionOrMax(thumbPosition, this.maxThumbPosition);
|
||||
var oldScrollPercent = this.scrollPercent;
|
||||
this.scrollPercent = thumbPosition / this.maxThumbPosition;
|
||||
if (oldScrollPercent != this.scrollPercent) {
|
||||
var overviewPosition = (thumbPosition * this.maxOverviewPosition) / this.maxThumbPosition;
|
||||
this.setScrollPosition(overviewPosition, thumbPosition);
|
||||
this.triggerCustomScroll(oldScrollPercent);
|
||||
return true
|
||||
}
|
||||
else
|
||||
return false;
|
||||
},
|
||||
|
||||
thumbPosition: function () {
|
||||
return this.$thumb.position()[this.sizing.offsetComponent()];
|
||||
},
|
||||
|
||||
scrollOverviewBy: function (delta) {
|
||||
var overviewPosition = this.overviewPosition() + delta;
|
||||
return this.scrollOverviewTo(overviewPosition, false);
|
||||
},
|
||||
|
||||
overviewPosition: function () {
|
||||
return -this.scrollable.$overview.position()[this.sizing.offsetComponent()];
|
||||
},
|
||||
|
||||
scrollOverviewTo: function (overviewPosition, animate) {
|
||||
overviewPosition = this.positionOrMax(overviewPosition, this.maxOverviewPosition);
|
||||
var oldScrollPercent = this.scrollPercent;
|
||||
this.scrollPercent = overviewPosition / this.maxOverviewPosition;
|
||||
if (oldScrollPercent != this.scrollPercent) {
|
||||
var thumbPosition = this.scrollPercent * this.maxThumbPosition;
|
||||
if (animate)
|
||||
this.setScrollPositionWithAnimation(overviewPosition, thumbPosition);
|
||||
else
|
||||
this.setScrollPosition(overviewPosition, thumbPosition);
|
||||
this.triggerCustomScroll(oldScrollPercent);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
},
|
||||
|
||||
positionOrMax: function (p, max) {
|
||||
if (p < 0)
|
||||
return 0;
|
||||
else if (p > max)
|
||||
return max;
|
||||
else
|
||||
return p;
|
||||
},
|
||||
|
||||
triggerCustomScroll: function (oldScrollPercent) {
|
||||
this.scrollable.$element.trigger("customScroll", {
|
||||
scrollAxis: this.sizing.scrollAxis(),
|
||||
direction: this.sizing.scrollDirection(oldScrollPercent, this.scrollPercent),
|
||||
scrollPercent: this.scrollPercent * 100
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
rescroll: function (keepPosition) {
|
||||
if (keepPosition) {
|
||||
var overviewPosition = this.positionOrMax(this.overviewPosition(), this.maxOverviewPosition);
|
||||
this.scrollPercent = overviewPosition / this.maxOverviewPosition;
|
||||
var thumbPosition = this.scrollPercent * this.maxThumbPosition;
|
||||
this.setScrollPosition(overviewPosition, thumbPosition);
|
||||
}
|
||||
else {
|
||||
var thumbPosition = this.scrollPercent * this.maxThumbPosition;
|
||||
var overviewPosition = this.scrollPercent * this.maxOverviewPosition;
|
||||
this.setScrollPosition(overviewPosition, thumbPosition);
|
||||
}
|
||||
},
|
||||
|
||||
setScrollPosition: function (overviewPosition, thumbPosition) {
|
||||
this.$thumb.css(this.sizing.offsetComponent(), thumbPosition + "px");
|
||||
this.scrollable.$overview.css(this.sizing.offsetComponent(), -overviewPosition + "px");
|
||||
},
|
||||
|
||||
setScrollPositionWithAnimation: function (overviewPosition, thumbPosition) {
|
||||
var thumbAnimationOpts = {};
|
||||
var overviewAnimationOpts = {};
|
||||
thumbAnimationOpts[this.sizing.offsetComponent()] = thumbPosition + "px";
|
||||
this.$thumb.animate(thumbAnimationOpts, this.scrollable.options.animationSpeed);
|
||||
overviewAnimationOpts[this.sizing.offsetComponent()] = -overviewPosition + "px";
|
||||
this.scrollable.$overview.animate(overviewAnimationOpts, this.scrollable.options.animationSpeed);
|
||||
},
|
||||
|
||||
calculateMaxThumbPosition: function () {
|
||||
return Math.max(0, this.sizing.size(this.$scrollBar) - this.thumbSize);
|
||||
},
|
||||
|
||||
calculateMaxOverviewPosition: function () {
|
||||
return Math.max(0, this.sizing.size(this.scrollable.$overview) - this.sizing.size(this.scrollable.$viewPort));
|
||||
},
|
||||
|
||||
setScrollEvent: function (event) {
|
||||
var attr = "page" + this.sizing.scrollAxis();
|
||||
if (!this.scrollEvent || this.scrollEvent[attr] != event[attr])
|
||||
this.scrollEvent = {pageX: event.pageX, pageY: event.pageY};
|
||||
},
|
||||
|
||||
scrollToElement: function (element) {
|
||||
var $element = $(element);
|
||||
if (this.sizing.isInside($element, this.scrollable.$overview) && !this.sizing.isInside($element, this.scrollable.$viewPort)) {
|
||||
var elementOffset = $element.offset();
|
||||
var overviewOffset = this.scrollable.$overview.offset();
|
||||
var viewPortOffset = this.scrollable.$viewPort.offset();
|
||||
this.scrollOverviewTo(elementOffset[this.sizing.offsetComponent()] - overviewOffset[this.sizing.offsetComponent()], true);
|
||||
}
|
||||
},
|
||||
|
||||
remove: function () {
|
||||
this.removeMouseMoveScrolling();
|
||||
this.removeMouseWheelScrolling();
|
||||
this.removeTouchScrolling();
|
||||
this.removeMouseClickScrolling();
|
||||
this.removeWindowResize();
|
||||
},
|
||||
|
||||
stopEventConditionally: function (event, condition) {
|
||||
if (condition || this.scrollable.options.preventDefaultScroll) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var HSizing = function () {
|
||||
}
|
||||
|
||||
HSizing.prototype = {
|
||||
size: function ($el, arg) {
|
||||
if (arg)
|
||||
return $el.width(arg);
|
||||
else
|
||||
return $el.width();
|
||||
},
|
||||
|
||||
minSize: function ($el) {
|
||||
return parseInt($el.css("min-width")) || 0;
|
||||
},
|
||||
|
||||
fixedThumbSize: function (options) {
|
||||
return options.fixedThumbWidth;
|
||||
},
|
||||
|
||||
scrollBar: function ($el) {
|
||||
return $el.find(".scroll-bar.horizontal");
|
||||
},
|
||||
|
||||
mouseDelta: function (event1, event2) {
|
||||
return event2.pageX - event1.pageX;
|
||||
},
|
||||
|
||||
offsetComponent: function () {
|
||||
return "left";
|
||||
},
|
||||
|
||||
wheelDelta: function (deltaX, deltaY) {
|
||||
return deltaX;
|
||||
},
|
||||
|
||||
scrollAxis: function () {
|
||||
return "X";
|
||||
},
|
||||
|
||||
scrollDirection: function (oldPercent, newPercent) {
|
||||
return oldPercent < newPercent ? "right" : "left";
|
||||
},
|
||||
|
||||
scrollingKeys: {
|
||||
37: function (viewPortSize) {
|
||||
return -10; //arrow left
|
||||
},
|
||||
39: function (viewPortSize) {
|
||||
return 10; //arrow right
|
||||
}
|
||||
},
|
||||
|
||||
isInside: function (element, wrappingElement) {
|
||||
var $element = $(element);
|
||||
var $wrappingElement = $(wrappingElement);
|
||||
var elementOffset = $element.offset();
|
||||
var wrappingElementOffset = $wrappingElement.offset();
|
||||
return (elementOffset.left >= wrappingElementOffset.left) &&
|
||||
(elementOffset.left + $element.width() <= wrappingElementOffset.left + $wrappingElement.width());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var VSizing = function () {
|
||||
}
|
||||
|
||||
VSizing.prototype = {
|
||||
|
||||
size: function ($el, arg) {
|
||||
if (arg)
|
||||
return $el.height(arg);
|
||||
else
|
||||
return $el.height();
|
||||
},
|
||||
|
||||
minSize: function ($el) {
|
||||
return parseInt($el.css("min-height")) || 0;
|
||||
},
|
||||
|
||||
fixedThumbSize: function (options) {
|
||||
return options.fixedThumbHeight;
|
||||
},
|
||||
|
||||
scrollBar: function ($el) {
|
||||
return $el.find(".scroll-bar.vertical");
|
||||
},
|
||||
|
||||
mouseDelta: function (event1, event2) {
|
||||
return event2.pageY - event1.pageY;
|
||||
},
|
||||
|
||||
offsetComponent: function () {
|
||||
return "top";
|
||||
},
|
||||
|
||||
wheelDelta: function (deltaX, deltaY) {
|
||||
return deltaY;
|
||||
},
|
||||
|
||||
scrollAxis: function () {
|
||||
return "Y";
|
||||
},
|
||||
|
||||
scrollDirection: function (oldPercent, newPercent) {
|
||||
return oldPercent < newPercent ? "down" : "up";
|
||||
},
|
||||
|
||||
scrollingKeys: {
|
||||
38: function (viewPortSize) {
|
||||
return -10; //arrow up
|
||||
},
|
||||
40: function (viewPortSize) {
|
||||
return 10; //arrow down
|
||||
},
|
||||
33: function (viewPortSize) {
|
||||
return -(viewPortSize - 20); //page up
|
||||
},
|
||||
34: function (viewPortSize) {
|
||||
return viewPortSize - 20; //page down
|
||||
}
|
||||
},
|
||||
|
||||
isInside: function (element, wrappingElement) {
|
||||
var $element = $(element);
|
||||
var $wrappingElement = $(wrappingElement);
|
||||
var elementOffset = $element.offset();
|
||||
var wrappingElementOffset = $wrappingElement.offset();
|
||||
return (elementOffset.top >= wrappingElementOffset.top) &&
|
||||
(elementOffset.top + $element.height() <= wrappingElementOffset.top + $wrappingElement.height());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return this.each(function () {
|
||||
if (options == undefined)
|
||||
options = defaultOptions;
|
||||
if (typeof(options) == "string") {
|
||||
var scrollable = $(this).data("scrollable");
|
||||
if (scrollable)
|
||||
scrollable[options](args);
|
||||
}
|
||||
else if (typeof(options) == "object") {
|
||||
options = $.extend(defaultOptions, options);
|
||||
new Scrollable($(this), options);
|
||||
}
|
||||
else
|
||||
throw "Invalid type of options";
|
||||
});
|
||||
|
||||
}
|
||||
;
|
||||
|
||||
})
|
||||
(jQuery);
|
||||
|
||||
(function ($) {
|
||||
|
||||
var types = ['DOMMouseScroll', 'mousewheel'];
|
||||
|
||||
if ($.event.fixHooks) {
|
||||
for (var i = types.length; i;) {
|
||||
$.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
|
||||
}
|
||||
}
|
||||
|
||||
$.event.special.mousewheel = {
|
||||
setup: function () {
|
||||
if (this.addEventListener) {
|
||||
for (var i = types.length; i;) {
|
||||
this.addEventListener(types[--i], handler, false);
|
||||
}
|
||||
} else {
|
||||
this.onmousewheel = handler;
|
||||
}
|
||||
},
|
||||
|
||||
teardown: function () {
|
||||
if (this.removeEventListener) {
|
||||
for (var i = types.length; i;) {
|
||||
this.removeEventListener(types[--i], handler, false);
|
||||
}
|
||||
} else {
|
||||
this.onmousewheel = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.extend({
|
||||
mousewheel: function (fn) {
|
||||
return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
|
||||
},
|
||||
|
||||
unmousewheel: function (fn) {
|
||||
return this.unbind("mousewheel", fn);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function handler(event) {
|
||||
var orgEvent = event || window.event, args = [].slice.call(arguments, 1), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
|
||||
event = $.event.fix(orgEvent);
|
||||
event.type = "mousewheel";
|
||||
|
||||
// Old school scrollwheel delta
|
||||
if (orgEvent.wheelDelta) {
|
||||
delta = orgEvent.wheelDelta / 120;
|
||||
}
|
||||
if (orgEvent.detail) {
|
||||
delta = -orgEvent.detail / 3;
|
||||
}
|
||||
|
||||
// New school multidimensional scroll (touchpads) deltas
|
||||
deltaY = delta;
|
||||
|
||||
// Gecko
|
||||
if (orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS) {
|
||||
deltaY = 0;
|
||||
deltaX = delta;
|
||||
}
|
||||
|
||||
// Webkit
|
||||
if (orgEvent.wheelDeltaY !== undefined) {
|
||||
deltaY = orgEvent.wheelDeltaY / 120;
|
||||
}
|
||||
if (orgEvent.wheelDeltaX !== undefined) {
|
||||
deltaX = orgEvent.wheelDeltaX / 120;
|
||||
}
|
||||
|
||||
// Add event and delta to the front of the arguments
|
||||
args.unshift(event, delta, deltaX, deltaY);
|
||||
|
||||
return ($.event.dispatch || $.event.handle).apply(this, args);
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
205
f_scripts/fe/js/jquery.easing.js
Normal file
205
f_scripts/fe/js/jquery.easing.js
Normal file
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
*
|
||||
* Uses the built in easing capabilities added In jQuery 1.1
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2008 George McGinley Smith
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
||||
|
||||
jQuery.extend( jQuery.easing,
|
||||
{
|
||||
def: 'easeOutQuad',
|
||||
swing: function (x, t, b, c, d) {
|
||||
//alert(jQuery.easing.default);
|
||||
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
||||
},
|
||||
easeInQuad: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t + b;
|
||||
},
|
||||
easeOutQuad: function (x, t, b, c, d) {
|
||||
return -c *(t/=d)*(t-2) + b;
|
||||
},
|
||||
easeInOutQuad: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||
},
|
||||
easeInCubic: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t + b;
|
||||
},
|
||||
easeOutCubic: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t + 1) + b;
|
||||
},
|
||||
easeInOutCubic: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t + 2) + b;
|
||||
},
|
||||
easeInQuart: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t + b;
|
||||
},
|
||||
easeOutQuart: function (x, t, b, c, d) {
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||
},
|
||||
easeInOutQuart: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||
},
|
||||
easeInQuint: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t*t + b;
|
||||
},
|
||||
easeOutQuint: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||
},
|
||||
easeInOutQuint: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||
},
|
||||
easeInSine: function (x, t, b, c, d) {
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||
},
|
||||
easeOutSine: function (x, t, b, c, d) {
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||
},
|
||||
easeInOutSine: function (x, t, b, c, d) {
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||
},
|
||||
easeInExpo: function (x, t, b, c, d) {
|
||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||
},
|
||||
easeOutExpo: function (x, t, b, c, d) {
|
||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||
},
|
||||
easeInOutExpo: function (x, t, b, c, d) {
|
||||
if (t==0) return b;
|
||||
if (t==d) return b+c;
|
||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||
},
|
||||
easeInCirc: function (x, t, b, c, d) {
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||
},
|
||||
easeOutCirc: function (x, t, b, c, d) {
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||
},
|
||||
easeInOutCirc: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||
},
|
||||
easeInElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
},
|
||||
easeOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
||||
},
|
||||
easeInOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
||||
},
|
||||
easeInBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||
},
|
||||
easeOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
easeInBounce: function (x, t, b, c, d) {
|
||||
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||
},
|
||||
easeOutBounce: function (x, t, b, c, d) {
|
||||
if ((t/=d) < (1/2.75)) {
|
||||
return c*(7.5625*t*t) + b;
|
||||
} else if (t < (2/2.75)) {
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
||||
} else if (t < (2.5/2.75)) {
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
||||
} else {
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
||||
}
|
||||
},
|
||||
easeInOutBounce: function (x, t, b, c, d) {
|
||||
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
||||
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
9
f_scripts/fe/js/jquery.hoverIntent.min.js
vendored
Normal file
9
f_scripts/fe/js/jquery.hoverIntent.min.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* hoverIntent v1.8.0 // 2014.06.29 // jQuery v1.9.1+
|
||||
* http://cherne.net/brian/resources/jquery.hoverIntent.html
|
||||
*
|
||||
* You may use hoverIntent under the terms of the MIT license. Basically that
|
||||
* means you are free to use hoverIntent as long as this header is left intact.
|
||||
* Copyright 2007, 2014 Brian Cherne
|
||||
*/
|
||||
(function($){$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var cfg={interval:100,sensitivity:6,timeout:0};if(typeof handlerIn==="object"){cfg=$.extend(cfg,handlerIn)}else{if($.isFunction(handlerOut)){cfg=$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector})}else{cfg=$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut})}}var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if(Math.sqrt((pX-cX)*(pX-cX)+(pY-cY)*(pY-cY))<cfg.sensitivity){$(ob).off("mousemove.hoverIntent",track);ob.hoverIntent_s=true;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=false;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=$.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type==="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).on("mousemove.hoverIntent",track);if(!ob.hoverIntent_s){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).off("mousemove.hoverIntent",track);if(ob.hoverIntent_s){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},cfg.selector)}})(jQuery);
|
||||
198
f_scripts/fe/js/jquery.init.js
Normal file
198
f_scripts/fe/js/jquery.init.js
Normal file
@@ -0,0 +1,198 @@
|
||||
isChrome = !!window.chrome && !!window.chrome.webstore;
|
||||
|
||||
jQuery("#main_navbar ul.nav li").not(".active").mouseover(function () {
|
||||
jQuery(this).find("i").addClass("objblink");
|
||||
}).mouseout(function () {
|
||||
jQuery(this).find("i").removeClass("objblink");
|
||||
});
|
||||
|
||||
jQuery(".user-sub-activity").mouseover(function () {
|
||||
jQuery(this).addClass("on");
|
||||
}).mouseout(function () {
|
||||
jQuery(this).removeClass("on");
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$( '#lang-menu' ).dlmenu({
|
||||
animationClasses : { classin : 'dl-animate-in-5', classout : 'dl-animate-out-5' }
|
||||
});
|
||||
});
|
||||
$(function() {
|
||||
$( '#user-nav-menu' ).dlmenu({
|
||||
animationClasses : { classin : 'dl-animate-in-5', classout : 'dl-animate-out-5' }
|
||||
});
|
||||
});
|
||||
|
||||
function thumbFade() {
|
||||
$('.mediaThumb:not(.loaded)').Lazy({
|
||||
effect: 'fadeIn',
|
||||
effectTime: 300,
|
||||
threshold: 0,
|
||||
scrollDirection: 'both',
|
||||
afterLoad: function(element) {
|
||||
element.removeAttr("height").addClass("loaded");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getWidth() {
|
||||
if (self.innerWidth) {
|
||||
return self.innerWidth;
|
||||
}
|
||||
|
||||
if (document.documentElement && document.documentElement.clientWidth) {
|
||||
return document.documentElement.clientWidth;
|
||||
}
|
||||
|
||||
if (document.body) {
|
||||
return document.body.clientWidth;
|
||||
}
|
||||
}
|
||||
|
||||
var dinamicSizeSetFunction_menu = function () {};
|
||||
var dinamicSizeSetFunction_thumb = function (selector) {};
|
||||
var dinamicSizeSetFunction_swiper = function () {};
|
||||
var jqUpdate = function jqUpdateSize(selector) {};
|
||||
function resizeDelimiter(){}
|
||||
function thisresizeDelimiter(){}
|
||||
var ms = "home";
|
||||
function isOldSafari() {
|
||||
return !!navigator.userAgent.match(' Safari/') && !navigator.userAgent.match(' Chrome') && (!!navigator.userAgent.match(' Version/6.0') || !!navigator.userAgent.match(' Version/5.'));
|
||||
}
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
if (!$('#user-arrow-box').hasClass('hidden') || !$('#notifications-arrow-box').hasClass('hidden')) {
|
||||
$('#ct-header-top .arrow_box').addClass('hidden');
|
||||
}
|
||||
}
|
||||
}, ".container.container_wrapper, #ct-header-bottom, #logo_container, .search_holder, .push, footer");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
if ($('#user-arrow-box').hasClass('hidden')) {
|
||||
$('#user-arrow-box').removeClass('hidden');
|
||||
$('#notifications-arrow-box').addClass('hidden');
|
||||
} else {
|
||||
$('#user-arrow-box').addClass('hidden');
|
||||
}
|
||||
}
|
||||
}, ".own-profile-image.mt");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
if ($('#notifications-arrow-box').hasClass('hidden')) {
|
||||
$('#notifications-arrow-box').removeClass('hidden');
|
||||
$('#user-arrow-box').addClass('hidden');
|
||||
|
||||
if (typeof($('.user-sub-activity').html()) == 'undefined') {
|
||||
$('#notifications-box').mask(" ");
|
||||
$('#notifications-box').load(current_url + ms + '?load', function(){
|
||||
$('.tooltip.top').detach();
|
||||
$('#notifications-box-scroll-off').customScrollbar({ skin: "default-skin", hScroll: false, updateOnWindowResize: true, preventDefaultScroll: true });
|
||||
$('#notifications-box').unmask();
|
||||
});
|
||||
}
|
||||
$('.tooltip.top').detach();
|
||||
} else {
|
||||
$('#notifications-arrow-box').addClass('hidden');
|
||||
}
|
||||
}
|
||||
}, ".top-notif");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
t = $(this);
|
||||
i = t.attr("rel-nr");
|
||||
|
||||
$('#a'+i).mask(" ");
|
||||
$.post( current_url + ms + '?hide', { i: i }, function(data){
|
||||
if (data == 1 && !$('.hidden-notifications').hasClass('active')) {
|
||||
$('#a'+i).detach();
|
||||
}
|
||||
$('#a'+i).unmask();
|
||||
});
|
||||
}
|
||||
}, ".hide-entry");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
t = $(this);
|
||||
i = t.attr("rel-nr");
|
||||
|
||||
$('#a'+i).mask(" ");
|
||||
$.post( current_url + ms + '?unhide', { i: i }, function(data){
|
||||
$('#a'+i).removeClass("is-hidden");
|
||||
$('#a'+i).unmask();
|
||||
if (data == 1) {
|
||||
$('#a'+i+' i.unhide-entry').removeClass('unhide-entry').addClass('restored-entry').removeClass('icon-undo2').addClass('icon-check');
|
||||
}
|
||||
});
|
||||
}
|
||||
}, ".unhide-entry");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
t = $(this);
|
||||
i = t.attr("rel-page");
|
||||
s = $('.hidden-notifications').hasClass("active") ? "?loadall" : "?load";
|
||||
|
||||
$('#notifications-box').mask(" ");
|
||||
$.get(current_url + ms + s + "&p=" + i, function(data){
|
||||
$('#notifications-box-list').append(data);
|
||||
$('#notifications-box-scroll-off').customScrollbar("resize", true)
|
||||
$('#notifications-box').unmask();
|
||||
t.attr("rel-page", (parseInt(i)+1));
|
||||
if (data == "") {
|
||||
$('#more-results').detach();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, ".notifications-more");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
t = $(this);
|
||||
s = !t.hasClass("active") ? "?loadall" : "?load";
|
||||
|
||||
$('#notifications-box-scroll').mask(" ");
|
||||
|
||||
$('#notifications-box').load(current_url + ms + s, function(){
|
||||
$('.tooltip.top').detach();
|
||||
$('#notifications-box-scroll-off').customScrollbar({ skin: "default-skin", hScroll: false, updateOnWindowResize: true, preventDefaultScroll: true });
|
||||
$('#notifications-box-scroll').unmask();
|
||||
|
||||
t.toggleClass('active');
|
||||
});
|
||||
}
|
||||
}, ".hidden-notifications");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
if (getWidth() <= 800) {
|
||||
m = getWidth() > 640 ? 310 : 155;
|
||||
if (mobileCheck()) {
|
||||
m = m - 15;
|
||||
}
|
||||
$(".search_holder").css({"max-width":(getWidth()-m)+"px", "-webkit-transition":"max-width 0.4s", "transition":"max-width 0.4s"});
|
||||
$(".search_holder").addClass("expand");
|
||||
|
||||
}
|
||||
}
|
||||
}, ".sb-search-input");
|
||||
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
if (getWidth() <= 800) {
|
||||
if ($(".search_holder").hasClass("expand")) {
|
||||
$(".search_holder").removeAttr("style");
|
||||
}
|
||||
}
|
||||
}
|
||||
}, "#wrapper > .container, #ct-header-bottom");
|
||||
|
||||
function mobileCheck() {
|
||||
var check = false;
|
||||
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);
|
||||
|
||||
return check;
|
||||
}
|
||||
1
f_scripts/fe/js/jquery.init.min.js
vendored
Normal file
1
f_scripts/fe/js/jquery.init.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/jquery.loadmask.js
Normal file
1
f_scripts/fe/js/jquery.loadmask.js
Normal file
@@ -0,0 +1 @@
|
||||
(function(a){a.fn.mask=function(c){this.unmask();if(this.css("position")=="static"){this.addClass("masked-relative")}this.addClass("masked");var d=a('<div class="loadmask"></div>');if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){d.height(this.height()+parseInt(this.css("padding-top"))+parseInt(this.css("padding-bottom")));d.width(this.width()+parseInt(this.css("padding-left"))+parseInt(this.css("padding-right")))}if(navigator.userAgent.toLowerCase().indexOf("msie 6")>-1){this.find("select").addClass("masked-hidden")}this.append(d);if(typeof c=="string"){var b=a('<div class="loadmask-msg" style="display:none;"></div>');b.append("<div>"+c+"</div>");this.append(b);b.css("top",Math.round(this.height()/2-(b.height()-parseInt(b.css("padding-top"))-parseInt(b.css("padding-bottom")))/2)+"px");b.css("left",Math.round(this.width()/2-(b.width()-parseInt(b.css("padding-left"))-parseInt(b.css("padding-right")))/2)+"px");b.show()}};a.fn.unmask=function(b){this.find(".loadmask-msg,.loadmask").remove();this.removeClass("masked");this.removeClass("masked-relative");this.find("select").removeClass("masked-hidden")}})(jQuery);
|
||||
28
f_scripts/fe/js/jquery.min.js
vendored
Normal file
28
f_scripts/fe/js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
f_scripts/fe/js/jquery.password.js
Normal file
2
f_scripts/fe/js/jquery.password.js
Normal file
@@ -0,0 +1,2 @@
|
||||
function getPasswordStrength(pw){var pwlength=(pw.length);if(pwlength>5)pwlength=5;var numnumeric=pw.replace(/[0-9]/g,"");var numeric=(pw.length-numnumeric.length);if(numeric>3)numeric=3;var symbols=pw.replace(/\W/g,"");var numsymbols=(pw.length-symbols.length);if(numsymbols>3)numsymbols=3;var numupper=pw.replace(/[A-Z]/g,"");var upper=(pw.length-numupper.length);if(upper>3)upper=3;var pwstrength=((pwlength*10)-20)+(numeric*10)+(numsymbols*15)+(upper*10);if(pwstrength<0){pwstrength=0}if(pwstrength>100){pwstrength=100}return pwstrength}function updatePasswordStrength_new(pwbox,pwdiv,divorderlist){var bpb=""+pwbox.value;var pwstrength=getPasswordStrength(bpb);var bars=(parseInt(pwstrength/10)*10);var pwdivEl=document.getElementById(pwdiv);if(!pwdivEl){alert('Password Strength Display Element Missing')}var divlist=pwdivEl.getElementsByTagName('div');var maindiv=divlist[0].getElementsByTagName('div');maindiv[0].className='pass_meter_base pass_meter_'+bars;var txtdivnum=1;if(divorderlist&&divorderlist.text>-1){txtdivnum=divorderlist.text}var txtdiv=divlist[txtdivnum];if(txtdiv&&self.pass_strength_phrases){txtdiv.innerHTML=pass_strength_phrases[bars]}}function updatePasswordStrength(pwbox,pwdiv,divorderlist){var bpb=""+pwbox.value;var pwstrength=getPasswordStrength(bpb);var bars=(parseInt(pwstrength/10)*10);var pwdivEl=document.getElementById(pwdiv);if(!pwdivEl){alert('Password Strength Display Element Missing')}var divlist=pwdivEl.getElementsByTagName('div');var imgdivnum=0;var txtdivnum=1;if(divorderlist&&divorderlist.text>-1){txtdivnum=divorderlist.text}if(divorderlist&&divorderlist.image>-1){imgdivnum=divorderlist.image}var imgdiv=divlist[imgdivnum];imgdiv.id='ui-passbar-'+bars;var txtdiv=divlist[txtdivnum];if(txtdiv&&self.pass_strength_phrases){txtdiv.innerHTML=pass_strength_phrases[bars]}}
|
||||
var pass_strength_phrases = { 0: '', 10: '', 20: '', 30: '', 40: '', 50: '', 60: '', 70: '', 80: '', 90: '', 100: '' };
|
||||
692
f_scripts/fe/js/jquery.sortable.js
Normal file
692
f_scripts/fe/js/jquery.sortable.js
Normal file
@@ -0,0 +1,692 @@
|
||||
/* ===================================================
|
||||
* jquery-sortable.js v0.9.13
|
||||
* http://johnny.github.com/jquery-sortable/
|
||||
* ===================================================
|
||||
* Copyright (c) 2012 Jonas von Andrian
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ========================================================== */
|
||||
|
||||
!function ( $, window, pluginName, undefined){
|
||||
var containerDefaults = {
|
||||
// If true, items can be dragged from this container
|
||||
drag: true,
|
||||
// If true, items can be droped onto this container
|
||||
drop: true,
|
||||
// Exclude items from being draggable, if the
|
||||
// selector matches the item
|
||||
exclude: "",
|
||||
// If true, search for nested containers within an item.If you nest containers,
|
||||
// either the original selector with which you call the plugin must only match the top containers,
|
||||
// or you need to specify a group (see the bootstrap nav example)
|
||||
nested: true,
|
||||
// If true, the items are assumed to be arranged vertically
|
||||
vertical: true
|
||||
}, // end container defaults
|
||||
groupDefaults = {
|
||||
// This is executed after the placeholder has been moved.
|
||||
// $closestItemOrContainer contains the closest item, the placeholder
|
||||
// has been put at or the closest empty Container, the placeholder has
|
||||
// been appended to.
|
||||
afterMove: function ($placeholder, container, $closestItemOrContainer) {
|
||||
},
|
||||
// The exact css path between the container and its items, e.g. "> tbody"
|
||||
containerPath: "",
|
||||
// The css selector of the containers
|
||||
containerSelector: "ol, ul",
|
||||
// Distance the mouse has to travel to start dragging
|
||||
distance: 0,
|
||||
// Time in milliseconds after mousedown until dragging should start.
|
||||
// This option can be used to prevent unwanted drags when clicking on an element.
|
||||
delay: 0,
|
||||
// The css selector of the drag handle
|
||||
handle: "",
|
||||
// The exact css path between the item and its subcontainers.
|
||||
// It should only match the immediate items of a container.
|
||||
// No item of a subcontainer should be matched. E.g. for ol>div>li the itemPath is "> div"
|
||||
itemPath: "",
|
||||
// The css selector of the items
|
||||
itemSelector: "li",
|
||||
// The class given to "body" while an item is being dragged
|
||||
bodyClass: "dragging",
|
||||
// The class giving to an item while being dragged
|
||||
draggedClass: "dragged",
|
||||
// Check if the dragged item may be inside the container.
|
||||
// Use with care, since the search for a valid container entails a depth first search
|
||||
// and may be quite expensive.
|
||||
isValidTarget: function ($item, container) {
|
||||
return true
|
||||
},
|
||||
// Executed before onDrop if placeholder is detached.
|
||||
// This happens if pullPlaceholder is set to false and the drop occurs outside a container.
|
||||
onCancel: function ($item, container, _super, event) {
|
||||
},
|
||||
// Executed at the beginning of a mouse move event.
|
||||
// The Placeholder has not been moved yet.
|
||||
onDrag: function ($item, position, _super, event) {
|
||||
$item.css(position)
|
||||
},
|
||||
// Called after the drag has been started,
|
||||
// that is the mouse button is being held down and
|
||||
// the mouse is moving.
|
||||
// The container is the closest initialized container.
|
||||
// Therefore it might not be the container, that actually contains the item.
|
||||
onDragStart: function ($item, container, _super, event) {
|
||||
$item.css({
|
||||
height: $item.outerHeight(),
|
||||
width: $item.outerWidth()
|
||||
})
|
||||
$item.addClass(container.group.options.draggedClass)
|
||||
$("body").addClass(container.group.options.bodyClass)
|
||||
},
|
||||
// Called when the mouse button is being released
|
||||
onDrop: function ($item, container, _super, event) {
|
||||
$item.removeClass(container.group.options.draggedClass).removeAttr("style")
|
||||
$("body").removeClass(container.group.options.bodyClass)
|
||||
},
|
||||
// Called on mousedown. If falsy value is returned, the dragging will not start.
|
||||
// Ignore if element clicked is input, select or textarea
|
||||
onMousedown: function ($item, _super, event) {
|
||||
if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) {
|
||||
event.preventDefault()
|
||||
return true
|
||||
}
|
||||
},
|
||||
// The class of the placeholder (must match placeholder option markup)
|
||||
placeholderClass: "placeholder",
|
||||
// Template for the placeholder. Can be any valid jQuery input
|
||||
// e.g. a string, a DOM element.
|
||||
// The placeholder must have the class "placeholder"
|
||||
placeholder: '<li class="placeholder"></li>',
|
||||
// If true, the position of the placeholder is calculated on every mousemove.
|
||||
// If false, it is only calculated when the mouse is above a container.
|
||||
pullPlaceholder: true,
|
||||
// Specifies serialization of the container group.
|
||||
// The pair $parent/$children is either container/items or item/subcontainers.
|
||||
serialize: function ($parent, $children, parentIsContainer) {
|
||||
var result = $.extend({}, $parent.data())
|
||||
|
||||
if(parentIsContainer)
|
||||
return [$children]
|
||||
else if ($children[0]){
|
||||
result.children = $children
|
||||
}
|
||||
|
||||
delete result.subContainers
|
||||
delete result.sortable
|
||||
|
||||
return result
|
||||
},
|
||||
// Set tolerance while dragging. Positive values decrease sensitivity,
|
||||
// negative values increase it.
|
||||
tolerance: 0
|
||||
}, // end group defaults
|
||||
containerGroups = {},
|
||||
groupCounter = 0,
|
||||
emptyBox = {
|
||||
left: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
right:0
|
||||
},
|
||||
eventNames = {
|
||||
start: "touchstart.sortable mousedown.sortable",
|
||||
drop: "touchend.sortable touchcancel.sortable mouseup.sortable",
|
||||
drag: "touchmove.sortable mousemove.sortable",
|
||||
scroll: "scroll.sortable"
|
||||
},
|
||||
subContainerKey = "subContainers"
|
||||
|
||||
/*
|
||||
* a is Array [left, right, top, bottom]
|
||||
* b is array [left, top]
|
||||
*/
|
||||
function d(a,b) {
|
||||
var x = Math.max(0, a[0] - b[0], b[0] - a[1]),
|
||||
y = Math.max(0, a[2] - b[1], b[1] - a[3])
|
||||
return x+y;
|
||||
}
|
||||
|
||||
function setDimensions(array, dimensions, tolerance, useOffset) {
|
||||
var i = array.length,
|
||||
offsetMethod = useOffset ? "offset" : "position"
|
||||
tolerance = tolerance || 0
|
||||
|
||||
while(i--){
|
||||
var el = array[i].el ? array[i].el : $(array[i]),
|
||||
// use fitting method
|
||||
pos = el[offsetMethod]()
|
||||
pos.left += parseInt(el.css('margin-left'), 10)
|
||||
pos.top += parseInt(el.css('margin-top'),10)
|
||||
dimensions[i] = [
|
||||
pos.left - tolerance,
|
||||
pos.left + el.outerWidth() + tolerance,
|
||||
pos.top - tolerance,
|
||||
pos.top + el.outerHeight() + tolerance
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
function getRelativePosition(pointer, element) {
|
||||
var offset = element.offset()
|
||||
return {
|
||||
left: pointer.left - offset.left,
|
||||
top: pointer.top - offset.top
|
||||
}
|
||||
}
|
||||
|
||||
function sortByDistanceDesc(dimensions, pointer, lastPointer) {
|
||||
pointer = [pointer.left, pointer.top]
|
||||
lastPointer = lastPointer && [lastPointer.left, lastPointer.top]
|
||||
|
||||
var dim,
|
||||
i = dimensions.length,
|
||||
distances = []
|
||||
|
||||
while(i--){
|
||||
dim = dimensions[i]
|
||||
distances[i] = [i,d(dim,pointer), lastPointer && d(dim, lastPointer)]
|
||||
}
|
||||
distances = distances.sort(function (a,b) {
|
||||
return b[1] - a[1] || b[2] - a[2] || b[0] - a[0]
|
||||
})
|
||||
|
||||
// last entry is the closest
|
||||
return distances
|
||||
}
|
||||
|
||||
function ContainerGroup(options) {
|
||||
this.options = $.extend({}, groupDefaults, options)
|
||||
this.containers = []
|
||||
|
||||
if(!this.options.rootGroup){
|
||||
this.scrollProxy = $.proxy(this.scroll, this)
|
||||
this.dragProxy = $.proxy(this.drag, this)
|
||||
this.dropProxy = $.proxy(this.drop, this)
|
||||
this.placeholder = $(this.options.placeholder)
|
||||
|
||||
if(!options.isValidTarget)
|
||||
this.options.isValidTarget = undefined
|
||||
}
|
||||
}
|
||||
|
||||
ContainerGroup.get = function (options) {
|
||||
if(!containerGroups[options.group]) {
|
||||
if(options.group === undefined)
|
||||
options.group = groupCounter ++
|
||||
|
||||
containerGroups[options.group] = new ContainerGroup(options)
|
||||
}
|
||||
|
||||
return containerGroups[options.group]
|
||||
}
|
||||
|
||||
ContainerGroup.prototype = {
|
||||
dragInit: function (e, itemContainer) {
|
||||
this.$document = $(itemContainer.el[0].ownerDocument)
|
||||
|
||||
// get item to drag
|
||||
var closestItem = $(e.target).closest(this.options.itemSelector);
|
||||
// using the length of this item, prevents the plugin from being started if there is no handle being clicked on.
|
||||
// this may also be helpful in instantiating multidrag.
|
||||
if (closestItem.length) {
|
||||
this.item = closestItem;
|
||||
this.itemContainer = itemContainer;
|
||||
if (this.item.is(this.options.exclude) || !this.options.onMousedown(this.item, groupDefaults.onMousedown, e)) {
|
||||
return;
|
||||
}
|
||||
this.setPointer(e);
|
||||
this.toggleListeners('on');
|
||||
this.setupDelayTimer();
|
||||
this.dragInitDone = true;
|
||||
}
|
||||
},
|
||||
drag: function (e) {
|
||||
if(!this.dragging){
|
||||
if(!this.distanceMet(e) || !this.delayMet)
|
||||
return
|
||||
|
||||
this.options.onDragStart(this.item, this.itemContainer, groupDefaults.onDragStart, e)
|
||||
this.item.before(this.placeholder)
|
||||
this.dragging = true
|
||||
}
|
||||
|
||||
this.setPointer(e)
|
||||
// place item under the cursor
|
||||
this.options.onDrag(this.item,
|
||||
getRelativePosition(this.pointer, this.item.offsetParent()),
|
||||
groupDefaults.onDrag,
|
||||
e)
|
||||
|
||||
var p = this.getPointer(e),
|
||||
box = this.sameResultBox,
|
||||
t = this.options.tolerance
|
||||
|
||||
if(!box || box.top - t > p.top || box.bottom + t < p.top || box.left - t > p.left || box.right + t < p.left)
|
||||
if(!this.searchValidTarget()){
|
||||
this.placeholder.detach()
|
||||
this.lastAppendedItem = undefined
|
||||
}
|
||||
},
|
||||
drop: function (e) {
|
||||
this.toggleListeners('off')
|
||||
|
||||
this.dragInitDone = false
|
||||
|
||||
if(this.dragging){
|
||||
// processing Drop, check if placeholder is detached
|
||||
if(this.placeholder.closest("html")[0]){
|
||||
this.placeholder.before(this.item).detach()
|
||||
} else {
|
||||
this.options.onCancel(this.item, this.itemContainer, groupDefaults.onCancel, e)
|
||||
}
|
||||
this.options.onDrop(this.item, this.getContainer(this.item), groupDefaults.onDrop, e)
|
||||
|
||||
// cleanup
|
||||
this.clearDimensions()
|
||||
this.clearOffsetParent()
|
||||
this.lastAppendedItem = this.sameResultBox = undefined
|
||||
this.dragging = false
|
||||
}
|
||||
},
|
||||
searchValidTarget: function (pointer, lastPointer) {
|
||||
if(!pointer){
|
||||
pointer = this.relativePointer || this.pointer
|
||||
lastPointer = this.lastRelativePointer || this.lastPointer
|
||||
}
|
||||
|
||||
var distances = sortByDistanceDesc(this.getContainerDimensions(),
|
||||
pointer,
|
||||
lastPointer),
|
||||
i = distances.length
|
||||
|
||||
while(i--){
|
||||
var index = distances[i][0],
|
||||
distance = distances[i][1]
|
||||
|
||||
if(!distance || this.options.pullPlaceholder){
|
||||
var container = this.containers[index]
|
||||
if(!container.disabled){
|
||||
if(!this.$getOffsetParent()){
|
||||
var offsetParent = container.getItemOffsetParent()
|
||||
pointer = getRelativePosition(pointer, offsetParent)
|
||||
lastPointer = getRelativePosition(lastPointer, offsetParent)
|
||||
}
|
||||
if(container.searchValidTarget(pointer, lastPointer))
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
if(this.sameResultBox)
|
||||
this.sameResultBox = undefined
|
||||
},
|
||||
movePlaceholder: function (container, item, method, sameResultBox) {
|
||||
var lastAppendedItem = this.lastAppendedItem
|
||||
if(!sameResultBox && lastAppendedItem && lastAppendedItem[0] === item[0])
|
||||
return;
|
||||
|
||||
item[method](this.placeholder)
|
||||
this.lastAppendedItem = item
|
||||
this.sameResultBox = sameResultBox
|
||||
this.options.afterMove(this.placeholder, container, item)
|
||||
},
|
||||
getContainerDimensions: function () {
|
||||
if(!this.containerDimensions)
|
||||
setDimensions(this.containers, this.containerDimensions = [], this.options.tolerance, !this.$getOffsetParent())
|
||||
return this.containerDimensions
|
||||
},
|
||||
getContainer: function (element) {
|
||||
return element.closest(this.options.containerSelector).data(pluginName)
|
||||
},
|
||||
$getOffsetParent: function () {
|
||||
if(this.offsetParent === undefined){
|
||||
var i = this.containers.length - 1,
|
||||
offsetParent = this.containers[i].getItemOffsetParent()
|
||||
|
||||
if(!this.options.rootGroup){
|
||||
while(i--){
|
||||
if(offsetParent[0] != this.containers[i].getItemOffsetParent()[0]){
|
||||
// If every container has the same offset parent,
|
||||
// use position() which is relative to this parent,
|
||||
// otherwise use offset()
|
||||
// compare #setDimensions
|
||||
offsetParent = false
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.offsetParent = offsetParent
|
||||
}
|
||||
return this.offsetParent
|
||||
},
|
||||
setPointer: function (e) {
|
||||
var pointer = this.getPointer(e)
|
||||
|
||||
if(this.$getOffsetParent()){
|
||||
var relativePointer = getRelativePosition(pointer, this.$getOffsetParent())
|
||||
this.lastRelativePointer = this.relativePointer
|
||||
this.relativePointer = relativePointer
|
||||
}
|
||||
|
||||
this.lastPointer = this.pointer
|
||||
this.pointer = pointer
|
||||
},
|
||||
distanceMet: function (e) {
|
||||
var currentPointer = this.getPointer(e)
|
||||
return (Math.max(
|
||||
Math.abs(this.pointer.left - currentPointer.left),
|
||||
Math.abs(this.pointer.top - currentPointer.top)
|
||||
) >= this.options.distance)
|
||||
},
|
||||
getPointer: function(e) {
|
||||
var o = e.originalEvent || e.originalEvent.touches && e.originalEvent.touches[0]
|
||||
return {
|
||||
left: e.pageX || o.pageX,
|
||||
top: e.pageY || o.pageY
|
||||
}
|
||||
},
|
||||
setupDelayTimer: function () {
|
||||
var that = this
|
||||
this.delayMet = !this.options.delay
|
||||
|
||||
// init delay timer if needed
|
||||
if (!this.delayMet) {
|
||||
clearTimeout(this._mouseDelayTimer);
|
||||
this._mouseDelayTimer = setTimeout(function() {
|
||||
that.delayMet = true
|
||||
}, this.options.delay)
|
||||
}
|
||||
},
|
||||
scroll: function (e) {
|
||||
this.clearDimensions()
|
||||
this.clearOffsetParent() // TODO is this needed?
|
||||
},
|
||||
toggleListeners: function (method) {
|
||||
var that = this,
|
||||
events = ['drag','drop','scroll']
|
||||
|
||||
$.each(events,function (i,event) {
|
||||
that.$document[method](eventNames[event], that[event + 'Proxy'])
|
||||
})
|
||||
},
|
||||
clearOffsetParent: function () {
|
||||
this.offsetParent = undefined
|
||||
},
|
||||
// Recursively clear container and item dimensions
|
||||
clearDimensions: function () {
|
||||
this.traverse(function(object){
|
||||
object._clearDimensions()
|
||||
})
|
||||
},
|
||||
traverse: function(callback) {
|
||||
callback(this)
|
||||
var i = this.containers.length
|
||||
while(i--){
|
||||
this.containers[i].traverse(callback)
|
||||
}
|
||||
},
|
||||
_clearDimensions: function(){
|
||||
this.containerDimensions = undefined
|
||||
},
|
||||
_destroy: function () {
|
||||
containerGroups[this.options.group] = undefined
|
||||
}
|
||||
}
|
||||
|
||||
function Container(element, options) {
|
||||
this.el = element
|
||||
this.options = $.extend( {}, containerDefaults, options)
|
||||
|
||||
this.group = ContainerGroup.get(this.options)
|
||||
this.rootGroup = this.options.rootGroup || this.group
|
||||
this.handle = this.rootGroup.options.handle || this.rootGroup.options.itemSelector
|
||||
|
||||
var itemPath = this.rootGroup.options.itemPath
|
||||
this.target = itemPath ? this.el.find(itemPath) : this.el
|
||||
|
||||
this.target.on(eventNames.start, this.handle, $.proxy(this.dragInit, this))
|
||||
|
||||
if(this.options.drop)
|
||||
this.group.containers.push(this)
|
||||
}
|
||||
|
||||
Container.prototype = {
|
||||
dragInit: function (e) {
|
||||
var rootGroup = this.rootGroup
|
||||
|
||||
if( !this.disabled &&
|
||||
!rootGroup.dragInitDone &&
|
||||
this.options.drag &&
|
||||
this.isValidDrag(e)) {
|
||||
rootGroup.dragInit(e, this)
|
||||
}
|
||||
},
|
||||
isValidDrag: function(e) {
|
||||
return e.which == 1 ||
|
||||
e.type == "touchstart" && e.originalEvent.touches.length == 1
|
||||
},
|
||||
searchValidTarget: function (pointer, lastPointer) {
|
||||
var distances = sortByDistanceDesc(this.getItemDimensions(),
|
||||
pointer,
|
||||
lastPointer),
|
||||
i = distances.length,
|
||||
rootGroup = this.rootGroup,
|
||||
validTarget = !rootGroup.options.isValidTarget ||
|
||||
rootGroup.options.isValidTarget(rootGroup.item, this)
|
||||
|
||||
if(!i && validTarget){
|
||||
rootGroup.movePlaceholder(this, this.target, "append")
|
||||
return true
|
||||
} else
|
||||
while(i--){
|
||||
var index = distances[i][0],
|
||||
distance = distances[i][1]
|
||||
if(!distance && this.hasChildGroup(index)){
|
||||
var found = this.getContainerGroup(index).searchValidTarget(pointer, lastPointer)
|
||||
if(found)
|
||||
return true
|
||||
}
|
||||
else if(validTarget){
|
||||
this.movePlaceholder(index, pointer)
|
||||
return true
|
||||
}
|
||||
}
|
||||
},
|
||||
movePlaceholder: function (index, pointer) {
|
||||
var item = $(this.items[index]),
|
||||
dim = this.itemDimensions[index],
|
||||
method = "after",
|
||||
width = item.outerWidth(),
|
||||
height = item.outerHeight(),
|
||||
offset = item.offset(),
|
||||
sameResultBox = {
|
||||
left: offset.left,
|
||||
right: offset.left + width,
|
||||
top: offset.top,
|
||||
bottom: offset.top + height
|
||||
}
|
||||
if(this.options.vertical){
|
||||
var yCenter = (dim[2] + dim[3]) / 2,
|
||||
inUpperHalf = pointer.top <= yCenter
|
||||
if(inUpperHalf){
|
||||
method = "before"
|
||||
sameResultBox.bottom -= height / 2
|
||||
} else
|
||||
sameResultBox.top += height / 2
|
||||
} else {
|
||||
var xCenter = (dim[0] + dim[1]) / 2,
|
||||
inLeftHalf = pointer.left <= xCenter
|
||||
if(inLeftHalf){
|
||||
method = "before"
|
||||
sameResultBox.right -= width / 2
|
||||
} else
|
||||
sameResultBox.left += width / 2
|
||||
}
|
||||
if(this.hasChildGroup(index))
|
||||
sameResultBox = emptyBox
|
||||
this.rootGroup.movePlaceholder(this, item, method, sameResultBox)
|
||||
},
|
||||
getItemDimensions: function () {
|
||||
if(!this.itemDimensions){
|
||||
this.items = this.$getChildren(this.el, "item").filter(
|
||||
":not(." + this.group.options.placeholderClass + ", ." + this.group.options.draggedClass + ")"
|
||||
).get()
|
||||
setDimensions(this.items, this.itemDimensions = [], this.options.tolerance)
|
||||
}
|
||||
return this.itemDimensions
|
||||
},
|
||||
getItemOffsetParent: function () {
|
||||
var offsetParent,
|
||||
el = this.el
|
||||
// Since el might be empty we have to check el itself and
|
||||
// can not do something like el.children().first().offsetParent()
|
||||
if(el.css("position") === "relative" || el.css("position") === "absolute" || el.css("position") === "fixed")
|
||||
offsetParent = el
|
||||
else
|
||||
offsetParent = el.offsetParent()
|
||||
return offsetParent
|
||||
},
|
||||
hasChildGroup: function (index) {
|
||||
return this.options.nested && this.getContainerGroup(index)
|
||||
},
|
||||
getContainerGroup: function (index) {
|
||||
var childGroup = $.data(this.items[index], subContainerKey)
|
||||
if( childGroup === undefined){
|
||||
var childContainers = this.$getChildren(this.items[index], "container")
|
||||
childGroup = false
|
||||
|
||||
if(childContainers[0]){
|
||||
var options = $.extend({}, this.options, {
|
||||
rootGroup: this.rootGroup,
|
||||
group: groupCounter ++
|
||||
})
|
||||
childGroup = childContainers[pluginName](options).data(pluginName).group
|
||||
}
|
||||
$.data(this.items[index], subContainerKey, childGroup)
|
||||
}
|
||||
return childGroup
|
||||
},
|
||||
$getChildren: function (parent, type) {
|
||||
var options = this.rootGroup.options,
|
||||
path = options[type + "Path"],
|
||||
selector = options[type + "Selector"]
|
||||
|
||||
parent = $(parent)
|
||||
if(path)
|
||||
parent = parent.find(path)
|
||||
|
||||
return parent.children(selector)
|
||||
},
|
||||
_serialize: function (parent, isContainer) {
|
||||
var that = this,
|
||||
childType = isContainer ? "item" : "container",
|
||||
|
||||
children = this.$getChildren(parent, childType).not(this.options.exclude).map(function () {
|
||||
return that._serialize($(this), !isContainer)
|
||||
}).get()
|
||||
|
||||
return this.rootGroup.options.serialize(parent, children, isContainer)
|
||||
},
|
||||
traverse: function(callback) {
|
||||
$.each(this.items || [], function(item){
|
||||
var group = $.data(this, subContainerKey)
|
||||
if(group)
|
||||
group.traverse(callback)
|
||||
});
|
||||
|
||||
callback(this)
|
||||
},
|
||||
_clearDimensions: function () {
|
||||
this.itemDimensions = undefined
|
||||
},
|
||||
_destroy: function() {
|
||||
var that = this;
|
||||
|
||||
this.target.off(eventNames.start, this.handle);
|
||||
this.el.removeData(pluginName)
|
||||
|
||||
if(this.options.drop)
|
||||
this.group.containers = $.grep(this.group.containers, function(val){
|
||||
return val != that
|
||||
})
|
||||
|
||||
$.each(this.items || [], function(){
|
||||
$.removeData(this, subContainerKey)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var API = {
|
||||
enable: function() {
|
||||
this.traverse(function(object){
|
||||
object.disabled = false
|
||||
})
|
||||
},
|
||||
disable: function (){
|
||||
this.traverse(function(object){
|
||||
object.disabled = true
|
||||
})
|
||||
},
|
||||
serialize: function () {
|
||||
return this._serialize(this.el, true)
|
||||
},
|
||||
refresh: function() {
|
||||
this.traverse(function(object){
|
||||
object._clearDimensions()
|
||||
})
|
||||
},
|
||||
destroy: function () {
|
||||
this.traverse(function(object){
|
||||
object._destroy();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(Container.prototype, API)
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
*
|
||||
* Parameters are
|
||||
* either options on init
|
||||
* or a method name followed by arguments to pass to the method
|
||||
*/
|
||||
$.fn[pluginName] = function(methodOrOptions) {
|
||||
var args = Array.prototype.slice.call(arguments, 1)
|
||||
|
||||
return this.map(function(){
|
||||
var $t = $(this),
|
||||
object = $t.data(pluginName)
|
||||
|
||||
if(object && API[methodOrOptions])
|
||||
return API[methodOrOptions].apply(object, args) || this
|
||||
else if(!object && (methodOrOptions === undefined ||
|
||||
typeof methodOrOptions === "object"))
|
||||
$t.data(pluginName, new Container($t, methodOrOptions))
|
||||
|
||||
return this
|
||||
});
|
||||
};
|
||||
|
||||
}(jQuery, window, 'sortable');
|
||||
98
f_scripts/fe/js/jquery.truncator.js
Normal file
98
f_scripts/fe/js/jquery.truncator.js
Normal file
@@ -0,0 +1,98 @@
|
||||
// HTML Truncator for jQuery
|
||||
// by Henrik Nyh <http://henrik.nyh.se> 2008-02-28.
|
||||
// Free to modify and redistribute with credit.
|
||||
|
||||
(function($) {
|
||||
|
||||
var trailing_whitespace = true;
|
||||
|
||||
$.fn.truncate = function(options) {
|
||||
|
||||
var opts = $.extend({}, $.fn.truncate.defaults, options);
|
||||
|
||||
$(this).each(function() {
|
||||
|
||||
var content_length = $.trim(squeeze($(this).text())).length;
|
||||
if (content_length <= opts.max_length)
|
||||
return; // bail early if not overlong
|
||||
|
||||
var actual_max_length = opts.max_length - opts.more.length - 3; // 3 for " ()"
|
||||
var truncated_node = recursivelyTruncate(this, actual_max_length);
|
||||
var full_node = $(this).hide();
|
||||
|
||||
truncated_node.insertAfter(full_node);
|
||||
|
||||
findNodeForMore(truncated_node).append(' <a href="#show more content">'+opts.more+'</a>...');
|
||||
findNodeForLess(full_node).append(' <a href="#show less content">'+opts.less+'</a>...');
|
||||
|
||||
truncated_node.find('a:last').click(function() {
|
||||
truncated_node.hide(); full_node.show(); return false;
|
||||
});
|
||||
full_node.find('a:last').click(function() {
|
||||
truncated_node.show(); full_node.hide(); return false;
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// Note that the " (…more)" bit counts towards the max length – so a max
|
||||
// length of 10 would truncate "1234567890" to "12 (…more)".
|
||||
$.fn.truncate.defaults = {
|
||||
max_length: 100,
|
||||
more: '…more',
|
||||
less: 'less'
|
||||
};
|
||||
|
||||
function recursivelyTruncate(node, max_length) {
|
||||
return (node.nodeType == 3) ? truncateText(node, max_length) : truncateNode(node, max_length);
|
||||
}
|
||||
|
||||
function truncateNode(node, max_length) {
|
||||
var node = $(node);
|
||||
var new_node = node.clone().empty();
|
||||
var truncatedChild;
|
||||
node.contents().each(function() {
|
||||
var remaining_length = max_length - new_node.text().length;
|
||||
if (remaining_length == 0) return; // breaks the loop
|
||||
truncatedChild = recursivelyTruncate(this, remaining_length);
|
||||
if (truncatedChild) new_node.append(truncatedChild);
|
||||
});
|
||||
return new_node;
|
||||
}
|
||||
|
||||
function truncateText(node, max_length) {
|
||||
var text = squeeze(node.data);
|
||||
if (trailing_whitespace) // remove initial whitespace if last text
|
||||
text = text.replace(/^ /, ''); // node had trailing whitespace.
|
||||
trailing_whitespace = !!text.match(/ $/);
|
||||
var text = text.slice(0, max_length);
|
||||
// Ensure HTML entities are encoded
|
||||
// http://debuggable.com/posts/encode-html-entities-with-jquery:480f4dd6-13cc-4ce9-8071-4710cbdd56cb
|
||||
text = $('<div/>').text(text).html();
|
||||
return text;
|
||||
}
|
||||
|
||||
// Collapses a sequence of whitespace into a single space.
|
||||
function squeeze(string) {
|
||||
return string.replace(/\s+/g, ' ');
|
||||
}
|
||||
|
||||
// Finds the last, innermost block-level element
|
||||
function findNodeForMore(node) {
|
||||
var $node = $(node);
|
||||
var last_child = $node.children(":last");
|
||||
if (!last_child) return node;
|
||||
var display = last_child.css('display');
|
||||
if (!display || display=='inline') return $node;
|
||||
return findNodeForMore(last_child);
|
||||
};
|
||||
|
||||
// Finds the last child if it's a p; otherwise the parent
|
||||
function findNodeForLess(node) {
|
||||
var $node = $(node);
|
||||
var last_child = $node.children(":last");
|
||||
if (last_child && last_child.is('p')) return last_child;
|
||||
return node;
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
343
f_scripts/fe/js/jquery.tweet.js
Normal file
343
f_scripts/fe/js/jquery.tweet.js
Normal file
@@ -0,0 +1,343 @@
|
||||
// jquery.tweet.js - See http://tweet.seaofclouds.com/ or https://github.com/seaofclouds/tweet for more info
|
||||
// Copyright (c) 2008-2012 Todd Matthews & Steve Purcell
|
||||
// Modified by Stan Scates for https://github.com/StanScates/Tweet.js-Mod
|
||||
jQuery(function($){
|
||||
$("#ticker").tweet({
|
||||
modpath: '/f_modules/m_frontend/m_tweets/',
|
||||
username: tw,
|
||||
page: 1,
|
||||
avatar_size: 16,
|
||||
count: 10,
|
||||
loading_text: "..."
|
||||
})
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
var ul = $(this).find(".tweet_list");
|
||||
ul.find('.tweet_text').truncate({
|
||||
max_length: 200,
|
||||
more: '',
|
||||
less: ''
|
||||
});
|
||||
|
||||
var ticker = function () {
|
||||
setTimeout(function () {
|
||||
ul.find('li:first').animate({
|
||||
marginTop: '-4em'
|
||||
}, 500, function () {
|
||||
$(this).detach().appendTo(ul).removeAttr('style');
|
||||
});
|
||||
ticker();
|
||||
}, 10000); // duration before next tick (4000 = 4 secs)
|
||||
};
|
||||
ticker();
|
||||
});
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd)
|
||||
define(['jquery'], factory); // AMD support for RequireJS etc.
|
||||
else
|
||||
factory(jQuery);
|
||||
}(function ($) {
|
||||
$.fn.tweet = function(o){
|
||||
var s = $.extend({
|
||||
modpath: "/twitter/", // [string] relative URL to Tweet.js mod (see https://github.com/StanScates/Tweet.js-Mod)
|
||||
username: null, // [string or array] required unless using the 'query' option; one or more twitter screen names (use 'list' option for multiple names, where possible)
|
||||
list_id: null, // [integer] ID of list to fetch when using list functionality
|
||||
list: null, // [string] optional slug of list belonging to username
|
||||
favorites: false, // [boolean] display the user's favorites instead of his tweets
|
||||
query: null, // [string] optional search query (see also: http://search.twitter.com/operators)
|
||||
avatar_size: null, // [integer] height and width of avatar if displayed (48px max)
|
||||
count: 3, // [integer] how many tweets to display?
|
||||
fetch: null, // [integer] how many tweets to fetch via the API (set this higher than 'count' if using the 'filter' option)
|
||||
page: 1, // [integer] which page of results to fetch (if count != fetch, you'll get unexpected results)
|
||||
retweets: true, // [boolean] whether to fetch (official) retweets (not supported in all display modes)
|
||||
intro_text: null, // [string] do you want text BEFORE your your tweets?
|
||||
outro_text: null, // [string] do you want text AFTER your tweets?
|
||||
join_text: null, // [string] optional text in between date and tweet, try setting to "auto"
|
||||
auto_join_text_default: "i said,", // [string] auto text for non verb: "i said" bullocks
|
||||
auto_join_text_ed: "i", // [string] auto text for past tense: "i" surfed
|
||||
auto_join_text_ing: "i am", // [string] auto tense for present tense: "i was" surfing
|
||||
auto_join_text_reply: "i replied to", // [string] auto tense for replies: "i replied to" @someone "with"
|
||||
auto_join_text_url: "i was looking at", // [string] auto tense for urls: "i was looking at" http:...
|
||||
loading_text: null, // [string] optional loading text, displayed while tweets load
|
||||
refresh_interval: null , // [integer] optional number of seconds after which to reload tweets
|
||||
twitter_url: "twitter.com", // [string] custom twitter url, if any (apigee, etc.)
|
||||
twitter_api_url: "api.twitter.com", // [string] custom twitter api url, if any (apigee, etc.)
|
||||
twitter_search_url: "search.twitter.com", // [string] custom twitter search url, if any (apigee, etc.)
|
||||
template: "{avatar}{time}{join}{text}", // [string or function] template used to construct each tweet <li> - see code for available vars
|
||||
comparator: function(tweet1, tweet2) { // [function] comparator used to sort tweets (see Array.sort)
|
||||
return tweet2["tweet_time"] - tweet1["tweet_time"];
|
||||
},
|
||||
filter: function(tweet) { // [function] whether or not to include a particular tweet (be sure to also set 'fetch')
|
||||
return true;
|
||||
}
|
||||
// You can attach callbacks to the following events using jQuery's standard .bind() mechanism:
|
||||
// "loaded" -- triggered when tweets have been fetched and rendered
|
||||
}, o);
|
||||
|
||||
// See http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
||||
var url_regexp = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi;
|
||||
|
||||
// Expand values inside simple string templates with {placeholders}
|
||||
function t(template, info) {
|
||||
if (typeof template === "string") {
|
||||
var result = template;
|
||||
for(var key in info) {
|
||||
var val = info[key];
|
||||
result = result.replace(new RegExp('{'+key+'}','g'), val === null ? '' : val);
|
||||
}
|
||||
return result;
|
||||
} else return template(info);
|
||||
}
|
||||
// Export the t function for use when passing a function as the 'template' option
|
||||
$.extend({tweet: {t: t}});
|
||||
|
||||
function replacer (regex, replacement) {
|
||||
return function() {
|
||||
var returning = [];
|
||||
this.each(function() {
|
||||
returning.push(this.replace(regex, replacement));
|
||||
});
|
||||
return $(returning);
|
||||
};
|
||||
}
|
||||
|
||||
function escapeHTML(s) {
|
||||
return s.replace(/</g,"<").replace(/>/g,"^>");
|
||||
}
|
||||
|
||||
$.fn.extend({
|
||||
linkUser: replacer(/(^|[\W])@(\w+)/gi, "$1<span class=\"at\">@</span><a href=\"http://"+s.twitter_url+"/$2\">$2</a>"),
|
||||
// Support various latin1 (\u00**) and arabic (\u06**) alphanumeric chars
|
||||
linkHash: replacer(/(?:^| )[\#]+([\w\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff\u0600-\u06ff]+)/gi,
|
||||
' <a href="http://'+s.twitter_search_url+'/search?q=&tag=$1&lang=all'+((s.username && s.username.length == 1 && !s.list) ? '&from='+s.username.join("%2BOR%2B") : '')+'" class="tweet_hashtag">#$1</a>'),
|
||||
makeHeart: replacer(/(<)+[3]/gi, "<tt class='heart'>♥</tt>")
|
||||
});
|
||||
|
||||
function linkURLs(text, entities) {
|
||||
return text.replace(url_regexp, function(match) {
|
||||
var url = (/^[a-z]+:/i).test(match) ? match : "http://"+match;
|
||||
var text = match;
|
||||
for(var i = 0; i < entities.length; ++i) {
|
||||
var entity = entities[i];
|
||||
if (entity.url == url && entity.expanded_url) {
|
||||
url = entity.expanded_url;
|
||||
text = entity.display_url;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "<a href=\""+escapeHTML(url)+"\">"+escapeHTML(text)+"</a>";
|
||||
});
|
||||
}
|
||||
|
||||
function parse_date(date_str) {
|
||||
// The non-search twitter APIs return inconsistently-formatted dates, which Date.parse
|
||||
// cannot handle in IE. We therefore perform the following transformation:
|
||||
// "Wed Apr 29 08:53:31 +0000 2009" => "Wed, Apr 29 2009 08:53:31 +0000"
|
||||
return Date.parse(date_str.replace(/^([a-z]{3})( [a-z]{3} \d\d?)(.*)( \d{4})$/i, '$1,$2$4$3'));
|
||||
}
|
||||
|
||||
function relative_time(date) {
|
||||
var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
|
||||
var delta = parseInt((relative_to.getTime() - date) / 1000, 10);
|
||||
var r = '';
|
||||
if (delta < 1) {
|
||||
r = 'just now';
|
||||
} else if (delta < 60) {
|
||||
r = delta + ' seconds ago';
|
||||
} else if(delta < 120) {
|
||||
r = 'about a minute ago';
|
||||
} else if(delta < (45*60)) {
|
||||
r = 'about ' + (parseInt(delta / 60, 10)).toString() + ' minutes ago';
|
||||
} else if(delta < (2*60*60)) {
|
||||
r = 'about an hour ago';
|
||||
} else if(delta < (24*60*60)) {
|
||||
r = 'about ' + (parseInt(delta / 3600, 10)).toString() + ' hours ago';
|
||||
} else if(delta < (48*60*60)) {
|
||||
r = 'about a day ago';
|
||||
} else {
|
||||
r = 'about ' + (parseInt(delta / 86400, 10)).toString() + ' days ago';
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
function build_auto_join_text(text) {
|
||||
if (text.match(/^(@([A-Za-z0-9-_]+)) .*/i)) {
|
||||
return s.auto_join_text_reply;
|
||||
} else if (text.match(url_regexp)) {
|
||||
return s.auto_join_text_url;
|
||||
} else if (text.match(/^((\w+ed)|just) .*/im)) {
|
||||
return s.auto_join_text_ed;
|
||||
} else if (text.match(/^(\w*ing) .*/i)) {
|
||||
return s.auto_join_text_ing;
|
||||
} else {
|
||||
return s.auto_join_text_default;
|
||||
}
|
||||
}
|
||||
|
||||
function build_api_request() {
|
||||
var modpath = s.modpath,
|
||||
count = (s.fetch === null) ? s.count : s.fetch,
|
||||
defaults = {
|
||||
include_entities: 1
|
||||
};
|
||||
|
||||
if (s.list) {
|
||||
return {
|
||||
host: s.twitter_api_url,
|
||||
url: "/1.1/lists/statuses.json",
|
||||
parameters: $.extend({}, defaults, {
|
||||
list_id: s.list_id,
|
||||
slug: s.list,
|
||||
owner_screen_name: s.username,
|
||||
page: s.page,
|
||||
count: count,
|
||||
include_rts: (s.retweets ? 1 : 0)
|
||||
})
|
||||
};
|
||||
} else if (s.favorites) {
|
||||
return {
|
||||
host: s.twitter_api_url,
|
||||
url: "/1.1/favorites/list.json",
|
||||
parameters: $.extend({}, defaults, {
|
||||
list_id: s.list_id,
|
||||
screen_name: s.username,
|
||||
page: s.page,
|
||||
count: count
|
||||
})
|
||||
};
|
||||
} else if (s.query === null && s.username.length === 1) {
|
||||
return {
|
||||
host: s.twitter_api_url,
|
||||
url: "/1.1/statuses/user_timeline.json",
|
||||
parameters: $.extend({}, defaults, {
|
||||
screen_name: s.username,
|
||||
page: s.page,
|
||||
count: count,
|
||||
include_rts: (s.retweets ? 1 : 0)
|
||||
})
|
||||
};
|
||||
} else {
|
||||
var query = (s.query || 'from:'+s.username.join(' OR from:'));
|
||||
return {
|
||||
host: s.twitter_search_url,
|
||||
url: "/search.json",
|
||||
parameters: $.extend({}, defaults, {
|
||||
page: s.page,
|
||||
q: query,
|
||||
rpp: count
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function extract_avatar_url(item, secure) {
|
||||
if (secure) {
|
||||
return ('user' in item) ?
|
||||
item.user.profile_image_url_https :
|
||||
extract_avatar_url(item, false).
|
||||
replace(/^http:\/\/[a-z0-9]{1,3}\.twimg\.com\//, "https://s3.amazonaws.com/twitter_production/");
|
||||
} else {
|
||||
return item.profile_image_url || item.user.profile_image_url;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert twitter API objects into data available for
|
||||
// constructing each tweet <li> using a template
|
||||
function extract_template_data(item) {
|
||||
var o = {};
|
||||
o.item = item;
|
||||
o.source = item.source;
|
||||
// The actual user name is not returned by all Twitter APIs, so please do not file an issue if it is empty.
|
||||
o.name = item.from_user_name || item.user.name;
|
||||
o.screen_name = item.from_user || item.user.screen_name;
|
||||
o.avatar_size = s.avatar_size;
|
||||
o.avatar_url = extract_avatar_url(item, (document.location.protocol === 'https:'));
|
||||
o.retweet = typeof(item.retweeted_status) != 'undefined';
|
||||
o.tweet_time = parse_date(item.created_at);
|
||||
o.join_text = s.join_text == "auto" ? build_auto_join_text(item.text) : s.join_text;
|
||||
o.tweet_id = item.id_str;
|
||||
o.twitter_base = "http://"+s.twitter_url+"/";
|
||||
o.user_url = o.twitter_base+o.screen_name;
|
||||
o.tweet_url = o.user_url+"/status/"+o.tweet_id;
|
||||
o.reply_url = o.twitter_base+"intent/tweet?in_reply_to="+o.tweet_id;
|
||||
o.retweet_url = o.twitter_base+"intent/retweet?tweet_id="+o.tweet_id;
|
||||
o.favorite_url = o.twitter_base+"intent/favorite?tweet_id="+o.tweet_id;
|
||||
o.retweeted_screen_name = o.retweet && item.retweeted_status.user.screen_name;
|
||||
o.tweet_relative_time = relative_time(o.tweet_time);
|
||||
o.entities = item.entities ? (item.entities.urls || []).concat(item.entities.media || []) : [];
|
||||
o.tweet_raw_text = o.retweet ? ('RT @'+o.retweeted_screen_name+' '+item.retweeted_status.text) : item.text; // avoid '...' in long retweets
|
||||
o.tweet_text = $([linkURLs(o.tweet_raw_text, o.entities)]).linkUser().linkHash()[0];
|
||||
o.tweet_text_fancy = $([o.tweet_text]).makeHeart()[0];
|
||||
|
||||
// Default spans, and pre-formatted blocks for common layouts
|
||||
o.user = t('<a class="tweet_user" href="{user_url}">{screen_name}</a>', o);
|
||||
o.join = s.join_text ? t(' <span class="tweet_join">{join_text}</span> ', o) : ' ';
|
||||
o.avatar = o.avatar_size ?
|
||||
t('<a class="tweet_avatar" href="{user_url}"><img src="{avatar_url}" height="{avatar_size}" width="{avatar_size}" alt="{screen_name}\'s avatar" title="{screen_name}\'s avatar" border="0"/></a>', o) : '';
|
||||
o.time = t('<span class="tweet_time"><a href="{tweet_url}" title="view tweet on twitter">{tweet_relative_time}</a></span>', o);
|
||||
o.text = t('<span class="tweet_text">{tweet_text_fancy}</span>', o);
|
||||
o.reply_action = t('<a class="tweet_action tweet_reply" href="{reply_url}">reply</a>', o);
|
||||
o.retweet_action = t('<a class="tweet_action tweet_retweet" href="{retweet_url}">retweet</a>', o);
|
||||
o.favorite_action = t('<a class="tweet_action tweet_favorite" href="{favorite_url}">favorite</a>', o);
|
||||
return o;
|
||||
}
|
||||
|
||||
return this.each(function(i, widget){
|
||||
var list = $('<ul class="tweet_list">');
|
||||
var intro = '<p class="tweet_intro">'+s.intro_text+'</p>';
|
||||
var outro = '<p class="tweet_outro">'+s.outro_text+'</p>';
|
||||
var loading = $('<p class="loading">'+s.loading_text+'</p>');
|
||||
|
||||
if(s.username && typeof(s.username) == "string"){
|
||||
s.username = [s.username];
|
||||
}
|
||||
|
||||
$(widget).unbind("tweet:load").bind("tweet:load", function(){
|
||||
if (s.loading_text) $(widget).empty().append(loading);
|
||||
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
type: "post",
|
||||
async: false,
|
||||
url: s.modpath || "/twitter/",
|
||||
data: { request: build_api_request() },
|
||||
success: function(data, status) {
|
||||
|
||||
if(data.message) {
|
||||
console.log(data.message);
|
||||
}
|
||||
|
||||
var response = data.response;
|
||||
$(widget).empty().append(list);
|
||||
if (s.intro_text) list.before(intro);
|
||||
list.empty();
|
||||
|
||||
if(response.statuses !== undefined) {
|
||||
resp = response.statuses;
|
||||
} else if(response.results !== undefined) {
|
||||
resp = response.results;
|
||||
} else {
|
||||
resp = response;
|
||||
}
|
||||
|
||||
var tweets = $.map(resp, extract_template_data);
|
||||
tweets = $.grep(tweets, s.filter).sort(s.comparator).slice(0, s.count);
|
||||
|
||||
list.append($.map(tweets, function(o) { return "<li>" + t(s.template, o) + "</li>"; }).join('')).
|
||||
children('li:first').addClass('tweet_first').end().
|
||||
children('li:odd').addClass('tweet_even').end().
|
||||
children('li:even').addClass('tweet_odd');
|
||||
|
||||
if (s.outro_text) list.after(outro);
|
||||
$(widget).trigger("loaded").trigger((tweets ? "empty" : "full"));
|
||||
if (s.refresh_interval) {
|
||||
window.setTimeout(function() { $(widget).trigger("tweet:load"); }, 1000 * s.refresh_interval);
|
||||
}
|
||||
}
|
||||
});
|
||||
}).trigger("tweet:load");
|
||||
});
|
||||
};
|
||||
}));
|
||||
79
f_scripts/fe/js/loadCSS.js
Normal file
79
f_scripts/fe/js/loadCSS.js
Normal file
@@ -0,0 +1,79 @@
|
||||
/*! loadCSS: load a CSS file asynchronously. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */
|
||||
(function(w){
|
||||
"use strict";
|
||||
/* exported loadCSS */
|
||||
var loadCSS = function( href, before, media ){
|
||||
// Arguments explained:
|
||||
// `href` [REQUIRED] is the URL for your CSS file.
|
||||
// `before` [OPTIONAL] is the element the script should use as a reference for injecting our stylesheet <link> before
|
||||
// By default, loadCSS attempts to inject the link after the last stylesheet or script in the DOM. However, you might desire a more specific location in your document.
|
||||
// `media` [OPTIONAL] is the media type or query of the stylesheet. By default it will be 'all'
|
||||
var doc = w.document;
|
||||
var ss = doc.createElement( "link" );
|
||||
var ref;
|
||||
if( before ){
|
||||
ref = before;
|
||||
}
|
||||
else {
|
||||
var refs = ( doc.body || doc.getElementsByTagName( "head" )[ 0 ] ).childNodes;
|
||||
ref = refs[ refs.length - 1];
|
||||
}
|
||||
|
||||
var sheets = doc.styleSheets;
|
||||
ss.rel = "stylesheet";
|
||||
ss.href = href;
|
||||
// temporarily set media to something inapplicable to ensure it'll fetch without blocking render
|
||||
ss.media = "only x";
|
||||
|
||||
// wait until body is defined before injecting link. This ensures a non-blocking load in IE11.
|
||||
function ready( cb ){
|
||||
if( doc.body ){
|
||||
return cb();
|
||||
}
|
||||
setTimeout(function(){
|
||||
ready( cb );
|
||||
});
|
||||
}
|
||||
// Inject link
|
||||
// Note: the ternary preserves the existing behavior of "before" argument, but we could choose to change the argument to "after" in a later release and standardize on ref.nextSibling for all refs
|
||||
// Note: `insertBefore` is used instead of `appendChild`, for safety re: http://www.paulirish.com/2011/surefire-dom-element-insertion/
|
||||
ready( function(){
|
||||
ref.parentNode.insertBefore( ss, ( before ? ref : ref.nextSibling ) );
|
||||
});
|
||||
// A method (exposed on return object for external use) that mimics onload by polling document.styleSheets until it includes the new sheet.
|
||||
var onloadcssdefined = function( cb ){
|
||||
var resolvedHref = ss.href;
|
||||
var i = sheets.length;
|
||||
while( i-- ){
|
||||
if( sheets[ i ].href === resolvedHref ){
|
||||
return cb();
|
||||
}
|
||||
}
|
||||
setTimeout(function() {
|
||||
onloadcssdefined( cb );
|
||||
});
|
||||
};
|
||||
|
||||
function loadCB(){
|
||||
if( ss.addEventListener ){
|
||||
ss.removeEventListener( "load", loadCB );
|
||||
}
|
||||
ss.media = media || "all";
|
||||
}
|
||||
|
||||
// once loaded, set link's media back to `all` so that the stylesheet applies once it loads
|
||||
if( ss.addEventListener ){
|
||||
ss.addEventListener( "load", loadCB);
|
||||
}
|
||||
ss.onloadcssdefined = onloadcssdefined;
|
||||
onloadcssdefined( loadCB );
|
||||
return ss;
|
||||
};
|
||||
// commonjs
|
||||
if( typeof exports !== "undefined" ){
|
||||
exports.loadCSS = loadCSS;
|
||||
}
|
||||
else {
|
||||
w.loadCSS = loadCSS;
|
||||
}
|
||||
}( typeof global !== "undefined" ? global : this ));
|
||||
32
f_scripts/fe/js/login.init.js
Normal file
32
f_scripts/fe/js/login.init.js
Normal file
@@ -0,0 +1,32 @@
|
||||
(function () {
|
||||
[].slice.call(document.querySelectorAll('.tabs')).forEach(function (el) {
|
||||
new CBPFWTabs(el);
|
||||
});
|
||||
})();
|
||||
|
||||
function oldSafariCSSfix() {
|
||||
if (isOldSafari()) {
|
||||
var tabnr = $(".login-page .tabs nav ul li").length;
|
||||
var width = jQuery('.login-page').width() - 32;
|
||||
|
||||
jQuery(".login-page .tabs nav ul li").width((width / tabnr) - 1).css("float", "left");
|
||||
jQuery(".login-page .tabs nav").css("width", (width + 1));
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).on("click", ".tabs ul:not(.fileThumbs) li", function() {
|
||||
});
|
||||
});
|
||||
|
||||
jQuery(window).load(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
function isOldSafari() {
|
||||
return !!navigator.userAgent.match(' Safari/') && !navigator.userAgent.match(' Chrome') && (!!navigator.userAgent.match(' Version/6.0') || !!navigator.userAgent.match(' Version/5.'));
|
||||
}
|
||||
1
f_scripts/fe/js/login.init.min.js
vendored
Normal file
1
f_scripts/fe/js/login.init.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(){[].slice.call(document.querySelectorAll(".tabs")).forEach(function(el){new CBPFWTabs(el)})})();function oldSafariCSSfix(){if(isOldSafari()){var tabnr=$(".login-page .tabs nav ul li").length;var width=jQuery(".login-page").width()-32;jQuery(".login-page .tabs nav ul li").width(width/tabnr-1).css("float","left");jQuery(".login-page .tabs nav").css("width",width+1)}}$(document).ready(function(){$(document).on("click",".tabs ul:not(.fileThumbs) li",function(){})});jQuery(window).load(function(){oldSafariCSSfix()});jQuery(window).resize(function(){oldSafariCSSfix()});function isOldSafari(){return!!navigator.userAgent.match(" Safari/")&&!navigator.userAgent.match(" Chrome")&&(!!navigator.userAgent.match(" Version/6.0")||!!navigator.userAgent.match(" Version/5."))}
|
||||
226
f_scripts/fe/js/menu-parse.js
Normal file
226
f_scripts/fe/js/menu-parse.js
Normal file
@@ -0,0 +1,226 @@
|
||||
$(document).ready(function() {
|
||||
$('#categories-accordion li').mouseout(function() {
|
||||
t = $(this);
|
||||
setTimeout(function() {
|
||||
if (!t.hasClass('menu-panel-entry-active')) {
|
||||
if (!t.find('a.active').hasClass('selected')) {
|
||||
t.find('a.active').removeClass('active');
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
});
|
||||
$(".menu-panel-entry").click(function(event){
|
||||
var current_id = $(this).attr("id");
|
||||
if ($(this).hasClass('main-menu-panel-entry-active') || current_id == 'account-menu-entry9' || current_id == 'account-menu-entry10' || current_id == 'account-menu-entry11' || current_id == 'account-menu-entry12' || current_id == 'account-menu-entry13') {
|
||||
return;
|
||||
}
|
||||
if (typeof($(this).attr("rel-m")) != "undefined") {
|
||||
menu_section = $(this).attr("rel-m");
|
||||
}
|
||||
|
||||
if (typeof($(this).attr("rel-s")) != "undefined") {
|
||||
inner_section = $(this).attr("rel-s");
|
||||
|
||||
if (typeof($("section.filter .viewType").html()) == "undefined" || $('#wrapper').hasClass('tpl_search') || $("#wrapper").hasClass("tpl_subs") || $('#wrapper').hasClass('tpl_channel') || $('#sub1-menu li').hasClass('menu-panel-entry-active')) {
|
||||
window.location = current_url + menu_section + "/" + inner_section;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof($(this).attr("rel-usr")) != "undefined") {
|
||||
usr = $(this).attr("rel-usr");
|
||||
|
||||
if (typeof($("section.filter .viewType").html()) == "undefined" || $('#categories-accordion li').hasClass('menu-panel-entry-active')) {
|
||||
window.location = current_url + menu_section + "/" + usr;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($(this).hasClass("menu-panel-entry-active") && !$(".menu-panel-entry-sub").hasClass("menu-panel-entry-sub-active")) return false;
|
||||
|
||||
if (!$("#wrapper").hasClass("tpl_files") && !$("#wrapper").hasClass("tpl_manage_channel") && !$("#wrapper").hasClass("tpl_account") && !$("#wrapper").hasClass("tpl_messages")) {
|
||||
$("a.dcjq-parent.active").removeClass("active");
|
||||
$(".menu-panel-entry-sub, .menu-panel-entry").removeClass("menu-panel-entry-sub-active");
|
||||
$(".menu-panel-entry, .pl-entry").removeClass("menu-panel-entry-active");
|
||||
} else {
|
||||
$("#categories-accordion a.dcjq-parent.active").removeClass("active");
|
||||
$(".menu-panel-entry-sub, #categories-accordion .menu-panel-entry").removeClass("menu-panel-entry-sub-active");
|
||||
$("#categories-accordion .menu-panel-entry, .pl-entry").removeClass("menu-panel-entry-active");
|
||||
}
|
||||
|
||||
$(this).find("a:first").addClass("dcjq-parent active");
|
||||
$(this).addClass("menu-panel-entry-active");
|
||||
|
||||
if(typeof(fe_mask) != 'undefined') {
|
||||
if(typeof($("#file-sort-div-val").val()) != "undefined"){
|
||||
var fe_link = '&do='+$("#file-sort-div-val").val()+'&for='+($("#type-menu-val").val() != "sort-" ? $("#type-menu-val").val() : $("#file-type-div-val").val());
|
||||
} else if (typeof(s_url) !== 'undefined') {
|
||||
if(s_url == 'channels'){
|
||||
var fe_link = '&sort='+$(".sort-active").attr("id");
|
||||
}
|
||||
if(s_url == 'search'){
|
||||
var fe_link = '&sort='+$(".sort-active").attr("id");
|
||||
}
|
||||
} else var fe_link = '';
|
||||
|
||||
wrapLoad(current_url + menu_section + "?s="+current_id+fe_link, current_id);
|
||||
} else {
|
||||
var u_url = '';
|
||||
if(current_id == 'backend-menu-entry6' || current_id == 'backend-menu-entry11'){
|
||||
u_url = '&u='+$("#p-user-key").val();
|
||||
}
|
||||
wrapLoad(current_url + menu_section + "?s="+current_id+u_url);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(".menu-panel-entry-sub").on("click", function(event){
|
||||
event.stopPropagation ? event.stopPropagation() : (event.cancelBubble=true);
|
||||
|
||||
var current_id = $(this).attr("id");
|
||||
var h2_title = $("#"+current_id+" span.bold").text();
|
||||
|
||||
if($(this).hasClass("menu-panel-entry-sub-active") && !$(".menu-panel-entry-sub").hasClass("menu-panel-entry-sub-active")) return false;
|
||||
|
||||
if($(this).hasClass("menu-panel-entry-sub") && $(this).hasClass("menu-panel-entry-active")) return false;
|
||||
|
||||
if (!$("#wrapper").hasClass("tpl_files") && !$("#wrapper").hasClass("tpl_manage_channel") && !$("#wrapper").hasClass("tpl_account") && !$("#wrapper").hasClass("tpl_messages")) {
|
||||
$("a.dcjq-parent.active").removeClass("active");
|
||||
$(".menu-panel-entry-sub, .menu-panel-entry").removeClass("menu-panel-entry-sub-active");
|
||||
$(".menu-panel-entry").removeClass("menu-panel-entry-active");
|
||||
} else {
|
||||
$("#categories-accordion a.dcjq-parent.active").removeClass("active");
|
||||
$(".menu-panel-entry-sub, #categories-accordion .menu-panel-entry").removeClass("menu-panel-entry-sub-active");
|
||||
$("#categories-accordion .menu-panel-entry").removeClass("menu-panel-entry-active");
|
||||
}
|
||||
|
||||
$(this).addClass("menu-panel-entry-active");
|
||||
|
||||
view_mode_type = $(".view-mode-type.active").attr("id").replace("view-mode-", "");
|
||||
id = jQuery(".content-current .main-view-mode-"+view_mode_type+".active").attr("id");
|
||||
type = jQuery(".content-current .main-view-mode-"+view_mode_type+".active").val();
|
||||
type_all = type + "-" + view_mode_type;
|
||||
nr = id.split("-");
|
||||
idnr = nr[3];
|
||||
m = idnr == 1 ? 4 : (idnr == 3 ? 6 : 4);
|
||||
|
||||
c_url = current_url + menu_section + "?s="+current_id;
|
||||
c_url+= "&p=0&sort="+type+"&t="+view_mode_type;
|
||||
|
||||
if ($("#section-playlists").hasClass("active") || $("#ch-pl").hasClass("tab-current")) {
|
||||
c_url+= "&pp=1";
|
||||
|
||||
if ($("#ch-pl").hasClass("tab-current")) {
|
||||
c_url+= "&ch";
|
||||
}
|
||||
}
|
||||
|
||||
wrapLoad(c_url, current_id);
|
||||
});
|
||||
});
|
||||
function wrapLoad(the_url, trg) {
|
||||
if (typeof(s_url) != 'undefined' && s_url == "uactivity" && typeof($("#uact-id").val()) != "undefined") { var id_trg = ".fancybox-inner"; }
|
||||
|
||||
else {
|
||||
if ($("#channel-tabs #section-playlists").hasClass("content-current")) {
|
||||
var id_trg = "#channel-tabs > .content-wrap";
|
||||
} else if (typeof($(".filter-link").html()) !== "undefined") {
|
||||
var id_trg = "#ct-wrapper #section-playlists";
|
||||
} else {
|
||||
var id_trg = "#siteContent";
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(trg) !== 'undefined' && trg == 'page') {
|
||||
id_trg = p_str;
|
||||
|
||||
if ($(".content-current div[id=paging-bottom]").length > 1) {
|
||||
$(".content-current #paging-bottom:last").detach();
|
||||
}
|
||||
}
|
||||
|
||||
$(id_trg).mask("");
|
||||
$(id_trg).load(the_url, function() {
|
||||
if (typeof($(".btn-group.viewType").html()) != "undefined" && typeof($("section.filter").html()) != "undefined") {
|
||||
setTimeout(function () {
|
||||
ViewModeSizeSetFunctions();
|
||||
}, 500);
|
||||
setTimeout(function () {
|
||||
thumbFade();
|
||||
}, 100);
|
||||
}
|
||||
$(id_trg).unmask();
|
||||
if ($("body").hasClass("media-width-480") || $("body").hasClass("media-width-320")) {
|
||||
smoothscrolltop();
|
||||
}
|
||||
if($(window).width()<=768 && $(".sidebar-container").is(":visible")){$(".sidebar-container").hide("fast")}
|
||||
if (typeof linkify != "undefined") {$(".comment_h p,p.p-info,pre.hp-pre,.full-details-holder p,.msg-body pre").linkify({defaultProtocol:"https",validate:{email:function(value){return false}},ignoreTags:["script","style"]})}
|
||||
});
|
||||
}
|
||||
function smoothscrolltop(){
|
||||
var currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
if (currentScroll > 0) {
|
||||
window.requestAnimationFrame(smoothscrolltop);
|
||||
window.scrollTo (0,currentScroll - (currentScroll/5));
|
||||
}
|
||||
}
|
||||
function postLoad(the_url, the_form, trg) {
|
||||
var id_trg = "#siteContent";
|
||||
|
||||
$(id_trg).mask("");
|
||||
$.post(the_url, $(the_form).serialize(), function(data) {
|
||||
$(id_trg).html(data);
|
||||
$(id_trg).unmask();
|
||||
});
|
||||
}
|
||||
function mobilecheck() {
|
||||
var check = false;
|
||||
(function(a){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
|
||||
return check;
|
||||
}
|
||||
function enterSubmit(input_name, button_name) {
|
||||
$(input_name).bind("keydown", function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$(button_name).click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
function display_c(){
|
||||
return;
|
||||
var refresh=1000; // Refresh rate in milli seconds
|
||||
mytime=setTimeout('display_ct()',refresh)
|
||||
}
|
||||
|
||||
function display_ct() {
|
||||
return;
|
||||
var currentTime = new Date();
|
||||
var currentHours = currentTime.getHours();
|
||||
var currentMinutes = currentTime.getMinutes();
|
||||
var currentSeconds = currentTime.getSeconds();
|
||||
var currentYear = currentTime.getYear();
|
||||
var currentMonth = currentTime.getMonth();
|
||||
var currentDate = currentTime.getDate();
|
||||
// Pad the minutes and seconds with leading zeros, if required
|
||||
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
|
||||
currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
|
||||
// Choose either "AM" or "PM" as appropriate
|
||||
var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";
|
||||
// Convert the hours component to 12-hour format if needed
|
||||
currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;
|
||||
// Convert an hours component of "0" to "12"
|
||||
currentHours = ( currentHours == 0 ) ? 12 : currentHours;
|
||||
// Convert the year
|
||||
var thisYear = currentYear + 1900;
|
||||
// Convert the month
|
||||
var thisMonth = currentMonth + 1;
|
||||
// Compose the string for display
|
||||
var currentTimeString = thisYear + "/" + thisMonth + "/" + currentDate + " " + currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;
|
||||
// Update the time display
|
||||
document.getElementById("clock").firstChild.nodeValue = currentTimeString;
|
||||
|
||||
tt=display_c();
|
||||
}
|
||||
1
f_scripts/fe/js/min/breakpoint-binds.min.js
vendored
Normal file
1
f_scripts/fe/js/min/breakpoint-binds.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
jQuery(function(){jQuery(window).bind("exitMedia320",function(){});jQuery(window).bind("enterMedia320",function(){});jQuery(window).bind("exitMedia480",function(){});jQuery(window).bind("enterMedia480",function(){});jQuery(window).bind("exitMedia768",function(){});jQuery(window).bind("enterMedia768",function(){});jQuery(window).bind("exitMedia980",function(){});jQuery(window).bind("enterMedia980",function(){});jQuery(window).bind("exitMedia1200",function(){});jQuery(window).bind("enterMedia1200",function(){});jQuery(window).setBreakpoints()});
|
||||
1
f_scripts/fe/js/min/breakpoints.min.js
vendored
Normal file
1
f_scripts/fe/js/min/breakpoints.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function($){var lastSize=0;var interval=null;$.fn.resetBreakpoints=function(){$(window).unbind("resize");if(interval){clearInterval(interval)}lastSize=0};$.fn.setBreakpoints=function(settings){var options=jQuery.extend({distinct:true,breakpoints:new Array(320,480,768,980,1200)},settings);interval=setInterval(function(){var w=$(window).width();var done=false;for(var bp in options.breakpoints.sort(function(a,b){return b-a})){if(!done&&w>=options.breakpoints[bp]&&lastSize<options.breakpoints[bp]){if(options.distinct){for(var x in options.breakpoints.sort(function(a,b){return b-a})){if($("body").hasClass("media-width-"+options.breakpoints[x])){$("body").removeClass("media-width-"+options.breakpoints[x]);$(window).trigger("exitMedia"+options.breakpoints[x])}}done=true}$("body").addClass("media-width-"+options.breakpoints[bp]);$(window).trigger("enterMedia"+options.breakpoints[bp])}if(w<options.breakpoints[bp]&&lastSize>=options.breakpoints[bp]){$("body").removeClass("media-width-"+options.breakpoints[bp]);$(window).trigger("exitMedia"+options.breakpoints[bp])}if(options.distinct&&w>=options.breakpoints[bp]&&w<options.breakpoints[bp-1]&&lastSize>w&&lastSize>0&&!$("body").hasClass("media-width-"+options.breakpoints[bp])){$("body").addClass("media-width-"+options.breakpoints[bp]);$(window).trigger("enterMedia"+options.breakpoints[bp])}}if(lastSize!=w){lastSize=w}},250)}})(jQuery);
|
||||
1
f_scripts/fe/js/min/browse.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/browse.init.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
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();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")});
|
||||
1
f_scripts/fe/js/min/channels.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/channels.init.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var SizeSetFunctions=function(){};var ViewModeSizeSetFunctions=function(){};jQuery(window).resize(function(){});jQuery(window).load(function(){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();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(){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()}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");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()}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;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()})}}},".promo-view-mode")});
|
||||
1
f_scripts/fe/js/min/classie.min.js
vendored
Normal file
1
f_scripts/fe/js/min/classie.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(window){"use strict";function classReg(className){return new RegExp("(^|\\s+)"+className+"(\\s+|$)")}var hasClass,addClass,removeClass;if("classList"in document.documentElement){hasClass=function(elem,c){return elem.classList.contains(c)};addClass=function(elem,c){elem.classList.add(c)};removeClass=function(elem,c){elem.classList.remove(c)}}else{hasClass=function(elem,c){return classReg(c).test(elem.className)};addClass=function(elem,c){if(!hasClass(elem,c)){elem.className=elem.className+" "+c}};removeClass=function(elem,c){elem.className=elem.className.replace(classReg(c)," ")}}function toggleClass(elem,c){var fn=hasClass(elem,c)?removeClass:addClass;fn(elem,c)}var classie={hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,has:hasClass,add:addClass,remove:removeClass,toggle:toggleClass};if(typeof define==="function"&&define.amd){define(classie)}else{window.classie=classie}})(window);
|
||||
1
f_scripts/fe/js/min/files.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/files.init.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
221
f_scripts/fe/js/min/fwtabs.browse.init.js
Normal file
221
f_scripts/fe/js/min/fwtabs.browse.init.js
Normal file
@@ -0,0 +1,221 @@
|
||||
(function() {
|
||||
[].slice.call(document.querySelectorAll(".tabs")).forEach(function(el) {
|
||||
new CBPFWTabs(el);
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
function mlazyload() {
|
||||
var cid = $(".content-current .main-view-mode.active").attr("id");
|
||||
$("#" + cid + "-more.more-button:last").unbind().bind('inview', function (event, isInView, visiblePartX, visiblePartY) {
|
||||
if (isInView) {
|
||||
if (visiblePartY == 'top') {
|
||||
} else if (visiblePartY == 'bottom') {
|
||||
} else {
|
||||
$("#" + cid + "-more.more-button:last").click();
|
||||
}
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
(function() {
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
var section = jQuery(this).find("a").attr("href").split("-");
|
||||
var sort = section[1];
|
||||
var sid = jQuery("#section-" + sort + " .main-view-mode.active").attr("id");
|
||||
var id = sid.split("-");
|
||||
var idnr = id[3];
|
||||
if (jQuery("#" + sid + "-list ul").length == 0) {
|
||||
var ct = "";
|
||||
var url = _rel + "?p=0&m=" + idnr + "&sort=" + sort;
|
||||
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("#" + sid + "-list").mask("");
|
||||
jQuery("#main-view-mode-" + idnr + "-" + sort + " span").removeClass("icon-thumbs").addClass("spinner icon-spinner");
|
||||
jQuery("#" + sid + "-list").load(url, function() {
|
||||
jQuery("#" + sid + "-list").unmask();
|
||||
thumbFade();
|
||||
setTimeout(function(){ mlazyload() }, 300);
|
||||
jQuery("#main-view-mode-" + idnr + "-" + sort + " span").addClass("icon-thumbs").removeClass("spinner icon-spinner");
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".tabs ul:not(.fileThumbs):not(.no-content) li");
|
||||
})();
|
||||
|
||||
function oldSafariCSSfix() {
|
||||
if (isOldSafari()) {
|
||||
var tabnr = $("#main-content.tabs nav ul li").length;
|
||||
var width = jQuery("#siteContent").width() - 32;
|
||||
jQuery("#main-content nav ul li").width(width / tabnr - 1).css("float", "left");
|
||||
jQuery(".tabs nav").css("width", width + 1);
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(window).load(function() {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
jQuery(window).resize(function() {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
var SizeSetFunctions = function() {};
|
||||
|
||||
var ViewModeSizeSetFunctions = function() {};
|
||||
|
||||
jQuery(window).resize(function() {});
|
||||
|
||||
jQuery(window).load(function() {
|
||||
thumbFade();
|
||||
mlazyload();
|
||||
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();
|
||||
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 span.load-more-text i").removeClass("iconBe-plus").addClass("spinner icon-spinner");
|
||||
|
||||
jQuery.get(url, function(result) {
|
||||
more.detach();
|
||||
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();
|
||||
setTimeout(function(){ mlazyload() }, 300);
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".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();
|
||||
setTimeout(function(){ mlazyload() }, 300);
|
||||
ViewModeSizeSetFunctions();
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".promo-view-mode");
|
||||
});
|
||||
1
f_scripts/fe/js/min/fwtabs.browse.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/fwtabs.browse.init.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
185
f_scripts/fe/js/min/fwtabs.channels.init.js
Normal file
185
f_scripts/fe/js/min/fwtabs.channels.init.js
Normal file
@@ -0,0 +1,185 @@
|
||||
(function() {
|
||||
[].slice.call(document.querySelectorAll(".tabs")).forEach(function(el) {
|
||||
new CBPFWTabs(el);
|
||||
});
|
||||
})();
|
||||
|
||||
function isOldSafari() {
|
||||
return !!navigator.userAgent.match(" Safari/") && !navigator.userAgent.match(" Chrome") && (!!navigator.userAgent.match(" Version/6.0") || !!navigator.userAgent.match(" Version/5."));
|
||||
}
|
||||
|
||||
function oldSafariCSSfix() {
|
||||
if (isOldSafari()) {
|
||||
var tabnr = 7;
|
||||
var width = jQuery("#siteContent").width() - 32;
|
||||
jQuery("#main-content nav ul li").width(width / tabnr - 1).css("float", "left");
|
||||
jQuery(".tabs nav").css("width", width + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function mlazyload() {
|
||||
var cid = $(".content-current .main-view-mode.active").attr("id");
|
||||
$("#" + cid + "-more.more-button:last").unbind().bind('inview', function (event, isInView, visiblePartX, visiblePartY) {
|
||||
if (isInView) {
|
||||
if (visiblePartY == 'top') {
|
||||
} else if (visiblePartY == 'bottom') {
|
||||
} else {
|
||||
$("#" + cid + "-more.more-button:last").click();
|
||||
}
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
(function() {
|
||||
jQuery(document).on({
|
||||
click: function() {
|
||||
var section = jQuery(this).find("a").attr("href").split("-");
|
||||
var sort = section[1];
|
||||
var sid = jQuery("#section-" + sort + " .main-view-mode.active").attr("id");
|
||||
var id = sid.split("-");
|
||||
var idnr = id[3];
|
||||
if (jQuery("#" + sid + "-list ul").length == 0) {
|
||||
var ct = "";
|
||||
var url = _rel + "?p=0&m=" + idnr + "&sort=" + sort;
|
||||
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("#" + sid + "-list").mask("");
|
||||
jQuery("#main-view-mode-" + idnr + "-" + sort + " span").addClass("spinner icon-spinner");
|
||||
jQuery("#" + sid + "-list").load(url, function() {
|
||||
jQuery("#" + sid + "-list").unmask();
|
||||
thumbFade();
|
||||
setTimeout(function(){ mlazyload() }, 300);
|
||||
jQuery("#main-view-mode-" + idnr + "-" + sort + " span").removeClass("spinner icon-spinner");
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".tabs ul:not(.fileThumbs):not(.ch-grid):not(.uu) li");
|
||||
})();
|
||||
|
||||
jQuery(window).load(function() {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
jQuery(window).resize(function() {
|
||||
oldSafariCSSfix();
|
||||
});
|
||||
|
||||
var SizeSetFunctions = function() {};
|
||||
|
||||
var ViewModeSizeSetFunctions = function() {};
|
||||
|
||||
jQuery(window).resize(function() {});
|
||||
|
||||
jQuery(window).load(function() {
|
||||
mlazyload();
|
||||
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();
|
||||
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() {
|
||||
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();
|
||||
} 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");
|
||||
thumbFade();
|
||||
setTimeout(function(){ mlazyload() }, 300);
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".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();
|
||||
} 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;
|
||||
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();
|
||||
setTimeout(function(){ mlazyload() }, 300);
|
||||
});
|
||||
}
|
||||
}
|
||||
}, ".promo-view-mode");
|
||||
});
|
||||
1
f_scripts/fe/js/min/fwtabs.channels.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/fwtabs.channels.init.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/fwtabs.files.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/fwtabs.files.init.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/fwtabs.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/fwtabs.init.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(){[].slice.call(document.querySelectorAll(".tabs")).forEach(function(el){new CBPFWTabs(el)})})();(function(){jQuery(document).on({click:function(){var section=jQuery(this).find("a").attr("href").split("-");var sort=section[1];var sid=jQuery("#section-"+sort+" .main-view-mode.active").attr("id");var id=sid.split("-");var idnr=id[3];if(jQuery("#"+sid+"-list ul").length==0){var ct="";var url=_rel+"?p=0&m="+idnr+"&sort="+sort;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("#"+sid+"-list").mask("");jQuery("#main-view-mode-"+idnr+"-"+sort+" span").removeClass("icon-thumbs").addClass("spinner icon-spinner");jQuery("#"+sid+"-list").load(url,function(){jQuery("#"+sid+"-list").unmask();thumbFade();jQuery("#main-view-mode-"+idnr+"-"+sort+" span").addClass("icon-thumbs").removeClass("spinner icon-spinner")})}}},".tabs ul:not(.fileThumbs):not(.no-content) li")})();function oldSafariCSSfix(){if(isOldSafari()){var tabnr=$("#main-content.tabs nav ul li").length;var width=jQuery("#siteContent").width()-32;jQuery("#main-content nav ul li").width(width/tabnr-1).css("float","left");jQuery(".tabs nav").css("width",width+1)}}jQuery(window).load(function(){oldSafariCSSfix()});jQuery(window).resize(function(){oldSafariCSSfix()});
|
||||
1
f_scripts/fe/js/min/fwtabs.min.js
vendored
Normal file
1
f_scripts/fe/js/min/fwtabs.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(window){"use strict";function extend(a,b){for(var key in b){if(b.hasOwnProperty(key)){a[key]=b[key]}}return a}function CBPFWTabs(el,options){this.el=el;this.options=extend({},this.options);extend(this.options,options);this._init()}CBPFWTabs.prototype.options={start:0};CBPFWTabs.prototype._init=function(){this.tabs=[].slice.call(this.el.querySelectorAll("nav > ul > li"));this.items=[].slice.call(this.el.querySelectorAll(".content-wrap > section"));this.current=-1;this._show();this._initEvents()};CBPFWTabs.prototype._initEvents=function(){var self=this;this.tabs.forEach(function(tab,idx){tab.addEventListener("click",function(ev){ev.preventDefault();self._show(idx)})})};CBPFWTabs.prototype._show=function(idx){if(this.current>=0){this.tabs[this.current].className=this.items[this.current].className=""}this.current=idx!=undefined?idx:this.options.start>=0&&this.options.start<this.items.length?this.options.start:0;this.tabs[this.current].className="tab-current";this.items[this.current].className="content-current"};window.CBPFWTabs=CBPFWTabs})(window);
|
||||
1
f_scripts/fe/js/min/fwtabs.view.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/fwtabs.view.init.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(){[].slice.call(document.querySelectorAll(".tabs")).forEach(function(el){new CBPFWTabs(el)})})();function oldSafariCSSfix(){if(isOldSafari()){var tabnr=4;var width=jQuery("#siteContent").width()-32;jQuery("#div-share nav ul li").width(width/tabnr-1).css("float","left");jQuery(".tabs nav").css("width",width+1)}}$(document).ready(function(){$(document).on("click",".tabs ul:not(.fileThumbs) li",function(){if($(this).find("a").attr("href")=="#section-thumb"){$(".save-entry-button").hide()}else{$(".save-entry-button").show()}})});jQuery(window).load(function(){oldSafariCSSfix()});jQuery(window).resize(function(){oldSafariCSSfix()});
|
||||
1
f_scripts/fe/js/min/icheck.min.js
vendored
Normal file
1
f_scripts/fe/js/min/icheck.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
f_scripts/fe/js/min/index.init.min.js
vendored
Normal file
2
f_scripts/fe/js/min/index.init.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/init0.min.js
vendored
Normal file
1
f_scripts/fe/js/min/init0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/jquery.autocomplete.min.js
vendored
Normal file
1
f_scripts/fe/js/min/jquery.autocomplete.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/jquery.cookie.min.js
vendored
Normal file
1
f_scripts/fe/js/min/jquery.cookie.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date;date.setTime(date.getTime()+options.expires*24*60*60*1e3)}else{date=options.expires}expires="; expires="+date.toUTCString()}var path=options.path?"; path="+options.path:"";var domain=options.domain?"; domain="+options.domain:"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("")}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==name+"="){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};
|
||||
1
f_scripts/fe/js/min/jquery.custom-scrollbar.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/jquery.custom-scrollbar.init.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
$(window).load(function(){$(".sidebar-container-off").customScrollbar({skin:"default-skin",hScroll:false,updateOnWindowResize:true,preventDefaultScroll:true})});
|
||||
1
f_scripts/fe/js/min/jquery.custom-scrollbar.min.js
vendored
Normal file
1
f_scripts/fe/js/min/jquery.custom-scrollbar.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/jquery.dlmenu.min.js
vendored
Normal file
1
f_scripts/fe/js/min/jquery.dlmenu.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function($,window,undefined){"use strict";var Modernizr=window.Modernizr,$body=$("body");$.DLMenu=function(options,element){this.$el=$(element);this._init(options)};$.DLMenu.defaults={animationClasses:{classin:"dl-animate-in-1",classout:"dl-animate-out-1"},onLevelClick:function(el,name){return false},onLinkClick:function(el,ev){return false}};$.DLMenu.prototype={_init:function(options){this.options=$.extend(true,{},$.DLMenu.defaults,options);this._config();var animEndEventNames={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd",animation:"animationend"},transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"};this.animEndEventName=animEndEventNames[Modernizr.prefixed("animation")]+".dlmenu";this.transEndEventName=transEndEventNames[Modernizr.prefixed("transition")]+".dlmenu",this.supportAnimations=Modernizr.cssanimations,this.supportTransitions=Modernizr.csstransitions;this._initEvents()},_config:function(){this.open=false;this.$trigger=this.$el.children(".dl-trigger");this.$menu=this.$el.children("ul.dl-menu");this.$menuitems=this.$menu.find("li:not(.dl-back)");this.$el.find("ul.dl-submenu").prepend('<li class="dl-back"><a href="#">back</a></li>');this.$back=this.$menu.find("li.dl-back")},_initEvents:function(){var self=this;this.$trigger.on("click.dlmenu",function(){if(self.open){self._closeMenu()}else{self._openMenu()}return false});this.$menuitems.on("click.dlmenu",function(event){event.stopPropagation();var $item=$(this),$submenu=$item.children("ul.dl-submenu");if($submenu.length>0){var $flyin=$submenu.clone().css("opacity",0).insertAfter(self.$menu),onAnimationEndFn=function(){self.$menu.off(self.animEndEventName).removeClass(self.options.animationClasses.classout).addClass("dl-subview");$item.addClass("dl-subviewopen").parents(".dl-subviewopen:first").removeClass("dl-subviewopen").addClass("dl-subview");$flyin.remove()};setTimeout(function(){$flyin.addClass(self.options.animationClasses.classin);self.$menu.addClass(self.options.animationClasses.classout);if(self.supportAnimations){self.$menu.on(self.animEndEventName,onAnimationEndFn)}else{onAnimationEndFn.call()}self.options.onLevelClick($item,$item.children("a:first").text())});return false}else{self.options.onLinkClick($item,event)}});this.$back.on("click.dlmenu",function(event){var $this=$(this),$submenu=$this.parents("ul.dl-submenu:first"),$item=$submenu.parent(),$flyin=$submenu.clone().insertAfter(self.$menu);var onAnimationEndFn=function(){self.$menu.off(self.animEndEventName).removeClass(self.options.animationClasses.classin);$flyin.remove()};setTimeout(function(){$flyin.addClass(self.options.animationClasses.classout);self.$menu.addClass(self.options.animationClasses.classin);if(self.supportAnimations){self.$menu.on(self.animEndEventName,onAnimationEndFn)}else{onAnimationEndFn.call()}$item.removeClass("dl-subviewopen");var $subview=$this.parents(".dl-subview:first");if($subview.is("li")){$subview.addClass("dl-subviewopen")}$subview.removeClass("dl-subview")});return false})},closeMenu:function(){if(this.open){this._closeMenu()}},_closeMenu:function(){var self=this,onTransitionEndFn=function(){self.$menu.off(self.transEndEventName);self._resetMenu()};this.$menu.removeClass("dl-menuopen");this.$menu.addClass("dl-menu-toggle");this.$trigger.removeClass("dl-active");if(this.supportTransitions){this.$menu.on(this.transEndEventName,onTransitionEndFn)}else{onTransitionEndFn.call()}this.open=false},openMenu:function(){if(!this.open){this._openMenu()}},_openMenu:function(){var self=this;$body.off("click").on("click.dlmenu",function(){self._closeMenu()});this.$menu.addClass("dl-menuopen dl-menu-toggle").on(this.transEndEventName,function(){$(this).removeClass("dl-menu-toggle")});this.$trigger.addClass("dl-active");this.open=true},_resetMenu:function(){this.$menu.removeClass("dl-subview");this.$menuitems.removeClass("dl-subview dl-subviewopen")}};var logError=function(message){if(window.console){window.console.error(message)}};$.fn.dlmenu=function(options){if(typeof options==="string"){var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=$.data(this,"dlmenu");if(!instance){logError("cannot call methods on dlmenu prior to initialization; "+"attempted to call method '"+options+"'");return}if(!$.isFunction(instance[options])||options.charAt(0)==="_"){logError("no such method '"+options+"' for dlmenu instance");return}instance[options].apply(instance,args)})}else{this.each(function(){var instance=$.data(this,"dlmenu");if(instance){instance._init()}else{instance=$.data(this,"dlmenu",new $.DLMenu(options,this))}})}return this}})(jQuery,window);
|
||||
1
f_scripts/fe/js/min/jquery.easing.min.js
vendored
Normal file
1
f_scripts/fe/js/min/jquery.easing.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*(--t*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return t==0?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return t==d?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=1.525)+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<1/2.75){return c*(7.5625*t*t)+b}else if(t<2/2.75){return c*(7.5625*(t-=1.5/2.75)*t+.75)+b}else if(t<2.5/2.75){return c*(7.5625*(t-=2.25/2.75)*t+.9375)+b}else{return c*(7.5625*(t-=2.625/2.75)*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});
|
||||
1
f_scripts/fe/js/min/jquery.fancybox.min.js
vendored
Normal file
1
f_scripts/fe/js/min/jquery.fancybox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
9
f_scripts/fe/js/min/jquery.hoverIntent.min.js
vendored
Normal file
9
f_scripts/fe/js/min/jquery.hoverIntent.min.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* hoverIntent v1.8.0 // 2014.06.29 // jQuery v1.9.1+
|
||||
* http://cherne.net/brian/resources/jquery.hoverIntent.html
|
||||
*
|
||||
* You may use hoverIntent under the terms of the MIT license. Basically that
|
||||
* means you are free to use hoverIntent as long as this header is left intact.
|
||||
* Copyright 2007, 2014 Brian Cherne
|
||||
*/
|
||||
(function($){$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var cfg={interval:100,sensitivity:6,timeout:0};if(typeof handlerIn==="object"){cfg=$.extend(cfg,handlerIn)}else{if($.isFunction(handlerOut)){cfg=$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector})}else{cfg=$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut})}}var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if(Math.sqrt((pX-cX)*(pX-cX)+(pY-cY)*(pY-cY))<cfg.sensitivity){$(ob).off("mousemove.hoverIntent",track);ob.hoverIntent_s=true;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=false;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=$.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type==="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).on("mousemove.hoverIntent",track);if(!ob.hoverIntent_s){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).off("mousemove.hoverIntent",track);if(ob.hoverIntent_s){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},cfg.selector)}})(jQuery);
|
||||
2
f_scripts/fe/js/min/jquery.lazy.ajax.min.js
vendored
Normal file
2
f_scripts/fe/js/min/jquery.lazy.ajax.min.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/*! jQuery & Zepto Lazy - AJAX Plugin v1.2 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2016 Daniel 'Eisbehr' Kern */
|
||||
!function(t){function a(a,e,o,n){t.ajax({url:e.attr("data-src"),type:n||"get",dataType:e.attr("data-type")||"html",success:function(t){e.html(t),o(!0),a.config("removeAttribute")&&e.removeAttr("data-src data-method data-type")},error:function(){o(!1)}})}t.lazy("ajax",function(t,e){a(this,t,e,t.attr("data-method"))}),t.lazy("get",function(t,e){a(this,t,e,"get")}),t.lazy("post",function(t,e){a(this,t,e,"post")})}(window.jQuery||window.Zepto);
|
||||
2
f_scripts/fe/js/min/jquery.lazy.min.js
vendored
Normal file
2
f_scripts/fe/js/min/jquery.lazy.min.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/*! jQuery & Zepto Lazy v1.7.4 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2016 Daniel 'Eisbehr' Kern */
|
||||
!function(t,e){"use strict";function r(r,a,i,l,u){function f(){L=t.devicePixelRatio>1,c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(l.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),l.a=function(t){c(t),i.push.apply(i,t)},l.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},l.f=function(t){for(var e=0;e<t.length;e++){var r=i.filter(t[e]);r.length&&s(!1,r)}},s(),n(a.appendScroll).on("scroll."+u+" resize."+u,l.e))}function c(t){var i=a.defaultImage,o=a.placeholder,l=a.imageBase,u=a.srcsetAttribute,f=a.loaderAttribute,c=a._f||{};t=n(t).filter(function(){var t=n(this),r=m(this);return!t.data(a.handledName)&&(t.attr(a.attribute)||t.attr(u)||t.attr(f)||c[r]!==e)}).data("plugin_"+a.name,r);for(var s=0,d=t.length;s<d;s++){var A=n(t[s]),g=m(t[s]),h=A.attr(a.imageBaseAttribute)||l;g==N&&h&&A.attr(u)&&A.attr(u,b(A.attr(u),h)),c[g]===e||A.attr(f)||A.attr(f,c[g]),g==N&&i&&!A.attr(E)?A.attr(E,i):g==N||!o||A.css(O)&&"none"!=A.css(O)||A.css(O,"url('"+o+"')")}}function s(t,e){if(!i.length)return void(a.autoDestroy&&r.destroy());for(var o=e||i,l=!1,u=a.imageBase||"",f=a.srcsetAttribute,c=a.handledName,s=0;s<o.length;s++)if(t||e||A(o[s])){var g=n(o[s]),h=m(o[s]),b=g.attr(a.attribute),v=g.attr(a.imageBaseAttribute)||u,p=g.attr(a.loaderAttribute);g.data(c)||a.visibleOnly&&!g.is(":visible")||!((b||g.attr(f))&&(h==N&&(v+b!=g.attr(E)||g.attr(f)!=g.attr(F))||h!=N&&v+b!=g.css(O))||p)||(l=!0,g.data(c,!0),d(g,h,v,p))}l&&(i=n(i).filter(function(){return!n(this).data(c)}))}function d(t,e,r,i){++z;var o=function(){y("onError",t),p(),o=n.noop};y("beforeLoad",t);var l=a.attribute,u=a.srcsetAttribute,f=a.sizesAttribute,c=a.retinaAttribute,s=a.removeAttribute,d=a.loadedName,A=t.attr(c);if(i){var g=function(){s&&t.removeAttr(a.loaderAttribute),t.data(d,!0),y(T,t),setTimeout(p,1),g=n.noop};t.off(I).one(I,o).one(D,g),y(i,t,function(e){e?(t.off(D),g()):(t.off(I),o())})||t.trigger(I)}else{var h=n(new Image);h.one(I,o).one(D,function(){t.hide(),e==N?t.attr(C,h.attr(C)).attr(F,h.attr(F)).attr(E,h.attr(E)):t.css(O,"url('"+h.attr(E)+"')"),t[a.effect](a.effectTime),s&&(t.removeAttr(l+" "+u+" "+c+" "+a.imageBaseAttribute),f!==C&&t.removeAttr(f)),t.data(d,!0),y(T,t),h.remove(),p()});var m=(L&&A?A:t.attr(l))||"";h.attr(C,t.attr(f)).attr(F,t.attr(u)).attr(E,m?r+m:null),h.complete&&h.trigger(D)}}function A(t){var e=t.getBoundingClientRect(),r=a.scrollDirection,n=a.threshold,i=h()+n>e.top&&-n<e.bottom,o=g()+n>e.left&&-n<e.right;return"vertical"==r?i:"horizontal"==r?o:i&&o}function g(){return w>=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;a<n;a++)t+=e+r[a].trim()+(a!==n-1?",":"")}return t}function v(t,e){var n,i=0;return function(o,l){function u(){i=+new Date,e.call(r,o)}var f=+new Date-i;n&&clearTimeout(n),f>t||!a.enableThrottle||l?u():n=setTimeout(u,t-f)}}function p(){--z,i.length||z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"==a.bind||o?f():n(t).on(D+"."+u,f)}function a(a,o){var l=this,u=n.extend({},l.config,o),f={},c=u.name+"-"+ ++i;return l.config=function(t,r){return r===e?u[t]:(u[t]=r,l)},l.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),l},l.getItems=function(){return f.g?f.g():{}},l.update=function(t){return f.e&&f.e({},!t),l},l.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),l},l.loadAll=function(){return f.e&&f.e({all:!0},!0),l},l.destroy=function(){return n(u.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(l,u,a,f,c),u.chainable?a:l}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=a.prototype.config,l=o._f||(o._f={}),u=0,f=t.length;u<f;u++)(o[t[u]]===e||n.isFunction(o[t[u]]))&&(o[t[u]]=i);for(var c=0,s=r.length;c<s;c++)l[r[c]]=t[0]}},a.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:e,afterLoad:e,onError:e,onFinishedAll:e},n(t).on("load",function(){o=!0})}(window);
|
||||
1
f_scripts/fe/js/min/jquery.loadmask.min.js
vendored
Normal file
1
f_scripts/fe/js/min/jquery.loadmask.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(a){a.fn.mask=function(c){this.unmask();if(this.css("position")=="static"){this.addClass("masked-relative")}this.addClass("masked");var d=a('<div class="loadmask"></div>');if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){d.height(this.height()+parseInt(this.css("padding-top"))+parseInt(this.css("padding-bottom")));d.width(this.width()+parseInt(this.css("padding-left"))+parseInt(this.css("padding-right")))}if(navigator.userAgent.toLowerCase().indexOf("msie 6")>-1){this.find("select").addClass("masked-hidden")}this.append(d);if(typeof c=="string"){var b=a('<div class="loadmask-msg" style="display:none;"></div>');b.append("<div>"+c+"</div>");this.append(b);b.css("top",Math.round(this.height()/2-(b.height()-parseInt(b.css("padding-top"))-parseInt(b.css("padding-bottom")))/2)+"px");b.css("left",Math.round(this.width()/2-(b.width()-parseInt(b.css("padding-left"))-parseInt(b.css("padding-right")))/2)+"px");b.show()}};a.fn.unmask=function(b){this.find(".loadmask-msg,.loadmask").remove();this.removeClass("masked");this.removeClass("masked-relative");this.find("select").removeClass("masked-hidden")}})(jQuery);
|
||||
1
f_scripts/fe/js/min/jquery.truncator.min.js
vendored
Normal file
1
f_scripts/fe/js/min/jquery.truncator.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function($){var trailing_whitespace=true;$.fn.truncate=function(options){var opts=$.extend({},$.fn.truncate.defaults,options);$(this).each(function(){var content_length=$.trim(squeeze($(this).text())).length;if(content_length<=opts.max_length)return;var actual_max_length=opts.max_length-opts.more.length-3;var truncated_node=recursivelyTruncate(this,actual_max_length);var full_node=$(this).hide();truncated_node.insertAfter(full_node);findNodeForMore(truncated_node).append(' <a href="#show more content">'+opts.more+"</a>...");findNodeForLess(full_node).append(' <a href="#show less content">'+opts.less+"</a>...");truncated_node.find("a:last").click(function(){truncated_node.hide();full_node.show();return false});full_node.find("a:last").click(function(){truncated_node.show();full_node.hide();return false})})};$.fn.truncate.defaults={max_length:100,more:"…more",less:"less"};function recursivelyTruncate(node,max_length){return node.nodeType==3?truncateText(node,max_length):truncateNode(node,max_length)}function truncateNode(node,max_length){var node=$(node);var new_node=node.clone().empty();var truncatedChild;node.contents().each(function(){var remaining_length=max_length-new_node.text().length;if(remaining_length==0)return;truncatedChild=recursivelyTruncate(this,remaining_length);if(truncatedChild)new_node.append(truncatedChild)});return new_node}function truncateText(node,max_length){var text=squeeze(node.data);if(trailing_whitespace)text=text.replace(/^ /,"");trailing_whitespace=!!text.match(/ $/);var text=text.slice(0,max_length);text=$("<div/>").text(text).html();return text}function squeeze(string){return string.replace(/\s+/g," ")}function findNodeForMore(node){var $node=$(node);var last_child=$node.children(":last");if(!last_child)return node;var display=last_child.css("display");if(!display||display=="inline")return $node;return findNodeForMore(last_child)}function findNodeForLess(node){var $node=$(node);var last_child=$node.children(":last");if(last_child&&last_child.is("p"))return last_child;return node}})(jQuery);
|
||||
1
f_scripts/fe/js/min/menu-parse.min.js
vendored
Normal file
1
f_scripts/fe/js/min/menu-parse.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/modernizr.custom.63321.js
vendored
Normal file
1
f_scripts/fe/js/min/modernizr.custom.63321.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/responsive-menu.min.js
vendored
Normal file
1
f_scripts/fe/js/min/responsive-menu.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/select.min.js
vendored
Normal file
1
f_scripts/fe/js/min/select.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var SelectList={fn:{prepare:function(name){var extra_span1="";var extra_span2="";if(name=="ipp_jump"||name=="ipp_select"){var text=name=="ipp_select"?"Items per page":name=="ipp_jump"?"Jump to page":"";extra_span1='<span rel="tooltip" title="'+text+'">';extra_span2="</span>"}var select=$('<div class="select-box" id="select-box-'+name+'"/>');var html='<div class="trigger" id="trigger-'+name+'">'+extra_span1+$("option:selected","select[name='"+name+"']").html()+extra_span2+"</div>";html+='<ul class="choices" id="choices-'+name+'">';$("option","select[name='"+name+"']").each(function(){var $option=$(this);var value=$option.val();var text=$option.html();if($option.is(":selected")){html+='<li data-value="'+value+'" style="display: none;">'+text+"</li>"}else{html+='<li data-value="'+value+'">'+text+"</li>"}});html+="</ul>";select.html(html).insertBefore("select[name='"+name+"']")},showHide:function(name){$("#trigger-"+name,"#select-box-"+name).unbind().bind("click",function(){var $trigger=$(this);var list=$trigger.next();if(list.is(":hidden")){list.slideDown(300,function(){$("#ct-wrapper").bind("click",bodyHideSelect);return})}else{list.slideUp(300,function(){$("#ct-wrapper").unbind("click",bodyHideSelect);return})}})},select:function(name){var $trigger=$("#trigger-"+name);var $select=$("select[name='"+name+"']");var $view=$("#view");$("li","#choices-"+name).on("click",function(){var $li=$(this);var value=$li.html();$("#choices-"+name+" li").show();$("#choices-"+name+" li").each(function(){var text=$(this).text();if(text==value){$(this).hide()}});$trigger.text($("<div/>").html(value).text());$li.parent().slideUp(300,function(){$select.changeVal($li.data("value"));$view.trigger("click")})})}},init:function(name){for(var method in this.fn){this.fn[method](name)}}};$.fn.changeVal=function(v){return $(this).val(v).trigger("change")};function bodyHideSelect(){$("#paging-top .choices").each(function(){if($(this).attr("id")==="choices-ipp_select"&&$(this).css("display")==="block"){$(this).slideUp(300,function(){$("#ct-wrapper").unbind("click",bodyHideSelect);return});return}})}function bodyHideSelect2(){$("#paging-top .choices").each(function(){if($(this).attr("id")==="choices-ipp_select"&&$(this).css("display")==="block"){$(this).slideUp(300,function(){$("#ct-wrapper").unbind("click",bodyHideSelect);return});return}});$(".entry-form-class .choices").each(function(){var choice=$(this);alert(choice.attr("id"));if(choice.attr("id")!==$(this).find(".choices").attr("id")){if($(this).find(".choices").css("display")==="block"){choice.slideUp(300,function(){$("#ct-wrapper").unbind("click",bodyHideSelect);return});return}}})}
|
||||
1
f_scripts/fe/js/min/tinymce.init.min.js
vendored
Normal file
1
f_scripts/fe/js/min/tinymce.init.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
tinymce.init({selector:".h-editable",inline:true,toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | outdent indent",menubar:false});tinymce.init({selector:".d-editable",menu:{file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},newmenu:{title:"Uploads",items:"insertlive insertvideo insertshort insertimage insertaudio insertdoc"},tools:{title:"View",items:"visualblocks code"}},menubar:"file edit format tools newmenu",inline:true,plugins:["advlist autolink lists link image charmap anchor","searchreplace visualblocks code fullscreen","insertdatetime media table contextmenu paste","textcolor colorpicker"],toolbar:"undo redo | styleselect | bold italic | forecolor backcolor | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | link",setup:function(e){if(typeof lm!="undefined"){e.addMenuItem("insertlive",{text:"Insert Broadcast",icon:"media",context:"newmenu",onclick:function(){url=_u+"&do=insert&t=live";$.fancybox({type:"ajax",margin:50,minWidth:"50%",href:url,height:"auto",autoHeight:"true",autoResize:"true",autoCenter:"true"})}})}if(typeof vm!="undefined"){e.addMenuItem("insertvideo",{text:"Insert Video",icon:"media",context:"newmenu",onclick:function(){url=_u+"&do=insert&t=video";$.fancybox({type:"ajax",margin:50,minWidth:"50%",href:url,height:"auto",autoHeight:"true",autoResize:"true",autoCenter:"true"})}})}if(typeof sm!="undefined"){e.addMenuItem("insertshort",{text:"Insert Short",icon:"media",context:"newmenu",onclick:function(){url=_u+"&do=insert&t=short";$.fancybox({type:"ajax",margin:50,minWidth:"50%",href:url,height:"auto",autoHeight:"true",autoResize:"true",autoCenter:"true"})}})}if(typeof im!="undefined"){e.addMenuItem("insertimage",{text:"Insert Picture",icon:"image",content:"newmenu",onclick:function(){url=_u+"&do=insert&t=image";$.fancybox({type:"ajax",margin:50,minWidth:"50%",href:url,height:"auto",autoHeight:"true",autoResize:"true",autoCenter:"true"})}})}if(typeof am!="undefined"){e.addMenuItem("insertaudio",{text:"Insert Audio",icon:"media",content:"newmenu",onclick:function(){url=_u+"&do=insert&t=audio";$.fancybox({type:"ajax",margin:50,minWidth:"50%",href:url,height:"auto",autoHeight:"true",autoResize:"true",autoCenter:"true"})}})}if(typeof dm!="undefined"){e.addMenuItem("insertdoc",{text:"Insert Document",icon:"books",content:"newmenu",onclick:function(){url=_u+"&do=insert&t=doc";$.fancybox({type:"ajax",margin:50,minWidth:"50%",href:url,height:"auto",autoHeight:"true",autoResize:"true",autoCenter:"true"})}})}}});(function(){[].slice.call(document.querySelectorAll(".tabs")).forEach(function(e){new CBPFWTabs(e)})})();function oldSafariCSSfix(){if(isOldSafari()){var e=4;var t=jQuery("#siteContent").width()-32;jQuery("#div-share nav ul li").width(t/e-1).css("float","left");jQuery(".tabs nav").css("width",t+1)}}$(document).ready(function(){$(document).on("click",".tabs ul:not(.fileThumbs) li",function(){if($(this).find("a").attr("href")=="#section-thumb"){$(".save-entry-button").hide()}else{$(".save-entry-button").show()}})});jQuery(window).load(function(){oldSafariCSSfix()});jQuery(window).resize(function(){oldSafariCSSfix()});
|
||||
1
f_scripts/fe/js/min/tip.min.js
vendored
Normal file
1
f_scripts/fe/js/min/tip.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
$(document).ready(function(){setTimeout(function(){var animatespeed=0;var targets=$("[rel=tooltip]"),target=false,tooltip=false,title=false;$(document).on({mouseenter:function(e){target=$(this);tip=target.attr("title");tooltip=$('<div class="tooltip"></div>');if(!tip||tip=="")return false;$(".tooltip").detach();target.removeAttr("title");tooltip.css("opacity",0).html(tip).appendTo("body");var init_tooltip=function(){if($(window).width()<tooltip.outerWidth()*1.5)tooltip.css("max-width",$(window).width()/2);else tooltip.css("max-width",340);var pos_left=target.offset().left+target.outerWidth()/2-tooltip.outerWidth()/2,pos_top=target.offset().top-tooltip.outerHeight()-20;if(pos_left<0){pos_left=target.offset().left+target.outerWidth()/2-20;tooltip.addClass("left")}else tooltip.removeClass("left");if(pos_left+tooltip.outerWidth()>$(window).width()){pos_left=target.offset().left-tooltip.outerWidth()+target.outerWidth()/2+20;tooltip.addClass("right")}else tooltip.removeClass("right");if(pos_top<0){var pos_top=target.offset().top+target.outerHeight();tooltip.addClass("top")}else tooltip.removeClass("top");if(target.hasClass("top-notif")){pos_left=pos_left-7}if(target.hasClass("top-upload")){if(typeof $("#top-login-form").html()!="undefined"){pos_left=pos_left-82;pos_top=pos_top+15}else{pos_left=pos_left-(getWidth()<701?23:55)}}tooltip.css({left:pos_left,top:pos_top}).animate({top:"+=10",opacity:1},animatespeed)};init_tooltip();$(window).resize(init_tooltip);var remove_tooltip=function(){tip=tooltip.html();tooltip.animate({top:"-=10",opacity:0},animatespeed,function(){$(this).remove()});target.attr("title",tip)};target.bind("mouseleave",remove_tooltip);tooltip.bind("click",remove_tooltip)}},"[rel=tooltip]")},1e3)});
|
||||
1
f_scripts/fe/js/min/view.init0.min.js
vendored
Normal file
1
f_scripts/fe/js/min/view.init0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
f_scripts/fe/js/min/ytmenu.min.js
vendored
Normal file
1
f_scripts/fe/js/min/ytmenu.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
$(document).ready(function(){$("#notifications-box-off").customScrollbar({skin:"default-skin",hScroll:false,updateOnWindowResize:true,preventDefaultScroll:true});$("i.menu-trigger").click(function(){if(!$(".sidebar-container").is(":visible")){$(".sidebar-container").show();$(".inner-block").addClass("with-menu");$("#ct-header-bottom").removeClass("no-menu");$("footer").addClass("with-menu");u="?m=";$(".sidebar-container").customScrollbar({skin:"default-skin",hScroll:false,updateOnWindowResize:true,preventDefaultScroll:true})}else{$(".sidebar-container").hide();$(".inner-block").removeClass("with-menu");$("#ct-header-bottom").addClass("no-menu");$("footer").removeClass("with-menu");u="?n="}if(typeof SizeSetFunctions=="function"){SizeSetFunctions()}else if(typeof dinamicSizeSetFunction_view=="function"){setTimeout(function(){dinamicSizeSetFunction_view()},1)}$(".owl-carousel").each(function(){var $carousel=$(this);var owl=$carousel.data("owlCarousel");owl.onResize()});$("#menu-trigger-response").load(current_url+"home"+u)})});
|
||||
1
f_scripts/fe/js/modernizr.custom.63321.js
vendored
Normal file
1
f_scripts/fe/js/modernizr.custom.63321.js
vendored
Normal file
File diff suppressed because one or more lines are too long
29
f_scripts/fe/js/onloadCSS.js
Normal file
29
f_scripts/fe/js/onloadCSS.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/*! onloadCSS: adds onload support for asynchronous stylesheets loaded with loadCSS. [c]2016 @zachleat, Filament Group, Inc. Licensed MIT */
|
||||
/* global navigator */
|
||||
/* exported onloadCSS */
|
||||
function onloadCSS( ss, callback ) {
|
||||
var called;
|
||||
function newcb(){
|
||||
if( !called && callback ){
|
||||
called = true;
|
||||
callback.call( ss );
|
||||
}
|
||||
}
|
||||
if( ss.addEventListener ){
|
||||
ss.addEventListener( "load", newcb );
|
||||
}
|
||||
if( ss.attachEvent ){
|
||||
ss.attachEvent( "onload", newcb );
|
||||
}
|
||||
|
||||
// This code is for browsers that don’t support onload
|
||||
// No support for onload (it'll bind but never fire):
|
||||
// * Android 4.3 (Samsung Galaxy S4, Browserstack)
|
||||
// * Android 4.2 Browser (Samsung Galaxy SIII Mini GT-I8200L)
|
||||
// * Android 2.3 (Pantech Burst P9070)
|
||||
|
||||
// Weak inference targets Android < 4.4
|
||||
if( "isApplicationInstalled" in navigator && "onloadcssdefined" in ss ) {
|
||||
ss.onloadcssdefined( newcb );
|
||||
}
|
||||
}
|
||||
38
f_scripts/fe/js/respond.init.js
Normal file
38
f_scripts/fe/js/respond.init.js
Normal file
@@ -0,0 +1,38 @@
|
||||
var owl = $('.response-carousel');
|
||||
if (typeof(owl.html()) !== "undefined") {
|
||||
owl.owlCarousel({
|
||||
items: 4,
|
||||
loop: false,
|
||||
margin: 10,
|
||||
autoplay: false,
|
||||
dots: false,
|
||||
nav: true,
|
||||
navText: [
|
||||
"<i class='icon-chevron-left icon-white icon-share'></i>",
|
||||
"<i class='icon-chevron-right icon-white icon-share'></i>"
|
||||
],
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
470: {
|
||||
items: 2
|
||||
},
|
||||
560: {
|
||||
items: 1
|
||||
},
|
||||
700: {
|
||||
items: 2
|
||||
},
|
||||
920: {
|
||||
items: 3
|
||||
},
|
||||
1200: {
|
||||
items: 3
|
||||
},
|
||||
1600: {
|
||||
items: 4
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
413
f_scripts/fe/js/responsive-menu.js
Normal file
413
f_scripts/fe/js/responsive-menu.js
Normal file
@@ -0,0 +1,413 @@
|
||||
/*!
|
||||
* Bootstrap v3.2.0 (http://getbootstrap.com)
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=1fa2329711cdf67edca3)
|
||||
* Config saved to config.json and https://gist.github.com/1fa2329711cdf67edca3
|
||||
*/
|
||||
if (typeof jQuery === "undefined") { throw new Error("Bootstrap's JavaScript requires jQuery") }
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: alert.js v3.2.0
|
||||
* http://getbootstrap.com/javascript/#alerts
|
||||
* ========================================================================
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
||||
// COLLAPSE PUBLIC CLASS DEFINITION
|
||||
// ================================
|
||||
|
||||
var Collapse = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
||||
this.transitioning = null
|
||||
|
||||
if (this.options.parent) this.$parent = $(this.options.parent)
|
||||
if (this.options.toggle) this.toggle()
|
||||
}
|
||||
|
||||
Collapse.VERSION = '3.2.0'
|
||||
|
||||
Collapse.DEFAULTS = {
|
||||
toggle: true
|
||||
}
|
||||
|
||||
Collapse.prototype.dimension = function () {
|
||||
var hasWidth = this.$element.hasClass('width')
|
||||
return hasWidth ? 'width' : 'height'
|
||||
}
|
||||
|
||||
Collapse.prototype.show = function () {
|
||||
if (this.transitioning || this.$element.hasClass('in')) return
|
||||
|
||||
var startEvent = $.Event('show.bs.collapse')
|
||||
this.$element.trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) return
|
||||
|
||||
var actives = this.$parent && this.$parent.find('> .panel > .in')
|
||||
|
||||
if (actives && actives.length) {
|
||||
var hasData = actives.data('bs.collapse')
|
||||
if (hasData && hasData.transitioning) return
|
||||
Plugin.call(actives, 'hide')
|
||||
hasData || actives.data('bs.collapse', null)
|
||||
}
|
||||
|
||||
var dimension = this.dimension()
|
||||
|
||||
this.$element
|
||||
.removeClass('collapse')
|
||||
.addClass('collapsing')[dimension](0)
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
var complete = function () {
|
||||
this.$element
|
||||
.removeClass('collapsing')
|
||||
.addClass('collapse in')[dimension]('')
|
||||
this.transitioning = 0
|
||||
this.$element
|
||||
.trigger('shown.bs.collapse')
|
||||
}
|
||||
|
||||
if (!$.support.transition) return complete.call(this)
|
||||
|
||||
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
|
||||
|
||||
this.$element
|
||||
.one('bsTransitionEnd', $.proxy(complete, this))
|
||||
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
|
||||
}
|
||||
|
||||
Collapse.prototype.hide = function () {
|
||||
if (this.transitioning || !this.$element.hasClass('in')) return
|
||||
|
||||
var startEvent = $.Event('hide.bs.collapse')
|
||||
this.$element.trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) return
|
||||
|
||||
var dimension = this.dimension()
|
||||
|
||||
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
|
||||
|
||||
this.$element
|
||||
.addClass('collapsing')
|
||||
.removeClass('collapse')
|
||||
.removeClass('in')
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
var complete = function () {
|
||||
this.transitioning = 0
|
||||
this.$element
|
||||
.trigger('hidden.bs.collapse')
|
||||
.removeClass('collapsing')
|
||||
.addClass('collapse')
|
||||
}
|
||||
|
||||
if (!$.support.transition) return complete.call(this)
|
||||
|
||||
this.$element
|
||||
[dimension](0)
|
||||
.one('bsTransitionEnd', $.proxy(complete, this))
|
||||
.emulateTransitionEnd(350)
|
||||
}
|
||||
|
||||
Collapse.prototype.toggle = function () {
|
||||
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
||||
}
|
||||
|
||||
|
||||
// COLLAPSE PLUGIN DEFINITION
|
||||
// ==========================
|
||||
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('bs.collapse')
|
||||
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
|
||||
if (!data && options.toggle && option == 'show') option = !option
|
||||
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
var old = $.fn.collapse
|
||||
|
||||
$.fn.collapse = Plugin
|
||||
$.fn.collapse.Constructor = Collapse
|
||||
|
||||
|
||||
// COLLAPSE NO CONFLICT
|
||||
// ====================
|
||||
|
||||
$.fn.collapse.noConflict = function () {
|
||||
$.fn.collapse = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
// COLLAPSE DATA-API
|
||||
// =================
|
||||
|
||||
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
|
||||
var href
|
||||
var $this = $(this)
|
||||
var target = $this.attr('data-target')
|
||||
|| e.preventDefault()
|
||||
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
|
||||
var $target = $(target)
|
||||
var data = $target.data('bs.collapse')
|
||||
var option = data ? 'toggle' : $this.data()
|
||||
var parent = $this.attr('data-parent')
|
||||
var $parent = parent && $(parent)
|
||||
|
||||
if (!data || !data.transitioning) {
|
||||
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
||||
}
|
||||
|
||||
Plugin.call($target, option)
|
||||
})
|
||||
|
||||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: scrollspy.js v3.2.0
|
||||
* http://getbootstrap.com/javascript/#scrollspy
|
||||
* ========================================================================
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
||||
// SCROLLSPY CLASS DEFINITION
|
||||
// ==========================
|
||||
|
||||
function ScrollSpy(element, options) {
|
||||
var process = $.proxy(this.process, this)
|
||||
|
||||
this.$body = $('body')
|
||||
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
|
||||
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
||||
this.selector = (this.options.target || '') + ' .nav li > a'
|
||||
this.offsets = []
|
||||
this.targets = []
|
||||
this.activeTarget = null
|
||||
this.scrollHeight = 0
|
||||
|
||||
this.$scrollElement.on('scroll.bs.scrollspy', process)
|
||||
this.refresh()
|
||||
this.process()
|
||||
}
|
||||
|
||||
ScrollSpy.VERSION = '3.2.0'
|
||||
|
||||
ScrollSpy.DEFAULTS = {
|
||||
offset: 10
|
||||
}
|
||||
|
||||
ScrollSpy.prototype.getScrollHeight = function () {
|
||||
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
|
||||
}
|
||||
|
||||
ScrollSpy.prototype.refresh = function () {
|
||||
var offsetMethod = 'offset'
|
||||
var offsetBase = 0
|
||||
|
||||
if (!$.isWindow(this.$scrollElement[0])) {
|
||||
offsetMethod = 'position'
|
||||
offsetBase = this.$scrollElement.scrollTop()
|
||||
}
|
||||
|
||||
this.offsets = []
|
||||
this.targets = []
|
||||
this.scrollHeight = this.getScrollHeight()
|
||||
|
||||
var self = this
|
||||
|
||||
this.$body
|
||||
.find(this.selector)
|
||||
.map(function () {
|
||||
var $el = $(this)
|
||||
var href = $el.data('target') || $el.attr('href')
|
||||
var $href = /^#./.test(href) && $(href)
|
||||
|
||||
return ($href
|
||||
&& $href.length
|
||||
&& $href.is(':visible')
|
||||
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
|
||||
})
|
||||
.sort(function (a, b) { return a[0] - b[0] })
|
||||
.each(function () {
|
||||
self.offsets.push(this[0])
|
||||
self.targets.push(this[1])
|
||||
})
|
||||
}
|
||||
|
||||
ScrollSpy.prototype.process = function () {
|
||||
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
||||
var scrollHeight = this.getScrollHeight()
|
||||
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
|
||||
var offsets = this.offsets
|
||||
var targets = this.targets
|
||||
var activeTarget = this.activeTarget
|
||||
var i
|
||||
|
||||
if (this.scrollHeight != scrollHeight) {
|
||||
this.refresh()
|
||||
}
|
||||
|
||||
if (scrollTop >= maxScroll) {
|
||||
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
||||
}
|
||||
|
||||
if (activeTarget && scrollTop <= offsets[0]) {
|
||||
return activeTarget != (i = targets[0]) && this.activate(i)
|
||||
}
|
||||
|
||||
for (i = offsets.length; i--;) {
|
||||
activeTarget != targets[i]
|
||||
&& scrollTop >= offsets[i]
|
||||
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
||||
&& this.activate(targets[i])
|
||||
}
|
||||
}
|
||||
|
||||
ScrollSpy.prototype.activate = function (target) {
|
||||
this.activeTarget = target
|
||||
|
||||
$(this.selector)
|
||||
.parentsUntil(this.options.target, '.active')
|
||||
.removeClass('active')
|
||||
|
||||
var selector = this.selector +
|
||||
'[data-target="' + target + '"],' +
|
||||
this.selector + '[href="' + target + '"]'
|
||||
|
||||
var active = $(selector)
|
||||
.parents('li')
|
||||
.addClass('active')
|
||||
|
||||
if (active.parent('.dropdown-menu').length) {
|
||||
active = active
|
||||
.closest('li.dropdown')
|
||||
.addClass('active')
|
||||
}
|
||||
|
||||
active.trigger('activate.bs.scrollspy')
|
||||
}
|
||||
|
||||
|
||||
// SCROLLSPY PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('bs.scrollspy')
|
||||
var options = typeof option == 'object' && option
|
||||
|
||||
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
var old = $.fn.scrollspy
|
||||
|
||||
$.fn.scrollspy = Plugin
|
||||
$.fn.scrollspy.Constructor = ScrollSpy
|
||||
|
||||
|
||||
// SCROLLSPY NO CONFLICT
|
||||
// =====================
|
||||
|
||||
$.fn.scrollspy.noConflict = function () {
|
||||
$.fn.scrollspy = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
// SCROLLSPY DATA-API
|
||||
// ==================
|
||||
|
||||
$(window).on('load.bs.scrollspy.data-api', function () {
|
||||
$('[data-spy="scroll"]').each(function () {
|
||||
var $spy = $(this)
|
||||
Plugin.call($spy, $spy.data())
|
||||
})
|
||||
})
|
||||
|
||||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: transition.js v3.2.0
|
||||
* http://getbootstrap.com/javascript/#transitions
|
||||
* ========================================================================
|
||||
* Copyright 2011-2014 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
||||
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
|
||||
// ============================================================
|
||||
|
||||
function transitionEnd() {
|
||||
var el = document.createElement('bootstrap')
|
||||
|
||||
var transEndEventNames = {
|
||||
WebkitTransition : 'webkitTransitionEnd',
|
||||
MozTransition : 'transitionend',
|
||||
OTransition : 'oTransitionEnd otransitionend',
|
||||
transition : 'transitionend'
|
||||
}
|
||||
|
||||
for (var name in transEndEventNames) {
|
||||
if (el.style[name] !== undefined) {
|
||||
return { end: transEndEventNames[name] }
|
||||
}
|
||||
}
|
||||
|
||||
return false // explicit for ie8 ( ._.)
|
||||
}
|
||||
|
||||
// http://blog.alexmaccaw.com/css-transitions
|
||||
$.fn.emulateTransitionEnd = function (duration) {
|
||||
var called = false
|
||||
var $el = this
|
||||
$(this).one('bsTransitionEnd', function () { called = true })
|
||||
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
|
||||
setTimeout(callback, duration)
|
||||
return this
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$.support.transition = transitionEnd()
|
||||
|
||||
if (!$.support.transition) return
|
||||
|
||||
$.event.special.bsTransitionEnd = {
|
||||
bindType: $.support.transition.end,
|
||||
delegateType: $.support.transition.end,
|
||||
handle: function (e) {
|
||||
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}(jQuery);
|
||||
118
f_scripts/fe/js/select.js
Normal file
118
f_scripts/fe/js/select.js
Normal file
@@ -0,0 +1,118 @@
|
||||
var SelectList = {
|
||||
fn: {
|
||||
prepare: function (name) {
|
||||
var extra_span1 = '';
|
||||
var extra_span2 = '';
|
||||
if (name == 'ipp_jump' || name == 'ipp_select') {
|
||||
var text = (name == 'ipp_select' ? 'Items per page' : (name == 'ipp_jump' ? 'Jump to page' : ''));
|
||||
extra_span1 = '<span title="tooltip" data-tipso="' + text + '">';
|
||||
extra_span2 = '</span>';
|
||||
}
|
||||
var select = $('<div class="select-box" id="select-box-' + name + '"/>');
|
||||
var html = '<div class="trigger" id="trigger-' + name + '">' + extra_span1 + $("option:selected", "select[name='" + name + "']").html() + extra_span2 + '</div>';
|
||||
html += '<ul class="choices" id="choices-' + name + '">';
|
||||
|
||||
$('option', "select[name='" + name + "']").each(function () {
|
||||
var $option = $(this);
|
||||
var value = $option.val();
|
||||
var text = $option.html();
|
||||
|
||||
if ($option.is(":selected")) {
|
||||
html += '<li data-value="' + value + '" style="display: none;">' + text + '</li>';
|
||||
} else {
|
||||
html += '<li data-value="' + value + '">' + text + '</li>';
|
||||
}
|
||||
});
|
||||
|
||||
html += '</ul>';
|
||||
select.html(html).insertBefore("select[name='" + name + "']");
|
||||
},
|
||||
|
||||
showHide: function (name) {
|
||||
$('#trigger-' + name, '#select-box-' + name).on('click', function () {
|
||||
var $trigger = $(this);
|
||||
var list = $trigger.next();
|
||||
if (list.is(':hidden')) {
|
||||
list.slideDown(300, function() {
|
||||
$('#ct-wrapper').bind('click', bodyHideSelect);
|
||||
return;
|
||||
});
|
||||
} else {
|
||||
list.slideUp(300, function() {
|
||||
$('#ct-wrapper').unbind('click', bodyHideSelect);
|
||||
return;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
select: function (name) {
|
||||
var $trigger = $('#trigger-' + name);
|
||||
var $select = $("select[name='" + name + "']");
|
||||
var $view = $('#view');
|
||||
|
||||
$('li', '#choices-' + name).on('click', function () {
|
||||
var $li = $(this);
|
||||
var value = $li.html();
|
||||
|
||||
$("#choices-" + name + " li").show();
|
||||
$("#choices-" + name + " li").each(function () {
|
||||
var text = $(this).text();
|
||||
if (text == value) {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
|
||||
$trigger.text($('<div/>').html(value).text());
|
||||
$li.parent().slideUp(300, function () {
|
||||
$select.changeVal($li.data('value'));
|
||||
$view.trigger('click');
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
init: function (name) {
|
||||
for (var method in this.fn) {
|
||||
this.fn[method](name);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.changeVal = function (v) {
|
||||
return $(this).val(v).trigger("change");
|
||||
}
|
||||
|
||||
function bodyHideSelect() {
|
||||
$("#paging-top .choices").each(function(){
|
||||
if ($(this).attr("id") === "choices-ipp_select" && $(this).css("display") === "block") {
|
||||
$(this).slideUp(300, function() { $('#ct-wrapper').unbind('click', bodyHideSelect); return; });
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
function bodyHideSelect2() {
|
||||
$("#paging-top .choices").each(function(){
|
||||
if ($(this).attr("id") === "choices-ipp_select" && $(this).css("display") === "block") {
|
||||
$(this).slideUp(300, function() { $('#ct-wrapper').unbind('click', bodyHideSelect); return; });
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
$(".entry-form-class .choices").each(function(){
|
||||
var choice = $(this);
|
||||
|
||||
alert(choice.attr("id"));
|
||||
|
||||
if (choice.attr("id") !== $(this).find(".choices").attr("id")) {
|
||||
|
||||
if ($(this).find(".choices").css("display") === "block") {
|
||||
choice.slideUp(300, function() { $('#ct-wrapper').unbind('click', bodyHideSelect); return; });
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
1107
f_scripts/fe/js/subdashboard.js
Normal file
1107
f_scripts/fe/js/subdashboard.js
Normal file
File diff suppressed because it is too large
Load Diff
1
f_scripts/fe/js/subdashboard.min.js
vendored
Normal file
1
f_scripts/fe/js/subdashboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
23
f_scripts/fe/js/this.js
Normal file
23
f_scripts/fe/js/this.js
Normal file
@@ -0,0 +1,23 @@
|
||||
;(function(window,document,undefined){var k=this;function l(a,b){var c=a.split("."),d=k;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function aa(a,b,c){return a.call.apply(a.bind,arguments)}
|
||||
function ba(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function n(a,b,c){n=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?aa:ba;return n.apply(null,arguments)}var q=Date.now||function(){return+new Date};function s(a,b){this.K=a;this.w=b||a;this.D=this.w.document}s.prototype.createElement=function(a,b,c){a=this.D.createElement(a);if(b)for(var d in b)b.hasOwnProperty(d)&&("style"==d?a.style.cssText=b[d]:a.setAttribute(d,b[d]));c&&a.appendChild(this.D.createTextNode(c));return a};function t(a,b,c){a=a.D.getElementsByTagName(b)[0];a||(a=document.documentElement);a&&a.lastChild&&a.insertBefore(c,a.lastChild)}function ca(a,b){function c(){a.D.body?b():setTimeout(c,0)}c()}
|
||||
function u(a,b,c){b=b||[];c=c||[];for(var d=a.className.split(/\s+/),e=0;e<b.length;e+=1){for(var f=!1,g=0;g<d.length;g+=1)if(b[e]===d[g]){f=!0;break}f||d.push(b[e])}b=[];for(e=0;e<d.length;e+=1){f=!1;for(g=0;g<c.length;g+=1)if(d[e]===c[g]){f=!0;break}f||b.push(d[e])}a.className=b.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function v(a,b){for(var c=a.className.split(/\s+/),d=0,e=c.length;d<e;d++)if(c[d]==b)return!0;return!1}
|
||||
function w(a){var b=a.w.location.protocol;"about:"==b&&(b=a.K.location.protocol);return"https:"==b?"https:":"http:"}function x(a,b){var c=a.createElement("link",{rel:"stylesheet",href:b}),d=!1;c.onload=function(){d||(d=!0)};c.onerror=function(){d||(d=!0)};t(a,"head",c)}
|
||||
function y(a,b,c,d){var e=a.D.getElementsByTagName("head")[0];if(e){var f=a.createElement("script",{src:b}),g=!1;f.onload=f.onreadystatechange=function(){g||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(g=!0,c&&c(null),f.onload=f.onreadystatechange=null,"HEAD"==f.parentNode.tagName&&e.removeChild(f))};e.appendChild(f);window.setTimeout(function(){g||(g=!0,c&&c(Error("Script load timeout")))},d||5E3);return f}return null};function z(a,b,c,d){this.R=a;this.Z=b;this.Ba=c;this.ra=d}l("webfont.BrowserInfo",z);z.prototype.sa=function(){return this.R};z.prototype.hasWebFontSupport=z.prototype.sa;z.prototype.ta=function(){return this.Z};z.prototype.hasWebKitFallbackBug=z.prototype.ta;z.prototype.ua=function(){return this.Ba};z.prototype.hasWebKitMetricsBug=z.prototype.ua;z.prototype.qa=function(){return this.ra};z.prototype.hasNativeFontLoading=z.prototype.qa;function A(a,b,c,d){this.c=null!=a?a:null;this.g=null!=b?b:null;this.B=null!=c?c:null;this.e=null!=d?d:null}var da=/^([0-9]+)(?:[\._-]([0-9]+))?(?:[\._-]([0-9]+))?(?:[\._+-]?(.*))?$/;A.prototype.compare=function(a){return this.c>a.c||this.c===a.c&&this.g>a.g||this.c===a.c&&this.g===a.g&&this.B>a.B?1:this.c<a.c||this.c===a.c&&this.g<a.g||this.c===a.c&&this.g===a.g&&this.B<a.B?-1:0};A.prototype.toString=function(){return[this.c,this.g||"",this.B||"",this.e||""].join("")};
|
||||
function B(a){a=da.exec(a);var b=null,c=null,d=null,e=null;a&&(null!==a[1]&&a[1]&&(b=parseInt(a[1],10)),null!==a[2]&&a[2]&&(c=parseInt(a[2],10)),null!==a[3]&&a[3]&&(d=parseInt(a[3],10)),null!==a[4]&&a[4]&&(e=/^[0-9]+$/.test(a[4])?parseInt(a[4],10):a[4]));return new A(b,c,d,e)};function C(a,b,c,d,e,f,g,h){this.P=a;this.ja=c;this.ya=e;this.ia=g;this.m=h}l("webfont.UserAgent",C);C.prototype.getName=function(){return this.P};C.prototype.getName=C.prototype.getName;C.prototype.oa=function(){return this.ja};C.prototype.getEngine=C.prototype.oa;C.prototype.pa=function(){return this.ya};C.prototype.getPlatform=C.prototype.pa;C.prototype.na=function(){return this.ia};C.prototype.getDocumentMode=C.prototype.na;C.prototype.ma=function(){return this.m};C.prototype.getBrowserInfo=C.prototype.ma;function D(a,b){this.a=a;this.k=b}var ea=new C("Unknown",0,"Unknown",0,"Unknown",0,void 0,new z(!1,!1,!1,!1));
|
||||
D.prototype.parse=function(){var a;if(-1!=this.a.indexOf("MSIE")||-1!=this.a.indexOf("Trident/")){a=E(this);var b=B(F(this)),c=null,d=null,e=G(this.a,/Trident\/([\d\w\.]+)/,1),f=H(this.k),c=-1!=this.a.indexOf("MSIE")?B(G(this.a,/MSIE ([\d\w\.]+)/,1)):B(G(this.a,/rv:([\d\w\.]+)/,1));""!=e?(d="Trident",B(e)):d="Unknown";a=new C("MSIE",0,d,0,a,0,f,new z("Windows"==a&&6<=c.c||"Windows Phone"==a&&8<=b.c,!1,!1,!!this.k.fonts))}else if(-1!=this.a.indexOf("Opera"))a:if(a="Unknown",c=B(G(this.a,/Presto\/([\d\w\.]+)/,
|
||||
1)),B(F(this)),b=H(this.k),null!==c.c?a="Presto":(-1!=this.a.indexOf("Gecko")&&(a="Gecko"),B(G(this.a,/rv:([^\)]+)/,1))),-1!=this.a.indexOf("Opera Mini/"))c=B(G(this.a,/Opera Mini\/([\d\.]+)/,1)),a=new C("OperaMini",0,a,0,E(this),0,b,new z(!1,!1,!1,!!this.k.fonts));else{if(-1!=this.a.indexOf("Version/")&&(c=B(G(this.a,/Version\/([\d\.]+)/,1)),null!==c.c)){a=new C("Opera",0,a,0,E(this),0,b,new z(10<=c.c,!1,!1,!!this.k.fonts));break a}c=B(G(this.a,/Opera[\/ ]([\d\.]+)/,1));a=null!==c.c?new C("Opera",
|
||||
0,a,0,E(this),0,b,new z(10<=c.c,!1,!1,!!this.k.fonts)):new C("Opera",0,a,0,E(this),0,b,new z(!1,!1,!1,!!this.k.fonts))}else/OPR\/[\d.]+/.test(this.a)?a=I(this):/AppleWeb(K|k)it/.test(this.a)?a=I(this):-1!=this.a.indexOf("Gecko")?(a="Unknown",b=new A,B(F(this)),b=!1,-1!=this.a.indexOf("Firefox")?(a="Firefox",b=B(G(this.a,/Firefox\/([\d\w\.]+)/,1)),b=3<=b.c&&5<=b.g):-1!=this.a.indexOf("Mozilla")&&(a="Mozilla"),c=B(G(this.a,/rv:([^\)]+)/,1)),b||(b=1<c.c||1==c.c&&9<c.g||1==c.c&&9==c.g&&2<=c.B),a=new C(a,
|
||||
0,"Gecko",0,E(this),0,H(this.k),new z(b,!1,!1,!!this.k.fonts))):a=ea;return a};function E(a){var b=G(a.a,/(iPod|iPad|iPhone|Android|Windows Phone|BB\d{2}|BlackBerry)/,1);if(""!=b)return/BB\d{2}/.test(b)&&(b="BlackBerry"),b;a=G(a.a,/(Linux|Mac_PowerPC|Macintosh|Windows|CrOS|PlayStation|CrKey)/,1);return""!=a?("Mac_PowerPC"==a?a="Macintosh":"PlayStation"==a&&(a="Linux"),a):"Unknown"}
|
||||
function F(a){var b=G(a.a,/(OS X|Windows NT|Android) ([^;)]+)/,2);if(b||(b=G(a.a,/Windows Phone( OS)? ([^;)]+)/,2))||(b=G(a.a,/(iPhone )?OS ([\d_]+)/,2)))return b;if(b=G(a.a,/(?:Linux|CrOS|CrKey) ([^;)]+)/,1))for(var b=b.split(/\s/),c=0;c<b.length;c+=1)if(/^[\d\._]+$/.test(b[c]))return b[c];return(a=G(a.a,/(BB\d{2}|BlackBerry).*?Version\/([^\s]*)/,2))?a:"Unknown"}
|
||||
function I(a){var b=E(a),c=B(F(a)),d=B(G(a.a,/AppleWeb(?:K|k)it\/([\d\.\+]+)/,1)),e="Unknown",f=new A,f="Unknown",g=!1;/OPR\/[\d.]+/.test(a.a)?e="Opera":-1!=a.a.indexOf("Chrome")||-1!=a.a.indexOf("CrMo")||-1!=a.a.indexOf("CriOS")?e="Chrome":/Silk\/\d/.test(a.a)?e="Silk":"BlackBerry"==b||"Android"==b?e="BuiltinBrowser":-1!=a.a.indexOf("PhantomJS")?e="PhantomJS":-1!=a.a.indexOf("Safari")?e="Safari":-1!=a.a.indexOf("AdobeAIR")?e="AdobeAIR":-1!=a.a.indexOf("PlayStation")&&(e="BuiltinBrowser");"BuiltinBrowser"==
|
||||
e?f="Unknown":"Silk"==e?f=G(a.a,/Silk\/([\d\._]+)/,1):"Chrome"==e?f=G(a.a,/(Chrome|CrMo|CriOS)\/([\d\.]+)/,2):-1!=a.a.indexOf("Version/")?f=G(a.a,/Version\/([\d\.\w]+)/,1):"AdobeAIR"==e?f=G(a.a,/AdobeAIR\/([\d\.]+)/,1):"Opera"==e?f=G(a.a,/OPR\/([\d.]+)/,1):"PhantomJS"==e&&(f=G(a.a,/PhantomJS\/([\d.]+)/,1));f=B(f);g="AdobeAIR"==e?2<f.c||2==f.c&&5<=f.g:"BlackBerry"==b?10<=c.c:"Android"==b?2<c.c||2==c.c&&1<c.g:526<=d.c||525<=d.c&&13<=d.g;return new C(e,0,"AppleWebKit",0,b,0,H(a.k),new z(g,536>d.c||536==
|
||||
d.c&&11>d.g,"iPhone"==b||"iPad"==b||"iPod"==b||"Macintosh"==b,!!a.k.fonts))}function G(a,b,c){return(a=a.match(b))&&a[c]?a[c]:""}function H(a){if(a.documentMode)return a.documentMode};function J(a){this.xa=a||"-"}J.prototype.e=function(a){for(var b=[],c=0;c<arguments.length;c++)b.push(arguments[c].replace(/[\W_]+/g,"").toLowerCase());return b.join(this.xa)};function K(a,b){this.P=a;this.$=4;this.Q="n";var c=(b||"n4").match(/^([nio])([1-9])$/i);c&&(this.Q=c[1],this.$=parseInt(c[2],10))}K.prototype.getName=function(){return this.P};function L(a){return a.Q+a.$}function fa(a){var b=4,c="n",d=null;a&&((d=a.match(/(normal|oblique|italic)/i))&&d[1]&&(c=d[1].substr(0,1).toLowerCase()),(d=a.match(/([1-9]00|normal|bold)/i))&&d[1]&&(/bold/i.test(d[1])?b=7:/[1-9]00/.test(d[1])&&(b=parseInt(d[1].substr(0,1),10))));return c+b};function ga(a,b,c,d,e){this.d=a;this.p=b;this.T=c;this.j="wf";this.h=new J("-");this.ha=!1!==d;this.C=!1!==e}function M(a){if(a.C){var b=v(a.p,a.h.e(a.j,"active")),c=[],d=[a.h.e(a.j,"loading")];b||c.push(a.h.e(a.j,"inactive"));u(a.p,c,d)}N(a,"inactive")}function N(a,b,c){if(a.ha&&a.T[b])if(c)a.T[b](c.getName(),L(c));else a.T[b]()};function ha(){this.A={}};function O(a,b){this.d=a;this.H=b;this.t=this.d.createElement("span",{"aria-hidden":"true"},this.H)}
|
||||
function P(a,b){var c=a.t,d;d=[];for(var e=b.P.split(/,\s*/),f=0;f<e.length;f++){var g=e[f].replace(/['"]/g,"");-1==g.indexOf(" ")?d.push(g):d.push("'"+g+"'")}d=d.join(",");e="normal";"o"===b.Q?e="oblique":"i"===b.Q&&(e="italic");c.style.cssText="display:block;position:absolute;top:0px;left:0px;visibility:hidden;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+d+";"+("font-style:"+e+";font-weight:"+(b.$+"00")+";")}
|
||||
function Q(a){t(a.d,"body",a.t)}O.prototype.remove=function(){var a=this.t;a.parentNode&&a.parentNode.removeChild(a)};function ja(a,b,c,d,e,f,g,h){this.aa=a;this.va=b;this.d=c;this.s=d;this.H=h||"BESbswy";this.m=e;this.J={};this.Y=f||3E3;this.da=g||null;this.G=this.F=null;a=new O(this.d,this.H);Q(a);for(var p in R)R.hasOwnProperty(p)&&(P(a,new K(R[p],L(this.s))),this.J[R[p]]=a.t.offsetWidth);a.remove()}var R={Ea:"serif",Da:"sans-serif",Ca:"monospace"};
|
||||
ja.prototype.start=function(){this.F=new O(this.d,this.H);Q(this.F);this.G=new O(this.d,this.H);Q(this.G);this.za=q();P(this.F,new K(this.s.getName()+",serif",L(this.s)));P(this.G,new K(this.s.getName()+",sans-serif",L(this.s)));ka(this)};function la(a,b,c){for(var d in R)if(R.hasOwnProperty(d)&&b===a.J[R[d]]&&c===a.J[R[d]])return!0;return!1}
|
||||
function ka(a){var b=a.F.t.offsetWidth,c=a.G.t.offsetWidth;b===a.J.serif&&c===a.J["sans-serif"]||a.m.Z&&la(a,b,c)?q()-a.za>=a.Y?a.m.Z&&la(a,b,c)&&(null===a.da||a.da.hasOwnProperty(a.s.getName()))?S(a,a.aa):S(a,a.va):ma(a):S(a,a.aa)}function ma(a){setTimeout(n(function(){ka(this)},a),25)}function S(a,b){a.F.remove();a.G.remove();b(a.s)};function T(a,b,c,d){this.d=b;this.u=c;this.U=0;this.fa=this.ca=!1;this.Y=d;this.m=a.m}function na(a,b,c,d,e){c=c||{};if(0===b.length&&e)M(a.u);else for(a.U+=b.length,e&&(a.ca=e),e=0;e<b.length;e++){var f=b[e],g=c[f.getName()],h=a.u,p=f;h.C&&u(h.p,[h.h.e(h.j,p.getName(),L(p).toString(),"loading")]);N(h,"fontloading",p);h=null;h=new ja(n(a.ka,a),n(a.la,a),a.d,f,a.m,a.Y,d,g);h.start()}}
|
||||
T.prototype.ka=function(a){var b=this.u;b.C&&u(b.p,[b.h.e(b.j,a.getName(),L(a).toString(),"active")],[b.h.e(b.j,a.getName(),L(a).toString(),"loading"),b.h.e(b.j,a.getName(),L(a).toString(),"inactive")]);N(b,"fontactive",a);this.fa=!0;oa(this)};
|
||||
T.prototype.la=function(a){var b=this.u;if(b.C){var c=v(b.p,b.h.e(b.j,a.getName(),L(a).toString(),"active")),d=[],e=[b.h.e(b.j,a.getName(),L(a).toString(),"loading")];c||d.push(b.h.e(b.j,a.getName(),L(a).toString(),"inactive"));u(b.p,d,e)}N(b,"fontinactive",a);oa(this)};function oa(a){0==--a.U&&a.ca&&(a.fa?(a=a.u,a.C&&u(a.p,[a.h.e(a.j,"active")],[a.h.e(a.j,"loading"),a.h.e(a.j,"inactive")]),N(a,"active")):M(a.u))};function U(a){this.K=a;this.v=new ha;this.Aa=new D(a.navigator.userAgent,a.document);this.a=this.Aa.parse();this.V=this.W=0;this.M=this.N=!0}
|
||||
U.prototype.load=function(a){var b=a.context||this.K;this.d=new s(this.K,b);this.N=!1!==a.events;this.M=!1!==a.classes;var b=new ga(this.d,b.document.documentElement,a,this.N,this.M),c=[],d=a.timeout;b.C&&u(b.p,[b.h.e(b.j,"loading")]);N(b,"loading");var c=this.v,e=this.d,f=[],g;for(g in a)if(a.hasOwnProperty(g)){var h=c.A[g];h&&f.push(h(a[g],e))}c=f;this.V=this.W=c.length;a=new T(this.a,this.d,b,d);g=0;for(d=c.length;g<d;g++)e=c[g],e.L(this.a,n(this.wa,this,e,b,a))};
|
||||
U.prototype.wa=function(a,b,c,d){var e=this;d?a.load(function(a,b,d){pa(e,c,a,b,d)}):(a=0==--this.W,this.V--,a&&0==this.V?M(b):(this.M||this.N)&&na(c,[],{},null,a))};function pa(a,b,c,d,e){var f=0==--a.W;(a.M||a.N)&&setTimeout(function(){na(b,c,d||null,e||null,f)},0)};function qa(a,b,c){this.S=a?a:b+ra;this.q=[];this.X=[];this.ga=c||""}var ra="//fonts.googleapis.com/css";qa.prototype.e=function(){if(0==this.q.length)throw Error("No fonts to load!");if(-1!=this.S.indexOf("kit="))return this.S;for(var a=this.q.length,b=[],c=0;c<a;c++)b.push(this.q[c].replace(/ /g,"+"));a=this.S+"?family="+b.join("%7C");0<this.X.length&&(a+="&subset="+this.X.join(","));0<this.ga.length&&(a+="&text="+encodeURIComponent(this.ga));return a};function sa(a){this.q=a;this.ea=[];this.O={}}
|
||||
var ta={latin:"BESbswy",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},ua={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},va={i:"i",italic:"i",n:"n",normal:"n"},wa=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;sa.prototype.parse=function(){for(var a=this.q.length,b=0;b<a;b++){var c=this.q[b].split(":"),d=c[0].replace(/\+/g," "),e=["n4"];if(2<=c.length){var f;var g=c[1];f=[];if(g)for(var g=g.split(","),h=g.length,p=0;p<h;p++){var m;m=g[p];if(m.match(/^[\w-]+$/)){m=wa.exec(m.toLowerCase());var r=void 0;if(null==m)r="";else{r=void 0;r=m[1];if(null==r||""==r)r="4";else var ia=ua[r],r=ia?ia:isNaN(r)?"4":r.substr(0,1);m=m[2];r=[null==m||""==m?"n":va[m],r].join("")}m=r}else m="";m&&f.push(m)}0<f.length&&(e=f);3==c.length&&(c=c[2],f=[],c=c?c.split(","):f,0<c.length&&(c=ta[c[0]])&&(this.O[d]=c))}this.O[d]||(c=ta[d])&&(this.O[d]=c);for(c=0;c<e.length;c+=1)this.ea.push(new K(d,e[c]))}};function V(a,b){this.a=(new D(navigator.userAgent,document)).parse();this.d=a;this.f=b}var xa={Arimo:!0,Cousine:!0,Tinos:!0};V.prototype.L=function(a,b){b(a.m.R)};V.prototype.load=function(a){var b=this.d;"MSIE"==this.a.getName()&&1!=this.f.blocking?ca(b,n(this.ba,this,a)):this.ba(a)};V.prototype.ba=function(a){for(var b=this.d,c=new qa(this.f.api,w(b),this.f.text),d=this.f.families,e=d.length,f=0;f<e;f++){var g=d[f].split(":");3==g.length&&c.X.push(g.pop());var h="";2==g.length&&""!=g[1]&&(h=":");c.q.push(g.join(h))}d=new sa(d);d.parse();x(b,c.e());a(d.ea,d.O,xa)};function W(a,b){this.d=a;this.f=b;this.o=[]}W.prototype.I=function(a){var b=this.d;return w(this.d)+(this.f.api||"//f.fontdeck.com/s/css/js/")+(b.w.location.hostname||b.K.location.hostname)+"/"+a+".js"};W.prototype.L=function(a,b){var c=this.f.id,d=this.d.w,e=this;c?(d.__webfontfontdeckmodule__||(d.__webfontfontdeckmodule__={}),d.__webfontfontdeckmodule__[c]=function(a,c){for(var d=0,p=c.fonts.length;d<p;++d){var m=c.fonts[d];e.o.push(new K(m.name,fa("font-weight:"+m.weight+";font-style:"+m.style)))}b(a)},y(this.d,this.I(c),function(a){a&&b(!1)})):b(!1)};W.prototype.load=function(a){a(this.o)};function X(a,b){this.d=a;this.f=b;this.o=[]}X.prototype.I=function(a){var b=w(this.d);return(this.f.api||b+"//use.typekit.net")+"/"+a+".js"};X.prototype.L=function(a,b){var c=this.f.id,d=this.d.w,e=this;c?y(this.d,this.I(c),function(a){if(a)b(!1);else{if(d.Typekit&&d.Typekit.config&&d.Typekit.config.fn){a=d.Typekit.config.fn;for(var c=0;c<a.length;c+=2)for(var h=a[c],p=a[c+1],m=0;m<p.length;m++)e.o.push(new K(h,p[m]));try{d.Typekit.load({events:!1,classes:!1})}catch(r){}}b(!0)}},2E3):b(!1)};X.prototype.load=function(a){a(this.o)};function Y(a,b){this.d=a;this.f=b;this.o=[]}Y.prototype.L=function(a,b){var c=this,d=c.f.projectId,e=c.f.version;if(d){var f=c.d.w;y(this.d,c.I(d,e),function(e){if(e)b(!1);else{if(f["__mti_fntLst"+d]&&(e=f["__mti_fntLst"+d]()))for(var h=0;h<e.length;h++)c.o.push(new K(e[h].fontfamily));b(a.m.R)}}).id="__MonotypeAPIScript__"+d}else b(!1)};Y.prototype.I=function(a,b){var c=w(this.d),d=(this.f.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,"");return c+"//"+d+"/"+a+".js"+(b?"?v="+b:"")};Y.prototype.load=function(a){a(this.o)};function Z(a,b){this.d=a;this.f=b}Z.prototype.load=function(a){var b,c,d=this.f.urls||[],e=this.f.families||[],f=this.f.testStrings||{};b=0;for(c=d.length;b<c;b++)x(this.d,d[b]);d=[];b=0;for(c=e.length;b<c;b++){var g=e[b].split(":");if(g[1])for(var h=g[1].split(","),p=0;p<h.length;p+=1)d.push(new K(g[0],h[p]));else d.push(new K(g[0]))}a(d,f)};Z.prototype.L=function(a,b){return b(a.m.R)};var $=new U(k);$.v.A.custom=function(a,b){return new Z(b,a)};$.v.A.fontdeck=function(a,b){return new W(b,a)};$.v.A.monotype=function(a,b){return new Y(b,a)};$.v.A.typekit=function(a,b){return new X(b,a)};$.v.A.google=function(a,b){return new V(b,a)};k.WebFont||(k.WebFont={},k.WebFont.load=n($.load,$),k.WebFontConfig&&$.load(k.WebFontConfig));})(this,document);
|
||||
89
f_scripts/fe/js/tinymce.init.js
Normal file
89
f_scripts/fe/js/tinymce.init.js
Normal file
@@ -0,0 +1,89 @@
|
||||
tinymce.init({
|
||||
selector: '.h-editable',
|
||||
inline: true,
|
||||
toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | outdent indent',
|
||||
menubar: false
|
||||
});
|
||||
|
||||
tinymce.init({
|
||||
selector: '.d-editable',
|
||||
menu: {
|
||||
file: {title: 'File', items: 'newdocument'},
|
||||
edit: {title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall'},
|
||||
format: {title: 'Format', items: 'bold italic underline strikethrough superscript subscript | formats | removeformat'},
|
||||
newmenu: {title: 'Uploads', items: 'insertlive insertvideo insertimage insertaudio insertdoc'},
|
||||
tools: {title: 'View', items: 'visualblocks code'}
|
||||
},
|
||||
menubar: 'file edit format tools newmenu',
|
||||
inline: true,
|
||||
plugins: [
|
||||
'advlist autolink lists link image charmap anchor',
|
||||
'searchreplace visualblocks code fullscreen',
|
||||
'insertdatetime media table contextmenu paste',
|
||||
'textcolor colorpicker'
|
||||
],
|
||||
toolbar: 'undo redo | styleselect | bold italic | forecolor backcolor | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | link',
|
||||
|
||||
setup: function (editor) {
|
||||
if (typeof(lm) != "undefined") {
|
||||
editor.addMenuItem('insertlive', {
|
||||
text: 'Insert Broadcast',
|
||||
icon: 'media',
|
||||
context: 'newmenu',
|
||||
|
||||
onclick: function () {
|
||||
url = _u + "&do=insert&t=live";
|
||||
$.fancybox({type: "ajax", margin: 50, minWidth: "50%", href: url, height: "auto", autoHeight: "true", autoResize: "true", autoCenter: "true"});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (typeof(vm) != "undefined") {
|
||||
editor.addMenuItem('insertvideo', {
|
||||
text: 'Insert Video',
|
||||
icon: 'media',
|
||||
context: 'newmenu',
|
||||
|
||||
onclick: function () {
|
||||
url = _u + "&do=insert&t=video";
|
||||
$.fancybox({type: "ajax", margin: 50, minWidth: "50%", href: url, height: "auto", autoHeight: "true", autoResize: "true", autoCenter: "true"});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (typeof(im) != "undefined") {
|
||||
editor.addMenuItem('insertimage', {
|
||||
text: 'Insert Picture',
|
||||
icon: 'image',
|
||||
content: 'newmenu',
|
||||
|
||||
onclick: function () {
|
||||
url = _u + "&do=insert&t=image";
|
||||
$.fancybox({type: "ajax", margin: 50, minWidth: "50%", href: url, height: "auto", autoHeight: "true", autoResize: "true", autoCenter: "true"});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (typeof(am) != "undefined") {
|
||||
editor.addMenuItem('insertaudio', {
|
||||
text: 'Insert Audio',
|
||||
icon: 'media',
|
||||
content: 'newmenu',
|
||||
|
||||
onclick: function () {
|
||||
url = _u + "&do=insert&t=audio";
|
||||
$.fancybox({type: "ajax", margin: 50, minWidth: "50%", href: url, height: "auto", autoHeight: "true", autoResize: "true", autoCenter: "true"});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (typeof(dm) != "undefined") {
|
||||
editor.addMenuItem('insertdoc', {
|
||||
text: 'Insert Document',
|
||||
icon: 'books',
|
||||
content: 'newmenu',
|
||||
|
||||
onclick: function () {
|
||||
url = _u + "&do=insert&t=doc";
|
||||
$.fancybox({type: "ajax", margin: 50, minWidth: "50%", href: url, height: "auto", autoHeight: "true", autoResize: "true", autoCenter: "true"});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
668
f_scripts/fe/js/tokendashboard.js
Normal file
668
f_scripts/fe/js/tokendashboard.js
Normal file
@@ -0,0 +1,668 @@
|
||||
google.load("visualization", "1", {packages:["corechart"]});
|
||||
|
||||
|
||||
jQuery(window).load(function(){
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
var _sel = new Array;
|
||||
jQuery(".this-week-filter").each(function(index, value){
|
||||
if (jQuery(this).is(":checked")) {
|
||||
_sel[index] = jQuery(this).val();
|
||||
} else {
|
||||
_sel[index] = '0';
|
||||
}
|
||||
});
|
||||
var f = $('#filter-section-sub a.active').attr('rel-t');
|
||||
|
||||
myLineChart1.destroy();
|
||||
thisWeekdata = ((f == '' || f == 'week') ? thisWeek(_sel) : (f == 'month' ? thisMonth(_sel) : (f == 'year' ? thisYear(_sel) : [])));
|
||||
myLineChart1 = new Chart(makeCanvas('chart-1-container')).Bar(thisWeekdata);
|
||||
generateLegend('legend-1-container', thisWeekdata.datasets);
|
||||
}
|
||||
}, "#this-week-uploads");
|
||||
});
|
||||
|
||||
jQuery(window).load(function(){
|
||||
jQuery(document).on({
|
||||
click: function () {
|
||||
var _sel = new Array;
|
||||
jQuery(".last-week-filter").each(function(index, value){
|
||||
if (jQuery(this).is(":checked")) {
|
||||
_sel[index] = jQuery(this).val();
|
||||
} else {
|
||||
_sel[index] = '0';
|
||||
}
|
||||
});
|
||||
var f = $('#filter-section-sub a.active').attr('rel-t');
|
||||
|
||||
myLineChart2.destroy();
|
||||
lastWeekdata = ((f == '' || f == 'week') ? lastWeek(_sel) : (f == 'month' ? lastMonth(_sel) : (f == 'year' ? lastYear(_sel) : [])));
|
||||
myLineChart2 = new Chart(makeCanvas('chart-2-container')).Bar(lastWeekdata);
|
||||
generateLegend('legend-2-container', lastWeekdata.datasets);
|
||||
}
|
||||
}, "#last-week-uploads");
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
function thisWeek(_sel) {
|
||||
var ds = [];
|
||||
_sel = _sel || '';
|
||||
|
||||
_s = {
|
||||
label: "Tokens Received",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: sw1
|
||||
};
|
||||
if (_sel == '' || _sel.indexOf("s") >= 0)
|
||||
ds.push(_s);
|
||||
|
||||
|
||||
var data = {
|
||||
labels: generateWeekLabels("this"),
|
||||
datasets: ds
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function thisMonth(_sel) {
|
||||
var ds = [];
|
||||
_sel = _sel || '';
|
||||
|
||||
_s = {
|
||||
label: "Tokens Received",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: sw1
|
||||
};
|
||||
if (_sel == '' || _sel.indexOf("s") >= 0)
|
||||
ds.push(_s);
|
||||
|
||||
var data = {
|
||||
labels: generateMonthLabels("this"),
|
||||
datasets: ds
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function thisYear(_sel) {
|
||||
var ds = [];
|
||||
_sel = _sel || '';
|
||||
|
||||
_s = {
|
||||
label: "Tokens Received",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: sw1
|
||||
};
|
||||
if (_sel == '' || _sel.indexOf("s") >= 0)
|
||||
ds.push(_s);
|
||||
|
||||
var data = {
|
||||
labels: generateUserYearLabels("this"),
|
||||
datasets: ds
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function thisWeek_subs(_sel) {
|
||||
_sel = _sel || '';
|
||||
|
||||
//_e = (ecount["total"] !== '' && (_sel == '' || _sel.indexOf("e") >= 0)) ? {
|
||||
_e = (_sel == '' || _sel.indexOf("e") >= 0) ? {
|
||||
label: "Donations",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: tws
|
||||
} : {};
|
||||
|
||||
var data = {
|
||||
labels: generateWeekLabels("this"),
|
||||
datasets: [
|
||||
_e
|
||||
]
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function thisMonth_subs(_sel) {
|
||||
_sel = _sel || '';
|
||||
|
||||
//_e = (ecount["total"] !== '' && (_sel == '' || _sel.indexOf("e") >= 0)) ? {
|
||||
_e = (_sel == '' || _sel.indexOf("e") >= 0) ? {
|
||||
label: "Donations",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: tws
|
||||
} : {};
|
||||
|
||||
var data = {
|
||||
labels: generateMonthLabels("this"),
|
||||
datasets: [
|
||||
_e
|
||||
]
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function thisYear_subs(_sel) {
|
||||
_sel = _sel || '';
|
||||
|
||||
//_e = (ecount["total"] !== '' && (_sel == '' || _sel.indexOf("e") >= 0)) ? {
|
||||
_e = (_sel == '' || _sel.indexOf("e") >= 0) ? {
|
||||
label: "Donations",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: tws
|
||||
} : {};
|
||||
|
||||
var data = {
|
||||
labels: generateUserYearLabels("this"),
|
||||
datasets: [
|
||||
_e
|
||||
]
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function lastWeek(_sel) {
|
||||
var ds = [];
|
||||
_sel = _sel || '';
|
||||
|
||||
_s = {
|
||||
label: "Tokens Received",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: sw2
|
||||
};
|
||||
if (_sel == '' || _sel.indexOf("s") >= 0)
|
||||
ds.push(_s);
|
||||
|
||||
var data = {
|
||||
labels: generateWeekLabels("last"),
|
||||
datasets: ds
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
function lastMonth(_sel) {
|
||||
var ds = [];
|
||||
_sel = _sel || '';
|
||||
|
||||
_s = {
|
||||
label: "Tokens Received",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: sw2
|
||||
};
|
||||
if (_sel == '' || _sel.indexOf("s") >= 0)
|
||||
ds.push(_s);
|
||||
|
||||
var data = {
|
||||
labels: generateMonthLabels("last"),
|
||||
datasets: ds
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function lastYear(_sel) {
|
||||
var ds = [];
|
||||
_sel = _sel || '';
|
||||
|
||||
_s = {
|
||||
label: "Tokens Received",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: sw2
|
||||
};
|
||||
if (_sel == '' || _sel.indexOf("s") >= 0)
|
||||
ds.push(_s);
|
||||
|
||||
var data = {
|
||||
labels: generateUserYearLabels("last"),
|
||||
datasets: ds
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function lastWeek_subs(_sel) {
|
||||
_sel = _sel || '';
|
||||
|
||||
_e = (ecount["total"] !== '' && (_sel == '' || _sel.indexOf("e") >= 0)) ? {
|
||||
label: "Donations",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: lws
|
||||
} : {};
|
||||
|
||||
var data = {
|
||||
labels: generateWeekLabels("last"),
|
||||
datasets: [
|
||||
_e
|
||||
]
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function lastMonth_subs(_sel) {
|
||||
_sel = _sel || '';
|
||||
|
||||
_e = (ecount["total"] !== '' && (_sel == '' || _sel.indexOf("e") >= 0)) ? {
|
||||
label: "Donations",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: lws
|
||||
} : {};
|
||||
|
||||
var data = {
|
||||
labels: generateMonthLabels("last"),
|
||||
datasets: [
|
||||
_e
|
||||
]
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function lastYear_subs(_sel) {
|
||||
_sel = _sel || '';
|
||||
|
||||
_e = (ecount["total"] !== '' && (_sel == '' || _sel.indexOf("e") >= 0)) ? {
|
||||
label: "Donations",
|
||||
fillColor: "rgba(133, 187, 101,0.5)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: lws
|
||||
} : {};
|
||||
|
||||
var data = {
|
||||
labels: generateUserYearLabels("last"),
|
||||
datasets: [
|
||||
_e
|
||||
]
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
function memberData() {
|
||||
// Some raw data (not necessarily accurate)
|
||||
var data = {
|
||||
labels: generateUserWeekLabels(),
|
||||
datasets: [
|
||||
{
|
||||
label: "This Week",
|
||||
fillColor: "rgba(133, 187, 101,0.2)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: this_week_users.split(",")
|
||||
},
|
||||
{
|
||||
label: "Last Week",
|
||||
fillColor: "rgba(155, 101, 187,0.2)",
|
||||
strokeColor: "rgba(155, 101, 187,1)",
|
||||
pointColor: "rgba(155, 101, 187,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(155, 101, 187,1)",
|
||||
data: last_week_users.split(",")
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function userData() {
|
||||
// Some raw data (not necessarily accurate)
|
||||
var data = {
|
||||
labels: generateUserYearLabels(),
|
||||
datasets: [
|
||||
{
|
||||
label: "This Year",
|
||||
fillColor: "rgba(133, 187, 101,0.2)",
|
||||
strokeColor: "rgba(133, 187, 101,1)",
|
||||
pointColor: "rgba(133, 187, 101,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(133, 187, 101,1)",
|
||||
data: this_year_earnings.split(",")
|
||||
},
|
||||
{
|
||||
label: "Last Year",
|
||||
fillColor: "rgba(155, 101, 187,0.2)",
|
||||
strokeColor: "rgba(155, 101, 187,1)",
|
||||
pointColor: "rgba(155, 101, 187,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(155, 101, 187,1)",
|
||||
data: last_year_earnings.split(",")
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
Chart.defaults.global.animation = true;
|
||||
Chart.defaults.global.animationSteps = 60;
|
||||
Chart.defaults.global.animationEasing = 'easeInOutQuart';
|
||||
Chart.defaults.global.responsive = true;
|
||||
Chart.defaults.global.maintainAspectRatio = false;
|
||||
|
||||
function drawChart1() {
|
||||
var f = $('#filter-section-sub a.active').attr('rel-t');
|
||||
var thisWeekdata = ((f == '' || f == 'week') ? thisWeek() : (f == 'month' ? thisMonth() : (f == 'year' ? thisYear() : [])));
|
||||
var myLineChart1 = new Chart(makeCanvas('chart-1-container')).Bar(thisWeekdata);
|
||||
generateLegend('legend-1-container', thisWeekdata.datasets);
|
||||
|
||||
return myLineChart1;
|
||||
}
|
||||
var myLineChart1 = drawChart1();
|
||||
|
||||
function drawChart1a() {
|
||||
var f = $('#filter-section-sub a.active').attr('rel-t');
|
||||
var thisWeekdata = ((f == '' || f == 'week') ? thisWeek_subs() : (f == 'month' ? thisMonth_subs() : (f == 'year' ? thisYear_subs() : [])));
|
||||
var myLineChart1a = new Chart(makeCanvas('chart-1a-container')).Line(thisWeekdata);
|
||||
generateLegend('legend-1a-container', thisWeekdata.datasets);
|
||||
|
||||
return myLineChart1a;
|
||||
}
|
||||
var myLineChart1a = drawChart1a();
|
||||
|
||||
function drawChart2() {
|
||||
var f = $('#filter-section-sub a.active').attr('rel-t');
|
||||
var lastWeekdata = ((f == '' || f == 'week') ? lastWeek() : (f == 'month' ? lastMonth() : (f == 'year' ? lastYear() : [])));
|
||||
var myLineChart2 = new Chart(makeCanvas('chart-2-container')).Bar(lastWeekdata);
|
||||
generateLegend('legend-2-container', lastWeekdata.datasets);
|
||||
|
||||
return myLineChart2;
|
||||
}
|
||||
var myLineChart2 = drawChart2();
|
||||
|
||||
function drawChart2a() {
|
||||
var f = $('#filter-section-sub a.active').attr('rel-t');
|
||||
var lastWeekdata = ((f == '' || f == 'week') ? lastWeek_subs() : (f == 'month' ? lastMonth_subs() : (f == 'year' ? lastYear_subs() : [])));
|
||||
var myLineChart2a = new Chart(makeCanvas('chart-2a-container')).Line(lastWeekdata);
|
||||
generateLegend('legend-2a-container', lastWeekdata.datasets);
|
||||
|
||||
return myLineChart2a;
|
||||
}
|
||||
var myLineChart2a = drawChart2a();
|
||||
|
||||
function twStats() {
|
||||
// Some raw data (not necessarily accurate)
|
||||
var data = [
|
||||
{
|
||||
value: twcount["total"],
|
||||
color:"rgb(155,101,187,0.5)",
|
||||
highlight: "rgb(130,73,164,0.5)",
|
||||
label: "Total"
|
||||
},
|
||||
{
|
||||
value: twcount["shared"],
|
||||
color: "rgb(101,133,187,0.5)",
|
||||
highlight: "rgb(73,107,164, 0.5)",
|
||||
label: "Shared"
|
||||
},
|
||||
{
|
||||
value: twcount["earned"],
|
||||
color: "rgb(133,187,101,0.5)",
|
||||
highlight: "rgb(107,164,73,0.5)",
|
||||
label: "Earned"
|
||||
},
|
||||
];
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
function lwStats() {
|
||||
// Some raw data (not necessarily accurate)
|
||||
var data = [
|
||||
{
|
||||
value: lwcount["total"],
|
||||
color:"rgb(155,101,187,0.5)",
|
||||
highlight: "rgb(130,73,164,0.5)",
|
||||
label: "Total"
|
||||
},
|
||||
{
|
||||
value: lwcount["shared"],
|
||||
color: "rgb(101,133,187,0.5)",
|
||||
highlight: "rgb(73,107,164, 0.5)",
|
||||
label: "Shared"
|
||||
},
|
||||
{
|
||||
value: lwcount["earned"],
|
||||
color: "rgb(133,187,101,0.5)",
|
||||
highlight: "rgb(107,164,73,0.5)",
|
||||
label: "Earned"
|
||||
},
|
||||
];
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function generateWeekLabels(type) {
|
||||
moment.locale('us', { week: { dow: 1 }});//set 6 to start week with Sundays
|
||||
moment.locale('us');
|
||||
|
||||
var labels = new Array();
|
||||
var nr = type == "this" ? 0 : 7;
|
||||
var cw = moment().week();
|
||||
var df = nr == 0 ? 0 : 1;
|
||||
var f = $("#week-sort-filters .content-filters li a.active");
|
||||
var cwr = (typeof f.attr("rel-w") !== "undefined" ? f.attr("rel-w") : cw);
|
||||
|
||||
for (var i=0; i<=6; i++) {
|
||||
labels[i] = moment().week(cwr-df).weekday(i).format("ddd, MMM DD");
|
||||
}
|
||||
|
||||
return labels;
|
||||
}
|
||||
function generateMonthLabels(type) {
|
||||
var labels = new Array();
|
||||
var nr = type === "this" ? 0 : 1;
|
||||
var cm = moment().month()+1;
|
||||
var f = $("#week-sort-filters .content-filters li a.active");
|
||||
var mnr = (typeof f.attr("rel-m") !== "undefined" ? f.attr("rel-m") : cm);
|
||||
var df = nr == 0 ? 1 : 2;
|
||||
var tnr = moment().month(mnr-df).daysInMonth();
|
||||
|
||||
for (var i=0; i<tnr; i++) {
|
||||
labels[i] = moment().month(mnr-df).date(i+1).format("ddd DD");
|
||||
}
|
||||
|
||||
return labels;
|
||||
}
|
||||
|
||||
function generateUserYearLabels(type) {
|
||||
var now = moment();
|
||||
var labels = new Array();
|
||||
|
||||
var nr = type === "this" ? 1 : 7;
|
||||
|
||||
for (var i=0; i<=11; i++) {
|
||||
if (nr == 1)
|
||||
labels[i] = moment().month(i).format("MMM");
|
||||
else
|
||||
labels[i] = moment().subtract(1, 'years').month(i).format("MMM");
|
||||
}
|
||||
|
||||
return labels;
|
||||
}
|
||||
function generateLegend(id, items) {
|
||||
var legend = document.getElementById(id);
|
||||
legend.innerHTML = items.map(function(item) {
|
||||
var color = item.color || item.fillColor;
|
||||
var label = item.label;
|
||||
|
||||
if (typeof(label) == 'undefined' || typeof(color) == 'undefined') {
|
||||
return;
|
||||
}
|
||||
return '<li><i style="background:' + color + '"><span title="' + label + '" rel="tooltip"> </span></i></li>';
|
||||
}).join('');
|
||||
|
||||
setTimeout(function () { resizeDelimiter(); }, 1000);
|
||||
|
||||
var animatespeed = 0;
|
||||
var targets = $( '[rel=tooltip]' ),
|
||||
target = false,
|
||||
tooltip = false,
|
||||
title = false;
|
||||
|
||||
targets.bind( 'mouseenter', function()
|
||||
{
|
||||
target = $( this );
|
||||
tip = target.attr( 'title' );
|
||||
tooltip = $( '<div class="tooltip"></div>' );
|
||||
|
||||
if( !tip || tip == '' )
|
||||
return false;
|
||||
|
||||
target.removeAttr( 'title' );
|
||||
tooltip.css( 'opacity', 0 )
|
||||
.html( tip )
|
||||
.appendTo( 'body' );
|
||||
|
||||
var init_tooltip = function()
|
||||
{
|
||||
if( $( window ).width() < tooltip.outerWidth() * 1.5 )
|
||||
tooltip.css( 'max-width', $( window ).width() / 2 );
|
||||
else
|
||||
tooltip.css( 'max-width', 340 );
|
||||
|
||||
var pos_left = target.offset().left + ( target.outerWidth() / 2 ) - ( tooltip.outerWidth() / 2 ),
|
||||
pos_top = target.offset().top - tooltip.outerHeight() - 20;
|
||||
|
||||
if( pos_left < 0 )
|
||||
{
|
||||
pos_left = target.offset().left + target.outerWidth() / 2 - 20;
|
||||
tooltip.addClass( 'left' );
|
||||
}
|
||||
else
|
||||
tooltip.removeClass( 'left' );
|
||||
|
||||
if( pos_left + tooltip.outerWidth() > $( window ).width() )
|
||||
{
|
||||
pos_left = target.offset().left - tooltip.outerWidth() + target.outerWidth() / 2 + 20;
|
||||
tooltip.addClass( 'right' );
|
||||
}
|
||||
else
|
||||
tooltip.removeClass( 'right' );
|
||||
|
||||
if( pos_top < 0 )
|
||||
{
|
||||
var pos_top = target.offset().top + target.outerHeight();
|
||||
tooltip.addClass( 'top' );
|
||||
}
|
||||
else
|
||||
tooltip.removeClass( 'top' );
|
||||
|
||||
tooltip.css( { left: pos_left, top: pos_top } )
|
||||
.animate( { top: '+=10', opacity: 1 }, animatespeed );
|
||||
};
|
||||
|
||||
init_tooltip();
|
||||
$( window ).resize( init_tooltip );
|
||||
|
||||
var remove_tooltip = function()
|
||||
{
|
||||
tip = tooltip.html();
|
||||
|
||||
tooltip.animate( { top: '-=10', opacity: 0 }, animatespeed, function()
|
||||
{
|
||||
$( this ).remove();
|
||||
});
|
||||
|
||||
target.attr( 'title', tip );
|
||||
};
|
||||
|
||||
target.bind( 'mouseleave', remove_tooltip );
|
||||
tooltip.bind( 'click', remove_tooltip );
|
||||
});
|
||||
}
|
||||
|
||||
function makeCanvas(id) {
|
||||
var container = document.getElementById(id);
|
||||
var canvas = document.createElement('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
|
||||
container.innerHTML = '';
|
||||
canvas.width = container.offsetWidth;
|
||||
canvas.height = container.offsetHeight;
|
||||
|
||||
container.appendChild(canvas);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
jQuery(".close_but").click(function () {
|
||||
var _for = "." + jQuery(this).attr("rel-close");
|
||||
jQuery(_for).fadeOut("normal", function () {
|
||||
jQuery(this).detach();
|
||||
});
|
||||
});
|
||||
|
||||
1
f_scripts/fe/js/tokendashboard.min.js
vendored
Normal file
1
f_scripts/fe/js/tokendashboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
f_scripts/fe/js/uploader/.htaccess
Normal file
3
f_scripts/fe/js/uploader/.htaccess
Normal file
@@ -0,0 +1,3 @@
|
||||
<Files ~ "\.(php*|s?p?html|cgi|pl|py|asp|aspx|sh|cin)$">
|
||||
deny from all
|
||||
</Files>
|
||||
1
f_scripts/fe/js/uploader/fileprogress.js
Normal file
1
f_scripts/fe/js/uploader/fileprogress.js
Normal file
@@ -0,0 +1 @@
|
||||
function FileProgress(e,s){this.fileProgressID=e.id;this.opacity=100;this.height=0;this.fileProgressWrapper=document.getElementById(this.fileProgressID);if(!this.fileProgressWrapper){this.fileProgressWrapper=document.createElement("div");this.fileProgressWrapper.className="progressWrapper";this.fileProgressWrapper.id=this.fileProgressID;this.fileProgressElement=document.createElement("div");this.fileProgressElement.className="progressContainer";var r=document.createElement("a");r.className="progressCancel";r.href="#";r.style.visibility="hidden";r.appendChild(document.createTextNode(" "));var i=document.createElement("div");i.className="progressName";i.appendChild(document.createTextNode(e.name));var t=document.createElement("div");t.className="progressBarInProgress";var o=document.createElement("div");o.className="progressBarStatus";o.innerHTML=" ";this.fileProgressElement.appendChild(r);this.fileProgressElement.appendChild(i);this.fileProgressElement.appendChild(o);this.fileProgressElement.appendChild(t);this.fileProgressWrapper.appendChild(this.fileProgressElement);document.getElementById(s).appendChild(this.fileProgressWrapper)}else{this.fileProgressElement=this.fileProgressWrapper.firstChild;this.reset()}this.height=this.fileProgressWrapper.offsetHeight;this.setTimer(null)}FileProgress.prototype.setTimer=function(e){this.fileProgressElement["FP_TIMER"]=e};FileProgress.prototype.getTimer=function(e){return this.fileProgressElement["FP_TIMER"]||null};FileProgress.prototype.reset=function(){this.fileProgressElement.className="progressContainer";this.fileProgressElement.childNodes[2].innerHTML=" ";this.fileProgressElement.childNodes[2].className="progressBarStatus";this.fileProgressElement.childNodes[3].className="progressBarInProgress";this.fileProgressElement.childNodes[3].style.width="0%";this.appear()};FileProgress.prototype.setProgress=function(e){this.fileProgressElement.className="progressContainer green";this.fileProgressElement.childNodes[3].className="progressBarInProgress";this.fileProgressElement.childNodes[3].style.width=e+"%";this.appear()};FileProgress.prototype.setComplete=function(){this.fileProgressElement.className="progressContainer blue";this.fileProgressElement.childNodes[3].className="progressBarComplete";this.fileProgressElement.childNodes[3].style.width="";var e=this;this.setTimer(setTimeout(function(){e.disappear()},5e3))};FileProgress.prototype.setError=function(){this.fileProgressElement.className="progressContainer red";this.fileProgressElement.childNodes[3].className="progressBarError";this.fileProgressElement.childNodes[3].style.width="";var e=this;this.setTimer(setTimeout(function(){e.disappear()},5e3))};FileProgress.prototype.setCancelled=function(){this.fileProgressElement.className="progressContainer";this.fileProgressElement.childNodes[3].className="progressBarError";this.fileProgressElement.childNodes[3].style.width="";var e=this;this.setTimer(setTimeout(function(){e.disappear();$("#progress-stats").addClass("no-display")},1300))};FileProgress.prototype.setStatus=function(e){this.fileProgressElement.childNodes[2].innerHTML=e};FileProgress.prototype.toggleCancel=function(e,s){this.fileProgressElement.childNodes[0].style.visibility=e?"visible":"hidden";if(s){var r=this.fileProgressID;this.fileProgressElement.childNodes[0].onclick=function(){s.cancelUpload(r);return false}}};FileProgress.prototype.appear=function(){if(this.getTimer()!==null){clearTimeout(this.getTimer());this.setTimer(null)}if(this.fileProgressWrapper.filters){try{this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity=100}catch(e){this.fileProgressWrapper.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=100)"}}else{this.fileProgressWrapper.style.opacity=1}this.fileProgressWrapper.style.height="";this.height=this.fileProgressWrapper.offsetHeight;this.opacity=100;this.fileProgressWrapper.style.display=""};FileProgress.prototype.disappear=function(){var e=15;var s=4;var r=30;if(this.opacity>0){this.opacity-=e;if(this.opacity<0){this.opacity=0}if(this.fileProgressWrapper.filters){try{this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity=this.opacity}catch(e){this.fileProgressWrapper.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+this.opacity+")"}}else{this.fileProgressWrapper.style.opacity=this.opacity/100}}if(this.height>0){this.height-=s;if(this.height<0){this.height=0}this.fileProgressWrapper.style.height=this.height+"px"}if(this.height>0||this.opacity>0){var i=this;this.setTimer(setTimeout(function(){i.disappear()},r))}else{this.fileProgressWrapper.style.display="none";this.setTimer(null)}};
|
||||
1
f_scripts/fe/js/uploader/handlers.js
Normal file
1
f_scripts/fe/js/uploader/handlers.js
Normal file
@@ -0,0 +1 @@
|
||||
function fileQueued(e){try{var t=new FileProgress(e,this.customSettings.progressTarget);t.setStatus("Pending...");t.toggleCancel(true,this)}catch(e){this.debug(e)}}function fileQueueError(e,t,s){try{if(t===SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){alert("You have attempted to queue too many files.\n"+(s===0?"You have reached the upload limit.":"You may select "+(s>1?"up to "+s+" files.":"one file.")));return}var a=new FileProgress(e,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(t){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:a.setStatus("File is too big.");this.debug("Error Code: File too big, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:a.setStatus("Cannot upload Zero Byte files.");this.debug("Error Code: Zero byte file, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:a.setStatus("Invalid File Type.");this.debug("Error Code: Invalid File Type, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;default:if(e!==null){a.setStatus("Unhandled Error")}this.debug("Error Code: "+t+", File name: "+e.name+", File size: "+e.size+", Message: "+s);break}}catch(e){this.debug(e)}}function fileDialogComplete(e,t){try{if(e>0){document.getElementById(this.customSettings.cancelButtonId).disabled=false}this.startUpload()}catch(e){this.debug(e)}}function uploadStart(e){try{var t=new FileProgress(e,this.customSettings.progressTarget);t.setStatus("Uploading...");t.toggleCancel(true,this);$("#progress-stats").removeClass("no-display");this.customSettings.progressCount=0;updateDisplay.call(this,e)}catch(e){}return true}function uploadProgress(e,t,s){try{var a=Math.ceil(t/s*100);var i=new FileProgress(e,this.customSettings.progressTarget);i.setProgress(a);i.setStatus("Uploading...");this.customSettings.progressCount++;updateDisplay.call(this,e)}catch(e){this.debug(e)}}function uploadSuccess(e,t){try{var s=new FileProgress(e,this.customSettings.progressTarget);s.setComplete();s.setStatus("Complete.");s.toggleCancel(false);updateDisplay.call(this,e)}catch(e){this.debug(e)}}function uploadError(e,t,s){try{var a=new FileProgress(e,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(t){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:a.setStatus("Upload Error: "+s);this.debug("Error Code: HTTP Error, File name: "+e.name+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:a.setStatus("Upload Failed.");this.debug("Error Code: Upload Failed, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:a.setStatus("Server (IO) Error");this.debug("Error Code: IO Error, File name: "+e.name+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:a.setStatus("Security Error");this.debug("Error Code: Security Error, File name: "+e.name+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:a.setStatus("Upload limit exceeded.");this.debug("Error Code: Upload Limit Exceeded, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:a.setStatus("Failed Validation. Upload skipped.");this.debug("Error Code: File Validation Failed, File name: "+e.name+", File size: "+e.size+", Message: "+s);break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}a.setStatus("Cancelled");a.setCancelled();break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:a.setStatus("Stopped");break;default:a.setStatus("Unhandled Error: "+t);this.debug("Error Code: "+t+", File name: "+e.name+", File size: "+e.size+", Message: "+s);break}}catch(e){this.debug(e)}}function uploadComplete(e){if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}var t="#upload-form";var s=$(t).attr("action");if($("#total-uploads").val()=="0"){$("#fsUploadStats").load(s+"&do=reload-stats")}$.post(s,$(t).serialize(),function(e){$("#form-response").html(e)})}function queueComplete(e){$("#progress-stats").addClass("no-display")}function updateDisplay(e){this.customSettings.tdCurrentSpeed.innerHTML=SWFUpload.speed.formatBPS(e.currentSpeed);this.customSettings.tdAverageSpeed.innerHTML=SWFUpload.speed.formatBPS(e.averageSpeed);this.customSettings.tdTimeRemaining.innerHTML=SWFUpload.speed.formatTime(e.timeRemaining);this.customSettings.tdTimeElapsed.innerHTML=SWFUpload.speed.formatTime(e.timeElapsed);this.customSettings.tdPercentUploaded.innerHTML=SWFUpload.speed.formatPercent(e.percentUploaded);this.customSettings.tdSizeUploaded.innerHTML=SWFUpload.speed.formatBytes(e.sizeUploaded)}
|
||||
2
f_scripts/fe/js/uploader/i18n/ar.js
Normal file
2
f_scripts/fe/js/uploader/i18n/ar.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Arabic (ar)
|
||||
plupload.addI18n({"Stop Upload":"أيقاف التحميل","Upload URL might be wrong or doesn't exist.":"عنوان التحميل ربما يكون خاطئ أو غير متوفر","tb":"تيرابايت","Size":"الحجم","Close":"أغلاق","Init error.":"خطأ في تهيئة","Add files to the upload queue and click the start button.":"أضف ملفات إلى القائمة إنتظار التحميل ثم أضغط على زر البداية","Filename":"أسم الملف","Image format either wrong or not supported.":"صيغة الصورة أما خطاء أو غير مدعومه","Status":"الحالة","HTTP Error.":"خطأ في برتوكول نقل الملفات","Start Upload":"أبدا التحميل","mb":"ميجابايت","kb":"كيلوبايت","Duplicate file error.":"خطاء في تكرار الملف","File size error.":"خطأ في حجم الملف","N/A":"لا شي","gb":"جيجابايت","Error: Invalid file extension:":"خطاء : أمتداد الملف غير صالح :","Select files":"أختر الملفات","%s already present in the queue.":"%s الملف موجود بالفعل في قائمة الانتظار","File: %s":"ملف: %s","b":"بايت","Uploaded %d/%d files":"تحميل %d/%d ملف","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"العناصر المقبوله لتحميل هي %d ملف في هذا الوقت. الملفات الاضافية أزيلة.","%d files queued":"%d الملفات في قائمة الانتظار","File: %s, size: %d, max file size: %d":"ملف: %s, أقصى حجم للملف: %d, حجم: %d","Drag files here.":"سحب الملف هنا","Runtime ran out of available memory.":"الذاكرة المتوفره أنتهت لمدة التشغيل","File count error.":"خطاء في عد الملفات","File extension error.":"خطأ في أمتداد الملف","Error: File too large:":" خطاء : حجم الملف كبير :","Add Files":"أضف ملفات"});
|
||||
2
f_scripts/fe/js/uploader/i18n/bs.js
Normal file
2
f_scripts/fe/js/uploader/i18n/bs.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Bosnian (bs)
|
||||
plupload.addI18n({"Stop Upload":"Prekini dodavanje","Upload URL might be wrong or doesn't exist.":"URL za dodavanje je neispravan ili ne postoji.","tb":"tb","Size":"Veličina","Close":"Zatvori","Init error.":"Inicijalizacijska greška.","Add files to the upload queue and click the start button.":"Dodajte datoteke u red i kliknite na dugme za pokretanje.","Filename":"Naziv datoteke","Image format either wrong or not supported.":"Format slike je neispravan ili nije podržan.","Status":"Status","HTTP Error.":"HTTP greška.","Start Upload":"Započni dodavanje","mb":"mb","kb":"kb","Duplicate file error.":"Dupla datoteka.","File size error.":"Greška u veličini datoteke.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Greška! Neispravan ekstenzija datoteke:","Select files":"Odaberite datoteke","%s already present in the queue.":"%s se već nalazi u redu.","File: %s":"Datoteka: %s","b":"b","Uploaded %d/%d files":"Dodano %d/%d datoteka","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Dodavanje trenutno dozvoljava samo %d datoteka istovremeno. Dodatne datoteke su uklonjene.","%d files queued":"%d datoteka čeka","File: %s, size: %d, max file size: %d":"Datoteka: %s, veličina: %d, maksimalna veličina: %d","Drag files here.":"Dovucite datoteke ovdje.","Runtime ran out of available memory.":"Nema više dostupne memorije.","File count error.":"Greška u brojanju datoeka.","File extension error.":"Greška u ekstenziji datoteke.","Error: File too large:":"Greška! Datoteka je prevelika:","Add Files":"Dodaj datoteke"});
|
||||
2
f_scripts/fe/js/uploader/i18n/ca.js
Normal file
2
f_scripts/fe/js/uploader/i18n/ca.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Catalan (ca)
|
||||
plupload.addI18n({"Stop Upload":"","Upload URL might be wrong or doesn't exist.":"","tb":"","Size":"","Close":"","Init error.":"","Add files to the upload queue and click the start button.":"","Filename":"","Image format either wrong or not supported.":"","Status":"","HTTP Error.":"","Start Upload":"","mb":"","kb":"","Duplicate file error.":"","File size error.":"","N/A":"","gb":"","Error: Invalid file extension:":"","Select files":"","%s already present in the queue.":"","File: %s":"","b":"","Uploaded %d/%d files":"","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"","%d files queued":"","File: %s, size: %d, max file size: %d":"","Drag files here.":"","Runtime ran out of available memory.":"","File count error.":"","File extension error.":"","Error: File too large:":"","Add Files":""});
|
||||
2
f_scripts/fe/js/uploader/i18n/cs.js
Normal file
2
f_scripts/fe/js/uploader/i18n/cs.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Czech (cs)
|
||||
plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Velikost","Close":"Close","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Přidejte soubory do fronty a pak spusťte nahrávání.","Filename":"Název souboru","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Spustit nahrávání","mb":"","kb":"","Duplicate file error.":"","File size error.":"File size error.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Vyberte soubory","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Nahráno %d/%d souborů","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"","Drag files here.":"Sem přetáhněte soubory.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Přidat soubory"});
|
||||
2
f_scripts/fe/js/uploader/i18n/cy.js
Normal file
2
f_scripts/fe/js/uploader/i18n/cy.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Welsh (cy)
|
||||
plupload.addI18n({"Stop Upload":"Atal Lanlwytho","Upload URL might be wrong or doesn't exist.":"URL y lanlwythiad ynb anghywir neu ddim yn bodoli.","tb":"tb","Size":"Maint","Close":"Cau","Init error.":"Gwall cych.","Add files to the upload queue and click the start button.":"Ychwanegwch ffeiliau i'r ciw lanlwytho a chlicio'r botwm dechrau.","Filename":"Enw'r ffeil","Image format either wrong or not supported.":"Fformat delwedd yn anghywir neu heb ei gynnal.","Status":"Statws","HTTP Error.":"Gwall HTTP.","Start Upload":"Dechrau Lanlwytho","mb":"mb","kb":"kb","Duplicate file error.":"Gwall ffeil ddyblyg.","File size error.":"Gwall maint ffeil.","N/A":"Dd/A","gb":"gb","Error: Invalid file extension:":"Gwall: estyniad ffeil annilys:","Select files":"Dewis ffeiliau","%s already present in the queue.":"%s yn y ciw yn barod.","File: %s":"Ffeil: %s","b":"b","Uploaded %d/%d files":"Lanlwythwyd %d/%d ffeil","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Mae'r elfen lanlwytho yn derbyn %d ffeil ar y tro. Caiff ffeiliau ychwanegol eu tynnu.","%d files queued":"%d ffeil mewn ciw","File: %s, size: %d, max file size: %d":"Ffeil: %s, maint: %d, maint mwyaf ffeil: %d","Drag files here.":"Llusgwch ffeiliau yma.","Runtime ran out of available memory.":"Allan o gof.","File count error.":"Gwall cyfri ffeiliau.","File extension error.":"Gwall estyniad ffeil.","Error: File too large:":"Gwall: Ffeil yn rhy fawr:","Add Files":"Ychwanegu Ffeiliau"});
|
||||
2
f_scripts/fe/js/uploader/i18n/da.js
Normal file
2
f_scripts/fe/js/uploader/i18n/da.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Danish (da)
|
||||
plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Størrelse","Close":"Close","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Tilføj filer til køen","Filename":"Filnavn","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"File size error.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Vælg filer","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Uploaded %d/%d files","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"","Drag files here.":"Træk filer her.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"});
|
||||
2
f_scripts/fe/js/uploader/i18n/de.js
Normal file
2
f_scripts/fe/js/uploader/i18n/de.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// German (de)
|
||||
plupload.addI18n({"Stop Upload":"Hochladen stoppen","Upload URL might be wrong or doesn't exist.":"Upload-URL ist falsch oder existiert nicht.","tb":"TB","Size":"Größe","Close":"Schließen","Init error.":"Initialisierungsfehler","Add files to the upload queue and click the start button.":"Dateien hinzufügen und auf 'Hochladen' klicken.","Filename":"Dateiname","Image format either wrong or not supported.":"Bildformat falsch oder nicht unterstützt.","Status":"Status","HTTP Error.":"HTTP-Fehler","Start Upload":"Upload beginnen","mb":"MB","kb":"kB","Duplicate file error.":"","File size error.":"Fehler bei Dateigröße","N/A":"Nicht verfügbar","gb":"GB","Error: Invalid file extension:":"Fehler: Ungültige Dateiendung:","Select files":"Dateien hochladen","%s already present in the queue.":"","File: %s":"Datei: %s","b":"B","Uploaded %d/%d files":"%d/%d Dateien sind hochgeladen","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Der Uploader akzeptiert nur %d Datei(en) pro Durchgang. Überzählige Dateien wurden abgetrennt.","%d files queued":"%d Dateien in der Warteschlange","File: %s, size: %d, max file size: %d":"Datei: %s, Größe: %d, maximale Dateigröße: %d","Drag files here.":"Ziehen Sie die Dateien hier hin","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"Fehler bei Dateiendung","Error: File too large:":"Fehler: Datei zu groß:","Add Files":"Dateien hinzufügen"});
|
||||
2
f_scripts/fe/js/uploader/i18n/el.js
Normal file
2
f_scripts/fe/js/uploader/i18n/el.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Greek (el)
|
||||
plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Μέγεθος","Close":"Close","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Προσθήκη αρχείων στην ουρά μεταφόρτωσης","Filename":"Όνομα αρχείου","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Κατάσταση","HTTP Error.":"HTTP Error.","Start Upload":"Εκκίνηση μεταφόρτωσης","mb":"","kb":"","Duplicate file error.":"","File size error.":"File size error.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Επιλέξτε Αρχεία","%s already present in the queue.":"","File: %s":"File: %s","b":"","Uploaded %d/%d files":"Ανέβηκαν %d/%d αρχεία","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"","Drag files here.":"Σύρετε αρχεία εδώ","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Προσθέστε αρχεία"});
|
||||
2
f_scripts/fe/js/uploader/i18n/en.js
Normal file
2
f_scripts/fe/js/uploader/i18n/en.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// English (en)
|
||||
plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"tb","Size":"Size","Close":"Close","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Add files to the upload queue and click the start button.","Filename":"Filename","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Start Upload","mb":"mb","kb":"kb","Duplicate file error.":"Duplicate file error.","File size error.":"File size error.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Select files","%s already present in the queue.":"%s already present in the queue.","File: %s":"File: %s","b":"b","Uploaded %d/%d files":"Uploaded %d/%d files","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"File: %s, size: %d, max file size: %d","Drag files here1.":"Drag files here2.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"});
|
||||
2
f_scripts/fe/js/uploader/i18n/es.js
Normal file
2
f_scripts/fe/js/uploader/i18n/es.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Spanish (es)
|
||||
plupload.addI18n({"Stop Upload":"Detener Subida.","Upload URL might be wrong or doesn't exist.":"URL de carga inexistente.","tb":"TB","Size":"Tamaño","Close":"Cerrar","Init error.":"Error de inicialización.","Add files to the upload queue and click the start button.":"Agregue archivos a la lista de subida y pulse clic en el botón de Iniciar carga","Filename":"Nombre de archivo","Image format either wrong or not supported.":"Formato de imagen no soportada.","Status":"Estado","HTTP Error.":"Error de HTTP.","Start Upload":"Iniciar carga","mb":"MB","kb":"KB","Duplicate file error.":"Error, archivo duplicado","File size error.":"Error de tamaño de archivo.","N/A":"No disponible","gb":"GB","Error: Invalid file extension:":"Error: Extensión de archivo inválida:","Select files":"Elija archivos","%s already present in the queue.":"%s ya se encuentra en la lista.","File: %s":"Archivo: %s","b":"B","Uploaded %d/%d files":"Subidos %d/%d archivos","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Se aceptan sólo %d archivo(s) al tiempo. Más, no se tienen en cuenta.","%d files queued":"%d archivos en cola.","File: %s, size: %d, max file size: %d":"Archivo: %s, tamaño: %d, tamaño máximo de archivo: %d","Drag files here.":"Arrastre archivos aquí","Runtime ran out of available memory.":"No hay memoria disponible.","File count error.":"Error en contador de archivos.","File extension error.":"Error de extensión de archivo.","Error: File too large:":"Error: archivo demasiado grande:","Add Files":"Agregar archivos"});
|
||||
2
f_scripts/fe/js/uploader/i18n/et.js
Normal file
2
f_scripts/fe/js/uploader/i18n/et.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Estonian (et)
|
||||
plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Üleslaadimise URL võib olla vale või seda pole.","tb":"","Size":"Suurus","Close":"Sulge","Init error.":"Lähtestamise viga.","Add files to the upload queue and click the start button.":"Lisa failid üleslaadimise järjekorda ja klõpsa alustamise nupule.","Filename":"Failinimi","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Olek","HTTP Error.":"HTTP ühenduse viga.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Failisuuruse viga.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Vali faile","%s already present in the queue.":"","File: %s":"Fail: %s","b":"","Uploaded %d/%d files":"Üles laaditud %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Üleslaadimise element saab vastu võtta ainult %d faili ühe korraga. Ülejäänud failid jäetakse laadimata.","%d files queued":"Järjekorras on %d faili","File: %s, size: %d, max file size: %d":"","Drag files here.":"Lohista failid siia.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"Failide arvu viga.","File extension error.":"Faililaiendi viga.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"});
|
||||
2
f_scripts/fe/js/uploader/i18n/fa.js
Normal file
2
f_scripts/fe/js/uploader/i18n/fa.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Persian (fa)
|
||||
plupload.addI18n({"Stop Upload":"توقف انتقال","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"سایز","Close":"بستن","Init error.":"خطا در استارت اسکریپت","Add files to the upload queue and click the start button.":"اضافه کنید فایل ها را به صف آپلود و دکمه شروع را کلیک کنید.","Filename":"نام فایل","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"وضعیت","HTTP Error.":"HTTP خطای","Start Upload":"شروع انتقال","mb":"","kb":"","Duplicate file error.":"","File size error.":"خطای سایز فایل","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"انتخاب فایل","%s already present in the queue.":"","File: %s":" فایل ها : %s","b":"","Uploaded %d/%d files":"منتقل شد %d/%d از فایلها","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"عنصر بارگذار فقط %d فایل رو در یک زمان می پذیرد. سایر فایل ها مجرد از این موضوع هستند.","%d files queued":"%d فایل در صف","File: %s, size: %d, max file size: %d":"","Drag files here.":"بکشید فایل ها رو به اینجا","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"خطای تعداد فایل","File extension error.":"خطا پیشوند فایل","Error: File too large:":"Error: File too large:","Add Files":"افزودن فایل"});
|
||||
2
f_scripts/fe/js/uploader/i18n/fi.js
Normal file
2
f_scripts/fe/js/uploader/i18n/fi.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Finnish (fi)
|
||||
plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"","Size":"Koko","Close":"Sulje","Init error.":"Init virhe.","Add files to the upload queue and click the start button.":"Lisää tiedostoja latausjonoon ja klikkaa aloita-nappia.","Filename":"Tiedostonimi","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Tila","HTTP Error.":"HTTP virhe.","Start Upload":"Start Upload","mb":"","kb":"","Duplicate file error.":"","File size error.":"Tiedostokokovirhe.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Valitse tiedostoja","%s already present in the queue.":"","File: %s":"Tiedosto: %s","b":"","Uploaded %d/%d files":"Ladattu %d/%d tiedostoa","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Latauselementti sallii ladata vain %d tiedosto(a) kerrallaan. Ylimääräiset tiedostot ohitettiin.","%d files queued":"%d tiedostoa jonossa","File: %s, size: %d, max file size: %d":"","Drag files here.":"Raahaa tiedostot tänne.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"Tiedostolaskentavirhe.","File extension error.":"Tiedostopäätevirhe.","Error: File too large:":"Error: File too large:","Add Files":"Add Files"});
|
||||
2
f_scripts/fe/js/uploader/i18n/fr.js
Normal file
2
f_scripts/fe/js/uploader/i18n/fr.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// French (fr)
|
||||
plupload.addI18n({"Stop Upload":"Arrêter l'envoi.","Upload URL might be wrong or doesn't exist.":"L'URL d'envoi est soit erronée soit n'existe pas.","tb":"To","Size":"Taille","Close":"Fermer","Init error.":"Erreur d'initialisation.","Add files to the upload queue and click the start button.":"Ajoutez des fichiers à la file d'attente de téléchargement et appuyez sur le bouton 'Démarrer l'envoi'","Filename":"Nom du fichier","Image format either wrong or not supported.":"Le format d'image est soit erroné soit pas géré.","Status":"État","HTTP Error.":"Erreur HTTP.","Start Upload":"Démarrer l'envoi","mb":"Mo","kb":"Ko","Duplicate file error.":"Erreur: Fichier à double.","File size error.":"Erreur de taille de fichier.","N/A":"Non applicable","gb":"Go","Error: Invalid file extension:":"Erreur: Extension de fichier non valide:","Select files":"Sélectionnez les fichiers","%s already present in the queue.":"%s déjà présent dans la file d'attente.","File: %s":"Fichier: %s","b":"o","Uploaded %d/%d files":"%d fichiers sur %d ont été envoyés","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Que %d fichier(s) peuvent être envoyé(s) à la fois. Les fichiers supplémentaires ont été ignorés.","%d files queued":"%d fichiers en attente","File: %s, size: %d, max file size: %d":"Fichier: %s, taille: %d, taille max. d'un fichier: %d","Drag files here.":"Déposez les fichiers ici.","Runtime ran out of available memory.":"Le traitement a manqué de mémoire disponible.","File count error.":"Erreur: Nombre de fichiers.","File extension error.":"Erreur d'extension de fichier","Error: File too large:":"Erreur: Fichier trop volumineux:","Add Files":"Ajouter des fichiers"});
|
||||
2
f_scripts/fe/js/uploader/i18n/he.js
Normal file
2
f_scripts/fe/js/uploader/i18n/he.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Hebrew (he)
|
||||
plupload.addI18n({"Stop Upload":"בטל העלאה","Upload URL might be wrong or doesn't exist.":"כתובת URL שגויה או לא קיימת.","tb":"tb","Size":"גודל","Close":"סגור","Init error.":"שגיאת איתחול","Add files to the upload queue and click the start button.":"הוסף קבצים לרשימה ולחץ על כפתור שליחה להתחלת פעולות העלאה","Filename":"שם קובץ","Image format either wrong or not supported.":"תמונה פגומה או סוג תמונה לא נתמך","Status":"אחוז","HTTP Error.":"שגיאת פרוטוקול","Start Upload":"שליחה","mb":"MB","kb":"KB","Duplicate file error.":"קובץ כפול","File size error.":"גודל קובץ חורג מהמותר","N/A":"שגיאה","gb":"GB","Error: Invalid file extension:":"שגיאה: סוג קובץ לא נתמך:","Select files":"בחר קבצים","%s already present in the queue.":"%sקובץ נמצא כבר ברשימת הקבצים.","File: %s":"קובץ: %s","b":"B","Uploaded %d/%d files":"מעלה: %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"אלמנטי ההעלאה מקבלים רק %d קובץ(ים) בפעם אחת. קבצים נוספים הוסרו.","%d files queued":"%d קבצים נותרו","File: %s, size: %d, max file size: %d":"קובץ: %s, גודל: %d, גודל מקסימלי: %d","Drag files here.":"גרור קבצים לכאן","Runtime ran out of available memory.":"שגיאת מחסור בזיכרון","File count error.":"שגיאת מספר קבצים","File extension error.":"קובץ זה לא נתמך","Error: File too large:":"שגיאה: קובץ חורג מהגודל המותר:","Add Files":"הוסף קבצים"});
|
||||
2
f_scripts/fe/js/uploader/i18n/hr.js
Normal file
2
f_scripts/fe/js/uploader/i18n/hr.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Croatian (hr)
|
||||
plupload.addI18n({"Stop Upload":"Zaustavi upload.","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"tb","Size":"Veličina","Close":"Zatvori","Init error.":"Greška inicijalizacije.","Add files to the upload queue and click the start button.":"Dodajte datoteke u listu i kliknite Upload.","Filename":"Ime datoteke","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP greška.","Start Upload":"Pokreni upload.","mb":"mb","kb":"kb","Duplicate file error.":"Pogreška dvostruke datoteke.","File size error.":"Greška veličine datoteke.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Pogreška: Nevažeći nastavak datoteke:","Select files":"Odaberite datoteke:","%s already present in the queue.":"%s je već prisutan u listi čekanja.","File: %s":"Datoteka: %s","b":"b","Uploaded %d/%d files":"Uploadano %d/%d datoteka","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d datoteka na čekanju.","File: %s, size: %d, max file size: %d":"Datoteka: %s, veličina: %d, maksimalna veličina: %d","Drag files here.":"Dovucite datoteke ovdje","Runtime ran out of available memory.":"Runtime aplikaciji je ponestalo memorije.","File count error.":"Pogreška u broju datoteka.","File extension error.":"Pogreška u nastavku datoteke.","Error: File too large:":"Pogreška: Datoteka je prevelika:","Add Files":"Dodaj datoteke"});
|
||||
2
f_scripts/fe/js/uploader/i18n/hu.js
Normal file
2
f_scripts/fe/js/uploader/i18n/hu.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Hungarian (hu)
|
||||
plupload.addI18n({"Stop Upload":"Feltöltés leállítása","Upload URL might be wrong or doesn't exist.":"A feltöltő URL hibás vagy nem létezik.","tb":"","Size":"Méret","Close":"Bezárás","Init error.":"Init hiba.","Add files to the upload queue and click the start button.":"A fájlok feltöltési sorhoz való hozzáadása után az Indítás gombra kell kattintani.","Filename":"Fájlnév","Image format either wrong or not supported.":"Rossz vagy nem támogatott képformátum.","Status":"Állapot","HTTP Error.":"HTTP-hiba.","Start Upload":"Feltöltés indítása","mb":"","kb":"","Duplicate file error.":"Duplikáltfájl-hiba.","File size error.":"Hibás fájlméret.","N/A":"Nem elérhető","gb":"","Error: Invalid file extension:":"Hiba: érvénytelen fájlkiterjesztés:","Select files":"Fájlok kiválasztása","%s already present in the queue.":"%s már szerepel a listában.","File: %s":"Fájl: %s","b":"b","Uploaded %d/%d files":"Feltöltött fájlok: %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"A feltöltés egyszerre csak %d fájlt fogad el, a többi fájl nem lesz feltöltve.","%d files queued":"%d fájl sorbaállítva","File: %s, size: %d, max file size: %d":"Fájl: %s, méret: %d, legnagyobb fájlméret: %d","Drag files here.":"Ide lehet húzni a fájlokat.","Runtime ran out of available memory.":"Futásidőben elfogyott a rendelkezésre álló memória.","File count error.":"A fájlok számával kapcsolatos hiba.","File extension error.":"Hibás fájlkiterjesztés.","Error: File too large:":"Hiba: a fájl túl nagy:","Add Files":"Fájlok hozzáadása"});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user