first import
This commit is contained in:
11
sites/all/modules/modal_forms/js/modal_forms_comment.js
Normal file
11
sites/all/modules/modal_forms/js/modal_forms_comment.js
Normal file
@@ -0,0 +1,11 @@
|
||||
(function ($) {
|
||||
|
||||
Drupal.behaviors.initModalFormsComment = {
|
||||
attach: function (context, settings) {
|
||||
$("a[href*='/comment/reply'], a[href*='?q=comment/reply']", context).once('init-modal-forms-comment', function () {
|
||||
this.href = this.href.replace(/comment\/reply/,'modal_forms/nojs/comment/reply');
|
||||
}).addClass('ctools-use-modal ctools-modal-modal-popup-medium');
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
19
sites/all/modules/modal_forms/js/modal_forms_contact.js
Normal file
19
sites/all/modules/modal_forms/js/modal_forms_contact.js
Normal file
@@ -0,0 +1,19 @@
|
||||
(function ($) {
|
||||
|
||||
Drupal.behaviors.initModalFormsContact = {
|
||||
attach: function (context, settings) {
|
||||
$("a[href*='/contact'], a[href*='?q=contact']", context).once('init-modal-forms-contact', function () {
|
||||
var pattern = /user\/[0-9]+\/contact/;
|
||||
if (pattern.test(this.href)) {
|
||||
// This is a personal contact form.
|
||||
this.href = this.href.replace(pattern, 'modal_forms/nojs/' + this.href.match(pattern));
|
||||
}
|
||||
else {
|
||||
// This is a site wide contact form.
|
||||
this.href = this.href.replace(/contact/,'modal_forms/nojs/contact');
|
||||
}
|
||||
}).addClass('ctools-use-modal ctools-modal-modal-popup-medium');
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
11
sites/all/modules/modal_forms/js/modal_forms_login.js
Normal file
11
sites/all/modules/modal_forms/js/modal_forms_login.js
Normal file
@@ -0,0 +1,11 @@
|
||||
(function ($) {
|
||||
|
||||
Drupal.behaviors.initModalFormsLogin = {
|
||||
attach: function (context, settings) {
|
||||
$("a[href*='/user/login'], a[href*='?q=user/login']", context).once('init-modal-forms-login', function () {
|
||||
this.href = this.href.replace(/user\/login/,'modal_forms/nojs/login');
|
||||
}).addClass('ctools-use-modal ctools-modal-modal-popup-small');
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
11
sites/all/modules/modal_forms/js/modal_forms_password.js
Normal file
11
sites/all/modules/modal_forms/js/modal_forms_password.js
Normal file
@@ -0,0 +1,11 @@
|
||||
(function ($) {
|
||||
|
||||
Drupal.behaviors.initModalFormsPassword = {
|
||||
attach: function (context, settings) {
|
||||
$("a[href*='/user/password'], a[href*='?q=user/password']", context).once('init-modal-forms-password', function () {
|
||||
this.href = this.href.replace(/user\/password/,'modal_forms/nojs/password');
|
||||
}).addClass('ctools-use-modal ctools-modal-modal-popup-small');
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
21
sites/all/modules/modal_forms/js/modal_forms_popup.js
Normal file
21
sites/all/modules/modal_forms/js/modal_forms_popup.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Provide the HTML to create the modal dialog.
|
||||
*/
|
||||
Drupal.theme.prototype.ModalFormsPopup = function () {
|
||||
var html = '';
|
||||
|
||||
html += '<div id="ctools-modal" class="popups-box">';
|
||||
html += ' <div class="ctools-modal-content modal-forms-modal-content">';
|
||||
html += ' <div class="popups-container">';
|
||||
html += ' <div class="modal-header popups-title">';
|
||||
html += ' <span id="modal-title" class="modal-title"></span>';
|
||||
html += ' <span class="popups-close close">' + Drupal.CTools.Modal.currentSettings.closeText + '</span>';
|
||||
html += ' <div class="clear-block"></div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-scroll"><div id="modal-content" class="modal-content popups-body"></div></div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
11
sites/all/modules/modal_forms/js/modal_forms_register.js
Normal file
11
sites/all/modules/modal_forms/js/modal_forms_register.js
Normal file
@@ -0,0 +1,11 @@
|
||||
(function ($) {
|
||||
|
||||
Drupal.behaviors.initModalFormsRegister = {
|
||||
attach: function (context, settings) {
|
||||
$("a[href*='/user/register'], a[href*='?q=user/register']", context).once('init-modal-forms-register', function () {
|
||||
this.href = this.href.replace(/user\/register/,'modal_forms/nojs/register');
|
||||
}).addClass('ctools-use-modal ctools-modal-modal-popup-medium');
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
Reference in New Issue
Block a user