summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2013-04-13 03:25:44 (GMT)
committerwebchick2013-04-13 03:25:44 (GMT)
commit17a2aa62ffbfc11ed6cddbe5e1b7aef0f6528068 (patch)
tree66d4cc96c3d34870970d09b96a757e64cb99a58e
parent2212a5fed8680d377e1d1ed584b34e8ba209b5d1 (diff)
Issue #1719640 by nod_, droplet, Wim Leers, SebCorbin: Use 'button' element instead of empty links.
-rw-r--r--core/misc/collapse.js3
-rw-r--r--core/misc/machine-name.js2
-rw-r--r--core/misc/tabledrag.js2
-rw-r--r--core/misc/tableresponsive.js2
-rw-r--r--core/misc/vertical-tabs.js2
-rw-r--r--core/modules/system/system.theme.css19
-rw-r--r--core/modules/text/text.js8
-rw-r--r--core/themes/bartik/css/colors.css11
-rw-r--r--core/themes/bartik/css/style.css11
-rw-r--r--core/themes/seven/style.css6
10 files changed, 48 insertions, 18 deletions
diff --git a/core/misc/collapse.js b/core/misc/collapse.js
index 48bfaf6..0765412 100644
--- a/core/misc/collapse.js
+++ b/core/misc/collapse.js
@@ -101,7 +101,8 @@ $.extend(CollapsibleDetails.prototype, {
.after(' ');
// .wrapInner() does not retain bound events.
- var $link = $('<a class="details-title" href="#"></a>')
+ var $link = $('<a class="details-title"></a>')
+ .attr('href', '#' + this.$node.attr('id'))
.prepend($legend.contents())
.appendTo($legend)
.click($.proxy(this.onLegendClick, this));
diff --git a/core/misc/machine-name.js b/core/misc/machine-name.js
index 9862ee3..ddaf782 100644
--- a/core/misc/machine-name.js
+++ b/core/misc/machine-name.js
@@ -109,7 +109,7 @@ Drupal.behaviors.machineName = {
options: options
};
// If it is editable, append an edit link.
- var $link = $('<span class="admin-link"><a href="#">' + Drupal.t('Edit') + '</a></span>').bind('click', eventData, clickEditHandler);
+ var $link = $('<span class="admin-link"><button type="button" class="link">' + Drupal.t('Edit') + '</button></span>').bind('click', eventData, clickEditHandler);
$suffix.append(' ').append($link);
// Preview the machine name in realtime when the human-readable name
diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js
index f578d4a..8b3021a 100644
--- a/core/misc/tabledrag.js
+++ b/core/misc/tabledrag.js
@@ -104,7 +104,7 @@ Drupal.tableDrag = function (table, tableSettings) {
$table.find('> tr.draggable, > tbody > tr.draggable').each(function () { self.makeDraggable(this); });
// Add a link before the table for users to show or hide weight columns.
- $table.before($('<a href="#" class="tabledrag-toggle-weight"></a>')
+ $table.before($('<button type="button" class="link tabledrag-toggle-weight"></button>')
.attr('title', Drupal.t('Re-order rows by numerical weight instead of dragging.'))
.click($.proxy(function (e) {
e.preventDefault();
diff --git a/core/misc/tableresponsive.js b/core/misc/tableresponsive.js
index 8633718..4f45dee 100644
--- a/core/misc/tableresponsive.js
+++ b/core/misc/tableresponsive.js
@@ -35,7 +35,7 @@ function TableResponsive (table) {
// traversed only once to find them.
this.$headers = this.$table.find('th');
// Add a link before the table for users to show or hide weight columns.
- this.$link = $('<a href="#" class="tableresponsive-toggle"></a>')
+ this.$link = $('<button type="button" class="link tableresponsive-toggle"></button>')
.attr('title', Drupal.t('Show table cells that were hidden to make the table fit within a small screen.'))
.on('click', $.proxy(this, 'eventhandlerToggleColumns'));
diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js
index 0dd7900..4c0b3d7 100644
--- a/core/misc/vertical-tabs.js
+++ b/core/misc/vertical-tabs.js
@@ -86,6 +86,8 @@ Drupal.verticalTab = function (settings) {
var self = this;
$.extend(this, settings, Drupal.theme('verticalTab', settings));
+ this.link.attr('href', '#' + settings.fieldset.attr('id'));
+
this.link.click(function (e) {
e.preventDefault();
self.focus();
diff --git a/core/modules/system/system.theme.css b/core/modules/system/system.theme.css
index 7da017b..094984c 100644
--- a/core/modules/system/system.theme.css
+++ b/core/modules/system/system.theme.css
@@ -1,4 +1,3 @@
-
/**
* @file
* Basic styling for common markup.
@@ -16,6 +15,9 @@ form {
margin: 0;
padding: 0;
}
+button {
+ font-size: 1em;
+}
hr {
border: 1px solid gray;
height: 1px;
@@ -192,6 +194,21 @@ abbr.form-required, abbr.tabledrag-changed, abbr.ajax-changed {
}
/**
+ * Show buttons as links.
+ */
+button.link {
+ background: transparent;
+ border: 0;
+ cursor: pointer;
+ margin: 0;
+ padding: 0;
+}
+
+label button.link {
+ font-weight: bold;
+}
+
+/*
* Autocomplete.
*
* @see autocomplete.js
diff --git a/core/modules/text/text.js b/core/modules/text/text.js
index 3292305..7e63c09 100644
--- a/core/modules/text/text.js
+++ b/core/modules/text/text.js
@@ -22,18 +22,18 @@ Drupal.behaviors.textSummary = {
}
// Set up the edit/hide summary link.
- var $link = $('<span class="field-edit-link">(<a class="link-edit-summary" href="#nogo">' + Drupal.t('Hide summary') + '</a>)</span>');
- var $a = $link.find('a');
+ var $link = $('<span class="field-edit-link"> (<button type="button" class="link link-edit-summary">' + Drupal.t('Hide summary') + '</button>)</span>');
+ var $button = $link.find('button');
var toggleClick = true;
$link.on('click', function (e) {
if (toggleClick) {
$summary.hide();
- $a.html(Drupal.t('Edit summary'));
+ $button.html(Drupal.t('Edit summary'));
$link.appendTo($fullLabel);
}
else {
$summary.show();
- $a.html(Drupal.t('Hide summary'));
+ $button.html(Drupal.t('Hide summary'));
$link.appendTo($summaryLabel);
}
e.preventDefault();
diff --git a/core/themes/bartik/css/colors.css b/core/themes/bartik/css/colors.css
index f2a3249..96f3877 100644
--- a/core/themes/bartik/css/colors.css
+++ b/core/themes/bartik/css/colors.css
@@ -1,4 +1,3 @@
-
/* ---------- Color Module Styles ----------- */
body,
@@ -30,14 +29,18 @@ body.overlay {
background-image: -webkit-linear-gradient(top, #0779bf 0%, #48a9e4 100%);
background-image: linear-gradient(top, #0779bf 0%, #48a9e4 100%);
}
-a {
+a,
+.link {
color: #0071b3;
}
a:hover,
-a:focus {
+a:focus,
+.link:hover,
+.link:focus {
color: #018fe2;
}
-a:active {
+a:active,
+.link:active {
color: #23aeff;
}
.sidebar .block {
diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css
index 7a6a376..42ddc2e 100644
--- a/core/themes/bartik/css/style.css
+++ b/core/themes/bartik/css/style.css
@@ -15,7 +15,10 @@ a:visited {
}
a:hover,
a:active,
-a:focus {
+a:focus,
+.link:hover,
+.link:active,
+.link:focus {
text-decoration: underline;
}
h1,
@@ -122,14 +125,16 @@ div.messages,
div.meta,
p.comment-time,
table,
-.breadcrumb {
+.breadcrumb,
+.link {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
input,
textarea,
select,
.form-button,
-a.button {
+a.button,
+button {
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
}
diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css
index c65a22d..6e083a7 100644
--- a/core/themes/seven/style.css
+++ b/core/themes/seven/style.css
@@ -6,11 +6,13 @@ body {
background: #fff;
font: normal 81.3%/1.538em "Lucida Grande", "Lucida Sans Unicode", sans-serif;
}
-a {
+a,
+.link {
color: #0074bd;
text-decoration: none;
}
-a:hover {
+a:hover,
+.link:hover {
text-decoration: underline;
}
hr {