Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
2 changed files with 35 additions and 1 deletions
Showing only changes of commit 3331dc20ec - Show all commits

View File

@ -413,3 +413,19 @@ body.mobile footer{
#reset{
margin-top: 60px;
}
#msg{
display: none;
width: 200px;
height: 44px;
border-radius: 6px;
position: fixed;
left: 50%;
margin-left: -100px;
margin-top: 45px;
background: rgba(100, 100, 100, 0.5);
color: #fff;
text-shadow: 1px 1px 0px #000;
}
#msg.active{
display: block;
}

View File

@ -275,15 +275,33 @@ UI.spinner.opts = {
UI.spinner.init = function () {
const spinner = new Spinner(UI.spinner.opts).spin(UI.spinner.elem);
};
UI.spinner.show = function () {
UI.spinner.show = function (text) {
if (!UI.spinner.elem.classList.contains('active')) {
UI.spinner.elem.classList.add('active');
}
if (text) {
UI.message.show(text)
}
};
UI.spinner.hide = function () {
if (UI.spinner.elem.classList.contains('active')) {
UI.spinner.elem.classList.remove('active');
}
};
UI.message = {
elem : document.getElementById('msg')
};
UI.message.show = function (text) {
UI.message.elem.innerHTML = text
if (!UI.message.elem.classList.contains('active')) {
UI.message.elem.classList.add('active');
}
};
UI.message.hide = function () {
if (UI.message.elem.classList.contains('active')) {
UI.message.elem.classList.remove('active');
}
};
var init = function () {