This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 235810 - wiki goodies js to "improve" issue look
Summary: wiki goodies js to "improve" issue look
Status: NEW
Alias: None
Product: www
Classification: Unclassified
Component: Web Content (show other bugs)
Version: 7.4
Hardware: PC Other
: P3 normal (vote)
Assignee: Jan Pirek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-11 11:51 UTC by skygo
Modified: 2013-09-11 14:07 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
css for the class added by json (1.40 KB, text/plain)
2013-09-11 14:04 UTC, skygo
Details
js to request info for a but (754 bytes, text/plain)
2013-09-11 14:07 UTC, skygo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description skygo 2013-09-11 11:51:14 UTC
I want to propose an “improvement” for the wiki that work with Iz template.

Iz template produce html like this <span class=”issue” id=”bugid” ><a buzillalink></a></span> 
 
Proposal is to have a json script that communicate with netbeans bugzilla api so it will  add css class to the span element 
  : a class for priority
  : a class for status
 : a class for resolution
That’s to allow for example background coloring or line through to have nicer output for bug into wiki.

I was not able to find the same mediawiki as the one netbeans wiki runs (mine is 1.21.. and netbeans is 1.15).

I wanted to tests on netbeans wiki to be sure it works but Mediawiki/commons.js is not writable :D before working on css.

//<code>
$(document).ready(function() {

    $(".issue").each(function(index) {
        var p = ($(this));
        var netbeansBuzillaAPI = 'https://netbeans.org/bugzilla/jsonrpc.cgi?method=Bug.get&callback=?&params=%5B+%7B+%22ids%22%3A%5B' + ($(this).attr('id')) + '%5D+%7D+%5D';
        $.getJSON(netbeansBuzillaAPI).done(function(data) {
            p.addClass(data.result['bugs'][0].priority);
            p.addClass(data.result['bugs'][0].status);
            p.addClass(data.result['bugs'][0].resolution);
        }).fail(function(jqxhr, textStatus, error) {
            var err = textStatus + ', ' + error;
            console.log("Request Failed: " + err);
        });
    });
});
//</code>

Best Regards
Comment 1 skygo 2013-09-11 14:04:16 UTC
Created attachment 139935 [details]
css for the class added by json

Color of background are based on dashboard 

color example
http://services.netbeans.org/dashboard/web/user.php?username=vriha&version=7.4

others thinks are choosen to make them different from each other but I'm not very good at design
Comment 2 skygo 2013-09-11 14:07:58 UTC
Created attachment 139936 [details]
js to request info for a but

js as attachement easier to copy paste + 

added bug type also.