split script.js into a "common.js" that is useful for other pages and regular "script.js" for only the main page

pull/3/head
Marek Baczynski 6 years ago
parent 2d867f327c
commit 3518c04c09

@ -0,0 +1,18 @@
var rootURL = '/parts/'
function overlay_in() {
$('.shadow').css({'display' : 'block'});
$('.overlay').css({'display' : 'block'});
$('.shadow').animate({'opacity' : 0.7});
$('.overlay').animate({'opacity' : 1.0, 'top' : '5%'});
}
function overlay_out() {
$('.shadow').animate({'opacity' : 0.0}, function () {
$('.overlay').css({'display' : 'none'});
});
$('.overlay').animate({'opacity' : 0.0, 'top' : '0'}, function () {
$('.shadow').css({'display' : 'none'});
});
end_edit();
}

@ -1,22 +1,3 @@
var rootURL = '/parts/'
function overlay_in() {
$('.shadow').css({'display' : 'block'});
$('.overlay').css({'display' : 'block'});
$('.shadow').animate({'opacity' : 0.7});
$('.overlay').animate({'opacity' : 1.0, 'top' : '5%'});
}
function overlay_out() {
$('.shadow').animate({'opacity' : 0.0}, function () {
$('.overlay').css({'display' : 'none'});
});
$('.overlay').animate({'opacity' : 0.0, 'top' : '0'}, function () {
$('.shadow').css({'display' : 'none'});
});
end_edit();
}
function init_edit(partID) {
$('table#details tr#location td p').hide();
$('table#details tr#location td select').show();

@ -10,6 +10,7 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
<script src="https://use.fontawesome.com/2fef7be393.js"></script>
<script type="text/javascript" src="{{ url_for('static', filename='common.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='script.js') }}"></script>
</head>
<body>

Loading…
Cancel
Save