I installed Colorbox 7.x-2.4 on my Drupal 7.22

I had the need to implement the tag "fixed" which is normally in the JQuery Colorbox script.

I modified the "js/colorbox_inline.js" file in the following way:

+34      fixed:function(){
+35        return $.urlParam('fixed', $(this).attr('href'));
+36      },

now, when I call the href with the following way:

<a class"colorbox-inline" href="?width=500&height=700&fixed=true&inline=true#id-of-content">Open Colorbox</a>

the opened iframe of Colorbox is in fixed position.
I ask if it's possible to implement this option into the next releases of Colorbox, also for the method: colorbox-load

thank you very much

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pingwin4eg’s picture

Title: Proposed implementation for the tag FIXED » Colorbox Inline ignores some default and URL parameters
Version: 7.x-2.4 » 7.x-2.x-dev
Category: Feature request » Bug report
Priority: Major » Normal
Issue summary: View changes
FileSize
866 bytes

I wonder why there are different colorbox_inline.js and colorbox_load.js at all if they are doing the same stuff. Well almost, because inline one doesn't take into account some of default colorbox options and is limited by only few url query parameters.

Uploading this patch specifically for the `Fixed` parameter.
But I propose to rewrite initColorboxInline behavior to be more like initColorboxLoad or merge them into one file if that possible.

pingwin4eg’s picture

Status: Active » Needs review
FileSize
3.32 KB

Here it is. All options are taken from defaults first and then overriden by URL parameters.

frjo’s picture

Status: Needs review » Closed (won't fix)
pingwin4eg’s picture

@frjo Can you give details about why this won't be fixed?