Browse files

minor stuff..

  • Loading branch information...
1 parent 2ca8892 commit 26a3946eab6cc23315f7acb63536a2ab2a14201b @sbellity sbellity committed Apr 16, 2012
View
2 example/config.inc.php
@@ -15,7 +15,7 @@ function _debug($elem) {
echo "</pre>";
}
-$environment = "oneapp";
+$environment = "neue";
$config = parse_ini_file('./config/' . $environment . '.ini', true);
View
27 example/public/js/app.js
@@ -70,26 +70,25 @@ $(function() {
// $('.topbar').scrollSpy();
$('#website_connect_btn').live('click',function(){
- $.post('./?/session', user_account, function(response){
- if (response.oahu_id) {
- $('#website_name span').html(response.name)
- $('#website_user_id span').html(response.id)
- $('#website_oahu_id span').html(response.oahu_id)
- $('.website_account').show();
- $('#website_disconnect_btn').show();
- $('#website_connect_btn').hide();
- }
- },'json');
+ var createSession = function(account) {
+ $.post('./?/session', account, function(response){
+ document.location.reload();
+ },'json');
+ }
+ if (Oahu.account) {
+ createSession(Oahu.account)
+ } else {
+ Oahu.once("oahu:account:success", function(msg, data) { createSession(data); });
+ Oahu.login('Facebook');
+ }
});
$("#website_disconnect_btn").live('click',function(){
$.ajax({
type: 'DELETE',
url: './?/session',
- success: function(response){
- $('.website_account').hide();
- $('#website_disconnect_btn').hide();
- $('#website_connect_btn').show();
+ success: function(response) {
+ document.location.reload();
},
dataType: 'json'
});
View
13,860 example/public/js/sproutcore-2.0.beta.3.js
0 additions, 13,860 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
11 example/public/js/sproutcore-2.0.beta.3.min.js
0 additions, 11 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
11 example/views/layouts/application.html.php
@@ -12,10 +12,9 @@
<script src="public/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
- <script src="<?php echo $config['oahu_js_url'] ?>"></script>
+ <script src="//<?php echo $config['host'] ?>/assets/oahu.js"></script>
<script>
var OahuConfig = <?php echo json_encode(array(
- "environment" => $config['oahu_env'],
"appId" => $config['consumer_id']
)); ?>
</script>
@@ -47,7 +46,13 @@
</div>
<div class="container">
<div class='hero-unit'>
- <a href="#" id="website_connect_btn" class="btn primary">Create User Session</a>
+ <?php if ($current_user): ?>
+ <h2>Connected on Server as <?php echo $current_user->name; ?></h2>
+ <br/>
+ <a href="#" id="website_disconnect_btn" class="btn primary">Destroy User Session</a>
+ <?php else: ?>
+ <a href="#" id="website_connect_btn" class="btn primary">Create User Session</a>
+ <?php endif ?>
</div>
<div id="main"><?php echo $content ?></div>
<div id="footer"></div>
View
3 example/views/movies/show.html.php
@@ -5,6 +5,9 @@
<?php echo $movie->synopsis ?>
+<p><b>Countries:</b> <?php echo implode(",", $movie->countries) ?></p>
+<p><b>Genres:</b> <?php echo implode(",", $movie->genres) ?></p>
+
<hr>
<?php echo partial('movies/_form.html.php'); ?>

0 comments on commit 26a3946

Please sign in to comment.