Changeset - 46b0cd850b52
[Not reviewed]
default
0 3 1
Ethan Zonca - 15 years ago 2010-12-08 21:29:20
ez@ethanzonca.com
Fix bug 36 (show only 5 saved schedules) and add alpha to the logo
4 files changed with 39 insertions and 4 deletions:
0 comments (0 inline, 0 general)
images/slatepermutate-alpha.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
inc/class.page.php
Show inline comments
 
@@ -192,25 +192,25 @@ class page
 
      echo '    ' . $this->headCode["$i"] . "\n";
 

	
 
    echo '  </head>' . PHP_EOL .
 
	 '  <body '.$this->bodyargs.'>'. PHP_EOL .
 
         '    <div id="page">'. PHP_EOL;
 
    echo $this->top(); // Write out top
 
  }
 

	
 
  /** Write out the top of the page, including opening div tags, header title and images, etc */
 
  private function top(){
 
    echo '      <div id="header">'. PHP_EOL .
 
	 '        <div id="title">'. PHP_EOL .
 
         '          <h1><a href="index.php"><img src="images/slatepermutate.png" alt="SlatePermutate" class="noborder" /></a><br /></h1>'. PHP_EOL .
 
         '          <h1><a href="index.php"><img src="images/slatepermutate-alpha.png" alt="SlatePermutate" class="noborder" /></a><br /></h1>'. PHP_EOL .
 
         '          <p>'. PHP_EOL .
 
         '            <span id="subtitle">'.$this->pagetitle.'</span>'. PHP_EOL .
 
  	 '            <span id="menu">Profile: '.$this->school['name'].' <a href="input.php?selectschool=1">(change)</a></span>'. PHP_EOL .
 
         '          </p>'. PHP_EOL .
 
         '        </div>'. PHP_EOL .
 
	 '      </div>'. PHP_EOL .
 
         '      <div id="content">'. PHP_EOL;
 
  }
 

	
 
  /** Write out the foot of the page and closing divs */
 
  public function foot(){
 
    echo '      </div> <!-- id="content" -->'. PHP_EOL;
 
@@ -245,33 +245,44 @@ class page
 
  public function showSavedScheds($session)
 
  {
 
    global $clean_urls;
 

	
 
    echo '<p>';
 
    if (isset($session['saved']) && count($session['saved']) > 0)
 
      {
 
	$process_php_s = 'process.php?s=';
 
	if ($clean_urls)
 
	  $process_php_s = '';
 

	
 
	echo '<div id="savedBox" ><h3>Saved Schedules:</h3>';
 

	
 

	
 
        $hidden = '';
 
	foreach($session['saved'] as $key => $name)
 
	  {
 
            if($key == 5) {
 
              echo '<div id="showMore"><a href="#">More...</a></div>';
 
              $hidden = 'hidden';
 
            }
 
            else {
 
                    echo '<p class="' . $hidden . '">';
 
	    echo '<a href="' . $process_php_s . $key . '" title="View schedule #' . $key . '">#' . $key . "</a>:\n "
 
	      . htmlentities($name)
 
	      . ' <a href="input.php?s=' . $key . '">edit</a>'
 
	      . ' <a href="process.php?del=' . $key . '">delete</a>'
 
	      . "<br /><br />\n";
 
		      . "<br /><br />\n"
 
                      . '</p>';
 
	  }
 
	echo '</div>';
 
	  }
 
	echo '<div id="showLess"><a href="#">Less...</a></div></div>';
 
      }
 
    echo '</p>';
 
  }
 

	
 
  /**
 
   * \brief
 
   *   Display a list of schools the user might be from.
 
   * \param $linkto
 
   *   The to which a &school= or ?school= query string should be
 
   *   appended.
 
   */
 
  public function showSchools($linkto)
scripts/scheduleInput.js
Show inline comments
 
@@ -402,16 +402,28 @@ jQuery(document).ready(function() {
 
	});
 
	jQuery(".defText").blur();
 

	
 
	//--------------------------------------------------
 
	// Show/Hide advanced items
 
	//--------------------------------------------------
 
	jQuery('.advanced').hide();    
 
	jQuery('#showadvanced').click( function() {
 
		jQuery('#showadvanced').hide();
 
		jQuery('.advanced').slideToggle();
 
	});
 

	
 

	
 
	//-------------------------------------------------
 
	// Show more saved schedules
 
	//-------------------------------------------------
 
        jQuery('#showMore').click( function() {
 
		jQuery('.hidden').show();
 
		jQuery('#showMore').hide();
 
		jQuery('#showLess').show();
 
        });
 
        jQuery('#showLess').click( function() {
 
		jQuery('.hidden').hide();
 
		jQuery('#showMore').show();
 
		jQuery('#showLess').hide();
 
	});
 

	
 

	
 
});
styles/general.css
Show inline comments
 
@@ -201,12 +201,24 @@ td.center {
 
  text-align: center;
 
}
 
.graytext {
 
  color: #999;
 
}
 
#sharedialog {
 
  display: none;
 
}
 

	
 
.bold {
 
  font-weight: bold;
 
}
 

	
 
/** Used for hidden saved schedules */
 
.hidden {
 
  display: none;
 
}
 
#showLess {
 
  display:none;
 
}
 
#savedBox p {
 
  padding:0;
 
  margin:0;
 
}
0 comments (0 inline, 0 general)