Skip to content

Commit

Permalink
Adding basic instructions to display, need to wire up js
Browse files Browse the repository at this point in the history
  • Loading branch information
quirkey committed Apr 18, 2010
1 parent 5f17e09 commit 38b2b64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
18 changes: 2 additions & 16 deletions _attachments/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,6 @@
}
};

function showModal(status, message) {
var $notification = $('#modal-notification');
$notification
.attr('class', 'modal')
.addClass(status)
.find('.message')
.html(message).end()
.find('button').one('click', function() {
$(this).parent().fadeOut(200);
}).focus().end()
.center()
.fadeIn(400);
};

function showNotification(status, message) {
var $notification = $('#inline-notification');
$notification
Expand Down Expand Up @@ -420,7 +406,7 @@
}
});

var app = $.sammy(function() {
var app = $.sammy('#container', function() {
this.use(Sammy.Template);
this.use(Sammy.NestedParams);
this.use(Sammy.Form);
Expand All @@ -429,7 +415,6 @@
this.setTitle('// Swinger //');

this.debug = true;
this.element_selector = '#container';
this.template_engine = 'template';

var current_preso = false;
Expand Down Expand Up @@ -604,6 +589,7 @@
this.post('#/login', function(e) {
User.login(this.params['name'], this.params['password'], function(user) {
showNotification('success', 'Thanks for logging in, ' + user.name + '!');
e.log('last', e.app.last_location_before_redirect);
e.redirect(e.app.last_location_before_redirect || '#/');
e.app.last_location_before_redirect = null;
})
Expand Down
4 changes: 4 additions & 0 deletions _attachments/templates/display.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<div id="display-instructions">
Hey! You're watching "<%= preso.attributes.title %>", a presentation by <%= preso.attributes.author %>.
Use the left and right arrow keys to navigate or press space bar to skip slides.
</div>
<div id="display" rel="<%= preso.id() %>">
<div id="slides">
<% $.each(preso.attributes.slides, function(i, slide) { %>
Expand Down

0 comments on commit 38b2b64

Please sign in to comment.