craigsworks.com - Support Forum

Full Version: Patch submission
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there an official way to submit patches?

I have added the ability to define url as a function so as to dynamically determine the url for loading content.

Here's the change I made:

loadContent: function(url, data)
{
if(typeof data !== 'object') data = null;

//Added ++++
// Call url function passing in the target as the parameter if url is a function
if(typeof url == 'function') {
url = url.call(self, target);
}

// Call API method
self.beforeContentLoad.call(self);

// Load content using jQuery's load method
self.elements.content.load(url, data, function()
{
// Call API method
self.onContentLoad.call(self);

// Recreate title if enabled
if(self.options.content.title.text !== false) createTitle.call(self);

// Update tooltip position
self.updatePosition();
});

return self;
},
Hi toyche,

At the moment there isn't any way to submit patches, but I'm working on setting up a subversion repository for the next releases.

Could you explain the context your using this in? I can't see a situation where I wouldn't know the URL prior to calling the function, since it itself is a parameter?
Hi Craig,

Here's an example of how it'll be useful. Let's say I have list of links which are dynamically generated and so I would not know before hand the actually url (which is defined in the href attribute) to load the content. If I can define url as a function, I would just call the function to get the url for loading content. Please see the following code example.

JS Code
<ul>
  <li><a href="/items/1" class="qtip">Link 1</a></li>
  <li><a href="/items/2" class="qtip">Link 2</a></li>
  <li><a href="/items/3" class="qtip">Link 3</a></li>
</ul>
 
<script>
  $('a.qtip').qtip({
    content: { text: 'Loading...', 
      url: function(target){ return target.attr('href');}
    }
  });
</script>



craig Wrote:Hi toyche,

At the moment there isn't any way to submit patches, but I'm working on setting up a subversion repository for the next releases.

Could you explain the context your using this in? I can't see a situation where I wouldn't know the URL prior to calling the function, since it itself is a parameter?
This is achievable without using the function you defined, by using the each method:

JS Code
$('a.qtip').each(function()
{
   $(this).qtip({
        content: { 
           text: 'Loading...', 
           url: $(this).attr('href')
        }
   });
});
Craig:

Now that you have the bazaar branch at launchpad (http://bazaar.launchpad.net/~craig.craig...runk/files) and bug tracker also at launchpad (http://bugs.launchpad.net/qtip/), what is the preferred way to discuss and then submit new features / patches?

Thanks,
ivan
Hi ivan,

The best way to submit patches at the moment is to open you're own branch and manually pull updates from the main branch into yours regularly. Feature requesting should be done via the blueprints system on launchpad.
Reference URL's