Loading template/app/view/videos/Container.js +8 −2 Original line number Diff line number Diff line Loading @@ -12,12 +12,18 @@ Ext.define('Docs.view.videos.Container', { * @param {Object} video */ load: function(video) { this.tpl = new Ext.XTemplate( this.tpl = this.tpl || new Ext.XTemplate( '<iframe id="videoplayer"', ' src="http://player.vimeo.com/video/{id}?portrait=0&color=4CC208"', ' width="640" height="360" frameborder="0"></iframe>', '<h1>{title}</h1>', '<p>{description}</p>' '<p>{[this.linkify(values.description)]}</p>', { // Detects URL-s in text and converts them to links linkify: function(text) { return text.replace(/(\bhttps?:\/\/\S+)/ig, "<a href='$1'>$1</a>"); } } ); this.update(this.tpl.apply(video)); } Loading Loading
template/app/view/videos/Container.js +8 −2 Original line number Diff line number Diff line Loading @@ -12,12 +12,18 @@ Ext.define('Docs.view.videos.Container', { * @param {Object} video */ load: function(video) { this.tpl = new Ext.XTemplate( this.tpl = this.tpl || new Ext.XTemplate( '<iframe id="videoplayer"', ' src="http://player.vimeo.com/video/{id}?portrait=0&color=4CC208"', ' width="640" height="360" frameborder="0"></iframe>', '<h1>{title}</h1>', '<p>{description}</p>' '<p>{[this.linkify(values.description)]}</p>', { // Detects URL-s in text and converts them to links linkify: function(text) { return text.replace(/(\bhttps?:\/\/\S+)/ig, "<a href='$1'>$1</a>"); } } ); this.update(this.tpl.apply(video)); } Loading