projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #22952 from totten/master-install-sk
[civicrm-core.git]
/
js
/
crm.ajax.js
diff --git
a/js/crm.ajax.js
b/js/crm.ajax.js
index 563e57a6dfbc5611af2c448b91c292faa6d3d165..39f7c85ef9aa29d3c196f69d2c9094bd90aafcb3 100644
(file)
--- a/
js/crm.ajax.js
+++ b/
js/crm.ajax.js
@@
-22,8
+22,12
@@
mode = CRM.config && CRM.config.isFrontend ? 'front' : 'back';
}
query = query || '';
mode = CRM.config && CRM.config.isFrontend ? 'front' : 'back';
}
query = query || '';
- var url,
- frag = path.split('?');
+ var url, frag, hash = '';
+ if (path.indexOf('#') > -1) {
+ hash = '#' + path.split('#')[1];
+ path = path.split('#')[0];
+ }
+ frag = path.split('?');
// Encode url path only if slashes in placeholder were also encoded
if (tplURL[mode].indexOf('civicrm/placeholder-url-path') >= 0) {
url = tplURL[mode].replace('civicrm/placeholder-url-path', frag[0]);
// Encode url path only if slashes in placeholder were also encoded
if (tplURL[mode].indexOf('civicrm/placeholder-url-path') >= 0) {
url = tplURL[mode].replace('civicrm/placeholder-url-path', frag[0]);
@@
-39,7
+43,7
@@
if (frag[1]) {
url += (url.indexOf('?') < 0 ? '?' : '&') + frag[1];
}
if (frag[1]) {
url += (url.indexOf('?') < 0 ? '?' : '&') + frag[1];
}
- return url;
+ return url
+ hash
;
};
$.fn.crmURL = function () {
};
$.fn.crmURL = function () {
@@
-507,6
+511,7
@@
var $el = $(this),
label = $el.is('input') ? $el.attr('value') : $el.text(),
identifier = $el.attr('name') || $el.attr('href');
var $el = $(this),
label = $el.is('input') ? $el.attr('value') : $el.text(),
identifier = $el.attr('name') || $el.attr('href');
+ $el.attr('tabindex', '-1');
if (!identifier || identifier === '#' || $.inArray(identifier, added) < 0) {
var $icon = $el.find('.icon, .crm-i'),
button = {'data-identifier': identifier, text: label, click: function() {
if (!identifier || identifier === '#' || $.inArray(identifier, added) < 0) {
var $icon = $el.find('.icon, .crm-i'),
button = {'data-identifier': identifier, text: label, click: function() {
@@
-522,7
+527,7
@@
added.push(identifier);
}
// display:none causes the form to not submit when pressing "enter"
added.push(identifier);
}
// display:none causes the form to not submit when pressing "enter"
- $el.parents(buttonContainers).css({height: 0, padding: 0, margin: 0, overflow: 'hidden'});
+ $el.parents(buttonContainers).css({height: 0, padding: 0, margin: 0, overflow: 'hidden'})
.attr('aria-hidden', 'true')
;
});
$el.dialog('option', 'buttons', buttons);
}
});
$el.dialog('option', 'buttons', buttons);
}