mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 04:18:39 +00:00
(trunk web) don't use jquery.dimensions as a separate file anymore; it's been integrated into the JQuery core. http://forum.transmissionbt.com/viewtopic.php?f=8&t=7193&p=35322#p35322
This commit is contained in:
@@ -64,8 +64,7 @@ clutch_jquery_DATA = \
|
|||||||
web/javascript/jquery/jquery.contextmenu.min.js \
|
web/javascript/jquery/jquery.contextmenu.min.js \
|
||||||
web/javascript/jquery/jquery.min.js \
|
web/javascript/jquery/jquery.min.js \
|
||||||
web/javascript/jquery/jquery.form.min.js \
|
web/javascript/jquery/jquery.form.min.js \
|
||||||
web/javascript/jquery/jquery.transmenu.min.js \
|
web/javascript/jquery/jquery.transmenu.min.js
|
||||||
web/javascript/jquery/jquery.dimensions.min.js
|
|
||||||
|
|
||||||
clutch_imagesdir = $(clutchdir)/images
|
clutch_imagesdir = $(clutchdir)/images
|
||||||
clutch_images_DATA = \
|
clutch_images_DATA = \
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
<script type="text/javascript" src="./javascript/jquery/jquery.transmenu.min.js"></script>
|
<script type="text/javascript" src="./javascript/jquery/jquery.transmenu.min.js"></script>
|
||||||
<script type="text/javascript" src="./javascript/jquery/jquery.contextmenu.min.js"></script>
|
<script type="text/javascript" src="./javascript/jquery/jquery.contextmenu.min.js"></script>
|
||||||
<script type="text/javascript" src="./javascript/menu.js"></script>
|
<script type="text/javascript" src="./javascript/menu.js"></script>
|
||||||
<script type="text/javascript" src="./javascript/jquery/jquery.dimensions.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./javascript/jquery/jquery.form.min.js"></script>
|
<script type="text/javascript" src="./javascript/jquery/jquery.form.min.js"></script>
|
||||||
<script type="text/javascript" src="./javascript/jquery/json.min.js"></script>
|
<script type="text/javascript" src="./javascript/jquery/json.min.js"></script>
|
||||||
<script type="text/javascript" src="./javascript/common.js"></script>
|
<script type="text/javascript" src="./javascript/common.js"></script>
|
||||||
|
|||||||
@@ -1,119 +0,0 @@
|
|||||||
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
|
|
||||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
||||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
|
||||||
*
|
|
||||||
* $LastChangedDate: 2007-12-20 08:46:55 -0600 (Thu, 20 Dec 2007) $
|
|
||||||
* $Rev: 4259 $
|
|
||||||
*
|
|
||||||
* Version: 1.2
|
|
||||||
*
|
|
||||||
* Requires: jQuery 1.2+
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function($){
|
|
||||||
|
|
||||||
$.dimensions = {
|
|
||||||
version: '1.2'
|
|
||||||
};
|
|
||||||
|
|
||||||
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
|
|
||||||
$.each( [ 'Height', 'Width' ], function(i, name){
|
|
||||||
|
|
||||||
// innerHeight and innerWidth
|
|
||||||
$.fn[ 'inner' + name ] = function() {
|
|
||||||
if (!this[0]) return;
|
|
||||||
|
|
||||||
var torl = name == 'Height' ? 'Top' : 'Left', // top or left
|
|
||||||
borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
|
|
||||||
|
|
||||||
return this.is(':visible') ? this[0]['client' + name] : num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
|
|
||||||
};
|
|
||||||
|
|
||||||
// outerHeight and outerWidth
|
|
||||||
$.fn[ 'outer' + name ] = function(options) {
|
|
||||||
if (!this[0]) return;
|
|
||||||
|
|
||||||
var torl = name == 'Height' ? 'Top' : 'Left', // top or left
|
|
||||||
borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
|
|
||||||
|
|
||||||
options = $.extend({ margin: false }, options || {});
|
|
||||||
|
|
||||||
var val = this.is(':visible') ?
|
|
||||||
this[0]['offset' + name] :
|
|
||||||
num( this, name.toLowerCase() )
|
|
||||||
+ num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')
|
|
||||||
+ num(this, 'padding' + torl) + num(this, 'padding' + borr);
|
|
||||||
|
|
||||||
return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create scrollLeft and scrollTop methods
|
|
||||||
$.each( ['Left', 'Top'], function(i, name) {
|
|
||||||
$.fn[ 'scroll' + name ] = function(val) {
|
|
||||||
if (!this[0]) return;
|
|
||||||
|
|
||||||
return val != undefined ?
|
|
||||||
|
|
||||||
// Set the scroll offset
|
|
||||||
this.each(function() {
|
|
||||||
this == window || this == document ?
|
|
||||||
window.scrollTo(
|
|
||||||
name == 'Left' ? val : $(window)[ 'scrollLeft' ](),
|
|
||||||
name == 'Top' ? val : $(window)[ 'scrollTop' ]()
|
|
||||||
) :
|
|
||||||
this[ 'scroll' + name ] = val;
|
|
||||||
}) :
|
|
||||||
|
|
||||||
// Return the scroll offset
|
|
||||||
this[0] == window || this[0] == document ?
|
|
||||||
self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] ||
|
|
||||||
$.boxModel && document.documentElement[ 'scroll' + name ] ||
|
|
||||||
document.body[ 'scroll' + name ] :
|
|
||||||
this[0][ 'scroll' + name ];
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
$.fn.extend({
|
|
||||||
position: function() {
|
|
||||||
var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;
|
|
||||||
|
|
||||||
if (elem) {
|
|
||||||
// Get *real* offsetParent
|
|
||||||
offsetParent = this.offsetParent();
|
|
||||||
|
|
||||||
// Get correct offsets
|
|
||||||
offset = this.offset();
|
|
||||||
parentOffset = offsetParent.offset();
|
|
||||||
|
|
||||||
// Subtract element margins
|
|
||||||
offset.top -= num(elem, 'marginTop');
|
|
||||||
offset.left -= num(elem, 'marginLeft');
|
|
||||||
|
|
||||||
// Add offsetParent borders
|
|
||||||
parentOffset.top += num(offsetParent, 'borderTopWidth');
|
|
||||||
parentOffset.left += num(offsetParent, 'borderLeftWidth');
|
|
||||||
|
|
||||||
// Subtract the two offsets
|
|
||||||
results = {
|
|
||||||
top: offset.top - parentOffset.top,
|
|
||||||
left: offset.left - parentOffset.left
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return results;
|
|
||||||
},
|
|
||||||
|
|
||||||
offsetParent: function() {
|
|
||||||
var offsetParent = this[0].offsetParent;
|
|
||||||
while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') )
|
|
||||||
offsetParent = offsetParent.offsetParent;
|
|
||||||
return $(offsetParent);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function num(el, prop) {
|
|
||||||
return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())
|
|
||||||
+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')
|
|
||||||
+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}
|
|
||||||
return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))
|
|
||||||
offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery);
|
|
||||||
Reference in New Issue
Block a user