Commit 697639aa authored by Gautam Chitnis's avatar Gautam Chitnis

Refactoring : Removed need for script.js

This commit adds initialize.js file that initializes all the required elements.
It also moves the code for handling playlist close on smaller screens to playlist component.

Gautam C.
parent af40afe2
......@@ -12,13 +12,13 @@
<script src='src/vendors/vue/vue.js'></script>
<script src="src/vendors/plyr/plyr.js"></script>
<script src="src/services/command.js"></script>
<script src="src/services/initialize.js"></script>
<script src='src/components/playlist/playlist.component.js'></script>
<script src="src/components/player/plyr.methods.js"></script>
<script src='src/components/controls/menu.component.js'></script>
<script src='src/components/vlm/vlm.component.js'></script>
<script src='src/components/playlist/playlist.component.js'></script>
<script src='src/components/playlist/buttons.playlist.component.js'></script>
<script src="src/components/script.js"></script>
<script src="src/vendors/bootstrap/bootstrap.min.js"></script>
</head>
<!--
......
......@@ -53,4 +53,12 @@ function populatePlaylist()
for (var i = 0; i < data.children[0].children.length; i++) {
app.addItem(data.children[0].children[i].id, data.children[0].children[i].name, data.children[0].children[i].src);
}
}
\ No newline at end of file
}
$(document).click(function(e){
var container = $("#playlistNav");
if($(window).width() <= 480 && !container.is(e.target) && container.has(e.target).length === 0 && container.css("width") != "0px"){
closePlaylist();
}
});
\ No newline at end of file
var player;
var app;
var jsonData;
var xmlData;
var data;
$(function() { // Handler for .ready() called.
plyrInit();
vueInit();
playlistInit();
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment