diff --git a/inc/class.schedule.php b/inc/class.schedule.php --- a/inc/class.schedule.php +++ b/inc/class.schedule.php @@ -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 ' });'; - 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 . ' ' . PHP_EOL; echo '
' . PHP_EOL - . '

[fb] Share on Facebook

-

[sp]Share with URL

Copy the share URL below:
' . htmlentities($outputPage->gen_share_url($this->id_get())) . '

' . PHP_EOL + . '

[fb] Share on Facebook

+

[sp]Share with URL

Copy the share URL below:
' . htmlentities($outputPage->gen_share_url($this->id_get())) . '

' . PHP_EOL . '
' . PHP_EOL . '

' . PHP_EOL . ' Edit' . PHP_EOL