-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADD icons for priority #224
Conversation
|
@@ -89,7 +89,7 @@ | |||
{if $field_name == 'iss_id'} | |||
<a href="view.php?id={$list[i].iss_id}" title="{t}view issue details{/t}">{$list[i].iss_id}</a> | |||
{elseif $field_name == 'pri_rank'} | |||
{$list[i].pri_title|escape:"html"} | |||
{if $list[i].pri_icon > 0}<img src="{$core.rel_url}images/priority/{$list[i].pri_icon|escape:"html"}.png" border="0" align="absmiddle"> {/if}{$list[i].pri_title|escape:"html"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than writing image url in html, add appropriate css class instead
$(function() { | ||
$.widget( "custom.iconselectmenu", $.ui.selectmenu, { | ||
_renderItem: function( ul, item ) { | ||
var li = $( "<li>", { text: item.label } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use convention that jQuery selector variables start with a dollar ($
)
} | ||
.icon .ui-icon { | ||
background-position: left top; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not inline css. add to global css file instead. page.css should have page specific css selectors
@@ -80,6 +80,8 @@ | |||
(<a href="#customer_details">{t}Complete Details{/t}</a>) | |||
{elseif $row.field == 'percentage_complete'} | |||
<div class="ui-progressbar iss_percent_complete" data-percent="{$row.percent}"><div class="progress-label"> {$row.percent} %</div></div> | |||
{elseif $row.field == 'priority'} | |||
{if $row.pri_icon > 0}<img src="{$core.rel_url}images/priority/{$row.pri_icon|escape:"html"}.png" border="0" align="absmiddle"> {/if}{$row.pri_title|escape:"html"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indenting broken. also try to use css not hardcode urls into html.
also, can pri_icon
value be 0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pri_icon = 0
is default (in DB), it mean none icon.
what's with your commit messages? please write sane commit messages not those
|
to fix commit message of last commit:
|
padding-left: 16px; | ||
margin: 0 3px 0 0px; | ||
} | ||
.icon_1 {background-image: url("../images/priority/1.png");} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is poor global class name.
better one: .priority-icon-1
Sorry, I am beginner. Thank for info. |
ok, icons appeared after clearing browser cache. but the |
I find error and fix. Thanks. |
Proposal icon for priority.
Icons: Farm-fresh http://www.fatcow.com/free-icons
DB: add "pri_icon" column in priority table