summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoelstein2017-02-04 03:38:41 (GMT)
committerJakob Perry2017-02-04 03:38:41 (GMT)
commit0b06ac7cd5b600fc1a44a493926e68afac5a9484 (patch)
tree57e9afd56744f9216ab2d196ef6d48e8af1c337f
parent8a117f17b0e8f2b03452577f2209fafc9c9a6013 (diff)
Issue #1570120 by msti, joelstein, joelrotelli, mrfelton, kingfisher64, drupalycious: Add a button for adding CSS id or CSS class for a region in IPE
-rw-r--r--images/icon-css.pngbin0 -> 449 bytes
-rw-r--r--panels_ipe/css/panels_ipe.css4
-rw-r--r--panels_ipe/panels_ipe.module13
3 files changed, 17 insertions, 0 deletions
diff --git a/images/icon-css.png b/images/icon-css.png
new file mode 100644
index 0000000..9a8addf
--- /dev/null
+++ b/images/icon-css.png
Binary files differ
diff --git a/panels_ipe/css/panels_ipe.css b/panels_ipe/css/panels_ipe.css
index e7896e2..481c24c 100644
--- a/panels_ipe/css/panels_ipe.css
+++ b/panels_ipe/css/panels_ipe.css
@@ -220,6 +220,10 @@ div.panels-ipe-handlebar-wrapper li.edit a span {
background-image: url(../images/icon-settings.png);
}
+div.panels-ipe-handlebar-wrapper li.css a span {
+ background-image: url(../images/icon-css.png);
+}
+
div.panels-ipe-handlebar-wrapper li.style a span,
div.panels-ipe-newblock a.style span {
background-image: url(../images/icon-style.png);
diff --git a/panels_ipe/panels_ipe.module b/panels_ipe/panels_ipe.module
index 35dfa6f..c87157c 100644
--- a/panels_ipe/panels_ipe.module
+++ b/panels_ipe/panels_ipe.module
@@ -108,6 +108,19 @@ function template_preprocess_panels_ipe_pane_wrapper(&$vars) {
);
}
+ // Add option to configure CSS.
+ if (user_access('administer advanced pane settings')) {
+ $vars['links']['css'] = array(
+ 'title' => '<span>' . t('CSS') . '</span>',
+ 'href' => $renderer->get_url('pane-css', $pane->pid),
+ 'html' => TRUE,
+ 'attributes' => array(
+ 'class' => array('ctools-use-modal', 'panels-ipe-hide-bar'),
+ 'title' => t('CSS'),
+ ),
+ );
+ }
+
// Deleting is managed entirely in the js; this is just an attachment point
// for it
$vars['links']['delete'] = array(