ckp
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 11 Mar 2009 15:07:00 +0000 (15:07 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 11 Mar 2009 15:07:00 +0000 (15:07 +0000)
14 files changed:
planetlab/css/plc_style.css
planetlab/events/events.php
planetlab/events/events_choser.php
planetlab/includes/plc_peers.php
planetlab/sites/site.php
planetlab/sites/sites.php
planetlab/slices/slice.php
planetlab/slices/slices.php
planetlab/tags/index.php
plekit/niftycorner/nifty_init.js [new file with mode: 0644]
plekit/php/nifty.php [new file with mode: 0644]
plekit/php/plekit-utils.php
plekit/php/toggle.php
plekit/toggle/toggle.css

index 32869ea..145ba2a 100644 (file)
@@ -1,6 +1,4 @@
-/*
-expanding links
-*/
+/* expanding links */
 
 .example {
     padding:10px; 
@@ -35,8 +33,14 @@ body {
     font-weight:bold;
 }
 
-*.plc-warning a:link { text-decoration: none; color:white }
-*.plc-warning a:visited { text-decoration: none; color:white }
-*.plc-warning a:hover { text-decoration: none; color:black }
+.plc-warning a:link { text-decoration: none; color:white }
+.plc-warning a:visited { text-decoration: none; color:white }
+.plc-warning a:hover { text-decoration: none; color:black }
 
 .addresses { text-align: center; font-weight: bold; }
+
+/* styling the planetlab module area */
+div.block-planetlab a {
+    font-weight:normal;
+    font-style:italic;
+}
index aabb428..302bdc7 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: index.php 11949 2009-02-09 17:57:16Z thierry $
+// $Id$
 
 // Require login
 require_once 'plc_login.php';
index 65f257c..da53366 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: index.php 11949 2009-02-09 17:57:16Z thierry $
+// $Id$
 
 // Require login
 require_once 'plc_login.php';
index a7b0b39..fc86830 100644 (file)
@@ -80,11 +80,11 @@ class Peers {
     // to set the background to grey on foreign objects
     // return true if the peer is local 
     if ( ! $peer_id ) {
-      print "<div class=\"plc-local\">";
+      print "<div class=\"nifty-medium plc-local\">";
     } else {
       $classname=strtolower($this->classname($peer_id));
       // set two classes, one generic to all foreign, and one based on the peer's shortname for finer grain tuning
-      printf ("<div class=\"plc-foreign %s\">",$classname);
+      printf ("<div class=\"nifty-medium plc-foreign %s\">",$classname);
     }
   }
 
index aa2c660..12e8849 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-  // $Id: index.php 11750 2009-01-29 10:11:53Z thierry $
+  // $Id$
 
 // Require login
 require_once 'plc_login.php';
index 0de66aa..439adb0 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-  // $Id: index.php 11750 2009-01-29 10:11:53Z thierry $
+  // $Id$
   //
 
   // Require login
index 4e23205..7366067 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: index.php 12104 2009-02-19 18:41:19Z thierry $
+// $Id$
 
 // Require login
 require_once 'plc_login.php';
index 28cba3b..f4ebb5c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: index.php 12104 2009-02-19 18:41:19Z thierry $
+// $Id$
 // pattern-matching selection not implemented
 // due to GetSlices bug, see test.php for details
 // in addition that would not make much sense
index bb3b849..0f9ba17 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: index.php 11603 2009-01-19 16:44:53Z thierry $
+// $Id$
 
 // Require login
 require_once 'plc_login.php';
diff --git a/plekit/niftycorner/nifty_init.js b/plekit/niftycorner/nifty_init.js
new file mode 100644 (file)
index 0000000..d027e00
--- /dev/null
@@ -0,0 +1,24 @@
+/* 
+  $Id$
+
+ instead of explicitly calling 
+ Nifty ('div#$id','medium');
+ on every single element as the original niftycube.js recommends, 
+ we just do that on every element that has one of the
+ the nifty-{small,medium,big} class set
+*/
+
+var nifty_inited = false;
+
+function nifty_init () {
+  window.console.log('initing - 1');
+  if ( nifty_inited ) return;
+  window.console.log('initing - 2');
+  var elements=document.getElementsByClassName('nifty-medium');
+  for (var i=0; i<elements.length; i++) {
+    window.console.log('catched ' + elements[i].id);
+    Nifty('div#'+elements[i].id,'medium');
+  }
+  nifty_inited = true;
+}
+
diff --git a/plekit/php/nifty.php b/plekit/php/nifty.php
new file mode 100644 (file)
index 0000000..5aae788
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+  // $Id$
+
+require_once 'prototype.php';
+
+drupal_set_html_head('
+<script type="text/javascript" src="/plekit/niftycorner/niftycube.js"></script>
+<script type="text/javascript" src="/plekit/niftycorner/nifty_init.js"></script>
+<script> Event.observe(window,"load", nifty_init); </script>
+');
+
+?>
index e6184c2..7326117 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: plc_functions.php 12096 2009-02-18 22:05:34Z thierry $
+// $Id$
 
 // returns array ['url' => path, 'values' => hash (key=>value)* ]
 function plekit_split_url ($full_url) {
index 6d35af8..c7ffc39 100644 (file)
@@ -3,10 +3,10 @@
   // $Id$
 
 require_once 'prototype.php';
+require_once 'nifty.php';
 
 drupal_set_html_head('
 <script type="text/javascript" src="/plekit/toggle/toggle.js"></script>
-<script type="text/javascript" src="/plekit/niftycorner/niftycube.js"></script>
 <link href="/plekit/toggle/toggle.css" rel="stylesheet" type="text/css" />
 ');
 
@@ -121,11 +121,7 @@ class PlekitToggle {
   function container_start_html ()     { 
     $id=$this->id_name('container');
 
-    // side-effects on the header
-    $nifty_init = "<script> Event.observe(window,'load', function () { Nifty ('div#$id','medium'); } ); </script>";
-    drupal_set_html_head($nifty_init);
-
-    $html="<div class='plc-toggle-container'";
+    $html="<div class='plc-toggle-container nifty-medium'";
     $html .= " id='$id'";
     $html .= ">";
     return $html;
index 38f8860..3959507 100644 (file)
@@ -5,7 +5,7 @@
 /* containers - work with nifty corners*/
 div.plc-toggle-container {
 /*    background-color: #E6E6E6; */
-    background-color: #d0f0d0;
+    background-color: #e8ffe8;
     padding: 5px;
     margin: 10px;
 }