Commit 21a87502 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Make the copy button to just select the code.

Implementing full copy-to-clipboard turned out to be way too much
trouble.
parent 5c1e637f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -50,6 +50,14 @@ Ext.define('Docs.controller.Examples', {
                    cmp.up('inlineexample').layout.setActiveItem(1);
                }
            },
            'inlineexample toolbar button[iconCls=copy]': {
                click: function(cmp) {
                    var editor = cmp.up('inlineexample').codeEditor;
                    var lastLine = editor.lineCount() - 1;
                    var lastCh = editor.getLine(lastLine).length;
                    editor.setSelection({line: 0, ch: 0}, {line: lastLine, ch: lastCh});
                }
            },
            'classoverview': {
                resize: function() {
                    Ext.Array.each(Ext.ComponentQuery.query('.inlineexample'), function(c) {
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ Ext.define('Docs.view.examples.Inline', {
                padding: 0,
                margin: 0,
                iconCls: 'copy',
                tooltip: 'Copy to Clipboard'
                tooltip: 'Select'
            }
        ]
    }],