3 class SummaryPerspective extends $.wiki.Perspective {
8 // first time page is rendered
9 $('#summary-cover-refresh').click(function() {
15 $('#summary-cover-refresh').attr('disabled', 'disabled');
16 this.doc.refreshCover({
17 success: function(text) {
18 $('#summary-cover').attr('src', text);
19 $('#summary-cover-refresh').removeAttr('disabled');
27 $('#charcounts_text').show();
28 $('#charcounts_raw').hide();
29 cc = this.doc.getLength({noFootnotes: true, noThemes: true});
30 $('#charcount').html(cc);
31 $('#charcount_pages').html((Math.round(cc/18)/100).toLocaleString());
33 cc = this.doc.getLength();
34 $('#charcount_full').html(cc);
35 $('#charcount_full_pages').html((Math.round(cc/18)/100).toLocaleString());
38 $('#charcounts_text').hide();
39 $('#charcounts_raw').show();
40 cc = this.doc.text.replace(/\s{2,}/g, ' ').length;
41 $('#charcount_raw').html(cc);
42 $('#charcount_raw_pages').html((Math.round(cc/18)/100).toLocaleString());
46 onEnter(success, failure){
52 $.wiki.SummaryPerspective = SummaryPerspective;