Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions js/qcode.alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@
var qcode = qcode || {};

(function($, undefined) {
var ding;
var alertQueue = [];
var timeoutID;
$(function() {
if ( qcode.Sound.supported ) {
ding = new qcode.Sound('/Sounds/Windows%20Ding.wav');
}
});

function showNextMessage() {
if ( alertQueue.length > 0 && timeoutID === undefined ) {
Expand Down Expand Up @@ -69,12 +63,13 @@ var qcode = qcode || {};
showNextMessage();
}
});
if ( qcode.Sound && qcode.Sound.supported ) {
ding.play();
if ( qcode.Sound && qcode.Sound.supported && qcode.alert.config.sound ) {
qcode.alert.config.sound.play();
}
});
showNextMessage();
}
qcode.alert.config = {};

qcode.confirm = function(message, onConfirm) {
alertQueue.push(function() {
Expand Down Expand Up @@ -125,10 +120,11 @@ var qcode = qcode || {};
showNextMessage();
}
});
if ( qcode.Sound && qcode.Sound.supported ) {
ding.play();
if ( qcode.Sound && qcode.Sound.supported && qcode.confirm.config.sound ) {
qcode.confirm.config.sound.play();
}
});
showNextMessage();
}
qcode.confirm.config = {};
})(jQuery);
16 changes: 6 additions & 10 deletions qcode-ui-3.12.5.js → qcode-ui-3.13.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -8651,14 +8651,8 @@ function preloadImages() {
var qcode = qcode || {};

(function($, undefined) {
var ding;
var alertQueue = [];
var timeoutID;
$(function() {
if ( qcode.Sound.supported ) {
ding = new qcode.Sound('/Sounds/Windows%20Ding.wav');
}
});

function showNextMessage() {
if ( alertQueue.length > 0 && timeoutID === undefined ) {
Expand Down Expand Up @@ -8703,12 +8697,13 @@ var qcode = qcode || {};
showNextMessage();
}
});
if ( qcode.Sound && qcode.Sound.supported ) {
ding.play();
if ( qcode.Sound && qcode.Sound.supported && qcode.alert.config.sound ) {
qcode.alert.config.sound.play();
}
});
showNextMessage();
}
qcode.alert.config = {};

qcode.confirm = function(message, onConfirm) {
alertQueue.push(function() {
Expand Down Expand Up @@ -8759,12 +8754,13 @@ var qcode = qcode || {};
showNextMessage();
}
});
if ( qcode.Sound && qcode.Sound.supported ) {
ding.play();
if ( qcode.Sound && qcode.Sound.supported && qcode.confirm.config.sound ) {
qcode.confirm.config.sound.play();
}
});
showNextMessage();
}
qcode.confirm.config = {};
})(jQuery);

/* ==== qcode.sound.js ==== */
Expand Down