Posted by wqmeng on November 3, 2008 at 4:47am
| Project: | Trouble ticketing system to support Computer Network Operations |
| Version: | 6.x-3.0-beta3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | roczei |
| Status: | closed (fixed) |
Issue Summary
Hi, I am testing your ticketing, it is great. while there is a little display problem When the drupal theme style has this define
* {
margin:0;
padding:0;
}
then the ticket block with the ul li tags will lost the default margin and padding style.
So I suggest that add a main css selector with the ticket display block and let the user define the margin and padding style themselves.
Here is my change:
In file ticket.pages.inc
search:
drupal_add_css(drupal_get_path('module', 'ticket').'/ticket.css');
$output = '<ul>';change to:
drupal_add_css(drupal_get_path('module', 'ticket').'/ticket.css');
$output = '<ul id = "ticket">';In ticket.css
At the end add
#ticket ul{
margin-left:0 0 0 15px;
padding:0;
}
#ticket ul li{
margin:3px 0 3px 0;
padding:0;
}Also I add little css change of my custom theme style file to display as I want
.ticket_desc {
margin-left:-15px;
}-------------------------
ty for your great work.
Comments
#1
Sorry a typo mistake in above comment:
In ticket.css
At the end add
#ticket ul{margin:0 0 0 15px;
padding:0;
}
#ticket ul li{
margin:3px 0 3px 0;
padding:0;
}
ty
#2
Finally I change to this:
In file ticket.pages.inc
Change function theme_ticket_info($t_infos) to this:
/**
* theme_ticket_info: ticket unitok es csoportok rovid ismertetoje
* @param: $t_info - ticket unitok es csoportok rovid ismertetojet tartalmazza
*/
function theme_ticket_info($t_infos) {
// lista kiiratasa
drupal_add_css(drupal_get_path('module', 'ticket').'/ticket.css');
$output = '<ul id="ticket">';
foreach ($t_infos as $key => $t_info) {
// unit hozza adasa a listahoz
$output .= '<li>'.l($t_info['name'], 'ticket/'.$key);
if ($t_info['desc'] != '') {
$output .= '<div class="ticket_desc">'.$t_info['desc'].'</div>';
}
// csoportok hozza adasa a listahoz
if ( count($t_info['groups']) ) {
$output .='<ul>';
foreach ($t_info['groups'] as $gkey => $info) {
if ( $gkey ) {
$output .= '<li>'.l($info['name'], 'ticket/'.$key.'/'.$gkey);
// add menupont ha van hozza jogod
if ( $info['access']) {
$output .= ' ('.l(t('add ticket'), 'ticket/'.$key.'/'.$gkey.'/add').')';
}
// leiras hozzaadasa a listahoz, ha van:)
if ($info['desc'] != '') {
$output .= '<div class="ticket_desc">'.$info['desc'].'</div>';
}
$output .= '</li>';
}
}
$output .='</ul>';
}
$output .= '</li>';
}
$output .= '</ul>';
return $output;
}
--------------------
In file ticket.css
Add the following style at the end:
#ticket ul{margin:0 0 0 15px;
padding:0;
list-style-type:circle; list-style-position:inside;
}
#ticket ul li{
margin:3px 0 3px 0;
padding:0;
}
#ticket > li{
list-style-type:disc; list-style-position:inside;
}
.ticket_desc {
margin-left:0px;
}
---------------------
and the tickets block looks right now, tested on IE6 7 8beta, Firefox3.03, Opera9.50 beta, and Safari3.1.2.
ty
#3
We modified the code but not exact way what you suggested, please check the code that it is good for you or not. There is a new rc1 release and this content this too.
#4