showoff 0.9.10.4 → 0.9.10.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cdefcb7407782277dabcbaeb10989d48ee5cafa
4
- data.tar.gz: 0fd28be0033c2252c2b10cd6d9258b886d360fa9
3
+ metadata.gz: df328a48d376bf8e56d3255d9251774ad4f89b2d
4
+ data.tar.gz: bb8c0990d0438c0081c5b9f3faaeed3cd9f0baa7
5
5
  SHA512:
6
- metadata.gz: 2a44ba78cfdc72aeaba84b1c890bf923443a3f4de4ee94f3bed25164abb5b9e3d34221384ed6f0fd64e2f1009cad1bd2132ec80a9062532a70115a8799e47a16
7
- data.tar.gz: 3e30d8accc301fbff29777316f0595fe73664801b93eae5fb57d13ce29bbf08f5256ebc628a2052bb42be62280b301ad1bc2e5d89af61b527350d7d730ae7915
6
+ metadata.gz: 41dd46e8e3885a8f8094f5ed9e0fe3af6648b671804a7f4f8b4752d97feb374ae2a806d8898c6c6d2e225f4d4cf96a545679ce7d814f11851631fc6b39ba9c38
7
+ data.tar.gz: 0f9d52330048ec02b39db8929cc90dbb30a03b327915ebc3c739247ba67121e2fd6946bac649bf3e9a6ce41c63f4180736fafe2b392b0d0669c1d106f9b6f434
@@ -1,4 +1,4 @@
1
1
  # No namespace here since ShowOff is a class and I'd have to inherit from
2
2
  # Sinatra::Application (which we don't want to load here)
3
- SHOWOFF_VERSION = '0.9.10.4'
3
+ SHOWOFF_VERSION = '0.9.10.5'
4
4
 
data/lib/showoff.rb CHANGED
@@ -930,8 +930,9 @@ class ShowOff < Sinatra::Application
930
930
 
931
931
 
932
932
  def self.do_static(args)
933
- what = args[0] || "index"
934
- opt = args[1]
933
+ args ||= [] # handle nil arguments
934
+ what = args[0] || "index"
935
+ opt = args[1]
935
936
 
936
937
  # Sinatra now aliases new to new!
937
938
  # https://github.com/sinatra/sinatra/blob/v1.3.3/lib/sinatra/base.rb#L1369
@@ -55,6 +55,11 @@ div.zoomed {
55
55
  display: none;
56
56
  }
57
57
 
58
+ #topbar #links span.spacer {
59
+ width: 2em;
60
+ display: inline-block;
61
+ }
62
+
58
63
  #center {
59
64
  display: -webkit-flex;
60
65
  display: flex;
@@ -289,7 +294,6 @@ div.zoomed {
289
294
  height: 100%;
290
295
  font-family: helvetica;
291
296
  font-weight: 100;
292
- padding: 0 0.25em;
293
297
  }
294
298
  #notes p,
295
299
  #notes h1,
@@ -299,13 +303,15 @@ div.zoomed {
299
303
  #notes ol,
300
304
  #notes ul {
301
305
  margin-right: 0.75em;
306
+ padding-left: 0.25em;
302
307
  }
303
308
  #notes p {
304
- padding: 0.1em inherit;
309
+ padding: 0.25em;
305
310
  margin-bottom: 0.5em;
306
311
  }
307
312
  #notes ol, #notes ul {
308
313
  padding-left: 2em;
314
+ padding-top: 0.25em;
309
315
  margin-bottom: 0.5em;
310
316
  }
311
317
  #notes ol {
@@ -1,12 +1,13 @@
1
1
  // presenter js
2
2
  var slaveWindow = null;
3
3
  var nextWindow = null;
4
+ var notesWindow = null;
4
5
 
5
6
  var paceData = [];
6
7
 
7
8
  $(document).ready(function(){
8
9
  // set up the presenter modes
9
- mode = { track: true, follow: true, update: true, slave: false, next: false};
10
+ mode = { track: true, follow: true, update: true, slave: false, next: false, notes: false};
10
11
 
11
12
  // attempt to open another window for the presentation if the mode defaults
12
13
  // to enabling this. It does not by default, so this is likely a no-op.
@@ -42,6 +43,8 @@ $(document).ready(function(){
42
43
  // set up tooltips
43
44
  $('#report').tipsy({ offset: 5 });
44
45
  $('#slaveWindow').tipsy({ offset: 5 });
46
+ $('#nextWindow').tipsy({ offset: 5 });
47
+ $('#notesWindow').tipsy({ offset: 5 });
45
48
  $('#generatePDF').tipsy({ offset: 5 });
46
49
  $('#onePage').tipsy({ offset: 5, gravity: 'ne' });
47
50
 
@@ -216,6 +219,36 @@ function openNext()
216
219
  }
217
220
  }
218
221
 
222
+ function toggleNotes() {
223
+ mode.notes = !mode.notes;
224
+ openNotes();
225
+ }
226
+
227
+ function openNotes()
228
+ {
229
+ if (mode.notes) {
230
+ try {
231
+ if(notesWindow == null || typeof(notesWindow) == 'undefined' || notesWindow.closed){
232
+ notesWindow = window.open('', '', 'width=350,height=450');
233
+ postSlide();
234
+ }
235
+ $('#notesWindow').addClass('enabled');
236
+ }
237
+ catch(e) {
238
+ console.log('Failed to open notes window. Popup blocker?');
239
+ }
240
+ }
241
+ else {
242
+ try {
243
+ notesWindow && notesWindow.close();
244
+ $('#notesWindow').removeClass('enabled');
245
+ }
246
+ catch (e) {
247
+ console.log('Notes window failed to close properly.');
248
+ }
249
+ }
250
+ }
251
+
219
252
  function askQuestion(question) {
220
253
  $("#questions ul").prepend($('<li/>').text(question));
221
254
 
@@ -373,6 +406,9 @@ function postSlide()
373
406
 
374
407
  var notes = getCurrentNotes();
375
408
  $('#notes').html(notes.html());
409
+ if (notesWindow) {
410
+ $(notesWindow.document.body).html(notes.html());
411
+ }
376
412
 
377
413
  var fileName = currentSlide.children().first().attr('ref');
378
414
  $('#slideFile').text(fileName);
data/views/presenter.erb CHANGED
@@ -41,10 +41,14 @@
41
41
  <% if @issues %>
42
42
  <a id="report" href="javascript:reportIssue();" title="Report an issue with the current slide.">Report Issue With Slide</a>
43
43
  <% end %>
44
+ <span class="spacer"> </span>
44
45
  <a id="stats" href="/stats" target="_showoffchild">Viewing Statistics</a>
45
46
  <a id="downloads" href="/download" target="_showoffchild">Downloads</a>
47
+ <span class="spacer"> </span>
46
48
  <a id="slaveWindow" href="javascript:toggleSlave();" title="Enable the slave window.">Slave Window</a>
47
49
  <a id="nextWindow" href="javascript:toggleNext();" title="Enable the next window view.">Next Window</a>
50
+ <a id="notesWindow" href="javascript:toggleNotes();" title="Enable the popout notes window.">Notes Window</a>
51
+ <span class="spacer"> </span>
48
52
  <a id="generatePDF" href="/pdf" title="Call out to wkhtmltopdf to generate a PDF.">Generate PDF</a>
49
53
  <a id="onePage" href="/onepage" title="Load the single page view. Useful for printing.">Single Page</a>
50
54
  </span>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10.4
4
+ version: 0.9.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-10 00:00:00.000000000 Z
11
+ date: 2014-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra