summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE/client/bower_components/jquery.newstape
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/jquery.newstape')
-rw-r--r--ecomp-portal-FE/client/bower_components/jquery.newstape/.bower.json34
-rw-r--r--ecomp-portal-FE/client/bower_components/jquery.newstape/bower.json24
-rw-r--r--ecomp-portal-FE/client/bower_components/jquery.newstape/dist/jquery.newstape.min.js1
-rw-r--r--ecomp-portal-FE/client/bower_components/jquery.newstape/gulpfile.js22
-rw-r--r--ecomp-portal-FE/client/bower_components/jquery.newstape/jquery.newstape.js135
-rw-r--r--ecomp-portal-FE/client/bower_components/jquery.newstape/package.json8
-rw-r--r--ecomp-portal-FE/client/bower_components/jquery.newstape/readme.md99
7 files changed, 323 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/jquery.newstape/.bower.json b/ecomp-portal-FE/client/bower_components/jquery.newstape/.bower.json
new file mode 100644
index 00000000..553e7d17
--- /dev/null
+++ b/ecomp-portal-FE/client/bower_components/jquery.newstape/.bower.json
@@ -0,0 +1,34 @@
+{
+ "name": "jquery.newstape",
+ "version": "1.0.0",
+ "license": "MIT",
+ "main": [
+ "dist/jquery.newstape.min.js"
+ ],
+ "description": "Simple Touch-enabled News Ticker Plugin",
+ "authors": [
+ "Nxeed <nxeed@ya.ru>"
+ ],
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "jquery": ">=1.7",
+ "jquery-mousewheel": ">=3.1.13",
+ "jquery.event.drag-new": "*"
+ },
+ "homepage": "https://github.com/nxeed/JQuery-Newstape",
+ "_release": "1.0.0",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.0",
+ "commit": "c67331c7cbb309da87d08ebb30a92244cda14776"
+ },
+ "_source": "https://github.com/nxeed/JQuery-Newstape.git",
+ "_target": "1.0.0",
+ "_originalSource": "jquery.newstape"
+} \ No newline at end of file
diff --git a/ecomp-portal-FE/client/bower_components/jquery.newstape/bower.json b/ecomp-portal-FE/client/bower_components/jquery.newstape/bower.json
new file mode 100644
index 00000000..e20d577f
--- /dev/null
+++ b/ecomp-portal-FE/client/bower_components/jquery.newstape/bower.json
@@ -0,0 +1,24 @@
+{
+ "name": "jquery.newstape",
+ "version": "1.0.0",
+ "license": "MIT",
+ "main": [
+ "dist/jquery.newstape.min.js"
+ ],
+ "description": "Simple Touch-enabled News Ticker Plugin",
+ "authors": [
+ "Nxeed <nxeed@ya.ru>"
+ ],
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "jquery": ">=1.7",
+ "jquery-mousewheel": ">=3.1.13",
+ "jquery.event.drag-new": "*"
+ }
+}
diff --git a/ecomp-portal-FE/client/bower_components/jquery.newstape/dist/jquery.newstape.min.js b/ecomp-portal-FE/client/bower_components/jquery.newstape/dist/jquery.newstape.min.js
new file mode 100644
index 00000000..f42e320e
--- /dev/null
+++ b/ecomp-portal-FE/client/bower_components/jquery.newstape/dist/jquery.newstape.min.js
@@ -0,0 +1 @@
+"function"!=typeof Object.create&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),function(e,t,n){var o={$elem:null,$content:null,options:{},height:0,contentHeight:0,dragstartPos:0,dragDeltaY:0,dragDeltaYReduce:0,timer:null,pos:0,init:function(t,n){var o=this;o.$elem=e(n),o.$content=e(".newstape-content",o.$elem),o.options=e.extend({},e.fn.newstape.options,o.$elem.data(),t);var a=function(){o.height=o.$elem.outerHeight(),o.contentHeight=o.$content.outerHeight()};o.options.heightSpy&&setInterval(a,1e3),a();var s=function(){o.timer=setInterval(function(){o.move()},o.options.period)};o.$elem.bind("mouseover.newstape",function(){clearInterval(o.timer)}),o.$elem.bind("mouseout.newstape",function(){s()}),o.options.mousewheel&&o.$elem.bind("mousewheel.newstape",function(e){e.preventDefault(),o.pos=e.deltaY>0?o.pos+o.options.mousewheelRate:o.pos-o.options.mousewheelRate,o.move()}),e("a",o.$elem).focus(function(t){o.$elem.scrollTop(0),o.pos=o.height-e(this).position().top-e(this).outerHeight(),o.move()}),o.options.dragable&&o.$elem.bind("dragstart.newstape",function(e,t){o.dragDeltaY=0,o.dragDeltaYReduce=0,o.dragstartPos=o.pos,o.$elem.addClass("newstape-drag")}).bind("drag.newstape",function(e,t){o.dragDeltaY=t.deltaY,o.pos=o.dragstartPos+(t.deltaY-o.dragDeltaYReduce),o.move()}).bind("dragend.newstape",function(e,t){o.$elem.removeClass("newstape-drag")}),s()},move:function(){var e=this,t=function(){e.dragstartPos=e.pos,e.dragDeltaYReduce=e.dragDeltaY,e.dragDeltaY=0};e.pos<=-1*e.contentHeight&&(e.pos=e.height,t()),e.pos>=e.height+e.options.offset&&(e.pos=-1*e.contentHeight,t()),e.$elem.hasClass("newstape-drag")||(e.pos=e.pos-e.options.offset),e.$content.css("top",parseInt(e.pos)+"px")}};e.fn.newstape=function(t){return this.each(function(){if(e(this).data("newstape-init")===!0)return!1;e(this).data("newstape-init",!0);var n=Object.create(o);n.init(t,this),e.data(this,"newstape",n)})},e.fn.newstape.options={period:30,offset:1,mousewheel:!0,dragable:!0,mousewheelRate:30,heightSpy:!0}}(jQuery,window,document); \ No newline at end of file
diff --git a/ecomp-portal-FE/client/bower_components/jquery.newstape/gulpfile.js b/ecomp-portal-FE/client/bower_components/jquery.newstape/gulpfile.js
new file mode 100644
index 00000000..68104cd0
--- /dev/null
+++ b/ecomp-portal-FE/client/bower_components/jquery.newstape/gulpfile.js
@@ -0,0 +1,22 @@
+var gulp = require('gulp'),
+ uglify = require('gulp-uglify'),
+ rename = require('gulp-rename'),
+ clean = require('gulp-clean');
+
+gulp.task('minjs', function() {
+ return gulp.src(['jquery.newstape.js'])
+ .pipe(uglify())
+ .pipe(rename({
+ suffix: ".min"
+ }))
+ .pipe(gulp.dest('dist'));
+});
+
+gulp.task('clean', function() {
+ return gulp.src(['dist/**/.*'], {read: false})
+ .pipe(clean());
+});
+
+gulp.task('default', ['clean', 'minjs'], function() {
+
+}); \ No newline at end of file
diff --git a/ecomp-portal-FE/client/bower_components/jquery.newstape/jquery.newstape.js b/ecomp-portal-FE/client/bower_components/jquery.newstape/jquery.newstape.js
new file mode 100644
index 00000000..3c3d3f26
--- /dev/null
+++ b/ecomp-portal-FE/client/bower_components/jquery.newstape/jquery.newstape.js
@@ -0,0 +1,135 @@
+if (typeof Object.create !== "function") {
+ Object.create = function(obj) {
+ function F() {
+ }
+ F.prototype = obj;
+ return new F();
+ };
+}
+
+(function($, window, document) {
+ var Newstape = {
+ $elem: null,
+ $content: null,
+ options: {},
+ height: 0,
+ contentHeight: 0,
+ dragstartPos: 0,
+ dragDeltaY: 0,
+ dragDeltaYReduce: 0,
+ timer: null,
+ pos: 0,
+ init: function(options, el) {
+ var base = this;
+
+ base.$elem = $(el);
+ base.$content = $('.newstape-content', base.$elem);
+
+ base.options = $.extend({}, $.fn.newstape.options, base.$elem.data(), options);
+
+ var heightRefresh = function() {
+ base.height = base.$elem.outerHeight();
+ base.contentHeight = base.$content.outerHeight();
+ };
+
+ if (base.options.heightSpy) {
+ setInterval(heightRefresh, 1000);
+ }
+
+ heightRefresh();
+
+ var play = function() {
+ base.timer = setInterval(function() {
+ base.move();
+ }, base.options.period);
+ };
+
+ base.$elem.bind('mouseover.newstape', function() {
+ clearInterval(base.timer);
+ });
+
+ base.$elem.bind('mouseout.newstape', function() {
+ play();
+ });
+
+ if (base.options.mousewheel) {
+ base.$elem.bind('mousewheel.newstape', function(e) {
+ e.preventDefault();
+ base.pos = (e.deltaY > 0) ? base.pos + base.options.mousewheelRate : base.pos - base.options.mousewheelRate;
+ base.move();
+ });
+ }
+
+ $('a', base.$elem).focus(function(e) {
+ base.$elem.scrollTop(0);
+ base.pos = base.height - $(this).position().top - $(this).outerHeight();
+ base.move();
+ });
+
+ if (base.options.dragable) {
+ base.$elem.bind('dragstart.newstape', function(e, dd) {
+ base.dragDeltaY = 0;
+ base.dragDeltaYReduce = 0;
+ base.dragstartPos = base.pos;
+ base.$elem.addClass('newstape-drag');
+ }).bind('drag.newstape', function(e, dd) {
+ base.dragDeltaY = dd.deltaY;
+ base.pos = base.dragstartPos + (dd.deltaY - base.dragDeltaYReduce);
+ base.move();
+ }).bind('dragend.newstape', function(e, dd) {
+ base.$elem.removeClass('newstape-drag');
+ });
+ }
+
+ play();
+ },
+ move: function() {
+ var base = this;
+
+ var dragUpdate = function() {
+ base.dragstartPos = base.pos;
+ base.dragDeltaYReduce = base.dragDeltaY;
+ base.dragDeltaY = 0;
+ };
+
+ if (base.pos <= base.contentHeight * -1) {
+ base.pos = base.height;
+ dragUpdate();
+ }
+
+ if (base.pos >= base.height + base.options.offset) {
+ base.pos = base.contentHeight * -1;
+ dragUpdate();
+ }
+
+ if (!base.$elem.hasClass('newstape-drag')) {
+ base.pos = base.pos - base.options.offset;
+ }
+
+ base.$content.css('top', parseInt(base.pos) + 'px');
+ }
+ };
+
+ $.fn.newstape = function(options) {
+ return this.each(function() {
+ if ($(this).data("newstape-init") === true) {
+ return false;
+ }
+
+ $(this).data("newstape-init", true);
+ var newstape = Object.create(Newstape);
+ newstape.init(options, this);
+ $.data(this, "newstape", newstape);
+ });
+ };
+
+ $.fn.newstape.options = {
+ period: 30,
+ offset: 1,
+ mousewheel: true,
+ dragable: true,
+ mousewheelRate: 30,
+ heightSpy: true
+ };
+
+}(jQuery, window, document));
diff --git a/ecomp-portal-FE/client/bower_components/jquery.newstape/package.json b/ecomp-portal-FE/client/bower_components/jquery.newstape/package.json
new file mode 100644
index 00000000..4809c2df
--- /dev/null
+++ b/ecomp-portal-FE/client/bower_components/jquery.newstape/package.json
@@ -0,0 +1,8 @@
+{
+ "devDependencies": {
+ "gulp": "^3.9.0",
+ "gulp-clean": "^0.3.1",
+ "gulp-rename": "^1.2.2",
+ "gulp-uglify": "^1.5.1"
+ }
+} \ No newline at end of file
diff --git a/ecomp-portal-FE/client/bower_components/jquery.newstape/readme.md b/ecomp-portal-FE/client/bower_components/jquery.newstape/readme.md
new file mode 100644
index 00000000..4383382c
--- /dev/null
+++ b/ecomp-portal-FE/client/bower_components/jquery.newstape/readme.md
@@ -0,0 +1,99 @@
+JQuery Newstape
+===================
+Simple Touch-enabled News Ticker Plugin
+
+Newstape is a really small jQuery text scroller plugin which automatically & vertically scrolls through a list of news feeds with support for mouse wheel, mouse drag and touch swipe events.
+
+[DEMO](http://www.jqueryscript.net/demo/Simple-Touch-enabled-News-Ticker-Plugin-Newstape/)
+
+How to use it:
+-------------
+Load jQuery library and the jQuery newstape plugin in your html page.
+``` html
+<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
+<script src="jquery.newstape.js"></script>
+```
+Load the optional jQuery mousewheel plugin for mouse wheel support.
+``` html
+<script src="jquery.mousewheel.min.js"></script>
+```
+Load the optional jquery.event.drag plugin for drag & swipe support.
+``` html
+<script src="jquery.event.drag.min.js"></script>
+```
+Create a basic news ticker as follow.
+``` html
+<div class="newstape">
+ <div class="newstape-content">
+ <div class="news-block">
+ <h3>News 1</h3>
+ <small>13.04.2015</small>
+ <p class="text-justify"> Content 1 ... </p>
+ <div class="text-right"> <a href="#">More</a> </div>
+ <hr />
+ </div>
+ <div class="news-block">
+ <h3>News 2</h3>
+ <small>13.04.2015</small>
+ <p class="text-justify"> Content 2 ... </p>
+ <div class="text-right"> <a href="#">More</a> </div>
+ <hr />
+ </div>
+ <div class="news-block">
+ <h3>News 3</h3>
+ <small>13.04.2015</small>
+ <p class="text-justify"> Content 3 ... </p>
+ <div class="text-right"> <a href="#">More</a> </div>
+ <hr />
+ </div>
+ </div>
+</div>
+```
+Add your own CSS styles to the news ticker.
+``` css
+.newstape {
+ background-color: #3BB0D6;
+ color: #fff;
+ height: 400px;
+ overflow: hidden;
+}
+
+.newstape-content {
+ position: relative;
+ padding: 15px;
+}
+
+.newstape-drag { cursor: ns-resize; }
+
+.text-center { text-align: center; }
+
+.text-right { text-align: right; }
+
+.text-justify { text-align: justify; }
+```
+Call the plugin to start the news ticker.
+``` javascript
+$('.newstape').newstape();
+
+```
+Default settings.
+``` javascript
+$('.newstape').newstape({
+
+// timer period
+period: 30,
+
+// offset pixel count
+offset: 1,
+
+// mousewheel scrolling
+mousewheel: true,
+
+// mousewheel offset pixel count
+mousewheelRate: 30,
+
+// dragging tape content
+dragable: true
+
+});
+```