franck@0: franck@0: /** franck@0: * Custom theming for the popupsLoading. franck@0: */ franck@0: Drupal.theme.popupLoading = function() { franck@0: var loading; franck@0: loading += '
'; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += ' '; franck@0: loading += '
'; franck@0: loading += ' Loading...'; franck@0: loading += '
'; franck@0: loading += '
'; franck@0: return loading; franck@0: }; franck@0: franck@0: Drupal.theme.popupTemplate = function (popupId) { franck@0: var template; franck@0: template += '
'; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += ' '; franck@0: template += '
'; franck@0: template += '
'; franck@0: template += '
'; franck@0: template += ' '; franck@0: template += '
%title
'; franck@0: template += '
'; franck@0: template += '
'; franck@0: template += '
%body
'; franck@0: template += '
%buttons
'; franck@0: template += ' '; franck@0: template += '
'; franck@0: template += '
'; franck@0: template += '
'; franck@0: return template; franck@0: }; franck@0: franck@0: /** franck@0: * We need to resize the popups-container as well as the popups if it scrolls franck@0: */ franck@0: Drupal.behaviors.resizePopupsContainer = function() { franck@0: var popup = Popups.activePopup(); franck@0: if (popup) { franck@0: var $popupsContainer = $('#' + popup.id + ' .popups-container'); franck@0: if ($popupsContainer.length) { franck@0: var popupHeight = $popupsContainer.height(); franck@0: var windowHeight = $(window).height(); franck@0: if (popupHeight > (0.9 * windowHeight) ) { // Must fit in 90% of window. franck@0: // we make this slightly smaller than popups so that it fits inside franck@0: popupHeight = 0.85 * windowHeight; franck@0: $popupsContainer.height(popupHeight); franck@0: } franck@0: // needs an extra 20px as the bottom dropshadow looks cutoff franck@0: var $popup = popup.$popup(); franck@0: $popup.height($popup.height() + 20); franck@0: } franck@0: } franck@0: };