Michael 10 лет назад
Родитель
Сommit
9cf98e7c30

+ 5 - 4
src/allplatforms/classes/Compiler.js

@@ -31,10 +31,11 @@ SC.loadPackage({ 'Compiler': {
                             +'\n\t\t<link rel="stylesheet" href="/resources/css/SuperGlue.css" data-superglue="text-css">'
                             +'\n\t</head>';
                 
-                thePage += '\n\t<body style="'+ document.body.getAttribute('style')
-                                                                .replace(document.location.origin, '')
-                                                                .replace('url("', 'url(')
-                                                                .replace('");', ');')
+                thePage += '\n\t<body style="'+ (document.body.getAttribute('style')
+                                                    ? document.body.getAttribute('style').replace(document.location.origin, '')
+                                                                                         .replace('url("', 'url(')
+                                                                                         .replace('");', ');')
+                                                    : '')
 
                             +'">';
         

+ 9 - 4
src/allplatforms/classes/Element.js

@@ -247,11 +247,16 @@ SC.loadPackage({ 'Element': {
                                             : '')
                                         +'>'
 
-                            + '\n' + (this.get('contentNode').innerHTML
-                                        .split('\n')
-                                        .filter(function(line){ return line.trim() !== '' })
-                                        .join('\n'))
+                            + '\n' +    (function(innerHTML){
 
+                                            var renderedContent = innerHTML;
+
+                                            renderedContent = renderedContent.split('\n').filter(function(line){ return line.trim() !== '' });
+
+                                            return renderedContent.join('\n')
+
+                                        }).call(this, this.get('contentNode').innerHTML)
+                                        
                             
                             + indent + '</div>';
 

+ 0 - 2
src/allplatforms/classes/FileManagerWindow.js

@@ -101,8 +101,6 @@ SC.loadPackage({ 'FileManagerWindow': {
             comment: 'I hold the path that was given to me to auto-select a file / directory.',
             transform: function(path) {
 
-                console.log(path);
-                
                 if ( path ) {
                     var fullPath = path;
                     var fullPathArray = fullPath.split('/');

+ 1 - 2
testpages/empty.html

@@ -12,9 +12,8 @@
 		</style>
 		<link rel="stylesheet" href="/resources/css/SuperGlue.css" data-superglue="text-css">
 	</head>
-	<body>
+	<body style="">
 		<div id="sg-page" data-superglue-grid="off/0px">
-			
 		</div>
 	</body>
 </html>