Skip to content

Commit

Permalink
Fixed the issue where the 'participate at' link was always hardcoded.…
Browse files Browse the repository at this point in the history
… Should load from the DB now, though I have to post-load insert it with JS. Annoying, but works and was easy to do.
  • Loading branch information
drewww committed Jun 6, 2011
1 parent 2870173 commit 380ad09
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion views/layouts/screen.ctp
Expand Up @@ -75,7 +75,7 @@
<h2> <h2>
<?php <?php
echo $html->link( echo $html->link(
__('backchan.nl - participate at http://fc2008.backchan.nl/', true), __('backchan.nl - participate at http://backchan.nl/', true),
'http://backchan.nl/' 'http://backchan.nl/'
); );
?> ?>
Expand Down
3 changes: 3 additions & 0 deletions views/meetings/screen.ctp
Expand Up @@ -20,6 +20,9 @@ $scriptContent .= $javascript->object(
"postfix"=>";\n") "postfix"=>";\n")
); );


$scriptContent .= "var conferenceUsername=\"". $meeting['Conference']['username'] . "\";\n";


// This magic "inline"=false bit is a queue for cake to put the scripts // This magic "inline"=false bit is a queue for cake to put the scripts
// into the header where they belong. Yay. // into the header where they belong. Yay.
$javascript->codeBlock($scriptContent, array("inline"=>false)); $javascript->codeBlock($scriptContent, array("inline"=>false));
Expand Down
3 changes: 3 additions & 0 deletions views/meetings/view.ctp
Expand Up @@ -31,6 +31,9 @@ $scriptContent .= $javascript->object(
); );
$scriptContent .= "var showAdmin=" . $adminInterface . ";\n"; $scriptContent .= "var showAdmin=" . $adminInterface . ";\n";



$scriptContent .= "var conferenceUsername=\"". $meeting['Conference']['username'] . "\";\n";

if ($user == false) $scriptContent .= "var showIdentityDialog=true;\n"; if ($user == false) $scriptContent .= "var showIdentityDialog=true;\n";
else $scriptContent .= "var showIdentityDialog=false;\n"; else $scriptContent .= "var showIdentityDialog=false;\n";


Expand Down
7 changes: 6 additions & 1 deletion webroot/js/meetings_screen.js
Expand Up @@ -31,7 +31,12 @@ function init()
{ {
success: refreshSuccessScreen, success: refreshSuccessScreen,
} }
); );

header = document.getElementById("header");
baseURL = conferenceUsername + ".backchan.nl";
header.innerHTML = "<h2><a href='http://" + baseURL +"'>participate at http://" + baseURL + "</a></h2>";

} }


function refreshSuccessScreen(o, response) function refreshSuccessScreen(o, response)
Expand Down
5 changes: 5 additions & 0 deletions webroot/js/meetings_view.js
Expand Up @@ -34,6 +34,11 @@ function init() {


// Post Table // Post Table
initDataTable(); initDataTable();

// Now, mess with the header so it has the right name + link on it.
header = document.getElementById("header");
baseURL = conferenceUsername + ".backchan.nl";
header.innerHTML = "<h2><a href='http://" + baseURL +"'>" + baseURL + "</a></h2>";
} }


function refreshMeeting() { function refreshMeeting() {
Expand Down

0 comments on commit 380ad09

Please sign in to comment.