aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-11-06 17:44:21 +0100
committerAngelo Naselli <anaselli@linux.it>2014-11-06 17:44:21 +0100
commit390efecb238391bfe4b0335b4742d66054bde44c (patch)
treeec9d1fbdb0ee8064f15982d68b98b876b03d9dcd /modules
parent24c4435d98ea0184bb0c5ccf826db1b993689411 (diff)
downloadcolin-keep-390efecb238391bfe4b0335b4742d66054bde44c.tar
colin-keep-390efecb238391bfe4b0335b4742d66054bde44c.tar.gz
colin-keep-390efecb238391bfe4b0335b4742d66054bde44c.tar.bz2
colin-keep-390efecb238391bfe4b0335b4742d66054bde44c.tar.xz
colin-keep-390efecb238391bfe4b0335b4742d66054bde44c.zip
Fixed package info layout
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/rpmdragora/dragoraUpdate19
-rwxr-xr-xmodules/rpmdragora/rpmdragora17
2 files changed, 28 insertions, 8 deletions
diff --git a/modules/rpmdragora/dragoraUpdate b/modules/rpmdragora/dragoraUpdate
index 1c06f9d..b0c4247 100755
--- a/modules/rpmdragora/dragoraUpdate
+++ b/modules/rpmdragora/dragoraUpdate
@@ -216,7 +216,8 @@ sub run_treeview_dialog {
## service list (serviceBox)
my $packageTbl = $mgaFactory->createCBTable($vbox, $yTableHeader, $yui::YCBTableCheckBoxOnFirstColumn);
-
+ $factory->createVSpacing($vbox, 1);
+ my $infoBox = $factory->createRichText($vbox, "", 0);
$AdminPanel::Rpmdragora::pkg::probe_only_for_updates = 1; # faster startup
$DB::single = 1;
@@ -227,7 +228,11 @@ sub run_treeview_dialog {
$packageTbl->setImmediateMode(1);
$packageTbl->setWeight(0, 50);
-
+ my $item = $packageTbl->selectedItem();
+ if ($item) {
+ my $pkg = $data{$item->index()}{fullname};
+ AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox);
+ }
# dialog buttons
$factory->createVSpacing($vbox, 1.0);
@@ -287,9 +292,14 @@ sub run_treeview_dialog {
}
elsif ($widget == $packageTbl) {
yui::YUI::app()->busyCursor();
+ my $item = $packageTbl->selectedItem();
+ if ($item) {
+ my $pkg = $data{$item->index()}{fullname};
+ AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox);
+ }
my $wEvent = yui::toYWidgetEvent($event);
if ($wEvent->reason() == $yui::YEvent::ValueChanged) {
- my $item = $packageTbl->changedItem();
+ $item = $packageTbl->changedItem();
if ($item) {
my $name = $data{$item->index()}{fullname};
$DB::single = 1;
@@ -298,6 +308,9 @@ sub run_treeview_dialog {
}
yui::YUI::app()->normalCursor();
}
+ elsif ($widget == $infoBox) {
+ print "RichText widget Event\n";
+ }
elsif ($widget == $selectButton) {
yui::YUI::app()->busyCursor();
$initialized = 0;
diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora
index ccb53f4..51f2b55 100755
--- a/modules/rpmdragora/rpmdragora
+++ b/modules/rpmdragora/rpmdragora
@@ -199,20 +199,27 @@ sub detaillist_changeditem_callback {
sub detaillist_callback {
my ($selection, $info, $options) = @_;
+
$info->setValue("");
- $info->setValue("<h2>" . $loc->N("Informations") . "</h2>");
return if( ref $selection ne "yui::YItem");
+
+ my $info_text ="<h2>" . $loc->N("Informations") . "</h2>";
+
my @data = get_info($options->{table_item_list}[$selection->index()],$info->parent()->parent());
for(@{$data[0]}){
if(ref $_ ne "ARRAY"){
- $info->setValue($info->value()."<br />$_");
+ $info_text .= "<br />" . $_;
}else{
- $info->setValue($info->value()."<br />");
- for my $subitem(@{$_}){
- $info->setValue($info->value()."<br />&nbsp;&nbsp;&nbsp;".$subitem);
+ $info_text .= "<br />";
+ for my $subitem(@{$_}) {
+ $info_text .= "<br />" . "<br />&nbsp;&nbsp;&nbsp;" . $subitem;
}
}
}
+ # change \n to <br/>
+ $info_text =~ s|\n|<br/>|g;
+
+ $info->setValue($info_text);
}
sub do_search($$$$$$$) {