root / drupal7 / sites / all / modules / ctools / js / modal.js @ 96a203dd
1 |
/**
|
---|---|
2 |
* @file
|
3 |
*
|
4 |
* Implement a modal form.
|
5 |
*
|
6 |
* @see modal.inc for documentation.
|
7 |
*
|
8 |
* This javascript relies on the CTools ajax responder.
|
9 |
*/
|
10 |
|
11 |
(function ($) { |
12 |
// Make sure our objects are defined.
|
13 |
Drupal.CTools = Drupal.CTools || {}; |
14 |
Drupal.CTools.Modal = Drupal.CTools.Modal || {}; |
15 |
|
16 |
/**
|
17 |
* Display the modal
|
18 |
*
|
19 |
* @todo -- document the settings.
|
20 |
*/
|
21 |
Drupal.CTools.Modal.show = function(choice) { |
22 |
var opts = {};
|
23 |
|
24 |
if (choice && typeof choice == 'string' && Drupal.settings[choice]) { |
25 |
// This notation guarantees we are actually copying it.
|
26 |
$.extend(true, opts, Drupal.settings[choice]); |
27 |
} |
28 |
else if (choice) { |
29 |
$.extend(true, opts, choice); |
30 |
} |
31 |
|
32 |
var defaults = {
|
33 |
modalTheme: 'CToolsModalDialog', |
34 |
throbberTheme: 'CToolsModalThrobber', |
35 |
animation: 'show', |
36 |
animationSpeed: 'fast', |
37 |
modalSize: {
|
38 |
type: 'scale', |
39 |
width: .8, |
40 |
height: .8, |
41 |
addWidth: 0, |
42 |
addHeight: 0, |
43 |
// How much to remove from the inner content to make space for the
|
44 |
// theming.
|
45 |
contentRight: 25, |
46 |
contentBottom: 45 |
47 |
}, |
48 |
modalOptions: {
|
49 |
opacity: .55, |
50 |
background: '#fff' |
51 |
} |
52 |
}; |
53 |
|
54 |
var settings = {};
|
55 |
$.extend(true, settings, defaults, Drupal.settings.CToolsModal, opts); |
56 |
|
57 |
if (Drupal.CTools.Modal.currentSettings && Drupal.CTools.Modal.currentSettings != settings) {
|
58 |
Drupal.CTools.Modal.modal.remove(); |
59 |
Drupal.CTools.Modal.modal = null;
|
60 |
} |
61 |
|
62 |
Drupal.CTools.Modal.currentSettings = settings; |
63 |
|
64 |
var resize = function(e) { |
65 |
// When creating the modal, it actually exists only in a theoretical
|
66 |
// place that is not in the DOM. But once the modal exists, it is in the
|
67 |
// DOM so the context must be set appropriately.
|
68 |
var context = e ? document : Drupal.CTools.Modal.modal;
|
69 |
|
70 |
if (Drupal.CTools.Modal.currentSettings.modalSize.type == 'scale') { |
71 |
var width = $(window).width() * Drupal.CTools.Modal.currentSettings.modalSize.width; |
72 |
var height = $(window).height() * Drupal.CTools.Modal.currentSettings.modalSize.height; |
73 |
} |
74 |
else {
|
75 |
var width = Drupal.CTools.Modal.currentSettings.modalSize.width;
|
76 |
var height = Drupal.CTools.Modal.currentSettings.modalSize.height;
|
77 |
} |
78 |
|
79 |
// Use the additionol pixels for creating the width and height.
|
80 |
$('div.ctools-modal-content', context).css({ |
81 |
'width': width + Drupal.CTools.Modal.currentSettings.modalSize.addWidth + 'px', |
82 |
'height': height + Drupal.CTools.Modal.currentSettings.modalSize.addHeight + 'px' |
83 |
}); |
84 |
$('div.ctools-modal-content .modal-content', context).css({ |
85 |
'width': (width - Drupal.CTools.Modal.currentSettings.modalSize.contentRight) + 'px', |
86 |
'height': (height - Drupal.CTools.Modal.currentSettings.modalSize.contentBottom) + 'px' |
87 |
}); |
88 |
} |
89 |
|
90 |
if (!Drupal.CTools.Modal.modal) {
|
91 |
Drupal.CTools.Modal.modal = $(Drupal.theme(settings.modalTheme));
|
92 |
if (settings.modalSize.type == 'scale') { |
93 |
$(window).bind('resize', resize); |
94 |
} |
95 |
} |
96 |
|
97 |
resize(); |
98 |
|
99 |
$('span.modal-title', Drupal.CTools.Modal.modal).html(Drupal.CTools.Modal.currentSettings.loadingText); |
100 |
Drupal.CTools.Modal.modalContent(Drupal.CTools.Modal.modal, settings.modalOptions, settings.animation, settings.animationSpeed); |
101 |
$('#modalContent .modal-content').html(Drupal.theme(settings.throbberTheme)); |
102 |
|
103 |
// Position autocomplete results based on the scroll position of the modal.
|
104 |
$('#modalContent .modal-content').delegate('input.form-autocomplete', 'keyup', function() { |
105 |
$('#autocomplete').css('top', $(this).position().top + $(this).outerHeight() + $(this).offsetParent().filter('#modal-content').scrollTop()); |
106 |
}); |
107 |
}; |
108 |
|
109 |
/**
|
110 |
* Hide the modal
|
111 |
*/
|
112 |
Drupal.CTools.Modal.dismiss = function() { |
113 |
if (Drupal.CTools.Modal.modal) {
|
114 |
Drupal.CTools.Modal.unmodalContent(Drupal.CTools.Modal.modal); |
115 |
} |
116 |
}; |
117 |
|
118 |
/**
|
119 |
* Provide the HTML to create the modal dialog.
|
120 |
*/
|
121 |
Drupal.theme.prototype.CToolsModalDialog = function () { |
122 |
var html = '' |
123 |
html += ' <div id="ctools-modal">'
|
124 |
html += ' <div class="ctools-modal-content">' // panels-modal-content |
125 |
html += ' <div class="modal-header">';
|
126 |
html += ' <a class="close" href="#">';
|
127 |
html += Drupal.CTools.Modal.currentSettings.closeText + Drupal.CTools.Modal.currentSettings.closeImage; |
128 |
html += ' </a>';
|
129 |
html += ' <span id="modal-title" class="modal-title"> </span>';
|
130 |
html += ' </div>';
|
131 |
html += ' <div id="modal-content" class="modal-content">';
|
132 |
html += ' </div>';
|
133 |
html += ' </div>';
|
134 |
html += ' </div>';
|
135 |
|
136 |
return html;
|
137 |
} |
138 |
|
139 |
/**
|
140 |
* Provide the HTML to create the throbber.
|
141 |
*/
|
142 |
Drupal.theme.prototype.CToolsModalThrobber = function () { |
143 |
var html = ''; |
144 |
html += ' <div id="modal-throbber">';
|
145 |
html += ' <div class="modal-throbber-wrapper">';
|
146 |
html += Drupal.CTools.Modal.currentSettings.throbber; |
147 |
html += ' </div>';
|
148 |
html += ' </div>';
|
149 |
|
150 |
return html;
|
151 |
}; |
152 |
|
153 |
/**
|
154 |
* Figure out what settings string to use to display a modal.
|
155 |
*/
|
156 |
Drupal.CTools.Modal.getSettings = function (object) { |
157 |
var match = $(object).attr('class').match(/ctools-modal-(\S+)/); |
158 |
if (match) {
|
159 |
return match[1]; |
160 |
} |
161 |
} |
162 |
|
163 |
/**
|
164 |
* Click function for modals that can be cached.
|
165 |
*/
|
166 |
Drupal.CTools.Modal.clickAjaxCacheLink = function () { |
167 |
Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(this));
|
168 |
return Drupal.CTools.AJAX.clickAJAXCacheLink.apply(this); |
169 |
}; |
170 |
|
171 |
/**
|
172 |
* Handler to prepare the modal for the response
|
173 |
*/
|
174 |
Drupal.CTools.Modal.clickAjaxLink = function () { |
175 |
Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(this));
|
176 |
return false; |
177 |
}; |
178 |
|
179 |
/**
|
180 |
* Submit responder to do an AJAX submit on all modal forms.
|
181 |
*/
|
182 |
Drupal.CTools.Modal.submitAjaxForm = function(e) { |
183 |
var $form = $(this); |
184 |
var url = $form.attr('action'); |
185 |
|
186 |
setTimeout(function() { Drupal.CTools.AJAX.ajaxSubmit($form, url); }, 1); |
187 |
return false; |
188 |
} |
189 |
|
190 |
/**
|
191 |
* Bind links that will open modals to the appropriate function.
|
192 |
*/
|
193 |
Drupal.behaviors.ZZCToolsModal = { |
194 |
attach: function(context) { |
195 |
// Bind links
|
196 |
// Note that doing so in this order means that the two classes can be
|
197 |
// used together safely.
|
198 |
/*
|
199 |
* @todo remimplement the warm caching feature
|
200 |
$('a.ctools-use-modal-cache', context).once('ctools-use-modal', function() {
|
201 |
$(this).click(Drupal.CTools.Modal.clickAjaxCacheLink);
|
202 |
Drupal.CTools.AJAX.warmCache.apply(this);
|
203 |
});
|
204 |
*/
|
205 |
|
206 |
$('area.ctools-use-modal, a.ctools-use-modal', context).once('ctools-use-modal', function() { |
207 |
var $this = $(this); |
208 |
$this.click(Drupal.CTools.Modal.clickAjaxLink);
|
209 |
// Create a drupal ajax object
|
210 |
var element_settings = {};
|
211 |
if ($this.attr('href')) { |
212 |
element_settings.url = $this.attr('href'); |
213 |
element_settings.event = 'click';
|
214 |
element_settings.progress = { type: 'throbber' }; |
215 |
} |
216 |
var base = $this.attr('href'); |
217 |
Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings); |
218 |
}); |
219 |
|
220 |
// Bind buttons
|
221 |
$('input.ctools-use-modal, button.ctools-use-modal', context).once('ctools-use-modal', function() { |
222 |
var $this = $(this); |
223 |
$this.click(Drupal.CTools.Modal.clickAjaxLink);
|
224 |
var button = this; |
225 |
var element_settings = {};
|
226 |
|
227 |
// AJAX submits specified in this manner automatically submit to the
|
228 |
// normal form action.
|
229 |
element_settings.url = Drupal.CTools.Modal.findURL(this);
|
230 |
if (element_settings.url == '') { |
231 |
element_settings.url = $(this).closest('form').attr('action'); |
232 |
} |
233 |
element_settings.event = 'click';
|
234 |
element_settings.setClick = true;
|
235 |
|
236 |
var base = $this.attr('id'); |
237 |
Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings); |
238 |
|
239 |
// Make sure changes to settings are reflected in the URL.
|
240 |
$('.' + $(button).attr('id') + '-url').change(function() { |
241 |
Drupal.ajax[base].options.url = Drupal.CTools.Modal.findURL(button); |
242 |
}); |
243 |
}); |
244 |
|
245 |
// Bind our custom event to the form submit
|
246 |
$('#modal-content form', context).once('ctools-use-modal', function() { |
247 |
var $this = $(this); |
248 |
var element_settings = {};
|
249 |
|
250 |
element_settings.url = $this.attr('action'); |
251 |
element_settings.event = 'submit';
|
252 |
element_settings.progress = { 'type': 'throbber' } |
253 |
var base = $this.attr('id'); |
254 |
|
255 |
Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings); |
256 |
Drupal.ajax[base].form = $this;
|
257 |
|
258 |
$('input[type=submit], button', this).click(function(event) { |
259 |
Drupal.ajax[base].element = this;
|
260 |
this.form.clk = this; |
261 |
// Stop autocomplete from submitting.
|
262 |
if (Drupal.autocompleteSubmit && !Drupal.autocompleteSubmit()) {
|
263 |
return false; |
264 |
} |
265 |
// An empty event means we were triggered via .click() and
|
266 |
// in jquery 1.4 this won't trigger a submit.
|
267 |
if (event.bubbles == undefined) { |
268 |
$(this.form).trigger('submit'); |
269 |
return false; |
270 |
} |
271 |
}); |
272 |
}); |
273 |
|
274 |
// Bind a click handler to allow elements with the 'ctools-close-modal'
|
275 |
// class to close the modal.
|
276 |
$('.ctools-close-modal', context).once('ctools-close-modal') |
277 |
.click(function() {
|
278 |
Drupal.CTools.Modal.dismiss(); |
279 |
return false; |
280 |
}); |
281 |
} |
282 |
}; |
283 |
|
284 |
// The following are implementations of AJAX responder commands.
|
285 |
|
286 |
/**
|
287 |
* AJAX responder command to place HTML within the modal.
|
288 |
*/
|
289 |
Drupal.CTools.Modal.modal_display = function(ajax, response, status) { |
290 |
if ($('#modalContent').length == 0) { |
291 |
Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(ajax.element)); |
292 |
} |
293 |
$('#modal-title').html(response.title); |
294 |
// Simulate an actual page load by scrolling to the top after adding the
|
295 |
// content. This is helpful for allowing users to see error messages at the
|
296 |
// top of a form, etc.
|
297 |
$('#modal-content').html(response.output).scrollTop(0); |
298 |
|
299 |
// Attach behaviors within a modal dialog.
|
300 |
var settings = response.settings || ajax.settings || Drupal.settings;
|
301 |
Drupal.attachBehaviors('#modalContent', settings);
|
302 |
} |
303 |
|
304 |
/**
|
305 |
* AJAX responder command to dismiss the modal.
|
306 |
*/
|
307 |
Drupal.CTools.Modal.modal_dismiss = function(command) { |
308 |
Drupal.CTools.Modal.dismiss(); |
309 |
$('link.ctools-temporary-css').remove(); |
310 |
} |
311 |
|
312 |
/**
|
313 |
* Display loading
|
314 |
*/
|
315 |
//Drupal.CTools.AJAX.commands.modal_loading = function(command) {
|
316 |
Drupal.CTools.Modal.modal_loading = function(command) { |
317 |
Drupal.CTools.Modal.modal_display({ |
318 |
output: Drupal.theme(Drupal.CTools.Modal.currentSettings.throbberTheme),
|
319 |
title: Drupal.CTools.Modal.currentSettings.loadingText
|
320 |
}); |
321 |
} |
322 |
|
323 |
/**
|
324 |
* Find a URL for an AJAX button.
|
325 |
*
|
326 |
* The URL for this gadget will be composed of the values of items by
|
327 |
* taking the ID of this item and adding -url and looking for that
|
328 |
* class. They need to be in the form in order since we will
|
329 |
* concat them all together using '/'.
|
330 |
*/
|
331 |
Drupal.CTools.Modal.findURL = function(item) { |
332 |
var url = ''; |
333 |
var url_class = '.' + $(item).attr('id') + '-url'; |
334 |
$(url_class).each(
|
335 |
function() {
|
336 |
var $this = $(this); |
337 |
if (url && $this.val()) { |
338 |
url += '/';
|
339 |
} |
340 |
url += $this.val();
|
341 |
}); |
342 |
return url;
|
343 |
}; |
344 |
|
345 |
|
346 |
/**
|
347 |
* modalContent
|
348 |
* @param content string to display in the content box
|
349 |
* @param css obj of css attributes
|
350 |
* @param animation (fadeIn, slideDown, show)
|
351 |
* @param speed (valid animation speeds slow, medium, fast or # in ms)
|
352 |
*/
|
353 |
Drupal.CTools.Modal.modalContent = function(content, css, animation, speed) { |
354 |
// If our animation isn't set, make it just show/pop
|
355 |
if (!animation) {
|
356 |
animation = 'show';
|
357 |
} |
358 |
else {
|
359 |
// If our animation isn't "fadeIn" or "slideDown" then it always is show
|
360 |
if (animation != 'fadeIn' && animation != 'slideDown') { |
361 |
animation = 'show';
|
362 |
} |
363 |
} |
364 |
|
365 |
if (!speed) {
|
366 |
speed = 'fast';
|
367 |
} |
368 |
|
369 |
// Build our base attributes and allow them to be overriden
|
370 |
css = jQuery.extend({ |
371 |
position: 'absolute', |
372 |
left: '0px', |
373 |
margin: '0px', |
374 |
background: '#000', |
375 |
opacity: '.55' |
376 |
}, css); |
377 |
|
378 |
// Add opacity handling for IE.
|
379 |
css.filter = 'alpha(opacity=' + (100 * css.opacity) + ')'; |
380 |
content.hide(); |
381 |
|
382 |
// if we already ahve a modalContent, remove it
|
383 |
if ( $('#modalBackdrop')) $('#modalBackdrop').remove(); |
384 |
if ( $('#modalContent')) $('#modalContent').remove(); |
385 |
|
386 |
// position code lifted from http://www.quirksmode.org/viewport/compatibility.html
|
387 |
if (self.pageYOffset) { // all except Explorer |
388 |
var wt = self.pageYOffset;
|
389 |
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict |
390 |
var wt = document.documentElement.scrollTop;
|
391 |
} else if (document.body) { // all other Explorers |
392 |
var wt = document.body.scrollTop;
|
393 |
} |
394 |
|
395 |
// Get our dimensions
|
396 |
|
397 |
// Get the docHeight and (ugly hack) add 50 pixels to make sure we dont have a *visible* border below our div
|
398 |
var docHeight = $(document).height() + 50; |
399 |
var docWidth = $(document).width(); |
400 |
var winHeight = $(window).height(); |
401 |
var winWidth = $(window).width(); |
402 |
if( docHeight < winHeight ) docHeight = winHeight;
|
403 |
|
404 |
// Create our divs
|
405 |
$('body').append('<div id="modalBackdrop" style="z-index: 1000; display: none;"></div><div id="modalContent" style="z-index: 1001; position: absolute;">' + $(content).html() + '</div>'); |
406 |
|
407 |
// Keyboard and focus event handler ensures focus stays on modal elements only
|
408 |
modalEventHandler = function( event ) { |
409 |
target = null;
|
410 |
if ( event ) { //Mozilla |
411 |
target = event.target; |
412 |
} else { //IE |
413 |
event = window.event; |
414 |
target = event.srcElement; |
415 |
} |
416 |
|
417 |
var parents = $(target).parents().get(); |
418 |
for (var i = 0; i < parents.length; ++i) { |
419 |
var position = $(parents[i]).css('position'); |
420 |
if (position == 'absolute' || position == 'fixed') { |
421 |
return true; |
422 |
} |
423 |
} |
424 |
if( $(target).filter('*:visible').parents('#modalContent').size()) { |
425 |
// allow the event only if target is a visible child node of #modalContent
|
426 |
return true; |
427 |
} |
428 |
if ( $('#modalContent')) $('#modalContent').get(0).focus(); |
429 |
return false; |
430 |
}; |
431 |
$('body').bind( 'focus', modalEventHandler ); |
432 |
$('body').bind( 'keypress', modalEventHandler ); |
433 |
|
434 |
// Create our content div, get the dimensions, and hide it
|
435 |
var modalContent = $('#modalContent').css('top','-1000px'); |
436 |
var mdcTop = wt + ( winHeight / 2 ) - ( modalContent.outerHeight() / 2); |
437 |
var mdcLeft = ( winWidth / 2 ) - ( modalContent.outerWidth() / 2); |
438 |
$('#modalBackdrop').css(css).css('top', 0).css('height', docHeight + 'px').css('width', docWidth + 'px').show(); |
439 |
modalContent.css({top: mdcTop + 'px', left: mdcLeft + 'px'}).hide()[animation](speed); |
440 |
|
441 |
// Bind a click for closing the modalContent
|
442 |
modalContentClose = function(){close(); return false;}; |
443 |
$('.close').bind('click', modalContentClose); |
444 |
|
445 |
// Bind a keypress on escape for closing the modalContent
|
446 |
modalEventEscapeCloseHandler = function(event) { |
447 |
if (event.keyCode == 27) { |
448 |
close(); |
449 |
return false; |
450 |
} |
451 |
}; |
452 |
|
453 |
$(document).bind('keydown', modalEventEscapeCloseHandler); |
454 |
|
455 |
// Close the open modal content and backdrop
|
456 |
function close() { |
457 |
// Unbind the events
|
458 |
$(window).unbind('resize', modalContentResize); |
459 |
$('body').unbind( 'focus', modalEventHandler); |
460 |
$('body').unbind( 'keypress', modalEventHandler ); |
461 |
$('.close').unbind('click', modalContentClose); |
462 |
$('body').unbind('keypress', modalEventEscapeCloseHandler); |
463 |
$(document).trigger('CToolsDetachBehaviors', $('#modalContent')); |
464 |
|
465 |
// Set our animation parameters and use them
|
466 |
if ( animation == 'fadeIn' ) animation = 'fadeOut'; |
467 |
if ( animation == 'slideDown' ) animation = 'slideUp'; |
468 |
if ( animation == 'show' ) animation = 'hide'; |
469 |
|
470 |
// Close the content
|
471 |
modalContent.hide()[animation](speed); |
472 |
|
473 |
// Remove the content
|
474 |
$('#modalContent').remove(); |
475 |
$('#modalBackdrop').remove(); |
476 |
}; |
477 |
|
478 |
// Move and resize the modalBackdrop and modalContent on resize of the window
|
479 |
modalContentResize = function(){ |
480 |
// Get our heights
|
481 |
var docHeight = $(document).height(); |
482 |
var docWidth = $(document).width(); |
483 |
var winHeight = $(window).height(); |
484 |
var winWidth = $(window).width(); |
485 |
if( docHeight < winHeight ) docHeight = winHeight;
|
486 |
|
487 |
// Get where we should move content to
|
488 |
var modalContent = $('#modalContent'); |
489 |
var mdcTop = ( winHeight / 2 ) - ( modalContent.outerHeight() / 2); |
490 |
var mdcLeft = ( winWidth / 2 ) - ( modalContent.outerWidth() / 2); |
491 |
|
492 |
// Apply the changes
|
493 |
$('#modalBackdrop').css('height', docHeight + 'px').css('width', docWidth + 'px').show(); |
494 |
modalContent.css('top', mdcTop + 'px').css('left', mdcLeft + 'px').show(); |
495 |
}; |
496 |
$(window).bind('resize', modalContentResize); |
497 |
|
498 |
$('#modalContent').focus(); |
499 |
}; |
500 |
|
501 |
/**
|
502 |
* unmodalContent
|
503 |
* @param content (The jQuery object to remove)
|
504 |
* @param animation (fadeOut, slideUp, show)
|
505 |
* @param speed (valid animation speeds slow, medium, fast or # in ms)
|
506 |
*/
|
507 |
Drupal.CTools.Modal.unmodalContent = function(content, animation, speed) |
508 |
{ |
509 |
// If our animation isn't set, make it just show/pop
|
510 |
if (!animation) { var animation = 'show'; } else { |
511 |
// If our animation isn't "fade" then it always is show
|
512 |
if (( animation != 'fadeOut' ) && ( animation != 'slideUp')) animation = 'show'; |
513 |
} |
514 |
// Set a speed if we dont have one
|
515 |
if ( !speed ) var speed = 'fast'; |
516 |
|
517 |
// Unbind the events we bound
|
518 |
$(window).unbind('resize', modalContentResize); |
519 |
$('body').unbind('focus', modalEventHandler); |
520 |
$('body').unbind('keypress', modalEventHandler); |
521 |
$('.close').unbind('click', modalContentClose); |
522 |
$(document).trigger('CToolsDetachBehaviors', $('#modalContent')); |
523 |
|
524 |
// jQuery magic loop through the instances and run the animations or removal.
|
525 |
content.each(function(){
|
526 |
if ( animation == 'fade' ) { |
527 |
$('#modalContent').fadeOut(speed, function() { |
528 |
$('#modalBackdrop').fadeOut(speed, function() { |
529 |
$(this).remove(); |
530 |
}); |
531 |
$(this).remove(); |
532 |
}); |
533 |
} else {
|
534 |
if ( animation == 'slide' ) { |
535 |
$('#modalContent').slideUp(speed,function() { |
536 |
$('#modalBackdrop').slideUp(speed, function() { |
537 |
$(this).remove(); |
538 |
}); |
539 |
$(this).remove(); |
540 |
}); |
541 |
} else {
|
542 |
$('#modalContent').remove(); |
543 |
$('#modalBackdrop').remove(); |
544 |
} |
545 |
} |
546 |
}); |
547 |
}; |
548 |
|
549 |
$(function() { |
550 |
Drupal.ajax.prototype.commands.modal_display = Drupal.CTools.Modal.modal_display; |
551 |
Drupal.ajax.prototype.commands.modal_dismiss = Drupal.CTools.Modal.modal_dismiss; |
552 |
}); |
553 |
|
554 |
})(jQuery); |