#350275 by Rob Loach, starbow, and quicksketch: Upgrade to jQuery 1.3.2 and jQuery Forms 2.21.
parent
53ef28ec4a
commit
b179a944a3
|
@ -91,6 +91,8 @@ Drupal 7.0, xxxx-xx-xx (development version)
|
|||
- Added RDF support:
|
||||
* Modules can declare RDF namespaces which are serialized in the <html> tag
|
||||
for RDFa support.
|
||||
- Upgraded the core JavaScript library to jQuery version 1.3.2.
|
||||
- Upgraded the jQuery Forms library to 2.21.
|
||||
|
||||
Drupal 6.0, 2008-02-13
|
||||
----------------------
|
||||
|
|
|
@ -184,12 +184,8 @@ Drupal.ahah.prototype.success = function (response, status) {
|
|||
}
|
||||
|
||||
// Determine what effect use and what content will receive the effect, then
|
||||
// show the new content. For browser compatibility, Safari is excluded from
|
||||
// using effects on table rows.
|
||||
if (($.browser.safari && $("tr.ahah-new-content", new_content).size() > 0)) {
|
||||
new_content.show();
|
||||
}
|
||||
else if ($('.ahah-new-content', new_content).size() > 0) {
|
||||
// show the new content.
|
||||
if ($('.ahah-new-content', new_content).size() > 0) {
|
||||
$('.ahah-new-content', new_content).hide();
|
||||
new_content.show();
|
||||
$(".ahah-new-content", new_content)[this.showEffect](this.showSpeed);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -206,7 +206,7 @@ Drupal.tableDrag.prototype.makeDraggable = function(item) {
|
|||
self.rowObject = new self.row(item, 'mouse', self.indentEnabled, self.maxDepth, true);
|
||||
|
||||
// Save the position of the table.
|
||||
self.table.topY = self.getPosition(self.table).y;
|
||||
self.table.topY = $(self.table).offset().top;
|
||||
self.table.bottomY = self.table.topY + self.table.offsetHeight;
|
||||
|
||||
// Add classes to the handle and row.
|
||||
|
@ -485,31 +485,6 @@ Drupal.tableDrag.prototype.dropRow = function(event, self) {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the position of an element by adding up parent offsets in the DOM tree.
|
||||
*/
|
||||
Drupal.tableDrag.prototype.getPosition = function(element){
|
||||
var left = 0;
|
||||
var top = 0;
|
||||
// Because Safari doesn't report offsetHeight on table rows, but does on table
|
||||
// cells, grab the firstChild of the row and use that instead.
|
||||
// http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari
|
||||
if (element.offsetHeight == 0) {
|
||||
element = element.firstChild; // A table cell.
|
||||
}
|
||||
|
||||
while (element.offsetParent){
|
||||
left += element.offsetLeft;
|
||||
top += element.offsetTop;
|
||||
element = element.offsetParent;
|
||||
}
|
||||
|
||||
left += element.offsetLeft;
|
||||
top += element.offsetTop;
|
||||
|
||||
return {x:left, y:top};
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the mouse coordinates from the event (allowing for browser differences).
|
||||
*/
|
||||
|
@ -528,9 +503,9 @@ Drupal.tableDrag.prototype.mouseCoords = function(event){
|
|||
* element. To do this we need the element's position and the mouse position.
|
||||
*/
|
||||
Drupal.tableDrag.prototype.getMouseOffset = function(target, event) {
|
||||
var docPos = this.getPosition(target);
|
||||
var docPos = $(target).offset();
|
||||
var mousePos = this.mouseCoords(event);
|
||||
return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
|
||||
return { x: mousePos.x - docPos.left, y: mousePos.y - docPos.top };
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -547,16 +522,8 @@ Drupal.tableDrag.prototype.findDropTargetRow = function(x, y) {
|
|||
for (var n=0; n<rows.length; n++) {
|
||||
var row = rows[n];
|
||||
var indentDiff = 0;
|
||||
// Safari fix see Drupal.tableDrag.prototype.getPosition()
|
||||
if (row.offsetHeight == 0) {
|
||||
var rowY = this.getPosition(row.firstChild).y;
|
||||
var rowHeight = parseInt(row.firstChild.offsetHeight)/2;
|
||||
}
|
||||
// Other browsers.
|
||||
else {
|
||||
var rowY = this.getPosition(row).y;
|
||||
var rowHeight = parseInt(row.offsetHeight)/2;
|
||||
}
|
||||
var rowY = $(row).offset().top;
|
||||
var rowHeight = parseInt($(row).outerHeight()) / 2;
|
||||
|
||||
// Because we always insert before, we need to offset the height a bit.
|
||||
if ((y > (rowY - rowHeight)) && (y < (rowY + rowHeight))) {
|
||||
|
@ -568,6 +535,13 @@ Drupal.tableDrag.prototype.findDropTargetRow = function(x, y) {
|
|||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Do not allow a row to be swapped with itself.
|
||||
if (row == this.rowObject.element) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Check that swapping with this row is allowed.
|
||||
if (!this.rowObject.isValidSwap(row)) {
|
||||
return null;
|
||||
|
|
|
@ -8,11 +8,6 @@
|
|||
*/
|
||||
Drupal.behaviors.teaser = {
|
||||
attach: function(context) {
|
||||
// This breaks in Konqueror. Prevent it from running.
|
||||
if (/KDE/.test(navigator.vendor)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('textarea.teaser:not(.teaser-processed)', context).each(function() {
|
||||
var teaser = $(this).addClass('teaser-processed');
|
||||
|
||||
|
@ -90,8 +85,8 @@ Drupal.behaviors.teaser = {
|
|||
Drupal.behaviors.textarea.attach(teaser.parentNode);
|
||||
}
|
||||
// Set initial visibility.
|
||||
if ($(teaser).is('[@disabled]')) {
|
||||
$(teaser).parent().hide();
|
||||
if (teaser[0].disabled) {
|
||||
teaser.parent().hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue