Minor fixes
Added all missing semicolons in scripts.js
This commit is contained in:
@@ -117,7 +117,7 @@ function handleJsIds() {
|
|||||||
handleModalIds();
|
handleModalIds();
|
||||||
handleAccordionIds();
|
handleAccordionIds();
|
||||||
handleCarouselIds();
|
handleCarouselIds();
|
||||||
handleTabsIds()
|
handleTabsIds();
|
||||||
}
|
}
|
||||||
function handleAccordionIds() {
|
function handleAccordionIds() {
|
||||||
var e = $(".demo #myAccordion");
|
var e = $(".demo #myAccordion");
|
||||||
@@ -129,12 +129,12 @@ function handleAccordionIds() {
|
|||||||
r = "accordion-element-" + randomNumber();
|
r = "accordion-element-" + randomNumber();
|
||||||
$(t).find(".accordion-toggle").each(function(e, t) {
|
$(t).find(".accordion-toggle").each(function(e, t) {
|
||||||
$(t).attr("data-parent", "#" + n);
|
$(t).attr("data-parent", "#" + n);
|
||||||
$(t).attr("href", "#" + r)
|
$(t).attr("href", "#" + r);
|
||||||
});
|
});
|
||||||
$(t).find(".accordion-body").each(function(e, t) {
|
$(t).find(".accordion-body").each(function(e, t) {
|
||||||
$(t).attr("id", r)
|
$(t).attr("id", r);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
function handleCarouselIds() {
|
function handleCarouselIds() {
|
||||||
var e = $(".demo #myCarousel");
|
var e = $(".demo #myCarousel");
|
||||||
@@ -142,10 +142,10 @@ function handleCarouselIds() {
|
|||||||
var n = "carousel-" + t;
|
var n = "carousel-" + t;
|
||||||
e.attr("id", n);
|
e.attr("id", n);
|
||||||
e.find(".carousel-indicators li").each(function(e, t) {
|
e.find(".carousel-indicators li").each(function(e, t) {
|
||||||
$(t).attr("data-target", "#" + n)
|
$(t).attr("data-target", "#" + n);
|
||||||
});
|
});
|
||||||
e.find(".left").attr("href", "#" + n);
|
e.find(".left").attr("href", "#" + n);
|
||||||
e.find(".right").attr("href", "#" + n)
|
e.find(".right").attr("href", "#" + n);
|
||||||
}
|
}
|
||||||
function handleModalIds() {
|
function handleModalIds() {
|
||||||
var e = $(".demo #myModalLink");
|
var e = $(".demo #myModalLink");
|
||||||
@@ -154,7 +154,7 @@ function handleModalIds() {
|
|||||||
var r = "modal-" + t;
|
var r = "modal-" + t;
|
||||||
e.attr("id", r);
|
e.attr("id", r);
|
||||||
e.attr("href", "#" + n);
|
e.attr("href", "#" + n);
|
||||||
e.next().attr("id", n)
|
e.next().attr("id", n);
|
||||||
}
|
}
|
||||||
function handleTabsIds() {
|
function handleTabsIds() {
|
||||||
var e = $(".demo #myTabs");
|
var e = $(".demo #myTabs");
|
||||||
@@ -165,14 +165,14 @@ function handleTabsIds() {
|
|||||||
var n = $(t).attr("id");
|
var n = $(t).attr("id");
|
||||||
var r = "panel-" + randomNumber();
|
var r = "panel-" + randomNumber();
|
||||||
$(t).attr("id", r);
|
$(t).attr("id", r);
|
||||||
$(t).parent().parent().find("a[href=#" + n + "]").attr("href", "#" + r)
|
$(t).parent().parent().find("a[href=#" + n + "]").attr("href", "#" + r);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
function randomNumber() {
|
function randomNumber() {
|
||||||
return randomFromInterval(1, 1e6)
|
return randomFromInterval(1, 1e6);
|
||||||
}
|
}
|
||||||
function randomFromInterval(e, t) {
|
function randomFromInterval(e, t) {
|
||||||
return Math.floor(Math.random() * (t - e + 1) + e)
|
return Math.floor(Math.random() * (t - e + 1) + e);
|
||||||
}
|
}
|
||||||
function gridSystemGenerator() {
|
function gridSystemGenerator() {
|
||||||
$(".lyrow .preview input").bind("keyup", function() {
|
$(".lyrow .preview input").bind("keyup", function() {
|
||||||
@@ -181,22 +181,22 @@ function gridSystemGenerator() {
|
|||||||
var n = $(this).val().split(" ", 12);
|
var n = $(this).val().split(" ", 12);
|
||||||
$.each(n, function(n, r) {
|
$.each(n, function(n, r) {
|
||||||
e = e + parseInt(r);
|
e = e + parseInt(r);
|
||||||
t += '<div class="span' + r + ' column"></div>'
|
t += '<div class="span' + r + ' column"></div>';
|
||||||
});
|
});
|
||||||
if (e == 12) {
|
if (e == 12) {
|
||||||
$(this).parent().next().children().html(t);
|
$(this).parent().next().children().html(t);
|
||||||
$(this).parent().prev().show()
|
$(this).parent().prev().show();
|
||||||
} else {
|
} else {
|
||||||
$(this).parent().prev().hide()
|
$(this).parent().prev().hide();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
function configurationElm(e, t) {
|
function configurationElm(e, t) {
|
||||||
$(".demo").delegate(".configuration > a", "click", function(e) {
|
$(".demo").delegate(".configuration > a", "click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var t = $(this).parent().next().next().children();
|
var t = $(this).parent().next().next().children();
|
||||||
$(this).toggleClass("active");
|
$(this).toggleClass("active");
|
||||||
t.toggleClass($(this).attr("rel"))
|
t.toggleClass($(this).attr("rel"));
|
||||||
});
|
});
|
||||||
$(".demo").delegate(".configuration .dropdown-menu a", "click", function(e) {
|
$(".demo").delegate(".configuration .dropdown-menu a", "click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -206,21 +206,21 @@ function configurationElm(e, t) {
|
|||||||
$(this).parent().addClass("active");
|
$(this).parent().addClass("active");
|
||||||
var r = "";
|
var r = "";
|
||||||
t.find("a").each(function() {
|
t.find("a").each(function() {
|
||||||
r += $(this).attr("rel") + " "
|
r += $(this).attr("rel") + " ";
|
||||||
});
|
});
|
||||||
t.parent().removeClass("open");
|
t.parent().removeClass("open");
|
||||||
n.removeClass(r);
|
n.removeClass(r);
|
||||||
n.addClass($(this).attr("rel"))
|
n.addClass($(this).attr("rel"));
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
function removeElm() {
|
function removeElm() {
|
||||||
$(".demo").delegate(".remove", "click", function(e) {
|
$(".demo").delegate(".remove", "click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).parent().remove();
|
$(this).parent().remove();
|
||||||
if (!$(".demo .lyrow").length > 0) {
|
if (!$(".demo .lyrow").length > 0) {
|
||||||
clearDemo()
|
clearDemo();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
function clearDemo() {
|
function clearDemo() {
|
||||||
$(".demo").empty();
|
$(".demo").empty();
|
||||||
@@ -229,13 +229,13 @@ function clearDemo() {
|
|||||||
localStorage.removeItem("layoutdata");
|
localStorage.removeItem("layoutdata");
|
||||||
}
|
}
|
||||||
function removeMenuClasses() {
|
function removeMenuClasses() {
|
||||||
$("#menu-layoutit li button").removeClass("active")
|
$("#menu-layoutit li button").removeClass("active");
|
||||||
}
|
}
|
||||||
function changeStructure(e, t) {
|
function changeStructure(e, t) {
|
||||||
$("#download-layout ." + e).removeClass(e).addClass(t)
|
$("#download-layout ." + e).removeClass(e).addClass(t);
|
||||||
}
|
}
|
||||||
function cleanHtml(e) {
|
function cleanHtml(e) {
|
||||||
$(e).parent().append($(e).children().html())
|
$(e).parent().append($(e).children().html());
|
||||||
}
|
}
|
||||||
function downloadLayoutSrc() {
|
function downloadLayoutSrc() {
|
||||||
var e = "";
|
var e = "";
|
||||||
@@ -245,28 +245,28 @@ function downloadLayoutSrc() {
|
|||||||
t.find(".lyrow").addClass("removeClean");
|
t.find(".lyrow").addClass("removeClean");
|
||||||
t.find(".box-element").addClass("removeClean");
|
t.find(".box-element").addClass("removeClean");
|
||||||
t.find(".lyrow .lyrow .lyrow .lyrow .lyrow .removeClean").each(function() {
|
t.find(".lyrow .lyrow .lyrow .lyrow .lyrow .removeClean").each(function() {
|
||||||
cleanHtml(this)
|
cleanHtml(this);
|
||||||
});
|
});
|
||||||
t.find(".lyrow .lyrow .lyrow .lyrow .removeClean").each(function() {
|
t.find(".lyrow .lyrow .lyrow .lyrow .removeClean").each(function() {
|
||||||
cleanHtml(this)
|
cleanHtml(this);
|
||||||
});
|
});
|
||||||
t.find(".lyrow .lyrow .lyrow .removeClean").each(function() {
|
t.find(".lyrow .lyrow .lyrow .removeClean").each(function() {
|
||||||
cleanHtml(this)
|
cleanHtml(this);
|
||||||
});
|
});
|
||||||
t.find(".lyrow .lyrow .removeClean").each(function() {
|
t.find(".lyrow .lyrow .removeClean").each(function() {
|
||||||
cleanHtml(this)
|
cleanHtml(this);
|
||||||
});
|
});
|
||||||
t.find(".lyrow .removeClean").each(function() {
|
t.find(".lyrow .removeClean").each(function() {
|
||||||
cleanHtml(this)
|
cleanHtml(this);
|
||||||
});
|
});
|
||||||
t.find(".removeClean").each(function() {
|
t.find(".removeClean").each(function() {
|
||||||
cleanHtml(this)
|
cleanHtml(this);
|
||||||
});
|
});
|
||||||
t.find(".removeClean").remove();
|
t.find(".removeClean").remove();
|
||||||
$("#download-layout .column").removeClass("ui-sortable");
|
$("#download-layout .column").removeClass("ui-sortable");
|
||||||
$("#download-layout .row-fluid").removeClass("clearfix").children().removeClass("column");
|
$("#download-layout .row-fluid").removeClass("clearfix").children().removeClass("column");
|
||||||
if ($("#download-layout .container").length > 0) {
|
if ($("#download-layout .container").length > 0) {
|
||||||
changeStructure("row-fluid", "row")
|
changeStructure("row-fluid", "row");
|
||||||
}
|
}
|
||||||
formatSrc = $.htmlClean($("#download-layout").html(), {
|
formatSrc = $.htmlClean($("#download-layout").html(), {
|
||||||
format: true,
|
format: true,
|
||||||
@@ -286,7 +286,7 @@ function downloadLayoutSrc() {
|
|||||||
});
|
});
|
||||||
$("#download-layout").html(formatSrc);
|
$("#download-layout").html(formatSrc);
|
||||||
$("#downloadModal textarea").empty();
|
$("#downloadModal textarea").empty();
|
||||||
$("#downloadModal textarea").val(formatSrc)
|
$("#downloadModal textarea").val(formatSrc);
|
||||||
webpage = formatSrc;
|
webpage = formatSrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,7 +345,7 @@ $(document).ready(function() {
|
|||||||
startdrag = 1;
|
startdrag = 1;
|
||||||
},
|
},
|
||||||
drag: function(e, t) {
|
drag: function(e, t) {
|
||||||
t.helper.width(400)
|
t.helper.width(400);
|
||||||
},
|
},
|
||||||
stop: function(e, t) {
|
stop: function(e, t) {
|
||||||
$(".demo .column").sortable({
|
$(".demo .column").sortable({
|
||||||
@@ -373,7 +373,7 @@ $(document).ready(function() {
|
|||||||
startdrag = 1;
|
startdrag = 1;
|
||||||
},
|
},
|
||||||
drag: function(e, t) {
|
drag: function(e, t) {
|
||||||
t.helper.width(400)
|
t.helper.width(400);
|
||||||
},
|
},
|
||||||
stop: function() {
|
stop: function() {
|
||||||
handleJsIds();
|
handleJsIds();
|
||||||
@@ -402,54 +402,54 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
$("#download").click(function() {
|
$("#download").click(function() {
|
||||||
downloadLayout();
|
downloadLayout();
|
||||||
return false
|
return false;
|
||||||
});
|
});
|
||||||
$("#downloadhtml").click(function() {
|
$("#downloadhtml").click(function() {
|
||||||
downloadHtmlLayout();
|
downloadHtmlLayout();
|
||||||
return false
|
return false;
|
||||||
});
|
});
|
||||||
$("#edit").click(function() {
|
$("#edit").click(function() {
|
||||||
$("body").removeClass("devpreview sourcepreview");
|
$("body").removeClass("devpreview sourcepreview");
|
||||||
$("body").addClass("edit");
|
$("body").addClass("edit");
|
||||||
removeMenuClasses();
|
removeMenuClasses();
|
||||||
$(this).addClass("active");
|
$(this).addClass("active");
|
||||||
return false
|
return false;
|
||||||
});
|
});
|
||||||
$("#clear").click(function(e) {
|
$("#clear").click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
clearDemo()
|
clearDemo();
|
||||||
});
|
});
|
||||||
$("#devpreview").click(function() {
|
$("#devpreview").click(function() {
|
||||||
$("body").removeClass("edit sourcepreview");
|
$("body").removeClass("edit sourcepreview");
|
||||||
$("body").addClass("devpreview");
|
$("body").addClass("devpreview");
|
||||||
removeMenuClasses();
|
removeMenuClasses();
|
||||||
$(this).addClass("active");
|
$(this).addClass("active");
|
||||||
return false
|
return false;
|
||||||
});
|
});
|
||||||
$("#sourcepreview").click(function() {
|
$("#sourcepreview").click(function() {
|
||||||
$("body").removeClass("edit");
|
$("body").removeClass("edit");
|
||||||
$("body").addClass("devpreview sourcepreview");
|
$("body").addClass("devpreview sourcepreview");
|
||||||
removeMenuClasses();
|
removeMenuClasses();
|
||||||
$(this).addClass("active");
|
$(this).addClass("active");
|
||||||
return false
|
return false;
|
||||||
});
|
});
|
||||||
$("#fluidPage").click(function(e) {
|
$("#fluidPage").click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
changeStructure("container", "container-fluid");
|
changeStructure("container", "container-fluid");
|
||||||
$("#fixedPage").removeClass("active");
|
$("#fixedPage").removeClass("active");
|
||||||
$(this).addClass("active");
|
$(this).addClass("active");
|
||||||
downloadLayoutSrc()
|
downloadLayoutSrc();
|
||||||
});
|
});
|
||||||
$("#fixedPage").click(function(e) {
|
$("#fixedPage").click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
changeStructure("container-fluid", "container");
|
changeStructure("container-fluid", "container");
|
||||||
$("#fluidPage").removeClass("active");
|
$("#fluidPage").removeClass("active");
|
||||||
$(this).addClass("active");
|
$(this).addClass("active");
|
||||||
downloadLayoutSrc()
|
downloadLayoutSrc();
|
||||||
});
|
});
|
||||||
$(".nav-header").click(function() {
|
$(".nav-header").click(function() {
|
||||||
$(".sidebar-nav .boxes, .sidebar-nav .rows").hide();
|
$(".sidebar-nav .boxes, .sidebar-nav .rows").hide();
|
||||||
$(this).next().slideDown()
|
$(this).next().slideDown();
|
||||||
});
|
});
|
||||||
$('#undo').click(function(){
|
$('#undo').click(function(){
|
||||||
stopsave++;
|
stopsave++;
|
||||||
@@ -464,8 +464,8 @@ $(document).ready(function() {
|
|||||||
removeElm();
|
removeElm();
|
||||||
gridSystemGenerator();
|
gridSystemGenerator();
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
handleSaveLayout()
|
handleSaveLayout();
|
||||||
}, timerSave)
|
}, timerSave);
|
||||||
$('.popover-info').hover(function(){
|
$('.popover-info').hover(function(){
|
||||||
$('.sidebar-nav').css('overflow', 'inherit');
|
$('.sidebar-nav').css('overflow', 'inherit');
|
||||||
}, function(){
|
}, function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user