View | Details | Raw Unified | Return to bug 21665
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js (-1 / +17 lines)
Lines 86-91 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
86
        editor.overwriteMode = newState;
86
        editor.overwriteMode = newState;
87
    }
87
    }
88
88
89
    function doubleClickSubfield( cm ) {
90
        var field = cm.marceditor.getCurrentField();
91
        if ( !field ) return;
92
93
        var curCursor = cm.getCursor();
94
        var subfield = field.getSubfieldAt( curCursor.ch );
95
        var subfieldText = cm.getRange({line:curCursor.line,ch:subfield.contentsStart},{line:curCursor.line,ch:subfield.end});
96
        var textArea = document.createElement("TEXTAREA");
97
        textArea.value = subfieldText;
98
        textArea.style.background = 'transparent';
99
        document.body.appendChild(textArea);
100
        textArea.select();
101
        document.execCommand("Copy");
102
        document.body.removeChild(textArea);
103
    }
104
89
    // Editor helper functions
105
    // Editor helper functions
90
    function activateTabPosition( cm, pos, idx ) {
106
    function activateTabPosition( cm, pos, idx ) {
91
        // Allow tabbing to as-yet-nonexistent positions
107
        // Allow tabbing to as-yet-nonexistent positions
Lines 625-630 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
625
        this.cm.on( 'changes', editorChanges );
641
        this.cm.on( 'changes', editorChanges );
626
        this.cm.on( 'cursorActivity', editorCursorActivity );
642
        this.cm.on( 'cursorActivity', editorCursorActivity );
627
        this.cm.on( 'overwriteToggle', editorSetOverwriteMode );
643
        this.cm.on( 'overwriteToggle', editorSetOverwriteMode );
644
        this.cm.on( 'dblclick', doubleClickSubfield );
628
645
629
        this.onCursorActivity = options.onCursorActivity;
646
        this.onCursorActivity = options.onCursorActivity;
630
647
631
- 

Return to bug 21665