Skip to content

Commit

Permalink
[JENKINS-31162] Some reviews to @gusreiber's PR
Browse files Browse the repository at this point in the history
  • Loading branch information
recena committed Mar 16, 2016
1 parent 81e3bc0 commit 21f6f4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -134,8 +134,8 @@ public static String getEffectiveClazz(@Nonnull TopLevelItemDescriptor descripto

/**
* Provides the icon path pattern for the requested item or null if this configurator doesn't have one.
* For example: /plugin/shortnme-of-myplugin/icons/item/:size:/myitem.pngm where :size should be replaced by the consumer using
* the standard sizes in Jenkins: 16x16, 24x24, etc...
* For example: /plugin/shortname-of-myplugin/icons/item/:size:/myitem.pngm where :size should be replaced by the
* consumer using the standard sizes in Jenkins: 16x16, 24x24, etc...
*
* @param descriptor the item it is asking about.
*
Expand Down
5 changes: 3 additions & 2 deletions war/src/main/js/add-item.js
Expand Up @@ -24,7 +24,7 @@ $.when(getItems(jRoot)).done(function(data){
var $form = $root.find('form[name="createItem"]').addClass('jenkins-config new-view');
var $newView = $('<div class="new-view" />')
.attr('name','createItem')
.attr('action','craetItem')
.attr('action','createItem')
.prependTo($form);
var $tabs = $('<div class="jenkins-config-widgets" />').appendTo($newView);
var $categories = $('<div class="categories" />').appendTo($newView);
Expand Down Expand Up @@ -247,12 +247,13 @@ $.when(getItems(jRoot)).done(function(data){
}

function drawItem(elem){
var $iconFilePath = jRoot + '/' + elem.iconFilePathPattern.replace(":size", "48x48");
var $item = $([
'<li class="',cleanClassName(elem.class),'"><label><input name="mode" value="',elem.class,'" type="radio" /> <span class="label">', elem.displayName, '</span></label></li>'
].join('')).append([
'<div class="desc">', elem.description, '</div>'
].join('')).append([
'<div class="icn"><span class="img" style="background:url(',jRoot,'/images/items/',cleanClassName(elem.class),'.png)"></span></div>'
'<div class="icn"><span class="img" style="background:url(', $iconFilePath, ')"></span></div>'
].join(''));

function setSelectState(){
Expand Down

0 comments on commit 21f6f4e

Please sign in to comment.