drop jquery.inview as it is unused

This commit is contained in:
Morris Jobke 2014-11-05 12:57:18 +01:00
parent 97cbec8b8d
commit a857bf1d50
5 changed files with 0 additions and 192 deletions

View File

@ -15,7 +15,6 @@ filter:
- 'core/js/jquery-showpassword.js'
- 'core/js/jquery-tipsy.js'
- 'core/js/jquery-ui-1.10.0.custom.js'
- 'core/js/jquery.inview.js'
- 'core/js/placeholders.js'
- 'core/js/underscore.js'
- 'core/js/jquery.multiselect.js'

View File

@ -1,41 +0,0 @@
Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales
http://creativecommons.org/licenses/by-nc-sa/2.0/uk/
You are free:
* to copy, distribute, display, and perform the work
* to make derivative works
Under the following conditions:
* Attribution — You must give the original author credit.
Attribute this work:
Information
What does "Attribute this work" mean?
The page you came from contained embedded licensing metadata,
including how the creator wishes to be attributed for re-use.
You can use the HTML here to cite the work. Doing so will
also include metadata on your page so that others can find the
original work as well.
* Non-Commercial — You may not use this work for commercial
purposes.
* Share Alike — If you alter, transform, or build upon this
work, you may distribute the resulting work only under a
licence identical to this one.
With the understanding that:
* Waiver — Any of the above conditions can be waived if you get
permission from the copyright holder.
* Other Rights — In no way are any of the following rights
affected by the license:
o Your fair dealing or fair use rights;
o The author's moral rights;
o Rights other persons may have either in the work itself
or in how the work is used, such as publicity or privacy rights.
* Notice — For any reuse or distribution, you must make clear to
others the licence terms of this work.

View File

@ -1,134 +0,0 @@
/**
* author Christopher Blum
* - based on the idea of Remy Sharp, http://remysharp.com/2009/01/26/element-in-view-event-plugin/
* - forked from http://github.com/zuk/jquery.inview/
*/
(function ($) {
var inviewObjects = {}, viewportSize, viewportOffset,
d = document, w = window, documentElement = d.documentElement, expando = $.expando, isFiring = false, $elements = {};
$.event.special.inview = {
add: function(data) {
var inviewObject = { data: data, $element: $(this) }
inviewObjects[data.guid + "-" + this[expando]] = inviewObject;
var selector = inviewObject.data.selector,
$element = inviewObject.$element;
var hash = parseInt(getHash( data.guid + this[expando]));
$elements[hash] = selector ? $element.find(selector) : $element;
},
remove: function(data) {
try { delete inviewObjects[data.guid + "-" + this[expando]]; } catch(e) {}
try {
var hash = parseInt(getHash(data.guid + this[expando]));
delete($elements[hash]);
} catch (e){}
}
};
function getHash(str){
str = str+'';
var hash = 0;
if (str.length == 0) return hash;
for (i = 0; i < str.length; i++) {
char = str.charCodeAt(i);
hash = ((hash<<5)-hash)+char;
hash = hash & hash; // Convert to 32bit integer
}
return Math.abs(hash);
}
function getViewportSize() {
var mode, domObject, size = { height: w.innerHeight, width: w.innerWidth };
// if this is correct then return it. iPad has compat Mode, so will
// go into check clientHeight/clientWidth (which has the wrong value).
if (!size.height) {
mode = d.compatMode;
if (mode || !$.support.boxModel) { // IE, Gecko
domObject = mode === 'CSS1Compat' ?
documentElement : // Standards
d.body; // Quirks
size = {
height: domObject.clientHeight,
width: domObject.clientWidth
};
}
}
return size;
}
function getViewportOffset() {
return {
top: w.pageYOffset || documentElement.scrollTop || (d.body?d.body.scrollTop:0),
left: w.pageXOffset || documentElement.scrollLeft || (d.body?d.body.scrollLeft:0)
};
}
function checkInView() {
if (isFiring){
return;
}
isFiring = true;
viewportSize = viewportSize || getViewportSize();
viewportOffset = viewportOffset || getViewportOffset();
for (var i in $elements) {
if (isNaN(parseInt(i))) {
continue;
}
var $element = $($elements[i]),
elementSize = { height: $element.height(), width: $element.width() },
elementOffset = $element.offset(),
inView = $element.data('inview'),
visiblePartX,
visiblePartY,
visiblePartsMerged;
// Don't ask me why because I haven't figured out yet:
// viewportOffset and viewportSize are sometimes suddenly null in Firefox 5.
// Even though it sounds weird:
// It seems that the execution of this function is interferred by the onresize/onscroll event
// where viewportOffset and viewportSize are unset
if (!viewportOffset || !viewportSize) {
isFiring = false;
return;
}
if (elementOffset.top + elementSize.height > viewportOffset.top &&
elementOffset.top < viewportOffset.top + viewportSize.height &&
elementOffset.left + elementSize.width > viewportOffset.left &&
elementOffset.left < viewportOffset.left + viewportSize.width) {
visiblePartX = (viewportOffset.left > elementOffset.left ?
'right' : (viewportOffset.left + viewportSize.width) < (elementOffset.left + elementSize.width) ?
'left' : 'both');
visiblePartY = (viewportOffset.top > elementOffset.top ?
'bottom' : (viewportOffset.top + viewportSize.height) < (elementOffset.top + elementSize.height) ?
'top' : 'both');
visiblePartsMerged = visiblePartX + "-" + visiblePartY;
if (!inView || inView !== visiblePartsMerged) {
$element.data('inview', visiblePartsMerged).trigger('inview', [true, visiblePartX, visiblePartY]);
}
} else if (inView) {
$element.data('inview', false).trigger('inview', [false]);
}
}
isFiring = false;
}
$(w).bind("scroll resize", function() {
viewportSize = viewportOffset = null;
});
// Use setInterval in order to also make sure this captures elements within
// "overflow:scroll" elements or elements that appeared in the dom tree due to
// dom manipulation and reflow
// old: $(window).scroll(checkInView);
//
// By the way, iOS (iPad, iPhone, ...) seems to not execute, or at least delays
// intervals while the user scrolls. Therefore the inview event might fire a bit late there
setInterval(checkInView, 250);
})(jQuery);

View File

@ -1,15 +0,0 @@
jQuery.inview is licensed Attribution-Non-Commercial-Share Alike 2.0 but the
conditions has been waived by the author in the following tweet:
https://twitter.com/#!/ChristopherBlum/status/148382899887013888
Saying:
Thomas Tanghus @tanghus 18 Dec. 2011
@ChristopherBlum Hi. Is it OK if I use https://github.com/protonet/jquery.inview in ownCloud? Preferably under an AGPL license ;-) owncloud.org
Christopher Blum Christopher Blum @ChristopherBlum 18 Dec. 2011
@tanghus Feel free to! :)

View File

@ -14,7 +14,6 @@ OC_Util::addScript( 'settings', 'users/users' );
OC_Util::addScript( 'settings', 'users/groups' );
OC_Util::addScript( 'core', 'multiselect' );
OC_Util::addScript( 'core', 'singleselect' );
OC_Util::addScript('core', 'jquery.inview');
OC_Util::addStyle( 'settings', 'settings' );
OC_App::setActiveNavigationEntry( 'core_users' );