Commit 6218db81 authored by catch's avatar catch

Issue #1217038 by jyve, idflood, dcmouyard, aspilicious: Clean up the CSS for the Shortcut module.

parent d672bcc4
#toolbar #edit-shortcuts {
position: absolute;
left: 0;
top: 0;
padding: 5px 5px 5px 10px;
}
#toolbar .toolbar-shortcuts ul {
float: none;
margin-right: 5px;
margin-left: 10em;
}
#toolbar .toolbar-shortcuts ul li a {
margin-left: 5px;
margin-right: 0;
padding: 0 5px;
}
#toolbar .toolbar-shortcuts span.icon {
float: right;
}
.add-or-remove-shortcuts a span.icon {
float: right;
margin-right: 8px;
margin-left: 0;
}
.add-or-remove-shortcuts a span.text {
float: right;
padding-right: 10px;
padding-left: 0;
}
.add-or-remove-shortcuts a:focus span.text,
.add-or-remove-shortcuts a:hover span.text {
-moz-border-radius: 5px 0 0 5px;
border-radius: 5px 0 0 5px;
padding-left: 6px;
}
#shortcut-set-switch .form-item-new {
padding-right: 17px;
padding-left: 0;
}
.add-shortcut a:hover span.icon {
background-position: 0 -24px;
}
.remove-shortcut a:hover span.icon {
background-position: -12px -24px;
}
/**
* @file
* Admin styling for shortcut module.
*/
.shortcut-slot-hidden {
display: none;
}
div.form-item-set div.form-item-new {
display: inline;
}
/**
* @file
* Generic RTL base styles for shortcut module.
*/
/**
* Toolbar.
*/
#edit-shortcuts {
left: 0;
position: absolute;
top: 0;
}
#shortcut-toolbar ul {
float: none;
}
#shortcut-toolbar .icon {
float: right;
}
/**
* Add/remove links.
*/
.add-or-remove-shortcuts .icon,
.add-or-remove-shortcuts .text {
float: right;
}
/**
* @file
* Generic base styles for shortcut module.
*/
/**
* Toolbar.
*/
#edit-shortcuts {
float: right; /* LTR */
}
#shortcut-toolbar ul {
float: left; /* LTR */
}
#shortcut-toolbar .icon {
float: left; /* LTR */
}
/**
* Add/remove links.
*/
.add-or-remove-shortcuts .icon {
display: block;
float: left; /* LTR */
}
.add-or-remove-shortcuts .text {
display: none;
float: left; /* LTR */
}
.add-or-remove-shortcuts a:focus .text,
.add-or-remove-shortcuts a:hover .text {
display: block;
}
#toolbar #edit-shortcuts {
float: right;
padding: 5px 10px 5px 5px;
line-height: 24px;
color: #fefefe;
}
#toolbar #edit-shortcuts:focus,
#toolbar #edit-shortcuts:hover,
#toolbar #edit-shortcuts.active {
color: #fff;
text-decoration: underline;
}
#toolbar .toolbar-shortcuts ul {
padding: 5px 0 2px 0;
height: 28px;
line-height: 24px;
float: left; /* LTR */
margin-left:5px; /* LTR */
}
#toolbar .toolbar-shortcuts ul li a {
padding: 0 5px 0 5px;
margin-right: 5px; /* LTR */
-moz-border-radius: 5px;
border-radius: 5px;
}
#toolbar .toolbar-shortcuts ul li a:focus,
#toolbar .toolbar-shortcuts ul li a:hover,
#toolbar .toolbar-shortcuts ul li a.active:focus {
background: #555;
}
#toolbar .toolbar-shortcuts ul li a.active:hover,
#toolbar .toolbar-shortcuts ul li a.active {
background: #000;
}
#toolbar .toolbar-shortcuts span.icon {
float: left; /* LTR */
background: #444;
width: 30px;
height: 30px;
margin-right: 5px; /* LTR */
-moz-border-radius: 5px;
border-radius: 5px;
}
.add-or-remove-shortcuts {
padding-top: 5px;
}
.add-or-remove-shortcuts a span.icon {
display: block;
width: 12px;
background: transparent url(shortcut.png) no-repeat scroll 0 0;
height: 12px;
float: left;
margin-left:8px;
}
.add-shortcut a:focus span.icon,
.add-shortcut a:hover span.icon {
background-position: 0 -12px;
}
.remove-shortcut a span.icon {
background-position: -12px 0;
}
.remove-shortcut a:focus span.icon,
.remove-shortcut a:hover span.icon {
background-position: -12px -12px;
}
.add-or-remove-shortcuts a span.text {
float: left;
padding-left:10px;
display: none;
}
.add-or-remove-shortcuts a:focus span.text,
.add-or-remove-shortcuts a:hover span.text {
font-size: 10px;
line-height: 12px;
color: #fff;
background-color: #5f605b;
display: block;
padding-right: 6px; /* LTR */
cursor: pointer;
-moz-border-radius: 0 5px 5px 0; /* LTR */
border-radius: 0 5px 5px 0; /* LTR */
}
#shortcut-set-switch .form-type-radios {
padding-bottom: 0;
margin-bottom: 0;
}
#shortcut-set-switch .form-item-new {
padding-top: 0;
padding-left: 17px; /* LTR */
}
......@@ -692,10 +692,15 @@ function shortcut_preprocess_page(&$variables) {
if (theme_get_setting('shortcut_module_link')) {
$variables['title_suffix']['add_or_remove_shortcut'] = array(
'#attached' => array('css' => array(drupal_get_path('module', 'shortcut') . '/shortcut.css')),
'#attached' => array(
'css' => array(
drupal_get_path('module', 'shortcut') . '/shortcut.base.css',
drupal_get_path('module', 'shortcut') . '/shortcut.theme.css',
),
),
'#prefix' => '<div class="add-or-remove-shortcuts ' . $link_mode . '-shortcut">',
'#type' => 'link',
'#title' => '<span class="icon"></span><span class="text">' . $link_text . '</span>',
'#title' => '<span class="icon">'. t('Add or remove shortcut') .'</span><span class="text">' . $link_text . '</span>',
'#href' => $link_path,
'#options' => array('query' => $query, 'html' => TRUE),
'#suffix' => '</div>',
......@@ -720,8 +725,13 @@ function shortcut_page_alter(&$page) {
*/
function shortcut_toolbar_pre_render($toolbar) {
$links = shortcut_renderable_links();
$links['#attached'] = array('css' => array(drupal_get_path('module', 'shortcut') . '/shortcut.css'));
$links['#prefix'] = '<div class="toolbar-shortcuts">';
$links['#attached'] = array(
'css' => array(
drupal_get_path('module', 'shortcut') . '/shortcut.base.css',
drupal_get_path('module', 'shortcut') . '/shortcut.theme.css',
),
);
$links['#prefix'] = '<div id="shortcut-toolbar">';
$links['#suffix'] = '</div>';
$shortcut_set = shortcut_current_displayed_set();
$configure_link = NULL;
......
/**
* @file
* RTL styling for the shortcut module.
*/
/**
* Toolbar.
*/
#shortcut-toolbar ul {
margin-left: 0;
margin-right: 5px;
}
#shortcut-toolbar a {
margin-left: 5px;
margin-right: 0;
}
#shortcut-toolbar .icon {
margin-left: 5px;
margin-right: 0;
}
/**
* Add/remove links.
*/
.add-or-remove-shortcuts .icon {
margin-left: 0;
margin-right: 8px;
}
.add-shortcut a:focus .icon,
.add-shortcut a:hover .icon {
background-position: 0 -24px;
}
.remove-shortcut a:focus .icon,
.remove-shortcut a:hover .icon {
background-position: -12px -24px;
}
.add-or-remove-shortcuts .text {
padding: 0 10px 0 6px;
}
.add-or-remove-shortcuts a:focus .text,
.add-or-remove-shortcuts a:hover .text {
-moz-border-radius: 5px 0 0 5px;
border-radius: 5px 0 0 5px;
}
/**
* @file
* Styling for the shortcut module.
*/
/**
* Toolbar.
*/
.toolbar #edit-shortcuts {
line-height: 24px;
padding: 5px 10px;
}
#edit-shortcuts:focus,
#edit-shortcuts:hover,
#edit-shortcuts.active {
text-decoration: underline;
}
#shortcut-toolbar ul {
line-height: 24px;
margin-left: 5px; /* LTR */
padding: 5px 0;
}
#shortcut-toolbar a {
-moz-border-radius: 5px;
border-radius: 5px;
margin-right: 5px; /* LTR */
padding: 0 5px;
}
#shortcut-toolbar a:focus,
#shortcut-toolbar a:hover,
#shortcut-toolbar a.active:focus {
background: #555;
}
#shortcut-toolbar a.active:hover,
#shortcut-toolbar a.active {
background-color: #000;
}
#shortcut-toolbar .icon {
background-color: #444;
-moz-border-radius: 5px;
border-radius: 5px;
height: 30px;
margin-right: 5px; /* LTR */
width: 30px;
}
/**
* Add/remove links.
*/
.add-or-remove-shortcuts .icon {
background: transparent url(shortcut.png) no-repeat;
height: 12px;
margin-left: 8px; /* LTR */
overflow: hidden;
text-indent: 12px;
width: 12px;
}
.add-shortcut a:focus .icon,
.add-shortcut a:hover .icon {
background-position: 0 -12px; /* LTR */
}
.remove-shortcut .icon {
background-position: -12px 0;
}
.remove-shortcut a:focus .icon,
.remove-shortcut a:hover .icon {
background-position: -12px -12px; /* LTR */
}
.add-or-remove-shortcuts .text {
padding: 0 6px 0 10px; /* LTR */
}
.add-or-remove-shortcuts a:focus .text,
.add-or-remove-shortcuts a:hover .text {
background-color: #5f605b;
-moz-border-radius: 0 5px 5px 0; /* LTR */
border-radius: 0 5px 5px 0; /* LTR */
color: #fff;
cursor: pointer;
font-size: 10px;
line-height: 12px;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment