core update from 7.37 to 7.38

This commit is contained in:
Bachir Soussi Chiadmi
2015-09-17 13:08:35 +02:00
parent a99f2d7aa6
commit c4f2e62697
150 changed files with 1148 additions and 498 deletions

View File

@@ -389,6 +389,27 @@ Drupal.overlay.isExternalLink = function (url) {
return re.test(url);
};
/**
* Constructs an internal URL (relative to this site) from the provided path.
*
* For example, if the provided path is 'admin' and the site is installed at
* http://example.com/drupal, this function will return '/drupal/admin'.
*
* @param path
* The internal path, without any leading slash.
*
* @return
* The internal URL derived from the provided path, or null if a valid
* internal path cannot be constructed (for example, if an attempt to create
* an external link is detected).
*/
Drupal.overlay.getInternalUrl = function (path) {
var url = Drupal.settings.basePath + path;
if (!this.isExternalLink(url)) {
return url;
}
};
/**
* Event handler: resizes overlay according to the size of the parent window.
*
@@ -577,7 +598,7 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
// If the link contains the overlay-restore class and the overlay-context
// state is set, also update the parent window's location.
var parentLocation = ($target.hasClass('overlay-restore') && typeof $.bbq.getState('overlay-context') == 'string')
? Drupal.settings.basePath + $.bbq.getState('overlay-context')
? this.getInternalUrl($.bbq.getState('overlay-context'))
: null;
href = this.fragmentizeLink($target.get(0), parentLocation);
// Only override default behavior when left-clicking and user is not
@@ -657,11 +678,15 @@ Drupal.overlay.eventhandlerOperateByURLFragment = function (event) {
}
// Get the overlay URL from the current URL fragment.
var internalUrl = null;
var state = $.bbq.getState('overlay');
if (state) {
internalUrl = this.getInternalUrl(state);
}
if (internalUrl) {
// Append render variable, so the server side can choose the right
// rendering and add child frame code to the page if needed.
var url = $.param.querystring(Drupal.settings.basePath + state, { render: 'overlay' });
var url = $.param.querystring(internalUrl, { render: 'overlay' });
this.open(url);
this.resetActiveClass(this.getPath(Drupal.settings.basePath + state));

View File

@@ -4,8 +4,8 @@ package = Core
version = VERSION
core = 7.x
; Information added by Drupal.org packaging script on 2015-05-07
version = "7.37"
; Information added by Drupal.org packaging script on 2015-08-19
version = "7.39"
project = "drupal"
datestamp = "1430973154"
datestamp = "1440020197"