@@ -138,7 +138,7 @@ class page
$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" />';
$this->headCode['gliderHeadcode'] = '<link rel="stylesheet" href="styles/glider.css" type="text/css" media="screen" charset="utf-8" />';
$this->headCode['uiTabsKeyboard'] = '<script type="text/javascript" src="scripts/uiTabsKeyboard.js"></script>';
$this->headCode['uiTabsKeyboard'] = '<script type="text/javascript" src="scripts/uiTabsKeyboard.js?v=20121128h"></script>';
$this->headCode['displayTables'] = '<script type="text/javascript" src="scripts/displayTables.js"></script>';
$this->pagetitle = $ntitle;
@@ -462,6 +462,10 @@ class Schedule
$outputPage = page::page_create(htmlentities($this->getName()), $headcode,
array('school' => $this->school_get(), 'semester' => $this->semester_get()));
$outputPage->headcode_add('schedule_share_links', $outputPage->script_wrap(
'var share_facebook_template = ' . json_encode('https://facebook.com/sharer.php?t=' . rawurlencode($this->scheduleName) . '&u=' . $outputPage->gen_share_url($this->id_get())) . ";\n"
. 'var share_url_template = ' . json_encode($outputPage->gen_share_url($this->id_get())) . ';'),
TRUE);
$outputPage->conversion();
if (!empty($this->created))
$outputPage->meta('dcterms.created', gmdate(DATE_W3C, $this->created));
@@ -495,10 +499,6 @@ class Schedule
echo ' jQuery.address.change(function(event){';
echo ' jQuery("#tabs").tabs( "select" , window.location.hash );';
echo ' });';
echo ' jQuery("#tabs").bind("tabsselect", function(event, ui) {';
echo ' window.location.hash = ui.tab.hash;';
echo ' jQuery("#sharedialog").dialog({ modal: true, width: 550, resizable: false, draggable: false, autoOpen: false });';
echo ' jQuery("#share").click( function() {
@@ -516,8 +516,8 @@ class Schedule
. ' </script>' . PHP_EOL;
echo ' <div id="sharedialog" title="Share Schedule">' . PHP_EOL
. ' <p class="indent"><img alt="[fb]" class="noborder" src="http://facebook.com/favicon.ico" /> <a href="http://www.facebook.com/sharer.php?u=' . urlencode(htmlentities($outputPage->gen_share_url($this->id_get()))) .'&t=My%20Schedule">Share on Facebook</a></p>
<p class="indent"><img alt="[sp]" class="noborder" src="images/favicon.svg" style="margin-right: 5px; width: 16px; height: 16px;"/><span class="clicktoclipboard"><a href="#">Share with URL</a><span class="toclipboard hidden"><p>Copy the share URL below:<br /><em class="centeredtext smallurl">' . htmlentities($outputPage->gen_share_url($this->id_get())) . '</em></p></span></span></p>' . PHP_EOL
. ' <p class="indent"><img alt="[fb]" class="noborder" src="http://facebook.com/favicon.ico" /> <a id="share-fb-a" href="http://www.facebook.com/sharer.php?u=' . urlencode(htmlentities($outputPage->gen_share_url($this->id_get()))) .'&t=' . rawurlencode($this->scheduleName) . '">Share on Facebook</a></p>
<p class="indent"><img alt="[sp]" class="noborder" src="images/favicon.svg" style="margin-right: 5px; width: 16px; height: 16px;"/><span class="clicktoclipboard"><a href="#">Share with URL</a><span class="toclipboard hidden"><p>Copy the share URL below:<br /><em id="share-url-em" class="centeredtext smallurl">' . htmlentities($outputPage->gen_share_url($this->id_get())) . '</em></p></span></span></p>' . PHP_EOL
. ' </div>' . PHP_EOL
. ' <p>' . PHP_EOL
. ' <a href="input.php?s='.$this->id.'" class="button">Edit</a>' . PHP_EOL
/*
* Copyright 2010 Nathan Gelderloos, Ethan Zonca, Nathan Phillip Brink
/* -*- tab-width: 4; -*-
* Copyright 2012 Nathan Gelderloos, Ethan Zonca, Nathan Phillip Brink
*
* This file is part of SlatePermutate.
@@ -18,6 +18,8 @@
*/
jQuery(document).ready( function() {
var share_facebook_a_obj = jQuery('#share-fb-a');
var share_url_em_obj = jQuery('#share-url-em');
jQuery(document).keydown(function(e) {
@@ -45,4 +47,20 @@ jQuery(document).ready( function() {
}
});
function share_update_uris(hash)
{
share_facebook_a_obj.attr('href', share_facebook_template + hash.replace('#', '%23'));
share_url_em_obj.text(share_url_template + hash);
share_update_uris(window.location.hash);
jQuery('#tabs').bind('tabsselect', function(event, ui) {
window.location.hash = ui.tab.hash;
* Update some links to be specific to the current bug (bug
* #92).
share_update_uris(ui.tab.hash);
Status change: