improving playing sounds UI
This commit is contained in:
parent
11d6ddc1e1
commit
32b29efdcc
@ -8,8 +8,8 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"GoogleAnalyticsCode": "",
|
||||
"APIRoot": "http://localhost:3439",
|
||||
"GlobalAPIRoot": "http://localhost:3439",
|
||||
"APIRoot": "https://ganjgah.ir",
|
||||
"GlobalAPIRoot": "https://ganjgah.ir",
|
||||
"SiteUrl": "http://localhost:33081",
|
||||
"ReadOnlyMode": "False"
|
||||
}
|
||||
|
||||
@ -857,7 +857,7 @@ ol {
|
||||
src: url(https://fonts.gstatic.com/s/materialicons/v107/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
|
||||
}
|
||||
|
||||
.material-icons, .pageicons {
|
||||
.material-icons, .pageicons, .inlinebutton {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
@ -879,3 +879,12 @@ ol {
|
||||
text-indent: 0;
|
||||
color: #300;
|
||||
}
|
||||
|
||||
.inlineanchor {
|
||||
display: inline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.inlinebutton {
|
||||
color: red;
|
||||
}
|
||||
|
||||
@ -140,12 +140,10 @@ function hilightverse(vnum, clr, sc, forceScroll) {
|
||||
$('#InlinePauseButton').remove();
|
||||
}
|
||||
if (sc == true) {
|
||||
var btn = document.createElement("BUTTON");
|
||||
var btn = document.createElement("a");
|
||||
btn.id = "InlinePauseButton";
|
||||
var t = document.createTextNode(" || ");
|
||||
btn.appendChild(t);
|
||||
btn.style["display"] = "inline";
|
||||
btn.style["width"] = "25px";
|
||||
btn.setAttribute('role', 'button');
|
||||
btn.className = 'inlineanchor';
|
||||
btn.onclick = function () {
|
||||
if ($('#jquery_jplayer_1').data().jPlayer.status.paused) {
|
||||
$('#jquery_jplayer_1').data().jPlayer.play();
|
||||
@ -156,6 +154,12 @@ function hilightverse(vnum, clr, sc, forceScroll) {
|
||||
};
|
||||
element.lastChild.appendChild(btn);
|
||||
|
||||
var btnIcon = document.createElement("i");
|
||||
btnIcon.className = 'inlinebutton';
|
||||
btnIcon.innerText = 'pause_circle_filled';
|
||||
btnIcon.id = "InlinePauseButtonImage"
|
||||
btn.appendChild(btnIcon);
|
||||
|
||||
if (forceScroll)
|
||||
if (!!element && element.scrollIntoView) {
|
||||
element.scrollIntoView();
|
||||
@ -173,22 +177,27 @@ function hilightverse(vnum, clr, sc, forceScroll) {
|
||||
n++;
|
||||
if (n == vnum) {
|
||||
ptags[p].style.color = clr;
|
||||
if (ptags[p].getElementsByTagName("BUTTON").length == 1) {
|
||||
ptags[p].removeChild(ptags[p].getElementsByTagName("BUTTON")[0]);
|
||||
if ($('#InlinePauseButton') != null) {
|
||||
$('#InlinePauseButton').remove();
|
||||
}
|
||||
|
||||
if (sc == true) {
|
||||
var btn = document.createElement("BUTTON");
|
||||
var t = document.createTextNode(" || ");
|
||||
btn.appendChild(t);
|
||||
btn.style["display"] = "inline";
|
||||
btn.style["width"] = "25px";
|
||||
var btn = document.createElement("a");
|
||||
btn.setAttribute('role', 'button');
|
||||
btn.className = 'inlineanchor';
|
||||
btn.innerHTML = '<i class="inlinebutton">pause_circle_filled</i>';
|
||||
btn.onclick = function () {
|
||||
if ($('#jquery_jplayer_1').data().jPlayer.status.paused) {
|
||||
$('#jquery_jplayer_1').data().jPlayer.play();
|
||||
if ($('#InlinePauseButton') != null) {
|
||||
$('#InlinePauseButton').innerHTML = '<i class="inlinebutton">pause_circle_filled</i>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$('#jquery_jplayer_1').data().jPlayer.pause();
|
||||
if ($('#InlinePauseButton') != null) {
|
||||
$('#InlinePauseButton').innerHTML = '<i class="inlinebutton">play_circle_filled</i>';
|
||||
}
|
||||
}
|
||||
};
|
||||
ptags[p].appendChild(btn);
|
||||
@ -460,7 +469,7 @@ function checkIfBookmarked(poemId) {
|
||||
document.getElementById('bookmark-icon').innerHTML = 'star';
|
||||
}
|
||||
else {
|
||||
document.getElementById(iconElementId).innerHTML = 'star_border';
|
||||
document.getElementById('bookmark-icon').innerHTML = 'star_border';
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user