Skip to content
Snippets Groups Projects
Commit f22d5030 authored by Lachlan Ennis's avatar Lachlan Ennis
Browse files

Issue #2887225 by arunkumark, jayesh_makwana, chishah92, Sivaprasad C,...

Issue #2887225 by arunkumark, jayesh_makwana, chishah92, Sivaprasad C, elachlan: Coding Standard issues
parent cafd044b
No related branches found
No related tags found
No related merge requests found
INTRODUCTION
------------
The External Links module is a very simple approach to adding icons to links
to external websites or e-mail addresses. It is a purely JavaScript
implementation, so the icons are only shown to users that have JavaScript
......@@ -7,8 +8,12 @@ enabled.
External Links was written by Nathan Haug.
Built by Robots: http://www.lullabot.com
Install
-------
REQUIREMENTS
------------
No special requirements.
INSTALLATION
------------
Simply install External Links like you would any other module.
1) Copy the extlink folder to the modules folder in your installation.
......@@ -18,7 +23,13 @@ Simply install External Links like you would any other module.
3) No additional configuration is necessary though you may fine-tune settings at
Administer -> Site configuration -> External Links (/admin/settings/extlink).
A note about the CSS
CONFIGURATION
-------------
No additional configuration is necessary though you may fine-tune settings at
Manage -> Configuration -> External Links
(/admin/config/user-interface/extlink).
A NOTE ABOUT THE CSS
--------------------
This module adds a CSS file that is only a few lines in length. You may choose
to move this CSS to your theme to prevent the file from needing to be loaded
......@@ -33,3 +44,10 @@ separately. To do this:
Note that you DO NOT need to make a extlink.css file. Specifying the file in the
info file is enough to tell Drupal not to load the original file.
MAINTAINERS
-----------
Current maintainers:
- Lachlan Ennis (elachlan) - https://www.drupal.org/u/elachlan
- Nate Haug (quicksketch) - https://www.drupal.org/u/quicksketch
\ No newline at end of file
......@@ -6,9 +6,9 @@
'use strict';
Drupal.extlink = Drupal.extlink || {};
Drupal.extlink = Drupal.extlink || {};
Drupal.extlink.attach = function (context, settings) {
Drupal.extlink.attach = function (context, settings) {
if (!settings.hasOwnProperty('extlink')) {
return;
}
......@@ -147,7 +147,7 @@ Drupal.extlink.attach = function (context, settings) {
if (settings.extlink.extAlert) {
return confirm(settings.extlink.extAlertText);
}
};
};
$(external_links).click(function (e) {
return Drupal.extlink.popupClickHandler(e, this);
......@@ -164,7 +164,7 @@ Drupal.extlink.attach = function (context, settings) {
* @param {string} icon_placement
* 'append' or 'prepend' the icon to the link.
*/
Drupal.extlink.applyClassAndSpan = function (links, class_name, icon_placement) {
Drupal.extlink.applyClassAndSpan = function (links, class_name, icon_placement) {
var $links_to_process;
if (Drupal.settings.extlink.extImgClass) {
$links_to_process = $(links);
......@@ -189,8 +189,8 @@ Drupal.extlink.applyClassAndSpan = function (links, class_name, icon_placement)
}
};
Drupal.behaviors.extlink = Drupal.behaviors.extlink || {};
Drupal.behaviors.extlink.attach = function (context, settings) {
Drupal.behaviors.extlink = Drupal.behaviors.extlink || {};
Drupal.behaviors.extlink.attach = function (context, settings) {
// Backwards compatibility, for the benefit of modules overriding extlink
// functionality by defining an "extlinkAttach" global function.
if (typeof extlinkAttach === 'function') {
......
......@@ -5,6 +5,18 @@
* External Link module.
*/
/**
* Implementation of hook_help().
*/
function extlink_help($path, $arg) {
switch ($path) {
case 'admin/help#extlink':
$output = '';
$output .= '<p>' . t('External Links is used to differentiate between internal and external links. Using jQuery, it will find all external links on a page and add an external icon indicating it will take you offsite or a mail icon for mailto links.') . '</p>';
return $output;
}
}
/**
* Implements hook_menu().
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment