+ SummaryPerspective.prototype.refreshCover = function() {
+ $('#summary-cover-refresh').attr('disabled', 'disabled');
+ this.doc.refreshCover({
+ success: function(text) {
+ $('#summary-cover').attr('src', text);
+ $('#summary-cover-refresh').removeAttr('disabled');
+ }
+ });
+ };
+
+ SummaryPerspective.prototype.showCharCount = function() {
+ var cc;
+ try {
+ cc = this.doc.getLength();
+ $('#charcount_untagged').hide();
+ }
+ catch (e) {
+ $('#charcount_untagged').show();
+ cc = this.doc.text.replace(/\s{2,}/g, ' ').length;
+ }
+ $('#charcount').html(cc);
+ $('#charcount_pages').html((Math.round(cc/18)/100).toLocaleString());
+ }
+