Setting custom opacity only affects the images, but the overlay opacity of login forms are not changed and keep the deafault 85%. I think that's not intended.

Please, any idea, how, what, where :) could I manually change the opacity for login form (hopefully by copying and modifying some default css file to my theme)?

Comments

Freakachoo’s picture

delboard, i have the same problem.

I solved it with just 1 row:

Go to colorbox/js/colorbox_login.js and add
opacity: settings.colorbox.opacity to 25 row, so code in the file will be:

(function ($) {

Drupal.behaviors.initColorboxLogin = {
  attach: function (context, settings) {
    if (!$.isFunction($.colorbox)) {
      return;
    }
    $("a[href*='/user/login'], a[href*='?q=user/login']", context).once('init-colorbox-login-processed', function () {
      var path = this.href;
      var new_path = path.replace(/user\/login/,'user/login/colorbox')
      var addquery = (path.indexOf('?') !=-1) ? '&' : '?';
      var dest = window.location.pathname.replace(Drupal.settings.basePath, '');

      // If no destination, add one to the current page.
      if (path.indexOf('destination') != -1 || dest == '') {
        this.href = new_path;
      }
      else {
        this.href = new_path + addquery + 'destination=' + dest;
      }
    }).colorbox({
      initialWidth:200,
      initialHeight:200,
      opacity: settings.colorbox.opacity,
      onComplete:function(){
        $('#edit-name').focus();
      }
    });
  }
};

})(jQuery);

This will solve the problem, and value of opacity geting from the settings of colorbox

remkovdz’s picture

I have the same problem, however the given solution does not work for me. That said, this is a bug from months ago, shouldn't this be fixed already? Thanks..

frjo’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Closed (won't fix)

Form support in Colorbox was a bad idea. I will most likely remove it completely in the future.

Please try out my "Modal forms" module instead, it build on top of ctools.

https://drupal.org/project/modal_forms

Also checkout the "CTools Auto-modal" module. I have not tested it but it looks really neat.

http://drupal.org/project/ctools_automodal

remkovdz’s picture

Hmm, my problem does not occur specifically in combination with a form... But with any colorbox...

xqbzzr’s picture

Same here.
No matter where i start the colorbox, the overlay stays on 0.9. The custom settings are not respected.