Loading template/app/view/examples/InlinePreview.js +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ Ext.define('Docs.view.examples.InlinePreview', { // 1 ms works in Chrome, Firefox wants something bigger. Works in IE too. iframe.onload = function() { Ext.Function.defer(function() { iframe.contentWindow.refreshPage(code, options); iframe.contentWindow.loadInlineExample(code, options); }, 100); }; iframe.src = "eg-iframe.html"; Loading template/eg-iframe.html +65 −3 Original line number Diff line number Diff line Loading @@ -4,13 +4,75 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Sencha Examples</title> <script type="text/javascript" src="extjs/ext-all.js"></script> <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"> <script type="text/javascript" src="touch/sencha-touch-all.js"></script> <link rel="stylesheet" type="text/css" href="touch/resources/css/sencha-touch.css"> <style id="iframe-css" type="text/css"></style> <style type="text/css" media="screen"> html { overflow: hidden } .home { text-align: center; } .home img { width: 64%; } .home h1 { font-weight: bold; font-size: 1.2em; } .home p { color: #666; font-size: 0.8em; line-height: 1.5em; margin: 10px 20px 12px 20px; } .home h2 { color: #999; font-size: 0.7em; } .twitterView .x-dataview-item { padding: 10px; min-height: 50px; } .twitterView .x-dataview-item img { float: left; display: block; margin-top: 36px; } .twitterView .x-dataview-item h2 { font-weight: bold; color: #333; margin: 0px 0px 10px 60px; } .twitterView .x-dataview-item p { color: #666; margin-left: 60px; font-size: 0.8em; } </style> <script type="text/javascript"> var refreshPage = function(code) { function loadInlineExample(code, options) { try { document.body.innerHTML = ''; if (!options.raw) { code = "Ext.setup({onReady: function(){" + code + "}});"; } if (options.tablet) { // Scale example down to 70% size. Default font-size is 114% Ext.get('iframe-css').update("body {font-size: 79.8% !important}"); } eval(code); } catch (e) { document.body.innerHTML = e; Loading template/touch-iframe.html +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ </style> <script type="text/javascript"> var refreshPage = function(code, options) { function loadInlineExample(code, options) { try { document.body.innerHTML = ''; if (!options.raw) { Loading Loading
template/app/view/examples/InlinePreview.js +1 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ Ext.define('Docs.view.examples.InlinePreview', { // 1 ms works in Chrome, Firefox wants something bigger. Works in IE too. iframe.onload = function() { Ext.Function.defer(function() { iframe.contentWindow.refreshPage(code, options); iframe.contentWindow.loadInlineExample(code, options); }, 100); }; iframe.src = "eg-iframe.html"; Loading
template/eg-iframe.html +65 −3 Original line number Diff line number Diff line Loading @@ -4,13 +4,75 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Sencha Examples</title> <script type="text/javascript" src="extjs/ext-all.js"></script> <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"> <script type="text/javascript" src="touch/sencha-touch-all.js"></script> <link rel="stylesheet" type="text/css" href="touch/resources/css/sencha-touch.css"> <style id="iframe-css" type="text/css"></style> <style type="text/css" media="screen"> html { overflow: hidden } .home { text-align: center; } .home img { width: 64%; } .home h1 { font-weight: bold; font-size: 1.2em; } .home p { color: #666; font-size: 0.8em; line-height: 1.5em; margin: 10px 20px 12px 20px; } .home h2 { color: #999; font-size: 0.7em; } .twitterView .x-dataview-item { padding: 10px; min-height: 50px; } .twitterView .x-dataview-item img { float: left; display: block; margin-top: 36px; } .twitterView .x-dataview-item h2 { font-weight: bold; color: #333; margin: 0px 0px 10px 60px; } .twitterView .x-dataview-item p { color: #666; margin-left: 60px; font-size: 0.8em; } </style> <script type="text/javascript"> var refreshPage = function(code) { function loadInlineExample(code, options) { try { document.body.innerHTML = ''; if (!options.raw) { code = "Ext.setup({onReady: function(){" + code + "}});"; } if (options.tablet) { // Scale example down to 70% size. Default font-size is 114% Ext.get('iframe-css').update("body {font-size: 79.8% !important}"); } eval(code); } catch (e) { document.body.innerHTML = e; Loading
template/touch-iframe.html +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ </style> <script type="text/javascript"> var refreshPage = function(code, options) { function loadInlineExample(code, options) { try { document.body.innerHTML = ''; if (!options.raw) { Loading