Changeset - 5f98ad157864
[Not reviewed]
default
0 4 0
Ethan Zonca - 15 years ago 2011-03-21 20:51:12
ez@ethanzonca.com
Updated to qTip2, fixed qTip position
4 files changed with 33 insertions and 18 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -105,6 +105,7 @@ class page
 
    $this->headCode['jValidate'] = '<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.pack.js"></script>';
 
    $this->headCode['jAddress'] = '<script type="text/javascript" src="http://ohnopub.net/js/jquery.address-1.3.2.min.js"></script>';
 
    $this->headCode['qTip'] = '<script type="text/javascript" src="http://ohnopub.net/js/jquery.qtip-1.0.min.js"></script>';
 
    $this->headCode['qTip2'] = '<script type="text/javascript" src="http://ohnopub.net/js/2011.03.21/jquery.qtip.min.js"></script><link rel="stylesheet" href="http://ohnopub.net/js/2011.03.21/jquery.qtip.min.css" type="text/css" media="screen" />';
 
    $this->headCode['schedInput'] = '<script type="text/javascript" src="scripts/scheduleInput.js"></script>';
 
    $this->headCode['outputPrintStyle'] = '<link rel="stylesheet" href="styles/print.css" type="text/css" media="screen" charset="utf-8" />';
 
    $this->headCode['outputStyle'] = '<link rel="stylesheet" href="styles/output.css" type="text/css" media="screen" charset="utf-8" />'; 
input.php
Show inline comments
 
@@ -24,7 +24,7 @@ include_once 'inc' . DIRECTORY_SEPARATOR
 
include_once 'inc' . DIRECTORY_SEPARATOR . 'class.page.php';
 
require_once('inc' . DIRECTORY_SEPARATOR . 'schedule_store.inc');
 

	
 
$scripts = array('jQuery', 'jQueryUI', 'qTip','schedInput');
 
$scripts = array('jQuery', 'jQueryUI', 'qTip2','schedInput');
 
$inputPage = page::page_create('Scheduler', $scripts, FALSE);
 

	
 
$schedule_store = FALSE;
scripts/scheduleInput.js
Show inline comments
 
@@ -161,25 +161,26 @@ function genOptionHtml(value, content, t
 
function addTips()
 
{
 
  var tr = jQuery('tr');
 
  var td = tr.eq(tr.length-2);
 
  var td = tr.eq(tr.length-1);
 

	
 
  jQuery('td:first', td).qtip({
 
    /* slate_permutate_example_course_id is set globally in input.php. */
 
    content: 'Start typing your class ID (such as ' + slate_permutate_example_course_id + ') and click a suggestion to add sections',
 
    style: {
 
      border: { 
 
        width: 3,
 
        radius: 4,
 
        color: '#333'
 
 /* slate_permutate_example_course_id is set globally in input.php. */
 
 jQuery('td:first', td).qtip(
 
   {
 
      content: 'Start typing your class ID (such as ' + slate_permutate_example_course_id + ') and click a suggestion to add sections',
 
      style: {
 
        tip: true,
 
        classes: "ui-tooltip-dark ui-tooltip-shadow ui-tooltip-rounded"
 
      },
 
      name: 'dark',
 
      tip: true
 
    },
 
    show: { effect: { type: 'fade', length: 2000 } },
 
    show: { ready: true }, 
 
/*    hide: { when: { event: 'inactive' } }, */
 
    corner: { target: 'topMiddle', tooltip: 'bottomMiddle' }
 
  });
 
      show: {
 
        ready: true
 
      },
 
      position:{
 
        my: 'top left', 
 
        at: 'bottom right',
 
      }
 
    }
 
  );
 

	
 
}
 

	
 
/**
styles/general.css
Show inline comments
 
@@ -377,3 +377,16 @@ a:hover {
 
.indent {
 
  margin-left: 1em;
 
}
 

	
 
/* qTip2 Styling */
 
.ui-tooltip-dark .ui-tooltip-content{
 
  border-color: #303030;
 
  border-width: 2px;
 
  color: #f3f3f3;
 
  background-color: #505050;
 

	
 
  background: rgba(80,80,80,.9)!important;
 

	
 
  font: normal bold 1.2em sans-serif;
 
}
 

	
0 comments (0 inline, 0 general)