Unified · Split
| @@ -27,20 +27,22 @@ class app.views.EntryPage extends app.View · 26 unmodified lines | ||
| 27 | 27 | render: (content = '', fromCache = false) -> |
| 28 | 28 | return unless @activated |
| 29 | 29 | @empty() |
| 30 | − | |
| 31 | 30 | @subview = new (@subViewClass()) @el, @entry |
| 32 | − @subview.render(content, fromCache) | |
| 31 | + | |
| 32 | + $.batchUpdate @el, => | |
| 33 | + @subview.render(content, fromCache) | |
| 34 | + @addClipboardLinks() unless fromCache | |
| 35 | + return | |
| 33 | 36 | |
| 34 | 37 | if app.disabledDocs.findBy 'slug', @entry.doc.slug |
| 35 | 38 | @hiddenView = new app.views.HiddenPage @el, @entry |
| 36 | 39 | |
| 37 | 40 | @trigger 'loaded' |
| 38 | − @delay @addClipboardLinks unless fromCache | |
| 39 | 41 | return |
| 40 | 42 | |
| 41 | 43 | CLIPBOARD_LINK = '<a class="_pre-clip" title="Copy to clipboard"></a>' |
| 42 | 44 | |
| 43 | − addClipboardLinks: => | |
| 45 | + addClipboardLinks: -> | |
| 44 | 46 | for el in @findAllByTag('pre') |
| 45 | 47 | el.insertAdjacentHTML('afterbegin', CLIPBOARD_LINK) |
| 46 | 48 | return |