##// END OF EJS Templates
Merge pull request #7720 from jdfreder/readonlyui...
Min RK -
r20393:141231cc merge
parent child Browse files
Show More
@@ -38,8 +38,18 b' define(['
38 var knw = this.new_notification_widget('kernel');
38 var knw = this.new_notification_widget('kernel');
39 var $kernel_ind_icon = $("#kernel_indicator_icon");
39 var $kernel_ind_icon = $("#kernel_indicator_icon");
40 var $modal_ind_icon = $("#modal_indicator");
40 var $modal_ind_icon = $("#modal_indicator");
41 var $readonly_ind_icon = $('#readonly-indicator');
41 var $body = $('body');
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 // Command/Edit mode
53 // Command/Edit mode
44 this.events.on('edit_mode.Notebook', function () {
54 this.events.on('edit_mode.Notebook', function () {
45 that.save_widget.update_document_title();
55 that.save_widget.update_document_title();
@@ -30,6 +30,19 b''
30 .indicator_area();
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 // Start out hidden.
43 display: none;
44 }
45
33 .modal_indicator:before {
46 .modal_indicator:before {
34 .fa-fw();
47 .fa-fw();
35 }
48 }
@@ -10711,6 +10711,22 b' ul#help_menu li a i {'
10711 text-align: center;
10711 text-align: center;
10712 width: auto;
10712 width: auto;
10713 }
10713 }
10714 #readonly-indicator {
10715 float: right !important;
10716 float: right;
10717 color: #777777;
10718 margin-left: 5px;
10719 margin-right: 5px;
10720 width: 11px;
10721 z-index: 10;
10722 text-align: center;
10723 width: auto;
10724 margin-top: 2px;
10725 margin-bottom: 0px;
10726 margin-left: 0px;
10727 margin-right: 0px;
10728 display: none;
10729 }
10714 .modal_indicator:before {
10730 .modal_indicator:before {
10715 width: 1.28571429em;
10731 width: 1.28571429em;
10716 text-align: center;
10732 text-align: center;
@@ -62,6 +62,12 b' data-notebook-path="{{notebook_path}}"'
62 <span class="kernel_indicator_name">Kernel</span>
62 <span class="kernel_indicator_name">Kernel</span>
63 <i id="kernel_indicator_icon"></i>
63 <i id="kernel_indicator_icon"></i>
64 </p>
64 </p>
65 <i id="readonly-indicator" class="navbar-text" title='This notebook is read-only'>
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 <i id="modal_indicator" class="navbar-text"></i>
71 <i id="modal_indicator" class="navbar-text"></i>
66 <span id="notification_area"></span>
72 <span id="notification_area"></span>
67 <div class="navbar-collapse collapse">
73 <div class="navbar-collapse collapse">
General Comments 0
You need to be logged in to leave comments. Login now