This commit is contained in:
Jesus Herman
2015-12-04 15:04:17 +01:00
2 changed files with 33 additions and 34 deletions

View File

@@ -43,7 +43,7 @@
</style> </style>
</head> </head>
<body style="min-height: 660px; cursor: auto;" class="edit toolbox-reset"> <body style="cursor: auto;" class="edit toolbox-reset">
<div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container-fluid"> <div class="container-fluid">
@@ -72,7 +72,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<!--/.nav-collapse -->
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,9 +1,9 @@
var webpage = ""; var webpage = "";
function supportstorage() { function supportstorage() {
if (typeof window.localStorage=='object') if (typeof window.localStorage=='object')
return true; return true;
else else
return false; return false;
} }
function handleSaveLayout() { function handleSaveLayout() {
@@ -16,7 +16,7 @@ function handleSaveLayout() {
} }
} }
var layouthistory; var layouthistory;
function saveLayout(){ function saveLayout(){
var data = layouthistory; var data = layouthistory;
if (!data) { if (!data) {
@@ -35,10 +35,10 @@ function saveLayout(){
} }
layouthistory = data; layouthistory = data;
//console.log(data); //console.log(data);
/*$.ajax({ /*$.ajax({
type: "POST", type: "POST",
url: "/build/saveLayout", url: "/build/saveLayout",
data: { layout: $('.demo').html() }, data: { layout: $('.demo').html() },
success: function(data) { success: function(data) {
//updateButtonsVisibility(); //updateButtonsVisibility();
} }
@@ -46,20 +46,20 @@ function saveLayout(){
} }
function downloadLayout(){ function downloadLayout(){
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/build/downloadLayout", url: "/build/downloadLayout",
data: { layout: $('#download-layout').html() }, data: { layout: $('#download-layout').html() },
success: function(data) { window.location.href = '/build/download'; } success: function(data) { window.location.href = '/build/download'; }
}); });
} }
function downloadHtmlLayout(){ function downloadHtmlLayout(){
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/build/downloadLayout", url: "/build/downloadLayout",
data: { layout: $('#download-layout').html() }, data: { layout: $('#download-layout').html() },
success: function(data) { window.location.href = '/build/downloadHtml'; } success: function(data) { window.location.href = '/build/downloadHtml'; }
}); });
} }
@@ -78,10 +78,10 @@ function undoLayout() {
return true; return true;
} }
return false; return false;
/*$.ajax({ /*$.ajax({
type: "POST", type: "POST",
url: "/build/getPreviousLayout", url: "/build/getPreviousLayout",
data: { }, data: { },
success: function(data) { success: function(data) {
undoOperation(data); undoOperation(data);
} }
@@ -103,10 +103,10 @@ function redoLayout() {
} }
return false; return false;
/* /*
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/build/getPreviousLayout", url: "/build/getPreviousLayout",
data: { }, data: { },
success: function(data) { success: function(data) {
redoOperation(data); redoOperation(data);
} }
@@ -296,10 +296,10 @@ var stopsave = 0;
var startdrag = 0; var startdrag = 0;
var demoHtml = $(".demo").html(); var demoHtml = $(".demo").html();
var currenteditor = null; var currenteditor = null;
$(window).resize(function() { // $(window).resize(function() {
$("body").css("min-height", $(window).height() - 90); // $("body").css("min-height", $(window).height() - 90);
$(".demo").css("min-height", $(window).height() - 160) // $(".demo").css("min-height", $(window).height() - 160)
}); // });
function restoreData(){ function restoreData(){
if (supportstorage()) { if (supportstorage()) {
@@ -334,8 +334,8 @@ $(document).ready(function() {
contentsCss: ['css/bootstrap-combined.min.css'], contentsCss: ['css/bootstrap-combined.min.css'],
allowedContent: true allowedContent: true
}); });
$("body").css("min-height", $(window).height() - 50); // $("body").css("min-height", $(window).height() - 50);
$(".demo").css("min-height", $(window).height() - 130); // $(".demo").css("min-height", $(window).height() - 130);
$(".sidebar-nav .lyrow").draggable({ $(".sidebar-nav .lyrow").draggable({
connectToSortable: ".demo", connectToSortable: ".demo",
helper: "clone", helper: "clone",
@@ -468,7 +468,7 @@ $(document).ready(function() {
}, timerSave) }, timerSave)
}) })
function saveHtml() function saveHtml()
{ {
webpage = '<html>\n<head>\n<script type="text/javascript" src="http://www.francescomalagrino.com/BootstrapPageGenerator/3/js/jquery-2.0.0.min.js"></script>\n<script type="text/javascript" src="http://www.francescomalagrino.com/BootstrapPageGenerator/3/js/jquery-ui"></script>\n<link href="http://www.francescomalagrino.com/BootstrapPageGenerator/3/css/bootstrap-combined.min.css" rel="stylesheet" media="screen">\n<script type="text/javascript" src="http://www.francescomalagrino.com/BootstrapPageGenerator/3/js/bootstrap.min.js"></script>\n</head>\n<body>\n'+ webpage +'\n</body>\n</html>' webpage = '<html>\n<head>\n<script type="text/javascript" src="http://www.francescomalagrino.com/BootstrapPageGenerator/3/js/jquery-2.0.0.min.js"></script>\n<script type="text/javascript" src="http://www.francescomalagrino.com/BootstrapPageGenerator/3/js/jquery-ui"></script>\n<link href="http://www.francescomalagrino.com/BootstrapPageGenerator/3/css/bootstrap-combined.min.css" rel="stylesheet" media="screen">\n<script type="text/javascript" src="http://www.francescomalagrino.com/BootstrapPageGenerator/3/js/bootstrap.min.js"></script>\n</head>\n<body>\n'+ webpage +'\n</body>\n</html>'
/* FM aka Vegetam Added the function that save the file in the directory Downloads. Work only to Chrome Firefox And IE*/ /* FM aka Vegetam Added the function that save the file in the directory Downloads. Work only to Chrome Firefox And IE*/
@@ -499,4 +499,3 @@ function saveHtml()
saveAs(blob, "webpage.html"); saveAs(blob, "webpage.html");
} }
} }