/[mldonkey]/mldonkey/src/daemon/driver/driverInteractive.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/driver/driverInteractive.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.43 by spiralvoice, Sun Jul 17 23:15:04 2005 UTC revision 1.44 by spiralvoice, Tue Jul 19 19:44:56 2005 UTC
# Line 504  function submitPriority(num,cp,sel) { Line 504  function submitPriority(num,cp,sel) {
504  }  }
505  //--\\>\\</script\\>  //--\\>\\</script\\>
506    
507  \\<div class=main\\>  \\<div class=main\\>";
508  \\<div id=\\\"object1\\\" style=\\\"position:absolute; background-color:FFFFDD;color:black;border-color:black;border-width:20;font-size:8pt; visibility:show; left:25px; top:  
509  -100px; z-index:+1\\\" onmouseover=\\\"overdiv=1;\\\"  onmouseout=\\\"overdiv=0; setTimeout(\\\'hideLayer()\\\',1000)\\\"\\>pop up description layer\\</div\\>  if !!html_mods_use_js_tooltips then Printf.bprintf buf
510  \\<form id=\\\"selectForm\\\" name=\\\"selectForm\\\" action=\\\"files\\\"\\>  "\\<div id=\\\"object1\\\" style=\\\"position:absolute; background-color:FFFFDD;color:black;border-color:black;border-width:20;font-size:8pt; visibility:show; left:25px; top:
511    -100px; z-index:+1\\\" onmouseover=\\\"overdiv=1;\\\"  onmouseout=\\\"overdiv=0; setTimeout(\\\'hideLayer()\\\',1000)\\\"\\>\\&nbsp;\\</div\\>";
512    
513            Printf.bprintf buf "\\<form id=\\\"selectForm\\\" name=\\\"selectForm\\\" action=\\\"files\\\"\\>
514  \\<table class=main cellspacing=0 cellpadding=0\\>  \\<table class=main cellspacing=0 cellpadding=0\\>
515    
516  \\<tr\\>\\<td\\>  \\<tr\\>\\<td\\>
# Line 576  let ctd fn td = Printf.sprintf "\\<td on Line 579  let ctd fn td = Printf.sprintf "\\<td on
579    print_table_html_mods buf    print_table_html_mods buf
580      (List.map (fun file ->      (List.map (fun file ->
581          [|          [|
582            (if downloading file then            (if !!html_mods_use_js_tooltips then
583                Printf.sprintf "                          Printf.sprintf "
584                                  onMouseOver=\\\"mOvr(this);popLayer('%s<br>Network: %s');return true;\\\" onMouseOut=\\\"mOut(this);hideLayer()\\\"\\>                                  onMouseOver=\\\"mOvr(this);setTimeout('popLayer(\\\\\'%s<br>File#: %d<br>Network: %s\\\\\')',%d);setTimeout('hideLayer()',%d);return true;\\\" onMouseOut=\\\"mOut(this);hideLayer();setTimeout('hideLayer()',%d)\\\"\\>"
585                  \\<td class=\\\"dl al np\\\"\\>\\<input class=checkbox name=pause type=checkbox value=%d\\>\\</td\\>                          (Http_server.html_real_escaped file.file_name)
586                            file.file_num
587                            (net_name file)
588                            !!html_mods_js_tooltips_wait
589                            !!html_mods_js_tooltips_timeout
590                            !!html_mods_js_tooltips_wait
591                             else Printf.sprintf "
592                                   onMouseOver=\\\"mOvr(this);return true;\\\" onMouseOut=\\\"mOut(this);\\\"\\>");
593    
594            (if downloading file then
595                  Printf.sprintf "\\<td class=\\\"dl al np\\\"\\>\\<input class=checkbox name=pause type=checkbox value=%d\\>\\</td\\>
596                  \\<td class=\\\"dl al np\\\"\\>R\\</td\\>                  \\<td class=\\\"dl al np\\\"\\>R\\</td\\>
597                  \\<td class=\\\"dl al brs\\\"\\>\\<input class=checkbox name=cancel type=checkbox value=%d\\>\\</td\\>"                  \\<td class=\\\"dl al brs\\\"\\>\\<input class=checkbox name=cancel type=checkbox value=%d\\>\\</td\\>"
                 (Http_server.html_real_escaped file.file_name)  
                 (net_name file)  
                 file.file_num  
598                  file.file_num                  file.file_num
599                    file.file_num          
600              else              else
601                Printf.sprintf "                Printf.sprintf "\\<td class=\\\"dl al np\\\"\\>P\\</td\\>
                                 onMouseOver=\\\"mOvr(this);popLayer('%s<br>Network: %s');return true;\\\" onMouseOut=\\\"mOut(this);hideLayer()\\\"\\>  
                 \\<td class=\\\"dl al np\\\"\\>P\\</td\\>  
602                  \\<td class=\\\"dl al np\\\"\\>\\<input class=checkbox name=resume type=checkbox value=%d\\>\\</td\\>                  \\<td class=\\\"dl al np\\\"\\>\\<input class=checkbox name=resume type=checkbox value=%d\\>\\</td\\>
603                  \\<td class=\\\"dl al brs\\\"\\>\\<input class=checkbox name=cancel type=checkbox value=%d\\>\\</td\\>"                  \\<td class=\\\"dl al brs\\\"\\>\\<input class=checkbox name=cancel type=checkbox value=%d\\>\\</td\\>"
                 (Http_server.html_real_escaped file.file_name)  
                 (net_name file)  
604                  file.file_num                  file.file_num
605                  file.file_num);                  file.file_num);
606    
# Line 605  let ctd fn td = Printf.sprintf "\\<td on Line 612  let ctd fn td = Printf.sprintf "\\<td on
612            ( let size = Int64.to_float file.file_size in            ( let size = Int64.to_float file.file_size in
613              let downloaded = Int64.to_float file.file_downloaded in              let downloaded = Int64.to_float file.file_downloaded in
614              let size = if size < 1. then 1. else size in              let size = if size < 1. then 1. else size in
615                (if !!html_mods_use_js_tooltips then
616              Printf.sprintf "\\<TD onClick=\\\"location.href='submit?q=vd+%d';return true;\\\"              Printf.sprintf "\\<TD onClick=\\\"location.href='submit?q=vd+%d';return true;\\\"
617                          class=\\\"dl al\\\"\\>%s\\<br\\>                          class=\\\"dl al\\\"\\>%s\\<br\\>
618                          \\<table cellpadding=0 cellspacing=0 width=100%%\\>\\<tr\\>                          \\<table cellpadding=0 cellspacing=0 width=100%%\\>\\<tr\\>
619                          \\<td class=\\\"loaded\\\" style=\\\"height:%dpx\\\" width=\\\"%d%%\\\"\\> \\</td\\>                          \\<td class=\\\"loaded\\\" style=\\\"height:%dpx\\\" width=\\\"%d%%\\\"\\> \\</td\\>
620                          \\<td class=\\\"remain\\\" style=\\\"height:%dpx\\\" width=\\\"%d%%\\\"\\> \\</td\\>                          \\<td class=\\\"remain\\\" style=\\\"height:%dpx\\\" width=\\\"%d%%\\\"\\> \\</td\\>
621                          \\</tr\\>\\</table\\>\\</td\\>"                          \\</tr\\>\\</table\\>\\</td\\>"
# Line 617  let ctd fn td = Printf.sprintf "\\<td on Line 625  let ctd fn td = Printf.sprintf "\\<td on
625              (truncate (downloaded /. size *. 100.))              (truncate (downloaded /. size *. 100.))
626              (!!html_vd_barheight)              (!!html_vd_barheight)
627              (truncate ( (1. -. downloaded /. size) *. 100.))              (truncate ( (1. -. downloaded /. size) *. 100.))
628             else
629                 Printf.sprintf "\\<TD onClick=\\\"location.href='submit?q=vd+%d';return true;\\\"
630                            title=\\\"[File#: %d] [Net: %s]%s\\\" class=\\\"dl al\\\"\\>%s\\<br\\>
631                            \\<table cellpadding=0 cellspacing=0 width=100%%\\>\\<tr\\>
632                            \\<td class=\\\"loaded\\\" style=\\\"height:%dpx\\\" width=\\\"%d%%\\\"\\> \\</td\\>
633                            \\<td class=\\\"remain\\\" style=\\\"height:%dpx\\\" width=\\\"%d%%\\\"\\> \\</td\\>
634                            \\</tr\\>\\</table\\>\\</td\\>"
635                file.file_num
636                file.file_num
637                            (net_name file)
638                            (if !!max_name_len < String.length file.file_name then " " ^ file.file_name else "")
639                (short_name file)
640                (!!html_vd_barheight)
641                (truncate (downloaded /. size *. 100.))
642                (!!html_vd_barheight)
643                (truncate ( (1. -. downloaded /. size) *. 100.)));
644            );            );
645    
646            (ctd file.file_num (size_of_int64 file.file_size));            (ctd file.file_num (size_of_int64 file.file_size));
# Line 962  let old_print_search buf o results = Line 986  let old_print_search buf o results =
986    let counter = ref 0 in    let counter = ref 0 in
987    if use_html_mods o then    if use_html_mods o then
988    begin    begin
989      Printf.bprintf buf "\\<div id=\\\"object1\\\" style=\\\"position:absolute; background-color:FFFFDD;color:black;border-color:black;border-width:20;font-size:8pt; visibility:show; left:25px; top:-100px; z-index:+1\\\" onmouseover=\\\"overdiv=1;\\\"  onmouseout=\\\"overdiv=0; setTimeout(\\\'hideLayer()\\\',1000)\\\"\\>pop up description layer\\</div\\>\n";      if !!html_mods_use_js_tooltips then Printf.bprintf buf "\\<div id=\\\"object1\\\" style=\\\"position:absolute; background-color:FFFFDD;color:black;border-color:black;border-width:20;font-size:8pt; visibility:show; left:25px; top:-100px; z-index:+1\\\" onmouseover=\\\"overdiv=1;\\\"  onmouseout=\\\"overdiv=0; setTimeout(\\\'hideLayer()\\\',1000)\\\"\\>\\&nbsp;\\</div\\>\n";
990      html_mods_table_header buf "resultsTable" "results" [      html_mods_table_header buf "resultsTable" "results" [
991        ( "0", "srh", "Network", "Network" ) ;        ( "0", "srh", "Network", "Network" ) ;
992        ( "0", "srh", "File", "File (mouseover)" ) ;        ( "0", "srh", "File", "File (mouseover)" ) ;
# Line 1000  let old_print_search buf o results = Line 1024  let old_print_search buf o results =
1024    
1025                if o.conn_output = HTML then begin                if o.conn_output = HTML then begin
1026                    if !!html_mods then                    if !!html_mods then
1027                        if !!html_mods_use_js_tooltips then
1028                      begin                      begin
1029                        Printf.bprintf buf "\\<td onMouseOut=\\\"hideLayer()\\\" onMouseOver=\\\"popLayer('";                        Printf.bprintf buf "\\<td onMouseOver=\\\"setTimeout('popLayer(\\\\\'";
1030                        begin                        begin
1031                          match r.result_names with                          match r.result_names with
1032                            [] -> ()                            [] -> ()
# Line 1021  let old_print_search buf o results = Line 1046  let old_print_search buf o results =
1046                                Buffer.add_string buf ((if !nl then "<br>" else begin nl := true;"" end) ^                                Buffer.add_string buf ((if !nl then "<br>" else begin nl := true;"" end) ^
1047                                  escaped_string_of_field t ^ ": " ^ get_tag_value t);                                  escaped_string_of_field t ^ ": " ^ get_tag_value t);
1048                        ) r.result_tags;                        ) r.result_tags;
1049                        Printf.bprintf buf "')\\\" class=\\\"sr\\\"\\>\\<a href=results\\?d=%d target=\\\"$S\\\"\\>" r.result_num                      Printf.bprintf buf "\\\\\'),%d');setTimeout('hideLayer()',%d);return true;\\\"  onMouseOut=\\\"hideLayer();setTimeout('hideLayer()',%d);return true;\\\" class=\\\"sr\\\"\\>\\<a href=results\\?d=%d target=\\\"$S\\\"\\>"
1050                            !!html_mods_js_tooltips_wait
1051                            !!html_mods_js_tooltips_timeout
1052                            !!html_mods_js_tooltips_wait
1053                             r.result_num
1054                        end
1055                        else begin
1056                          Printf.bprintf buf "\\<td title=\\\"";
1057                          let nl = ref false in
1058                          List.iter (fun t ->
1059                              match t.tag_name with
1060                              | Field_UNKNOWN "FTH" | Field_UNKNOWN "urn" -> ()
1061                              | _ ->
1062                                  Buffer.add_string buf ((if !nl then "\n" else begin nl := true;"" end) ^
1063                                      "|| (" ^
1064                                    escaped_string_of_field t ^ "): " ^ get_tag_value t);
1065                          ) r.result_tags;
1066    
1067                          Printf.bprintf buf "\\\" class=\\\"sr\\\"\\>\\<a href=results\\?d=%d target=\\\"$S\\\"\\>" r.result_num
1068                      end                      end
1069                    else Printf.bprintf buf "\\<a href=results\\?d=%d $S\\>" r.result_num;                    else Printf.bprintf buf "\\<a href=results\\?d=%d $S\\>" r.result_num;
1070                  end;                  end;

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26