Loading template/app/controller/InlineExamples.js +10 −2 Original line number Diff line number Diff line Loading @@ -74,8 +74,16 @@ Ext.define('Docs.controller.InlineExamples', { // Strip tags and replace HTML entities with their values var code = Ext.String.htmlDecode(Ext.util.Format.stripTags(inlineEg.innerHTML)); var options = {}; Ext.Array.forEach(inlineEg.className.split(/ +/), function(cssClass) { options[cssClass] = true; Ext.Array.forEach(inlineEg.className.split(/ +/), function(cls) { if (cls === "phone" || cls === "miniphone" || cls === "tablet") { options.device = cls; } else if (cls === "ladscape" || cls === "portrait") { options.orientation = cls; } else { options[cls] = true; } }); var div = document.createElement("div"); inlineEg.parentNode.replaceChild(div, inlineEg); Loading template/app/view/examples/Inline.js +10 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,16 @@ Ext.define('Docs.view.examples.Inline', { ] }], /** * @cfg {Object} options * A set of options for configuring the preview: * * @cfg {String} options.device phone, miniphone or tablet * @cfg {String} options.orientation ladscape or portrait * @cfg {Boolean} options.raw True to turn off Ext.setup(). */ options: {}, initComponent: function() { this.items = [ this.editor = Ext.create('Docs.view.examples.InlineEditor', { Loading template/app/view/examples/InlinePreview.js +9 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,13 @@ Ext.define('Docs.view.examples.InlinePreview', { iframeId: 0 }, /** * @cfg {Object} options * A set of options for configuring the preview. * See docs of parent component. */ options: {}, initComponent: function() { this.html = this.getHtml(); Loading @@ -23,8 +30,8 @@ Ext.define('Docs.view.examples.InlinePreview', { if (Docs.touchExamplesUi) { return Ext.create('Docs.view.examples.Device', { id: this.getIframeId(), device: this.options.tablet ? "tablet" : (this.options.miniphone ? "miniphone" : "phone"), orientation: this.options.portrait ? "portrait" : "landscape" device: this.options.device, orientation: this.options.orientation }).toHtml(); } else { Loading Loading
template/app/controller/InlineExamples.js +10 −2 Original line number Diff line number Diff line Loading @@ -74,8 +74,16 @@ Ext.define('Docs.controller.InlineExamples', { // Strip tags and replace HTML entities with their values var code = Ext.String.htmlDecode(Ext.util.Format.stripTags(inlineEg.innerHTML)); var options = {}; Ext.Array.forEach(inlineEg.className.split(/ +/), function(cssClass) { options[cssClass] = true; Ext.Array.forEach(inlineEg.className.split(/ +/), function(cls) { if (cls === "phone" || cls === "miniphone" || cls === "tablet") { options.device = cls; } else if (cls === "ladscape" || cls === "portrait") { options.orientation = cls; } else { options[cls] = true; } }); var div = document.createElement("div"); inlineEg.parentNode.replaceChild(div, inlineEg); Loading
template/app/view/examples/Inline.js +10 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,16 @@ Ext.define('Docs.view.examples.Inline', { ] }], /** * @cfg {Object} options * A set of options for configuring the preview: * * @cfg {String} options.device phone, miniphone or tablet * @cfg {String} options.orientation ladscape or portrait * @cfg {Boolean} options.raw True to turn off Ext.setup(). */ options: {}, initComponent: function() { this.items = [ this.editor = Ext.create('Docs.view.examples.InlineEditor', { Loading
template/app/view/examples/InlinePreview.js +9 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,13 @@ Ext.define('Docs.view.examples.InlinePreview', { iframeId: 0 }, /** * @cfg {Object} options * A set of options for configuring the preview. * See docs of parent component. */ options: {}, initComponent: function() { this.html = this.getHtml(); Loading @@ -23,8 +30,8 @@ Ext.define('Docs.view.examples.InlinePreview', { if (Docs.touchExamplesUi) { return Ext.create('Docs.view.examples.Device', { id: this.getIframeId(), device: this.options.tablet ? "tablet" : (this.options.miniphone ? "miniphone" : "phone"), orientation: this.options.portrait ? "portrait" : "landscape" device: this.options.device, orientation: this.options.orientation }).toHtml(); } else { Loading