From 6a766913137024ad46616630e6558ca713c08196 Mon Sep 17 00:00:00 2001
From: Chris Svajlenka <chris@svajlenka.com>
Date: Tue, 25 Feb 2014 10:04:55 -0800
Subject: [PATCH] Addressing https://drupal.org/node/2186159, Allows usage
 without IPE.

---
 breakpoint_panels.module | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/breakpoint_panels.module b/breakpoint_panels.module
index d883d97..a9f1293 100644
--- a/breakpoint_panels.module
+++ b/breakpoint_panels.module
@@ -27,6 +27,7 @@ function breakpoint_panels_menu() {
     'page arguments' => array(1, 4, 5),
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
+    'theme callback' => 'ajax_base_page_theme',
   );
 
   // Ajax rendering of a specific pane.
@@ -126,7 +127,7 @@ function breakpoint_panels_panels_ipe_pane_links_alter(&$links, $pane, $display)
   // todo: Currently this only works with panes that are in the DB as opposed to in code.
   if (!empty($pane['pane']->did)) {
     $links['global'] = array(
-      'title' => t('BP'),
+      'title' => t('Breakpoint settings'),
       'href' => 'breakpoint_panels/nojs/settings/form/' . $pane['pane']->pid . '/' . $pane['pane']->did,
       'attributes' => array(
         'class' => 'ctools-use-modal ctools-modal-modal-popup-small',
@@ -136,6 +137,19 @@ function breakpoint_panels_panels_ipe_pane_links_alter(&$links, $pane, $display)
 }
 
 /**
+ * Implements hook_get_pane_links_alter().
+ */
+function breakpoint_panels_get_pane_links_alter(&$links, $pane) {
+  if (!empty($pane->did)) {
+    $links['style']['breakpoint_settings'] = array(
+      'title' => t('Breakpoint settings'),
+      'href' => 'breakpoint_panels/nojs/settings/form/' . $pane->pid . '/' . $pane->did,
+      'attributes' => array('class' => array('ctools-use-modal')),
+    );
+  }
+}
+
+/**
  * Creates a modal popup.
  */
 function breakpoint_panels_modal_popup($js = NULL, $pid = 0, $did = 0) {
-- 
1.8.3.4 (Apple Git-47)

