From 847006de47d4f1868cecf6126801a94e26f709ad Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 19 Feb 2009 19:55:57 +0000 Subject: [PATCH] more renamings --- planetlab/events/events.php | 6 ++-- planetlab/events/events_choser.php | 12 ++++---- planetlab/nodes/interface.php | 12 ++++---- planetlab/nodes/node.php | 26 ++++++++-------- planetlab/nodes/nodes.php | 6 ++-- planetlab/peers/peer.php | 6 ++-- planetlab/peers/peers.php | 6 ++-- planetlab/persons/person.php | 24 +++++++-------- planetlab/persons/persons.php | 6 ++-- planetlab/sites/site.php | 26 ++++++++-------- planetlab/sites/sites.php | 6 ++-- planetlab/tags/nodegroup.php | 10 +++---- planetlab/tags/nodegroups.php | 6 ++-- planetlab/tags/tag.php | 18 +++++------ planetlab/tags/tags.php | 8 ++--- .../icons/tablesort-bullet1.gif | Bin .../icons/tablesort-bullet2.gif | Bin .../icons/tablesort-col-alt.jpg | Bin .../icons/tablesort-gradient.gif | Bin .../icons/tablesort-header-down.jpg | Bin .../icons/tablesort-header-sortable.jpg | Bin .../icons/tablesort-header-up.jpg | Bin .../icons/tablesort-header.jpg | Bin .../icons/tablesort-td-alt.jpg | Bin {planetlab => plekit}/icons/toggle-hidden.png | Bin .../icons/toggle-visible.png | Bin plekit/php/datepicker.php | 4 +-- plekit/php/details.php | 10 +++---- plekit/php/form.php | 28 +++++++++--------- plekit/php/linetabs.php | 4 +-- plekit/php/table.php | 4 +-- plekit/php/toggle.php | 8 ++--- plekit/table/table.css | 18 +++++------ 33 files changed, 127 insertions(+), 127 deletions(-) rename planetlab/icons/tablesort_bullet1.gif => plekit/icons/tablesort-bullet1.gif (100%) rename planetlab/icons/tablesort_bullet2.gif => plekit/icons/tablesort-bullet2.gif (100%) rename planetlab/icons/tablesort_col_alt.jpg => plekit/icons/tablesort-col-alt.jpg (100%) rename planetlab/icons/tablesort_gradient.gif => plekit/icons/tablesort-gradient.gif (100%) rename planetlab/icons/tablesort_header_down.jpg => plekit/icons/tablesort-header-down.jpg (100%) rename planetlab/icons/tablesort_header_sortable.jpg => plekit/icons/tablesort-header-sortable.jpg (100%) rename planetlab/icons/tablesort_header_up.jpg => plekit/icons/tablesort-header-up.jpg (100%) rename planetlab/icons/tablesort_header.jpg => plekit/icons/tablesort-header.jpg (100%) rename planetlab/icons/tablesort_td_alt.jpg => plekit/icons/tablesort-td-alt.jpg (100%) rename {planetlab => plekit}/icons/toggle-hidden.png (100%) rename {planetlab => plekit}/icons/toggle-visible.png (100%) diff --git a/planetlab/events/events.php b/planetlab/events/events.php index ccd6444..aabb428 100644 --- a/planetlab/events/events.php +++ b/planetlab/events/events.php @@ -126,7 +126,7 @@ function e_fault ($event) { $tabs=array(); $tabs['Clear events']=l_events(); -plc_tabs($tabs); +plekit_linetabs($tabs); list($from_string,$from_time) = parse_date ($from_date,false,$DAY,$EPOCH); list($until_string,$until_time) = parse_date ($until_date,true,$DAY,$EPOCH); @@ -248,7 +248,7 @@ $headers=array("Id"=>"int", "D"=>"none", ); -$table = new PlcTable ("events",$headers,"0r"); +$table = new PlekitTable ("events",$headers,"0r"); $table->set_options (array ('max_pages'=>20)); $table->start (); foreach ($events as $event) { @@ -283,7 +283,7 @@ $table->set_options(array('notes'=>array("The R column shows the call result val "Click the button in the D(etails) column to get more details"))); $table->end(); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/events/events_choser.php b/planetlab/events/events_choser.php index 6463185..65f257c 100644 --- a/planetlab/events/events_choser.php +++ b/planetlab/events/events_choser.php @@ -35,18 +35,18 @@ $tabs['Sites']=l_sites(); $tabs['Users']=l_persons(); $tabs['Nodes']=l_nodes(); $tabs['Slices']=l_slices(); -plc_tabs ($tabs); +plekit_linetabs ($tabs); // fill out dates from now if not specified -$from_picker = new PlcDatepicker ('from_date','From (inclusive)',array('inline'=>true)); +$from_picker = new PlekitDatepicker ('from_date','From (inclusive)',array('inline'=>true)); $from_picker->today(); -$until_picker = new PlcDatepicker ('until_date','Until (inclusive)',array('inline'=>true)); +$until_picker = new PlekitDatepicker ('until_date','Until (inclusive)',array('inline'=>true)); $until_picker->today(); -$form=new PlcForm(l_events(),array(),'GET'); +$form=new PlekitForm(l_events(),array(),'GET'); $form->start(); -$details = new PlcDetails (true); +$details = new PlekitDetails (true); $details->start(); $details->tr ($form->submit_html('submit','Show Events'),'center'); @@ -72,7 +72,7 @@ $details->th_th(html_div($from_picker->html()) , html_div($until_picker->html()) $details->end(); $form->end(); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/nodes/interface.php b/planetlab/nodes/interface.php index 70afd19..a922a73 100644 --- a/planetlab/nodes/interface.php +++ b/planetlab/nodes/interface.php @@ -46,7 +46,7 @@ if ( ! $node_id) { $tabs=array(); $tabs[] = array('label'=>'Back to node', 'url'=>l_node($node_id), 'bubble'=>'Cancel pending changes'); -plc_tabs($tabs); +plekit_linetabs($tabs); $fields=array( 'method', 'type', 'ip', 'gateway', 'network', 'broadcast', 'netmask', 'dns1', 'dns2', 'hostname', 'mac', 'bwlimit', 'node_id' ); @@ -65,7 +65,7 @@ drupal_set_title (' '); -$details=new PlcDetails($can_update); +$details=new PlekitDetails($can_update); // xxx hardwire network type for now $form_variables = array('node_id'=>$node_id,'type'=>"ipv4"); @@ -138,10 +138,10 @@ if ($mode == 'add') return; //////////////////////////////////////// tags -$toggle=new PlcToggle ('tags','Tags',array('trigger-tagname'=>'h2')); +$toggle=new PlekitToggle ('tags','Tags',array('trigger-tagname'=>'h2')); $toggle->start(); -$form = new PlcForm (l_actions(),array('interface_id'=>$interface_id)); +$form = new PlekitForm (l_actions(),array('interface_id'=>$interface_id)); $form->start(); $tags=$api->GetInterfaceTags (array('interface_id'=>$interface_id)); @@ -155,7 +155,7 @@ $headers=array("Name"=>"string", if ($can_update) $headers[plc_delete_icon()]="none"; $table_options=array("notes_area"=>false,"pagesize_area"=>false,"search_width"=>10); -$table=new PlcTable("interface_tags",$headers,0,$table_options); +$table=new PlekitTable("interface_tags",$headers,0,$table_options); $table->start(); if ($tags) foreach ($tags as $tag) { $table->row_start(); @@ -193,7 +193,7 @@ $table->end(); $form->end(); $toggle->end(); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/nodes/node.php b/planetlab/nodes/node.php index bf475ec..a1e6221 100644 --- a/planetlab/nodes/node.php +++ b/planetlab/nodes/node.php @@ -131,12 +131,12 @@ if ( $local_peer && $privileges ) { 'bubble'=>"Comon page about node $hostname")); } -plc_tabs($tabs); +plekit_linetabs($tabs); // show gray background on foreign objects : start a
with proper class $peers->block_start ($peer_id); -$details=new PlcDetails($privileges); +$details=new PlekitDetails($privileges); $details->start(); if ( ! $local_peer) { $details->th_td("Peer",$peers->peer_link($peer_id)); @@ -165,7 +165,7 @@ if ( ! ($local_peer && $privileges)) { $boot_value=$boot_state; } else { $boot_value=""; - $boot_form = new PlcForm (l_actions(), array("node_id"=>$node_id, + $boot_form = new PlekitForm (l_actions(), array("node_id"=>$node_id, "action"=>"node-boot-state")); $boot_value .= $boot_form->start_html(); $states = array( 'boot'=>'Boot', 'safeboot'=>'SafeBoot', 'failboot'=>'FailBoot', @@ -185,7 +185,7 @@ $details->th_td ("Boot state",$boot_value); if ( $local_peer && $privileges) { $download_value=""; - $download_form = new PlcForm (l_actions_download(),array("node_id"=>$node_id)); + $download_form = new PlekitForm (l_actions_download(),array("node_id"=>$node_id)); $download_value .= $download_form->start_html(); $selectors = array( array("display"=>"-- All in one images --","disabled"=>true), @@ -214,7 +214,7 @@ $details->th_tds ("All site nodes",$nodes_area); $details->end (); -$form=new PlcForm (l_actions(), array('node_id'=>$node_id)); +$form=new PlekitForm (l_actions(), array('node_id'=>$node_id)); $form->start(); //////////////////////////////////////////////////////////// Tags @@ -227,7 +227,7 @@ if ( $local_peer ) { $tagnames = array_map ("get_tagname",$tags); $nodegroups_hash=plc_nodegroup_global_hash($api,$tagnames); - $toggle = new PlcToggle ('tags',"Tags",array('trigger-tagname'=>'h2', + $toggle = new PlekitToggle ('tags',"Tags",array('trigger-tagname'=>'h2', 'trigger-bubble'=>'Inspect and set tags on that node', 'start-visible'=>$show_tags)); $toggle->start(); @@ -239,7 +239,7 @@ if ( $local_peer ) { if (plc_is_admin()) $headers[plc_delete_icon()]="none"; $table_options=array("notes_area"=>false,"pagesize_area"=>false,"search_width"=>10); - $table=new PlcTable("node_tags",$headers,0,$table_options); + $table=new PlekitTable("node_tags",$headers,0,$table_options); $table->start(); if ($tags) foreach ($tags as $tag) { // does this match a nodegroup ? @@ -285,7 +285,7 @@ if ( $local_peer ) { //////////////////////////////////////////////////////////// interfaces if ( $local_peer ) { - $toggle=new PlcToggle ('interfaces',"Interfaces",array('trigger-tagname'=>'h2', + $toggle=new PlekitToggle ('interfaces',"Interfaces",array('trigger-tagname'=>'h2', 'trigger-bubble'=>'Inspect and tune interfaces on that node', 'start-hidden'=>true)); $toggle->start(); @@ -306,7 +306,7 @@ if ( $local_peer ) { if ( $privileges ) $headers[plc_delete_icon()]='string'; $table_options=array('search_area'=>false,"pagesize_area"=>false,'notes_area'=>false); - $table=new PlcTable("node_interfaces",$headers,2,$table_options); + $table=new PlekitTable("node_interfaces",$headers,2,$table_options); $table->start(); foreach ( $interfaces as $interface ) { @@ -343,7 +343,7 @@ if ( $local_peer ) { if ($privileges) { $table->tfoot_start(); $table->row_start(); - $add_button=new PlcFormButton (l_interface_add($node_id),"add_interface","Add interface","GET"); + $add_button=new PlekitFormButton (l_interface_add($node_id),"add_interface","Add interface","GET"); // we should have 6 cols, use 3 for the left (new) and the rest for the right (remove) $table->cell($add_button->html(), 3,"left"); $table->cell($form->submit_html("delete-interfaces","Remove Interfaces"), $table->columns()-3,"right"); @@ -358,7 +358,7 @@ if ( $local_peer ) { // display slices { - $toggle=new PlcToggle ('slices',"Slices",array('trigger-tagname'=>'h2', + $toggle=new PlekitToggle ('slices',"Slices",array('trigger-tagname'=>'h2', 'trigger-bubble'=>'Review slices running on that node', 'start-hidden'=>true)); $toggle->start(); @@ -375,7 +375,7 @@ if ( $local_peer ) { $table_options['search_area']=false; $table_options['pagesize_area']=false; } - $table=new PlcTable("node_slices",$headers,1,$table_options); + $table=new PlekitTable("node_slices",$headers,1,$table_options); $table->start(); foreach ($slices as $slice) { @@ -395,7 +395,7 @@ $form->end(); //////////////////////////////////////////////////////////// $peers->block_end($peer_id); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/nodes/nodes.php b/planetlab/nodes/nodes.php index 90a3b3a..6c57cf5 100644 --- a/planetlab/nodes/nodes.php +++ b/planetlab/nodes/nodes.php @@ -116,7 +116,7 @@ foreach ($sites as $site) $site_hash[$site['site_id']]=$site; // -------------------- drupal_set_title($title); -plc_tabs($tabs); +plekit_linetabs($tabs); if ( ! $nodes ) { drupal_set_message ('No node found'); @@ -135,7 +135,7 @@ $headers = array ("Peer"=>"string", ); # initial sort on hostnames -$table=new PlcTable ("nodes",$headers,4); +$table=new PlekitTable ("nodes",$headers,4); $table->start(); $peers = new Peers ($api); @@ -169,7 +169,7 @@ foreach ($nodes as $node) { $table->end(); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/peers/peer.php b/planetlab/peers/peer.php index f0736cc..014af46 100644 --- a/planetlab/peers/peer.php +++ b/planetlab/peers/peer.php @@ -18,7 +18,7 @@ require_once 'linetabs.php'; $tabs=array(); $tabs['Back to peers list']=l_peers(); -plc_tabs ($tabs); +plekit_linetabs ($tabs); // -------------------- // recognized URL arguments @@ -40,7 +40,7 @@ $peer_id=$peer['peer_id']; drupal_set_title("Details for Peer " . $peername); -$details=new PlcDetails(false); +$details=new PlekitDetails(false); $details->start(); $details->th_td("Peer name",$peer['peername']); $details->th_td("Short name",$peer['shortname']); @@ -57,7 +57,7 @@ $nb=sizeof($peer['slice_ids']); $details->th_td("Number of slices",href(l_slices_peer($peer_id),"$nb slices")); $details->end(); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/peers/peers.php b/planetlab/peers/peers.php index 96f6dff..d178edd 100644 --- a/planetlab/peers/peers.php +++ b/planetlab/peers/peers.php @@ -25,7 +25,7 @@ $peers = $api->GetPeers( NULL, array("peer_id","peername","shortname","peer_url" $tabs=array(); $tabs['Comon for all nodes']=l_comon("peer_id","0"); -plc_tabs($tabs); +plekit_linetabs($tabs); if ( empty($peers)) { drupal_set_message ("You seem to be running a standalone deployment"); @@ -38,7 +38,7 @@ if ( empty($peers)) { 'Comon'=>'string'); $table_options=array('search_area'=>false, 'notes_area'=>false); - $table = new PlcTable ("peers",$headers,1,$table_options); + $table = new PlekitTable ("peers",$headers,1,$table_options); $table->start(); foreach ($peers as $peer) { $table->row_start(); @@ -53,7 +53,7 @@ if ( empty($peers)) { $table->end(); } -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/persons/person.php b/planetlab/persons/person.php index 5fac9b2..968a7d8 100644 --- a/planetlab/persons/person.php +++ b/planetlab/persons/person.php @@ -116,7 +116,7 @@ if ( $privileges) 'bubble'=>"Events about $first_name $last_name", 'image'=>'/planetlab/icons/event.png','height'=>18); -plc_tabs($tabs); +plekit_linetabs($tabs); $peers->block_start ($peer_id); @@ -127,7 +127,7 @@ $enabled_label="Yes"; if ( ! $enabled ) $enabled_label = plc_warning_html("Disabled"); $can_update = (plc_is_admin() && $local_peer) || $is_my_account; -$details = new PlcDetails($can_update); +$details = new PlekitDetails($can_update); $details->form_start(l_actions(),array("action"=>"update-person", "person_id"=>$person_id)); @@ -160,7 +160,7 @@ $details->end(); $details->form_end(); //////////////////// slices -$toggle=new PlcToggle ('slices','Slices',array('trigger-tagname'=>'h2')); +$toggle=new PlekitToggle ('slices','Slices',array('trigger-tagname'=>'h2')); $toggle->start(); if( ! $slices) { @@ -173,7 +173,7 @@ if( ! $slices) { $table_options['search_area']=false; $table_options['pagesize_area']=false; } - $table=new PlcTable ("person_slices",$headers,1,$table_options); + $table=new PlekitTable ("person_slices",$headers,1,$table_options); $table->start(); foreach( $slices as $slice ) { @@ -188,11 +188,11 @@ if( ! $slices) { $toggle->end(); // we don't set 'action', but use the submit button name instead -$form=new PlcForm(l_actions(), array("person_id"=>$person_id)); +$form=new PlekitForm(l_actions(), array("person_id"=>$person_id)); $form->start(); //////////////////// keys -$toggle=new PlcToggle ('keys',"Keys",array('trigger-tagname'=>'h2')); +$toggle=new PlekitToggle ('keys',"Keys",array('trigger-tagname'=>'h2')); $toggle->start(); $can_manage_keys = ( $local_peer && ( plc_is_admin() || $is_my_account) ); @@ -205,7 +205,7 @@ $headers=array("Type"=>"string", if ($can_manage_keys) $headers[plc_delete_icon()]="none"; // table overall options $table_options=array('search_area'=>false,'pagesize_area'=>false,'notes_area'=>false); -$table=new PlcTable("person_keys",$headers,"1",$table_options); +$table=new PlekitTable("person_keys",$headers,"1",$table_options); $table->start(); if ($keys) foreach ($keys as $key) { @@ -240,7 +240,7 @@ $table->end(); $toggle->end(); //////////////////// sites -$toggle=new PlcToggle('sites','Sites',array('trigger-tagname'=>'h2')); +$toggle=new PlekitToggle('sites','Sites',array('trigger-tagname'=>'h2')); $toggle->start(); if (empty( $sites ) ) { @@ -252,7 +252,7 @@ $headers['Login_base']="string"; $headers['Name']="string"; if ($can_manage_sites) $headers[plc_delete_icon()]="none"; $table_options = array('notes_area'=>false,'search_area'=>false, 'pagesize_area'=>false); -$table=new PlcTable ("person_sites",$headers,0,$table_options); +$table=new PlekitTable ("person_sites",$headers,0,$table_options); $table->start(); foreach( $sites as $site ) { $site_name= $site['name']; @@ -293,7 +293,7 @@ $table->end(); $toggle->end(); //////////////////// roles -$toggle=new PlcToggle ('roles','Roles',array('trigger-tagname'=>'h2')); +$toggle=new PlekitToggle ('roles','Roles',array('trigger-tagname'=>'h2')); $toggle->start(); if (! $roles) plc_warning ("This user has no role !"); @@ -305,7 +305,7 @@ $headers=array("Role"=>"string"); if ($can_manage_roles) $headers [plc_delete_icon()]="none"; $table_options=array('search_area'=>false,'pagesize_area'=>false,'notes_area'=>false); -$table=new PlcTable("person_roles",$headers,0,$table_options); +$table=new PlekitTable("person_roles",$headers,0,$table_options); $table->start(); // construct array of role objs @@ -347,7 +347,7 @@ $toggle->end(); $form->end(); $peers->block_end($peer_id); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/persons/persons.php b/planetlab/persons/persons.php index d1d46d8..575da0e 100644 --- a/planetlab/persons/persons.php +++ b/planetlab/persons/persons.php @@ -127,7 +127,7 @@ foreach ($sites as $site) { // -------------------- drupal_set_title($title); -//plc_tabs($tabs); +//plekit_linetabs($tabs); if ( ! $persons ) { drupal_set_message ('No account found'); @@ -145,7 +145,7 @@ $headers = array ("Peer"=>"string", ); // initial sort on email -$table=new PlcTable("persons",$headers,4); +$table=new PlekitTable("persons",$headers,4); $table->start(); $peers=new Peers ($api); @@ -176,7 +176,7 @@ foreach ($persons as $person) { $notes=array("The S column shows the number of slices for the given user"); $table->end(array('notes'=>$notes)); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/sites/site.php b/planetlab/sites/site.php index b56e62e..57d89f5 100644 --- a/planetlab/sites/site.php +++ b/planetlab/sites/site.php @@ -133,7 +133,7 @@ if ( $local_peer && $privileges ) { 'bubble'=>'Review pending join requests'); } -plc_tabs($tabs); +plekit_linetabs($tabs); // show gray background on foreign objects : start a
with proper class $peers->block_start ($peer_id); @@ -144,7 +144,7 @@ if ( ! $enabled ) " to review pending applications."); $can_update=(plc_is_admin () && $local_peer) || ( plc_in_site($site_id) && plc_is_pi()); -$details = new PlcDetails($can_update); +$details = new PlekitDetails($can_update); if ( ! $site['is_public']) plc_warning("This site is not public!"); @@ -191,14 +191,14 @@ if ( $local_peer ) { $nodes_title = plc_warning_html ($nodes_title); $nodes_title .= href(l_nodes_site($site_id)," (See as nodes)"); - $toggle=new PlcToggle ('nodes',$nodes_title,array('trigger-tagname'=>'h2')); + $toggle=new PlekitToggle ('nodes',$nodes_title,array('trigger-tagname'=>'h2')); $toggle->start(); $headers=array(); $headers['hostname']='string'; $headers['state']='string'; - $table = new PlcTable ('nodes',$headers,'0',array('search_area'=>false, + $table = new PlekitTable ('nodes',$headers,'0',array('search_area'=>false, 'notes_area'=>false, 'pagesize_area'=>false)); $table->start(); @@ -210,7 +210,7 @@ if ( $local_peer ) { } $table->tfoot_start(); $table->row_start(); - $button=new PlcFormButton (l_node_add(),"node_add","Add node","POST"); + $button=new PlekitFormButton (l_node_add(),"node_add","Add node","POST"); $table->cell($button->html(),$table->columns(),"right"); $table->row_end(); $table->end(); @@ -227,7 +227,7 @@ if ( $local_peer ) { $persons_title = plc_warning_html ($persons_title); $persons_title .= href(l_persons_site($site_id)," (See as users)"); - $toggle=new PlcToggle ('persons',$persons_title,array('trigger-tagname'=>'h2')); + $toggle=new PlekitToggle ('persons',$persons_title,array('trigger-tagname'=>'h2')); $toggle->start(); $headers = array (); @@ -236,7 +236,7 @@ if ( $local_peer ) { $headers['User']='string'; $headers["Tech"]='string'; if ($has_disabled_persons) $headers["Disabled"]='string'; - $table=new PlcTable('persons',$headers,'1r-3r-0',array('search_area'=>false, + $table=new PlekitTable('persons',$headers,'1r-3r-0',array('search_area'=>false, 'notes_area'=>false, 'pagesize_area'=>false)); $table->start(); @@ -254,9 +254,9 @@ if ( $local_peer ) { //////////////////// Slices // xxx to review after slices gets reworked - $toggle=new PlcToggle ('slices',"Slices",array('trigger-tagname'=>'h2')); + $toggle=new PlekitToggle ('slices',"Slices",array('trigger-tagname'=>'h2')); $toggle->start(); - $details=new PlcDetails (false); + $details=new PlekitDetails (false); $details->start(); // summary on slices $slice_label = count($slice_ids) . " running / " . $max_slices . " max"; @@ -265,19 +265,19 @@ if ( $local_peer ) { $details->th_td("# Slices", href(l_slices_site($site_id),$slice_label)); if ($slices) foreach ($slices as $slice) $details->th_td($slice['instantiation'],l_slice_obj($slice)); - $button=new PlcFormButton (l_slice_add(),"slice_add","Add slice","POST"); + $button=new PlekitFormButton (l_slice_add(),"slice_add","Add slice","POST"); $details->tr($button->html(),"right"); $details->end(); $toggle->end(); // Addresses - $toggle=new PlcToggle ('addresses',"Addresses",array('trigger-tagname'=>'h2', + $toggle=new PlekitToggle ('addresses',"Addresses",array('trigger-tagname'=>'h2', 'start-visible'=>false)); $toggle->start(); if ( ! $addresses) { print "No known address for this site"; } else { - $details=new PlcDetails (false); + $details=new PlekitDetails (false); $details->start(); $details->th_td("Addresses",""); foreach ($addresses as $address) { @@ -299,7 +299,7 @@ if ( $local_peer ) { //////////////////////////////////////// $peers->block_end($peer_id); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/sites/sites.php b/planetlab/sites/sites.php index d37a348..0de66aa 100644 --- a/planetlab/sites/sites.php +++ b/planetlab/sites/sites.php @@ -102,7 +102,7 @@ if (plc_is_admin()) 'bubble'=>'Review pending join requests'); drupal_set_title($title); -plc_tabs($tabs); +plekit_linetabs($tabs); // go $sites= $api->GetSites( $site_filter , $site_columns); @@ -120,7 +120,7 @@ if (plc_is_admin()) { $headers['?']="string"; } -$table=new PlcTable("sites",$headers,2); +$table=new PlekitTable("sites",$headers,2); $table->start(); if ($sites) foreach ($sites as $site) { @@ -142,7 +142,7 @@ $notes=array("N = number of sites / U = number of users / S = number of slices") $table->end(array('notes'=>$notes)); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/tags/nodegroup.php b/planetlab/tags/nodegroup.php index 30a6d51..4c43fed 100644 --- a/planetlab/tags/nodegroup.php +++ b/planetlab/tags/nodegroup.php @@ -50,9 +50,9 @@ $tabs []= tab_nodegroups(); $tabs []= tab_nodes_local(); drupal_set_title("Details for node group " . $nodegroup['groupname']); -plc_tabs($tabs); +plekit_linetabs($tabs); -$details=new PlcDetails(false); +$details=new PlekitDetails(false); $details->start(); $details->th_td ("Node group name",$nodegroup['groupname']); $details->th_td ("Based on tag",href(l_tag($nodegroup['tag_type_id']),$tagname)); @@ -61,12 +61,12 @@ $details->th_td("# nodes",count($nodegroup['node_ids'])); $details->end(); // xxx : add & delete buttons would make sense here too -$toggle=new PlcToggle('nodes',"Nodes",array('trigger-tagname'=>'h2')); +$toggle=new PlekitToggle('nodes',"Nodes",array('trigger-tagname'=>'h2')); $toggle=>start(); $headers["Hostname"]="string"; -$table = new PlcTable("nodegroup_nodes",$headers,0,array('search_width'=>15)); +$table = new PlekitTable("nodegroup_nodes",$headers,0,array('search_width'=>15)); $table->start(); if ($nodes) foreach ($nodes as $node) { $table->row_start (); @@ -77,7 +77,7 @@ if ($nodes) foreach ($nodes as $node) { $table->end (); $toggle->end(); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/tags/nodegroups.php b/planetlab/tags/nodegroups.php index 8531125..6917d6a 100644 --- a/planetlab/tags/nodegroups.php +++ b/planetlab/tags/nodegroups.php @@ -48,7 +48,7 @@ $nodegroups=$api->GetNodeGroups($nodegroup_filter,$nodegroup_columns); // -------------------- drupal_set_title($title); -plc_tabs($tabs); +plekit_linetabs($tabs); if ( ! $nodegroups ) { drupal_set_message ('No node group found'); @@ -62,7 +62,7 @@ $headers = array ( "Name"=>"string", "Nodes"=>"int"); # initial sort on groupname -$table=new PlcTable("nodegroups",$headers,0); +$table=new PlekitTable("nodegroups",$headers,0); $table->start(); foreach ($nodegroups as $nodegroup) { @@ -77,7 +77,7 @@ foreach ($nodegroups as $nodegroup) { $table->end(); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/tags/tag.php b/planetlab/tags/tag.php index 2eabae6..7d5e521 100644 --- a/planetlab/tags/tag.php +++ b/planetlab/tags/tag.php @@ -51,11 +51,11 @@ $slice_tags=$api->GetSliceTags(array_merge($filter,array("node_id"=>array()))); $sliver_tags=$api->GetSliceTags(array_merge($filter,array("~node_id"=>array()))); drupal_set_title("Details for tag type $tagname"); -plc_tabs($tabs); +plekit_linetabs($tabs); // ---------- $can_update=plc_is_admin(); -$details=new PlcDetails ($can_update); +$details=new PlekitDetails ($can_update); $details->form_start(l_actions(),array("action"=>"update-tag-type", "tag_type_id"=>$tag_type_id)); @@ -90,9 +90,9 @@ $table_options=array('notes_area'=>false, 'pagesize_area'=>false, 'search_width' // xxx could outline values corresponding to a nodegroup if (count ($node_tags)) { - $toggle=new PlcToggle('tag_nodes',"Nodes",array('trigger-tagname'=>'h2')); + $toggle=new PlekitToggle('tag_nodes',"Nodes",array('trigger-tagname'=>'h2')); $toggle->start(); - $table=new PlcTable ("tag_nodes",array("Hostname"=>"string","value"=>"string"),0,$table_options); + $table=new PlekitTable ("tag_nodes",array("Hostname"=>"string","value"=>"string"),0,$table_options); $table->start(); foreach ($node_tags as $node_tag) { $table->row_start(); @@ -105,9 +105,9 @@ if (count ($node_tags)) { } if (count ($interface_tags)) { - $toggle=new PlcToggle('tag_interfaces',"Interfaces",array('trigger-tagname'=>'h2')); + $toggle=new PlekitToggle('tag_interfaces',"Interfaces",array('trigger-tagname'=>'h2')); $toggle->start(); - $table=new PlcTable ("tag_interfaces",array("IP"=>"IPAddress","value"=>"string"),0,$table_options); + $table=new PlekitTable ("tag_interfaces",array("IP"=>"IPAddress","value"=>"string"),0,$table_options); $table->start(); foreach ($interface_tags as $interface_tag) { $table->row_start(); @@ -123,9 +123,9 @@ if (count ($interface_tags)) { // xxx don't show hostnames yet $slice_tags = array_merge ($slice_tags,$sliver_tags); if (count ($slice_tags)) { - $toggle=new PlcToggle('tag_slices',"Slice and sliver tags",array('trigger-tagname'=>'h2')); + $toggle=new PlekitToggle('tag_slices',"Slice and sliver tags",array('trigger-tagname'=>'h2')); $toggle->start(); - $table=new PlcTable ("tag_slices",array("Slice"=>"string","value"=>"string","Node id"=>"int"),0,$table_options); + $table=new PlekitTable ("tag_slices",array("Slice"=>"string","value"=>"string","Node id"=>"int"),0,$table_options); $table->start(); foreach ($slice_tags as $slice_tag) { $table->row_start(); @@ -142,7 +142,7 @@ if (count ($slice_tags)) { $toggle->end(); } -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/tags/tags.php b/planetlab/tags/tags.php index d222f14..e78582a 100644 --- a/planetlab/tags/tags.php +++ b/planetlab/tags/tags.php @@ -32,7 +32,7 @@ $tabs []= tab_slices(); // -------------------- drupal_set_title($title); -plc_tabs($tabs); +plekit_linetabs($tabs); $tag_type_columns = array( "tag_type_id", "tagname", "category", "description", "min_role_id" ); @@ -54,10 +54,10 @@ $headers['Min role']="string"; $headers["Id"]="int"; if (plc_is_admin()) $headers[plc_delete_icon()]="none"; -$form=new PlcForm(l_actions(),NULL); +$form=new PlekitForm(l_actions(),NULL); $form->start(); -$table = new PlcTable("tags",$headers,0); +$table = new PlekitTable("tags",$headers,0); $table->start(); $roles_hash=plc_role_global_hash($api); @@ -109,7 +109,7 @@ if (plc_is_admin()) { $table->end(); $form->end(); -//plc_tabs ($tabs,"bottom"); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php'; diff --git a/planetlab/icons/tablesort_bullet1.gif b/plekit/icons/tablesort-bullet1.gif similarity index 100% rename from planetlab/icons/tablesort_bullet1.gif rename to plekit/icons/tablesort-bullet1.gif diff --git a/planetlab/icons/tablesort_bullet2.gif b/plekit/icons/tablesort-bullet2.gif similarity index 100% rename from planetlab/icons/tablesort_bullet2.gif rename to plekit/icons/tablesort-bullet2.gif diff --git a/planetlab/icons/tablesort_col_alt.jpg b/plekit/icons/tablesort-col-alt.jpg similarity index 100% rename from planetlab/icons/tablesort_col_alt.jpg rename to plekit/icons/tablesort-col-alt.jpg diff --git a/planetlab/icons/tablesort_gradient.gif b/plekit/icons/tablesort-gradient.gif similarity index 100% rename from planetlab/icons/tablesort_gradient.gif rename to plekit/icons/tablesort-gradient.gif diff --git a/planetlab/icons/tablesort_header_down.jpg b/plekit/icons/tablesort-header-down.jpg similarity index 100% rename from planetlab/icons/tablesort_header_down.jpg rename to plekit/icons/tablesort-header-down.jpg diff --git a/planetlab/icons/tablesort_header_sortable.jpg b/plekit/icons/tablesort-header-sortable.jpg similarity index 100% rename from planetlab/icons/tablesort_header_sortable.jpg rename to plekit/icons/tablesort-header-sortable.jpg diff --git a/planetlab/icons/tablesort_header_up.jpg b/plekit/icons/tablesort-header-up.jpg similarity index 100% rename from planetlab/icons/tablesort_header_up.jpg rename to plekit/icons/tablesort-header-up.jpg diff --git a/planetlab/icons/tablesort_header.jpg b/plekit/icons/tablesort-header.jpg similarity index 100% rename from planetlab/icons/tablesort_header.jpg rename to plekit/icons/tablesort-header.jpg diff --git a/planetlab/icons/tablesort_td_alt.jpg b/plekit/icons/tablesort-td-alt.jpg similarity index 100% rename from planetlab/icons/tablesort_td_alt.jpg rename to plekit/icons/tablesort-td-alt.jpg diff --git a/planetlab/icons/toggle-hidden.png b/plekit/icons/toggle-hidden.png similarity index 100% rename from planetlab/icons/toggle-hidden.png rename to plekit/icons/toggle-hidden.png diff --git a/planetlab/icons/toggle-visible.png b/plekit/icons/toggle-visible.png similarity index 100% rename from planetlab/icons/toggle-visible.png rename to plekit/icons/toggle-visible.png diff --git a/plekit/php/datepicker.php b/plekit/php/datepicker.php index 54de9bf..7a983f8 100644 --- a/plekit/php/datepicker.php +++ b/plekit/php/datepicker.php @@ -14,11 +14,11 @@ drupal_set_html_head(' // (*) format (default 2010/Jan/01), php-equiv. Y/M/d, which in this paradigm translates into Y-sl-m-sl-d // (*) value : the value to display initially - default '' -class PlcDatepicker { +class PlekitDatepicker { var $id; - function PlcDatepicker ($id,$display,$options=NULL) { + function PlekitDatepicker ($id,$display,$options=NULL) { $datepicker_default_options = array ('inline'=>true, 'format'=>'Y-sl-M-sl-d', diff --git a/plekit/php/details.php b/plekit/php/details.php index ccf1c4a..7649a32 100644 --- a/plekit/php/details.php +++ b/plekit/php/details.php @@ -24,7 +24,7 @@ drupal_set_html_head(' // th_th : special cases, display 2 // xxx todo : accept optional arguments as an options hash, rather than using the set_ methods which are ugly -class PlcDetails { +class PlekitDetails { var $editable; var $form; @@ -34,7 +34,7 @@ class PlcDetails { var $height; var $input_type; - function PlcDetails ($editable) { + function PlekitDetails ($editable) { $this->editable=$editable; $this->form=NULL; $this->width=""; @@ -59,10 +59,10 @@ class PlcDetails { } // starts an inner form if the details are editable - // accpets same args as PlcForm + // accpets same args as PlekitForm function form_start ($url,$values,$method="POST") { print $this->form_start_html($url,$values,$method); return $this->form; } function form_start_html ($url,$values,$method="POST") { - $this->form = new PlcForm ($url,$values,$method); + $this->form = new PlekitForm ($url,$values,$method); return $this->form->start_html(); } @@ -139,7 +139,7 @@ class PlcDetails { $html .= "value - default is empty array var $method; // default is POST - function PlcForm ($full_url, $values, $method="POST") { + function PlekitForm ($full_url, $values, $method="POST") { // so we can use the various l_* functions: // we parse the url to extract var-values pairs, // and add them to the 'values' argument if any @@ -64,18 +64,18 @@ class PlcForm { if ( ! $options) $options=array(); $html="$display"; @@ -157,18 +157,18 @@ class PlcForm { $role_ids [] = $role['role_id']; } } - return PlcForm::role_selectors($api,$role_ids,$current); + return PlekitForm::role_selectors($api,$role_ids,$current); } } // a form with a single button -class PlcFormButton extends PlcForm { +class PlekitFormButton extends PlekitForm { var $button_id; var $button_text; - function PlcFormButton ($full_url, $button_id, $button_text, $method="POST") { - $this->PlcForm($full_url,array(),$method); + function PlekitFormButton ($full_url, $button_id, $button_text, $method="POST") { + $this->PlekitForm($full_url,array(),$method); $this->button_id=$button_id; $this->button_text=$button_text; } diff --git a/plekit/php/linetabs.php b/plekit/php/linetabs.php index b26dffc..3e89eab 100644 --- a/plekit/php/linetabs.php +++ b/plekit/php/linetabs.php @@ -38,14 +38,14 @@ drupal_set_html_head(' // $tabs['Simple Tab']="http://planet-lab.org"; // $tabs['Complex Tab']=array('url'=>'http://planet-lab.org/', // 'bubble'=>'This text gets displayed when the mouse remains over for a while'); -// plc_tabs($tabs); +// plekit_linetabs($tabs); ////////// Notes: limited support for images // (*) for some reason, confirmation does not work with image tabs // (the form gets submitted whatever the confirmation....) // (*) you need to tune the image size, which is wrong, as the image should rather be bottom-aligned -function plc_tabs ($array, $id=NULL) { +function plekit_linetabs ($array, $id=NULL) { // need id to pass to the onclick function attached to the input buttons $id="minitabs"; if (! $id) $id .= '-' + $id; diff --git a/plekit/php/table.php b/plekit/php/table.php index e7837a7..65ea41a 100644 --- a/plekit/php/table.php +++ b/plekit/php/table.php @@ -24,7 +24,7 @@ drupal_set_html_head(' // - pagesize_def: the page size when one clicks the pagesize reset button // - max_pages: the max number of pages to display in the paginator -class PlcTable { +class PlekitTable { // mandatory var $table_id; var $headers; @@ -40,7 +40,7 @@ class PlcTable { var $notes; // an array of additional notes var $has_tfoot; - function PlcTable ($table_id,$headers,$column_sort,$options=NULL) { + function PlekitTable ($table_id,$headers,$column_sort,$options=NULL) { $this->table_id = $table_id; $this->headers = $headers; $this->column_sort = $column_sort; diff --git a/plekit/php/toggle.php b/plekit/php/toggle.php index f8d6051..3474b41 100644 --- a/plekit/php/toggle.php +++ b/plekit/php/toggle.php @@ -30,11 +30,11 @@ drupal_set_html_head(' // (*) area_end(): of returning it, we do not expect the code for the area to be passed // so these methods can be used to delimit the area in question -class PlcToggle { +class PlekitToggle { // mandatory var $id; - function PlcToggle ($id,$trigger,$options=NULL) { + function PlekitToggle ($id,$trigger,$options=NULL) { $this->id = $id; $this->trigger=$trigger; if ( ! $options ) $options = array(); @@ -71,9 +71,9 @@ class PlcToggle { if ( ! $this->options['start-hidden']) { $x1=""; $x2=" style='display:none'"; } else { $x2=""; $x1=" style='display:none'"; } $image_id=$this->id_name('image-visible'); - $html .= ""; + $html .= ""; $image_id=$this->id_name('image-hidden'); - $html .= ""; + $html .= ""; return $html; } diff --git a/plekit/table/table.css b/plekit/table/table.css index 7bf4d99..b2f23f5 100644 --- a/plekit/table/table.css +++ b/plekit/table/table.css @@ -23,7 +23,7 @@ th.plc_table { text-transform: uppercase; text-align: left; padding: 8px 12px 4px 12px; - background: #CAE8EA url(/planetlab/icons/tablesort_header.jpg) no-repeat; + background: #CAE8EA url(/plekit/icons/tablesort-header.jpg) no-repeat; vertical-align:middle; } table.plc_table>tbody>tr>td, table.plc_table textarea, table.plc_table input [type="text"] { @@ -51,14 +51,14 @@ th.sortable-sortFileSize, th.sortable-sortAlphaNumeric, th.sortable-sortEnglishDateTime { cursor:pointer; - background: #CAE8EA url(/planetlab/icons/tablesort_header_sortable.jpg) no-repeat; + background: #CAE8EA url(/plekit/icons/tablesort-header-sortable.jpg) no-repeat; padding: 8px 12px 4px 16px; } th.forwardSort { - background:#CAE8EA url(/planetlab/icons/tablesort_header_down.jpg) no-repeat 0 0; + background:#CAE8EA url(/plekit/icons/tablesort-header-down.jpg) no-repeat 0 0; } th.reverseSort { - background:#CAE8EA url(/planetlab/icons/tablesort_header_up.jpg) no-repeat 0 0; + background:#CAE8EA url(/plekit/icons/tablesort-header-up.jpg) no-repeat 0 0; } table thead th.forwardSort a, table thead th.reverseSort a { @@ -76,18 +76,18 @@ tr.alt { as it trys to download the image each and every time that it is used (which means a 1000 row table will produce 1000 http requests for the image in question) */ tr[class="alt"]>td { - background: #F5FAFA url(/planetlab/icons/tablesort_td_alt.jpg) no-repeat; + background: #F5FAFA url(/plekit/icons/tablesort-td-alt.jpg) no-repeat; } table.plc_table>tbody>tr>td [class~="alt"] { - background: #edf3f3 url(/planetlab/icons/tablesort_col_alt.jpg) no-repeat !important; + background: #edf3f3 url(/plekit/icons/tablesort-col-alt.jpg) no-repeat !important; } /* Poor old Internet Explorer won't see the next two rules either as it doesn't get :first-child */ table.plc_table>tbody>tr.alt>td:first-child { - background: #F5FAFA url(/planetlab/icons/tablesort_bullet2.gif) no-repeat; + background: #F5FAFA url(/plekit/icons/tablesort-bullet2.gif) no-repeat; font-weight:bold; } table.plc_table>tbody>tr>td:first-child { - background: #fff url(/planetlab/icons/tablesort_bullet1.gif) no-repeat; + background: #fff url(/plekit/icons/tablesort-bullet1.gif) no-repeat; font-weight:bold; } @@ -162,7 +162,7 @@ ul.fdtablePaginater li div span { display:block; line-height:2em; border:1px solid #fff; - background:#fff url(/planetlab/icons/tablesort_gradient.gif) repeat-x 0 -20px; + background:#fff url(/plekit/icons/tablesort-gradient.gif) repeat-x 0 -20px; } ul.fdtablePaginater li a { cursor:pointer; -- 2.43.0