}
query = query || '';
var frag = path.split('?');
- var url = tplURL[mode].replace("*path*", frag[0]);
+ var url = tplURL[mode].replace("civicrm-placeholder-url-path", frag[0]);
if (!query) {
- url = url.replace(/[?&]\*query\*/, '');
+ url = url.replace(/[?&]civicrm-placeholder-url-query=1/, '');
}
else {
- url = url.replace("*query*", typeof query === 'string' ? query : $.param(query));
+ url = url.replace("civicrm-placeholder-url-query=1", typeof query === 'string' ? query : $.param(query));
}
if (frag[1]) {
url += (url.indexOf('?') < 0 ? '?' : '&') + frag[1];
var buttonContainers = '.crm-submit-buttons, .action-link',
buttons = [],
added = [];
- $(buttonContainers, $el).find('input.crm-form-submit, a.button').each(function() {
+ $(buttonContainers, $el).find('input.crm-form-submit, a.button, button').each(function() {
var $el = $(this),
label = $el.is('input') ? $el.attr('value') : $el.text(),
identifier = $el.attr('name') || $el.attr('href');
var currentHeight = $wrapper.outerHeight(),
padding = currentHeight - $dialog.height(),
newHeight = $dialog.prop('scrollHeight') + padding,
- menuHeight = $('#civicrm-menu').outerHeight(),
- maxHeight = $(window).height() - menuHeight;
+ menuHeight = $('#civicrm-menu').outerHeight();
+ if ($('body').hasClass('crm-menubar-below-cms-menu')) {
+ menuHeight += $('#civicrm-menu').offset().top;
+ }
+ var maxHeight = $(window).height() - menuHeight;
newHeight = newHeight > maxHeight ? maxHeight : newHeight;
if (newHeight > (currentHeight + 15)) {
$dialog.dialog('option', {