Joe8Bit / jquery-github-widget

A jQuery powered widget for displaying user and repo information for a given Github user
MIT License
29 stars 12 forks source link

Optional custom sorter for github widget #8

Closed sourishkrout closed 11 years ago

sourishkrout commented 11 years ago

I've added this a while ago to have better control of what will show in the top spots of the github widget.

Let me know if you what anything changed. I'm sure @gtraxx would like to see this piece of code getting merged.

Thanks Sebastian

sourishkrout commented 11 years ago

Here's an example on how to use the custom sorter based on ./example/index.html:

 28     
gtraxx commented 11 years ago

Hello, I just tested but I do not see any difference?

$("#github").github({
        user: "******",
        show_extended_info: true,
        show_follows: true,
        width: "350px",
        show_repos: 5,
        oldest_first: true,
        sorter: function(a, b) {
            if (a.fork && b.fork)
                return 0;
            if (a.fork)
                return 1;
            if (b.fork)
                return -1;
            return 0;
        }
    });

Another example would you? Best regards

sourishkrout commented 11 years ago

Seems like I broke the travis build and that's probably why my commits didn't make it into master.

You can pull my code from here which should make it work for you until I'll find time to address the problems: https://github.com/sourishkrout/jquery-github-widget

sourishkrout commented 11 years ago

Build passed on travis now. Feel free to merge or let me know what's missing. Thanks, Sebastian.

gtraxx commented 11 years ago

Great :)

sourishkrout commented 11 years ago

@gtraxx: can you get it working pulling from my fork?

gtraxx commented 11 years ago

We must ask JoeyPetterson :)

sourishkrout commented 11 years ago

@JoePettersson: Anything I can do to get this one merged? Let me know please!

Thanks, Sebastian

gtraxx commented 11 years ago

@sourishkrout it's ok for file merge ? :)

Joe8Bit commented 11 years ago

@sourishkrout this looks good to go for me, could you add the above documentation to the README.md? Then I'll merge, thanks!

sourishkrout commented 11 years ago

@JoePettersson: Here you go! Added the example to the readme.