I am really really tired from getting the question "Why does the site tell me to resize it?!" from clients when I forget to delete the 6 lines in Alpha template.php where the Resize Me! indicator is added to $vars['page_bottom'].

There should be an option on the main theme options to enable/disable this.

I have created this option. I'm just making a proper GIT patch right now.

Alpha/template.php has changed to only add the indicator to the page bottom when the site is in responsive mode AND the setting enable_resize_indicator is TRUE.

Changes:
alpha/template.php -- Add check for enable_resize_indicator in settings

154     if ($theme->settings['responsive'] && $theme->settings['enable_resize_indicator']) {
155       $vars['page_bottom']['alpha_resize_indicator'] = array(                   
156         '#type' => 'markup',                                                    
157         '#markup' => '<div class="alpha-resize-indicator"></div>',              
158       );                                                                        
159     }

alpha/alpha.info -- Add setting in info file. Default to enabled (I guess that's what 1 means)

215d214
settings[alpha_enable_resize_indicator] = '1'

alpha/includes/theme-settings-general.inc -- Add the setting checkbox directly under the Enable Responsive checkbox on main theme settings tab

   $form['alpha_settings']['layout']['responsive_settings']['alpha_enable_resize_indicator'] = array(
     '#type' => 'checkbox',
     '#title' => t('Enable the "Resize Me" indicator at the bottom of the page'),
     '#description' => t('Enabling this will add a floating indicator in the bottom right corner directing the user to "Resize Me" for responsive designs.'),
     '#default_value' => $theme->settings['enable_resize_indicator'],
   );

Comments

ianmarcinkowski’s picture

Attaching patch file.

ianmarcinkowski’s picture

Issue tags: +Responsive Design
ianmarcinkowski’s picture

Status: Active » Needs work

I forgot to pull the setting in to the settings array. Oops. Here is the revised patch.

ianmarcinkowski’s picture

Err.. Here is the revised patch. :D

ianmarcinkowski’s picture

Status: Needs work » Patch (to be ported)
drupaleye’s picture

Tried to apply the patch #4. Using Omega 7.x-3.1 Alpha 7.x-3.1 and subtheme Respond. The check-box is visible in the theme RESPONSIVE SETTINGS, but is always enabled even after disabling and saving. And the most important: The "resize me" div does not appear. (Patch applied manually.)

(edit)....
I guess I was trying to achieve the opposite of the original question. The patch worked, but only when debug is enabled. In the alpha template.php, the code patch is inside the if-debug statement. To make the resize me label appear without debugging enabled, I did like this (after applying patch #4):

  // If no module has taken care of the main content, add it to the page now.
  // This allows the site to still be usable even if no modules that
  // control page regions (for example, the Block module) are enabled.
  if (!drupal_static('system_main_content_added', FALSE)) {
    $vars['content']['system_main'] = drupal_set_page_content();
  }

//make the resize me appear without debugging enabled 
 if ($theme->settings['enable_resize_indicator']) {   
      $vars['page_bottom']['alpha_resize_indicator'] = array(
        '#type' => 'markup',
        '#markup' => '<div class="alpha-resize-indicator"></div>',
      );
    }

  if (($theme->settings['debug']['access'] || $GLOBALS['user']->uid == 1) && ($theme->settings['debug']['grid'] || $theme->settings['debug']['block'])) {
    drupal_add_css(drupal_get_path('theme', 'alpha') . '/css/alpha-debug.css', array('group' => CSS_THEME, 'weight' => -5));   
    drupal_add_js(drupal_get_path('theme', 'alpha') . '/js/alpha-debug.js', array('group' => JS_THEME, 'weight' => -5));

In your css you also have to use this:

.alpha-resize-indicator {
  background: url(../images/resize-handle.png) no-repeat 0 0;
  width: 100px;
  height: 100px;
  position: fixed;
  z-index: 998;
  right: 0;
  bottom: 0;
}

Last step: copy the file resize-handle.png from the Alpha image folder to your theme image folder or make your own image.

This probably will be overwritten by updates to the Omega Alpha theme, so I don't know if this is good practice. But it works for now.

steinmb’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
Assigned: ianmarcinkowski » Unassigned
Priority: Minor » Normal
Status: Patch (to be ported) » Needs review
steinmb’s picture

Issue tags: -Responsive Design