first commit

This commit is contained in:
alazhar
2020-01-02 22:20:31 +07:00
commit 10eb3340ad
5753 changed files with 631345 additions and 0 deletions

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html><SCRIPT Language=VBScript>

View File

@ -0,0 +1,512 @@
/****************************************************************************
Accessible News Slider
https://github.com/rip747/Yahoo-style-news-slider-for-jQuery
Authors:
Brian Reindel
http://blog.reindel.com
Andrea Ferracani
http://www.micc.unifi.it/ferracani
Maintainer:
Anthony Petruzzi
http://rip747.github.com/
License:
Unrestricted. This script is free for both personal and commercial use.
*****************************************************************************/
(function( $ ){
$.fn.accessNews = function(settings){
var defaults = {
moduleclass: '',
// title for the display
title: "TODAY NEWS:",
// subtitle for the display
subtitle: "November 27 2010",
overlaycontentbx: true,
showcontenttitle:true,
showcontentdesc : true,
// number of slides to advance when paginating
slideBy: 4,
// the speed for the pagination
speed: "normal",
// slideshow interval
slideShowInterval: 5000,
// delay before slide show begins
slideShowDelay: 5000,
// theme
theme: "default",
// allow the pagination to wrap continuously instead of stopping when the beginning or end is reached
continuousPaging : true,
// selector for the story title
contentTitle: "h3",
// selector for the story subtitle
contentSubTitle: "abbr",
// selector for the story description
contentDescription: "p",
thumbbxwidth : 107,
imgheight : 400,
contentopacity :0.5,
outerwrapperwclass :'',
// function to call when the slider first initializes
onLoad: null,
// function to call when the slider is done being created
onComplete: null
};
return this.each(function(){
settings = jQuery.extend(defaults, settings);
//console.log(settings.speed);
var _this = jQuery(this);
var stories = _this.children();
//console.log(_this);
//_this.append('<div style="clear:both;"></div>');
var intervalId;
var _storyIndictor;
var _storyIndictors;
var container = {
_wrapper: "<div class=\"cbystylenewssldroutrwrpr\"><div class=\"jqans-wrapper " + settings.theme +" "+ settings.moduleclass +"\"></div></div>",
_container: "<div class=\"jqans-container\"></div>",
_headline: jQuery("<div class='jqans-headline'></div>").html(["<p><strong>", settings.title, "</strong> ", settings.subtitle, "</p>"].join("")),
_content: jQuery("<div class='jqans-content'></div>"),
_stories: "<div class=\"jqans-stories\"></div>",
_first: jQuery(stories[0]),
init: function(){
if (settings.onLoad)
{
settings.onLoad.call($(this));
}
//console.log(_this);
// wrap the ul with our div class and assigned theme
_this.wrap(this._wrapper);
// our container where we show the image and news item
_this.before(this._container);
// set the width of the container
//console.log(this._first.outerWidth(true));
var width = ((stories.length+1) * (this._first.outerWidth(true)+1));
_this.css("width", width);
if (settings.title.length)
{
this.append(this._headline);
}
this.append(this._content);
// create the selector indictor
this.selector(width);
this.set(0);
// pagination setup
pagination.init();
// slideshow setup
slideshow.init();
//_this.wrap(this._stories).after('<a href="#" class="cbystylessplay" ></a>');
_this.wrap(this._stories);
_this.parent('div.jqans-stories').before('<a class="cbystylessplay" href="#"></a>');
_this.after('<span class="jqans-pagination-controls-next"><a href="#" title="Next">Next &gt;&gt;</a></span>');
_this.before('<span class="jqans-pagination-controls-back"><a href="#" title="Prev">Prev &gt;&gt;</a></span>');
var _next = jQuery(".jqans-pagination-controls-next > a");
var _back = jQuery(".jqans-pagination-controls-back > a");
_next.click(function(event){
//event.preventDefault();
//console.log('next');
var page = pagination._currentPage + 1;
pagination.to(page);
return false;
});
_back.click(function(event){
//console.log( pagination._currentPage);
//event.preventDefault();
var page = pagination._currentPage - 1;
pagination.to(page);
//pagination.to(2);
return false;
});
if (settings.onComplete)
{
settings.onComplete.call($(this));
}
},
selector: function(width){
var s = "";
for(var i = 1; i <= stories.length; i++){
s += "<li><div/></li>";
}
/*
var o = jQuery("<div class=\"jqans-stories-selector\"></div>");
o.append("<ul>"+ s +"</ul>");
_storyIndictor = jQuery(o.find("ul"));
_storyIndictors = _storyIndictor.children();
o.css("width", width);
_this.before(o);
*/
},
append: function(content){
this.get().append(content);
},
// returns the main container
get: function(){
return _this.parents("div.jqans-wrapper").find('div.jqans-container');
},
set: function(position){
var container = this.get();
//console.log(container);
var story = jQuery(stories[position]);
//console.log(story);
//var storyIndictor = jQuery(_storyIndictors[position]);
var _content = jQuery("div.jqans-content", container);
//var img = jQuery('<img></img>');
var para = jQuery('<div class="cbystylesscntnt"></div>');
var title = jQuery(settings.contentTitle + " a", story).attr('title') || jQuery(settings.contentTitle, story).text();
//console.log(jQuery(settings.contentTitle + " a", story).attr('href'));
var href = jQuery(settings.contentTitle + " a", story).attr('href');
//img.attr('src', jQuery('img', story).attr('longdesc') || jQuery('img', story).attr('src'));
var imgsrc = jQuery('img', story).attr('longdesc') || jQuery('img', story).attr('src');
//console.log(imgsrc);
var img = jQuery('<a href="'+ href +'" target="_blank"><img style="height:'+settings.imgheight+'px;width:100%;" src="'+ imgsrc +'" alt="img"/></a>');
var contenttitle = '';
var contentdesc = '';
if(settings.showcontenttitle){
contenttitle = '<h1><a href="'+ href +'" target="_blank">' + title + '</a></h1>';
}
if(settings.showcontentdesc){
contentdesc = "<p>" + jQuery(settings.contentDescription, story).html() + "</p>";
}
if(settings.overlaycontentbx){
para.html( contenttitle + contentdesc);
}
_content.empty();
//console.log(img);
_content.append(img);
//console.log(_content.find('img'));
_content.find('img').css('display','none');
//_content.find('img').fadeOut();
_content.find('img').fadeIn();
//_content.find('img').css('visibility','hidden');
//console.log(_content);
//console.log(img);
_content.append(para);
stories.removeClass('selected');
story.addClass('selected');
//_storyIndictors.removeClass('selected');
//storyIndictor.addClass('selected');
}
};
var pagination = {
loaded: false,
_animating: false,
_totalPages: 0,
_currentPage: 1,
_storyWidth: 0,
_slideByWidth: 0,
init: function(){
//console.log(settings.thumbbxwidth);
//console.log(this);
var thumbbxwdth = parseInt(settings.thumbbxwidth);
var wrapperwidth = $('.'+settings.outerwrapperwclass).width();
var factorofThumbBxWdthPx = Math.floor((parseInt(wrapperwidth))/thumbbxwdth);
settings.slideBy = factorofThumbBxWdthPx;
// if(factorofThumbBxWdthPx != NaN){
// console.log(factorofThumbBxWdthPx);
// }
if (stories.length > settings.slideBy) {
this._totalPages = Math.ceil(stories.length / settings.slideBy);
this._storyWidth = jQuery(stories[0]).outerWidth(true);
this._slideByWidth = this._storyWidth * settings.slideBy;
this.draw();
this.loaded = true;
}
},
draw: function(){
//console.log()
//var _viewAll = jQuery("<div class=\"jqans-pagination\"></div>").html(["<div class=\"jqans-pagination-count\"><div class=\"cbystylesspgcnt\" ><span style=\"float:left;\"><span class=\"jqans-pagination-count-start\">1</span> - <span class=\"jqans-pagination-count-end\">", settings.slideBy, "</span> of <span class=\"jqans-pagination-count-total\">", stories.length, "</span> total </span></div></div><div class=\"jqans-pagination-controls\"><span class=\"jqans-pagination-controls-back\"><a href=\"#\" title=\"Back\">&lt;&lt; Back</a></span><span class=\"jqans-pagination-controls-next\"><a href=\"#\" title=\"Next\">Next &gt;&gt;</a></span></div>"].join(""));
var _viewAll = jQuery("<div class=\"jqans-pagination\"></div>").html(["<div class=\"jqans-pagination-count\"><div class=\"cbystylesspgcnt\" ><p><span class=\"jqans-pagination-count-start\">1</span> - <span class=\"jqans-pagination-count-end\">", settings.slideBy, "</span> of <span class=\"jqans-pagination-count-total\">", stories.length, "</span> total </p></div></div>"].join(""));
_this.after(_viewAll);
//_this.after('<a>');
//<div class=\"jqans-pagination-controls\"><span class=\"jqans-pagination-controls-back\"><a href=\"#\" title=\"Back\">&lt;&lt; Back</a></span><span class=\"jqans-pagination-controls-next\"><a href=\"#\" title=\"Next\">Next &gt;&gt;</a></span></div>
//_this.append('<span class="jqans-pagination-controls-next"><a href="#" title="Next">Next &gt;&gt;</a></span>');
//_this.prepend('<span class="jqans-pagination-controls-back"><a href="#" title="Prev">Prev &gt;&gt;</a></span>');
/*
var _next = jQuery(".jqans-pagination-controls-next > a", _this);
var _back = jQuery(".jqans-pagination-controls-back > a", _this);
_next.click(function(event){
event.preventDefault();
console.log('next');
var page = pagination._currentPage + 1;
pagination.to(page);
return false;
});
_back.click(function(event){
event.preventDefault();
var page = pagination._currentPage - 1;
pagination.to(page);
return false;
});
*/
},
to: function(page){
if(this._animating){
return;
}
if(!this._totalPages){
return;
}
//console.log(page);
// we're animating!
this._animating = true;
var viewAll = _this.parent("div").next(".jqans-pagination");
var startAt = jQuery(".jqans-pagination-count-start", viewAll);
var endAt = jQuery(".jqans-pagination-count-end", viewAll);
if(page > this._totalPages)
{
page = settings.continuousPaging ? 1 : this._totalPages;
}
if (page < 1)
{
page = settings.continuousPaging ? this._totalPages : 1;
}
//console.log(this._totalPages);
var _startAt = (page * settings.slideBy) - settings.slideBy;
var _endAt = (page * settings.slideBy);
if (_endAt > stories.length)
{
_endAt = stories.length;
}
var _left = parseInt(_this.css("left"));
var _offset = (page * this._slideByWidth) - this._slideByWidth;
startAt.html(_startAt + 1);
endAt.html(_endAt);
_left = (_offset * -1);
_this.animate({
left: _left+22
}, settings.speed);
//console.log(_storyIndictor);
/*
_storyIndictor.animate({
left: _left+22
}, settings.speed);
*/
// when paginating set the active story to the first
// story on the page
container.set(_startAt);
this._currentPage = page;
// no more animating :(
this._animating = false;
}
};
var slideshow = {
_pauseclicked : false,
init: function(){
this.attach();
this.off();
intervalId = setTimeout(function(){
slideshow.on();
}, settings.slideShowDelay);
},
on: function(){
this.off();
intervalId = setInterval(function(){
slideshow.slide();
}, settings.slideShowInterval);
},
off: function(){
clearInterval(intervalId);
},
slide: function(){
//currently selected story
var current = jQuery("li.selected", _this);
// the next story
var next = current.next("li");
// page number
var page = 0;
if (!next.length)
{
next = jQuery(stories[0]);
page = 1;
}
var storyIndex = stories.index(next);
if (pagination.loaded) {
var storyMod = (storyIndex) % settings.slideBy;
if (storyMod === 0) {
page = (Math.ceil(storyIndex / settings.slideBy)) + 1;
}
if (page > 0) {
pagination.to(page);
}
}
container.set(storyIndex);
},
attach: function(){
var that = jQuery(_this).parent("div.jqans-wrapper");
that.hover(function(){
// pause the slideshow on hover
slideshow.off();
}, function (){
// resume slideshow on mouseout
//console.log(slideshow._pauseclicked);
if(slideshow._pauseclicked == false){
//console.log(' inside '+slideshow._pauseclicked);
slideshow.on();
}
});
}
};
//setup the container
container.init();
// append hover every to each element to update container content
stories.hover(function(){
// set container contect to hovered li
container.set(stories.index(this));
}, function(){
// do nothing
});
/** Added By Mir Md. Faysal **/
$('a.cbystylessplay').click(function(event){
//console.log('play clicked');
event.preventDefault();
//console.log(slideshow._pauseclicked);
$('a.cbystylessplay').toggleClass('cbystylesspause');
if(slideshow._pauseclicked == false){
slideshow._pauseclicked = true;
slideshow.off();
}else{
slideshow._pauseclicked = false;
slideshow.on();
}
//console.log(slideshow._pauseclicked);
});
$('a.cbystylessplay').hover(function(){
$('a.cbystylessplay').toggleClass('cbystylessplayhvr');
});
$('div.jqans-content').hover(function(){
//console.log('sada');
$('div.cbystylesscntnt').css('opacity','1');
}, function(){
$('div.cbystylesscntnt').css('opacity',settings.contentopacity);
});
$('div.jqans-pagination-count').hover(function(){
$('div.cbystylesscntnt').css('opacity','1');
},
function(){
$('div.cbystylesscntnt').css('opacity',settings.contentopacity);
});
$('span.jqans-pagination-controls-back').hover(function(){
//$('span.jqans-pagination-controls-back').css('background-color','#5771FF');
$('span.jqans-pagination-controls-back a').addClass('jqans-pagination-controlshvr');
}, function(){
//$('span.jqans-pagination-controls-back').css('background-color','#FFF');
$('span.jqans-pagination-controls-back a').removeClass('jqans-pagination-controlshvr');
});
$('span.jqans-pagination-controls-next').hover(function(){
//$('span.jqans-pagination-controls-next').css('background-color','#5771FF');
$('span.jqans-pagination-controls-next a').addClass('jqans-pagination-controlshvr');
}, function(){
//$('span.jqans-pagination-controls-next').css('background-color','#FFF');
$('span.jqans-pagination-controls-next a').removeClass('jqans-pagination-controlshvr');
});
//console.log(settings.thumbbxwidth);
responsive(settings.thumbbxwidth, settings.outerwrapperwclass);
$(window).resize(function() {
responsive(settings.thumbbxwidth);
});
});
};
})( jQuery );
function responsive(thumbbxwdth,outerwrapperwclass){
thumbbxwdth = parseInt(thumbbxwdth);
var wrapperwidth = jQuery('.'+outerwrapperwclass).width();
var factorofThumbBxWdthPx = Math.floor((parseInt(wrapperwidth) )/thumbbxwdth);
//console.log(factorof107px);
var innerwrprwidth = thumbbxwdth*factorofThumbBxWdthPx; //width of the thumb is 107px; width of the container adjusted so that thumbs fit the container
innerwrprwidth += 'px';
//jQuery('div.jqans-wrapper').css('width',innerwrprwidth);
//jQuery('div.jqans-content').css('width',innerwrprwidth);
/*jQuery('div.cbystylesscntnt').css('width',innerwrprwidth);*/
}

File diff suppressed because it is too large Load Diff