Bug 11559: (QA followup) replace font choices, fix macro editor
authorJesse Weaver <pianohacker@gmail.com>
Mon, 26 Oct 2015 20:29:54 +0000 (14:29 -0600)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 27 Oct 2015 15:25:01 +0000 (12:25 -0300)
More specifically:
  * Use monospace font options that are more widely installed
  * Don't allow entering macros until the user loads/creates a macro

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt

index b5c2c23..4e4d9b2 100644 (file)
@@ -652,6 +652,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
         $( '#macro-list li[data-name="' + name + '"]' ).addClass( 'active' );
         var macro = Preferences.user.macros[name];
         macroEditor.setValue( macro.contents );
+        macroEditor.setOption( 'readOnly', false );
         $( '#macro-format' ).val( macro.format || 'its' );
         if ( macro.history ) macroEditor.setHistory( macro.history );
     }
@@ -787,6 +788,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
                     },
                     mode: 'null',
                     lineNumbers: true,
+                    readOnly: true,
                 }
             );
             var saveTimeout;
index f791a20..0288ada 100644 (file)
                 <li><a class="set-fontSize" style="font-size: 1.18em" href="#">Huge text</a></li>
                 <li class="divider"></li>
                 <li><a class="set-font" style="font-family: monospace" href="#">Default font</a></li>
+                <li><a class="set-font" style="font-family: Consolas" href="#">Consolas</a></li>
                 <li><a class="set-font" style="font-family: 'Courier New'" href="#">Courier New</a></li>
-                <li><a class="set-font" style="font-family: peep" href="#">peep</a></li>
+                <li><a class="set-font" style="font-family: 'DejaVu Sans Mono'" href="#">DejaVu Sans Mono</a></li>
+                <li><a class="set-font" style="font-family: 'Lucida Console'" href="#">Lucida Console</a></li>
+                <li><a class="set-font" style="font-family: Monaco" href="#">Monaco</a></li>
             </ul>
         </div>
         <button class="btn btn-small" id="show-alerts" title="Previous alerts"><i class="icon-bell"></i> Alerts <span class="caret"></span></button>