first import

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-08 11:40:19 +02:00
commit 1bc61b12ad
8435 changed files with 1582817 additions and 0 deletions

View 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);

View 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);

View 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);

View 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);

View 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;
}

View 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);