Commit 8e55f800 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Button to open Touch example in new window.

parent 705089ea
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -68,6 +68,11 @@ Ext.define('Docs.controller.Examples', {
                    }, this, {
                        delegate: 'button.landscape'
                    });
                    cmp.el.addListener('click', function(e, el) {
                        this.openInNewWindow();
                    }, this, {
                        delegate: 'button.new-window'
                    });
                }
            }
        });
@@ -119,5 +124,10 @@ Ext.define('Docs.controller.Examples', {

    changeDevice: function(device) {
        this.getPage().setDevice(device);
    },

    openInNewWindow: function() {
        var example = this.getExample(this.activeUrl);
        window.open("touch/examples/" + example.url);
    }
});
+4 −0
Original line number Diff line number Diff line
@@ -31,6 +31,10 @@ Ext.define('Docs.view.examples.TouchContainer', {
                        '<button class="landscape selected">Landscape</button>',
                        '<button class="portrait">Portrait</button>',
                    '<div>',
                    '<span class="separator">&nbsp;</span>',
                    '<div>',
                        '<button class="new-window">Open in new window</button>',
                    '<div>',
                '</div>'
            ].join('')
        }];