+
Dialog
@@ -54,6 +54,12 @@
+
History
diff --git a/frontend/public/js/core.js b/frontend/public/js/core.js
index a701d54..0a183fa 100644
--- a/frontend/public/js/core.js
+++ b/frontend/public/js/core.js
@@ -64,9 +64,19 @@ $('.closePane, .dialogButton').click(function(){
$(".pane").draggable({ containment: $(document.body), scroll: false , opacity: 0.35}); //http://api.jqueryui.com/draggable/#option-containment
function dialog(title,message){
- $('.dialog header h1').html(title);
- $('.dialog p').html(message);
- $('#paneCover, .dialog').fadeToggle(200);
+ $('.dialog.closeable header h1').html(title);
+ $('.dialog.closeable p').html(message);
+ $('#paneCover, .dialog.closeable').fadeToggle(200);
+}
+function non_close_dialog(title,message){
+ $('.dialog.noncloseable header h1').html(title);
+ $('.dialog.noncloseable p').html(message);
+ $('#paneCover, .dialog.noncloseable').fadeToggle(200);
+
+ return function() {
+ $('#paneCover').fadeOut(200);
+ $('.dialog.noncloseable').fadeOut(200);
+ };
}
$('#notiToggle').click(function(){
diff --git a/frontend/public/js/hanasu/hanasu.js b/frontend/public/js/hanasu/hanasu.js
index b60f85f..4137b04 100644
--- a/frontend/public/js/hanasu/hanasu.js
+++ b/frontend/public/js/hanasu/hanasu.js
@@ -39,6 +39,9 @@ var Hanasu = (function () {
}
Hanasu.prototype.setPlayStatus(false);
Hanasu.prototype.clearSongInfo();
+ if(Hanasu.prototype.loadingScreenHandle != "null") {
+ Hanasu.prototype.loadingScreenHandle();
+ }
}
});
} else {
@@ -63,6 +66,9 @@ var Hanasu = (function () {
Hanasu.prototype.stationTimer.play();
}
Hanasu.prototype.retrieveCurrentStationData(false);
+ if(Hanasu.prototype.loadingScreenHandle != "null") {
+ Hanasu.prototype.loadingScreenHandle();
+ }
});
$("#jquery_jplayer").bind($.jPlayer.event.ended, function (event) {
Hanasu.prototype.setPlayStatus(false);
@@ -222,6 +228,7 @@ var Hanasu = (function () {
Hanasu.prototype.stopStation(true);
}
Hanasu.prototype.obtainNotificationsPermission();
+ Hanasu.prototype.loadingScreenHandle = non_close_dialog("Connecting...", "One moment please...");
if(station.PlaylistExt == '') {
Hanasu.prototype._playStation(station, station.Stream);
} else {
diff --git a/frontend/public/js/hanasu/hanasu.ts b/frontend/public/js/hanasu/hanasu.ts
index fcf2411..3f560bd 100644
--- a/frontend/public/js/hanasu/hanasu.ts
+++ b/frontend/public/js/hanasu/hanasu.ts
@@ -30,6 +30,8 @@ class Hanasu {
public CurrentStation: Station;
public NotificationToggled: bool;
+ private loadingScreenHandle: any;
+
public initializeApplication(isMobile: bool = false) {
//any important starting procedures, we can put here.
@@ -78,6 +80,11 @@ class Hanasu {
Hanasu.prototype.setPlayStatus(false);
Hanasu.prototype.clearSongInfo();
+
+
+ if (Hanasu.prototype.loadingScreenHandle != "null") {
+ Hanasu.prototype.loadingScreenHandle();
+ }
}
});
} else {
@@ -105,6 +112,10 @@ class Hanasu {
}
Hanasu.prototype.retrieveCurrentStationData(false); //Grabs the song title and artist name in depending on what the Station ServerType is.
+
+ if (Hanasu.prototype.loadingScreenHandle != "null") {
+ Hanasu.prototype.loadingScreenHandle();
+ }
});
$("#jquery_jplayer").bind($.jPlayer.event.ended, function(event) {
@@ -330,6 +341,8 @@ class Hanasu {
Hanasu.prototype.obtainNotificationsPermission();
+ Hanasu.prototype.loadingScreenHandle = non_close_dialog("Connecting...","One moment please...");
+
// Checks if the station requires any pre-processing.
if (station.PlaylistExt == '') {
Hanasu.prototype._playStation(station, station.Stream); //Plays the station since it is not a playlist, but is a direct stream.