- #88439: Update jQuery in core to 1.0.2
- #88642: Change drupal.js function separators to semi-colons.5.x
parent
370de93087
commit
5ac7267827
|
@ -264,9 +264,9 @@ Drupal.ACDB.prototype.search = function (searchString) {
|
|||
$.ajax({
|
||||
type: "GET",
|
||||
url: db.uri +'/'+ Drupal.encodeURIComponent(searchString),
|
||||
success: function (xmlhttp) {
|
||||
success: function (data) {
|
||||
// Parse back result
|
||||
var matches = Drupal.parseJson(xmlhttp.responseText);
|
||||
var matches = Drupal.parseJson(data);
|
||||
if (typeof matches['status'] == 'undefined' || matches['status'] != 0) {
|
||||
db.cache[searchString] = matches;
|
||||
// Verify if these are still the matches the user wants to see
|
||||
|
|
|
@ -19,7 +19,7 @@ Drupal.extend = function(obj) {
|
|||
this[i] = obj[i];
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Redirects a button's form submission to a hidden iframe and displays the result
|
||||
|
@ -82,7 +82,7 @@ Drupal.redirectFormButton = function (uri, button, handler) {
|
|||
button.onmouseout = button.onblur = function() {
|
||||
button.onclick = null;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the absolute position of an element on the screen
|
||||
|
@ -103,21 +103,21 @@ Drupal.absolutePosition = function (el) {
|
|||
r.y += tmp.y;
|
||||
}
|
||||
return r;
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the dimensions of an element on the screen
|
||||
*/
|
||||
Drupal.dimensions = function (el) {
|
||||
return { width: el.offsetWidth, height: el.offsetHeight };
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the position of the mouse cursor based on the event object passed
|
||||
*/
|
||||
Drupal.mousePosition = function(e) {
|
||||
return { x: e.clientX + document.documentElement.scrollLeft, y: e.clientY + document.documentElement.scrollTop };
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse a JSON response.
|
||||
|
@ -129,7 +129,7 @@ Drupal.parseJson = function (data) {
|
|||
return { status: 0, data: data.length ? data : 'Unspecified error' };
|
||||
}
|
||||
return eval('(' + data + ');');
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Create an invisible iframe for form submissions.
|
||||
|
@ -157,14 +157,14 @@ Drupal.createIframe = function () {
|
|||
visibility: 'hidden'
|
||||
});
|
||||
$('body').append(div);
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete the invisible iframe
|
||||
*/
|
||||
Drupal.deleteIframe = function () {
|
||||
$('#redirect-holder').remove();
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Freeze the current body height (as minimum height). Used to prevent
|
||||
|
@ -181,14 +181,14 @@ Drupal.freezeHeight = function () {
|
|||
height: $('body').css('height')
|
||||
}).attr('id', 'freeze-height');
|
||||
$('body').append(div);
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Unfreeze the body height
|
||||
*/
|
||||
Drupal.unfreezeHeight = function () {
|
||||
$('#freeze-height').remove();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Wrapper to address the mod_rewrite url encoding bug
|
||||
|
@ -198,7 +198,7 @@ Drupal.encodeURIComponent = function (item, uri) {
|
|||
uri = uri || location.href;
|
||||
item = encodeURIComponent(item).replace('%2F', '/');
|
||||
return uri.indexOf('?q=') ? item : item.replace('%26', '%2526').replace('%23', '%2523');
|
||||
}
|
||||
};
|
||||
|
||||
// Global Killswitch on the <html> element
|
||||
if (Drupal.jsEnabled) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -69,9 +69,9 @@ Drupal.progressBar.prototype.sendPing = function () {
|
|||
$.ajax({
|
||||
type: this.method,
|
||||
url: this.uri,
|
||||
success: function (xmlhttp) {
|
||||
success: function (data) {
|
||||
// Parse response
|
||||
var progress = Drupal.parseJson(xmlhttp.responseText);
|
||||
var progress = Drupal.parseJson(data);
|
||||
// Display errors
|
||||
if (progress.status == 0) {
|
||||
pb.displayError(progress.data);
|
||||
|
|
Loading…
Reference in New Issue