##// END OF EJS Templates
Add readonly indicator to notification area.
Jonathan Frederic -
Show More
@@ -38,8 +38,18 b' define(['
38 38 var knw = this.new_notification_widget('kernel');
39 39 var $kernel_ind_icon = $("#kernel_indicator_icon");
40 40 var $modal_ind_icon = $("#modal_indicator");
41 var $readonly_ind_icon = $('#readonly-indicator');
41 42 var $body = $('body');
42 43
44 // Listen for the notebook loaded event. Set readonly indicator.
45 this.events.on('notebook_loaded.Notebook', function() {
46 if (that.notebook.writable) {
47 $readonly_ind_icon.hide();
48 } else {
49 $readonly_ind_icon.show();
50 }
51 });
52
43 53 // Command/Edit mode
44 54 this.events.on('edit_mode.Notebook', function () {
45 55 that.save_widget.update_document_title();
@@ -30,6 +30,16 b''
30 30 .indicator_area();
31 31 }
32 32
33 #readonly-indicator {
34 .pull-right();
35 .indicator_area();
36
37 margin-top: 2px;
38 margin-bottom: 0px;
39 margin-left: 0px;
40 margin-right: 0px;
41 }
42
33 43 .modal_indicator:before {
34 44 .fa-fw();
35 45 }
@@ -62,6 +62,12 b' data-notebook-path="{{notebook_path}}"'
62 62 <span class="kernel_indicator_name">Kernel</span>
63 63 <i id="kernel_indicator_icon"></i>
64 64 </p>
65 <i id="readonly-indicator" class="navbar-text">
66 <span class="fa-stack">
67 <i class="fa fa-save fa-stack-1x"></i>
68 <i class="fa fa-ban fa-stack-2x text-danger"></i>
69 </span>
70 </i>
65 71 <i id="modal_indicator" class="navbar-text"></i>
66 72 <span id="notification_area"></span>
67 73 <div class="navbar-collapse collapse">
General Comments 0
You need to be logged in to leave comments. Login now