mirror of
https://github.com/taroved/pol
synced 2025-05-29 12:30:09 -07:00
spinner
This commit is contained in:
parent
f63531fdd1
commit
2a81c5d5c9
@ -188,6 +188,7 @@ function Item(name, button) {
|
|||||||
|
|
||||||
function updateSelection() {
|
function updateSelection() {
|
||||||
//todo: freeze UI
|
//todo: freeze UI
|
||||||
|
loader(true);
|
||||||
return requestSelection().then(function(data){
|
return requestSelection().then(function(data){
|
||||||
// go by items
|
// go by items
|
||||||
for (var name in data) {
|
for (var name in data) {
|
||||||
@ -209,9 +210,11 @@ function Item(name, button) {
|
|||||||
// remove all hover styles
|
// remove all hover styles
|
||||||
styleTool.unstyleAll('hover');
|
styleTool.unstyleAll('hover');
|
||||||
}
|
}
|
||||||
|
loader(false);
|
||||||
return {};
|
return {};
|
||||||
}, function(error){
|
}, function(error){
|
||||||
//todo: unfreez UI
|
//unfreez UI
|
||||||
|
loader(false);
|
||||||
console.log('Server error: '+ error);
|
console.log('Server error: '+ error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -415,11 +418,14 @@ function updateCreateButton() {
|
|||||||
function onCreateButtonClick() {
|
function onCreateButtonClick() {
|
||||||
var active = !$('#create').hasClass('disabled');
|
var active = !$('#create').hasClass('disabled');
|
||||||
if (active)
|
if (active)
|
||||||
//todo: freeze UI
|
//freeze UI
|
||||||
|
loader(true);
|
||||||
createFeed().then(function(feed_page_url){
|
createFeed().then(function(feed_page_url){
|
||||||
window.location.href = feed_page_url;
|
window.location.href = feed_page_url;
|
||||||
|
loader(false);
|
||||||
}, function(error){
|
}, function(error){
|
||||||
//todo: unfreez UI
|
//unfreez UI
|
||||||
|
loader(false);
|
||||||
console.log('Server error: '+ error);
|
console.log('Server error: '+ error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -457,6 +463,10 @@ function createFeed() {
|
|||||||
// ++++ Create button logic
|
// ++++ Create button logic
|
||||||
////
|
////
|
||||||
|
|
||||||
|
// Spinner
|
||||||
|
function loader(show) {
|
||||||
|
document.getElementById("loader-bg").style.display = show ? "block" : "none";
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
items['title'] = new Item('title', $('#st-title')[0]);
|
items['title'] = new Item('title', $('#st-title')[0]);
|
||||||
|
@ -35,4 +35,43 @@
|
|||||||
color: white;
|
color: white;
|
||||||
border: none; }
|
border: none; }
|
||||||
|
|
||||||
|
/* Loader background */
|
||||||
|
#loader-bg {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0%;
|
||||||
|
top: 0%;
|
||||||
|
z-index: 1;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(255, 255, 255, 0.5); }
|
||||||
|
|
||||||
|
/* Center the loader */
|
||||||
|
#loader {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
z-index: 1;
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
margin: -75px 0 0 -75px;
|
||||||
|
border: 16px solid #f3f3f3;
|
||||||
|
border-radius: 50%;
|
||||||
|
border-top: 16px solid #3498db;
|
||||||
|
width: 120px;
|
||||||
|
height: 120px;
|
||||||
|
-webkit-animation: spin 2s linear infinite;
|
||||||
|
animation: spin 2s linear infinite; }
|
||||||
|
|
||||||
|
@-webkit-keyframes spin {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg); }
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg); } }
|
||||||
|
@keyframes spin {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg); }
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg); } }
|
||||||
|
|
||||||
/*# sourceMappingURL=wizard.css.css.map */
|
/*# sourceMappingURL=wizard.css.css.map */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"mappings": "AAGA,OAAQ;EAIN,MAAM,EAAE,MAAM;E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,QAAQ;EAClB,IAAI,EAAE,EAAE;EACR,GAAG,EAAE,EAAE;EACP,OAAO,EAAE,CAAC;EACV,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,gBAAgB,EAAE,wBAAqB;;AAEzC,uBAAuB;AACvB,OAAQ;EACN,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAE,GAAG;EACT,GAAG,EAAE,GAAG;EACR,OAAO,EAAE,CAAC;EACV,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,KAAK;EACb,MAAM,EAAE,eAAe;EACvB,MAAM,EAAE,kBAAkB;EAC1B,aAAa,EAAE,GAAG;EAClB,UAAU,EAAE,kBAAkB;EAC9B,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,KAAK;EACb,iBAAiB,EAAE,uBAAuB;EAC1C,SAAS,EAAE,uBAAuB;;AAGpC,uBAGC;EAFC,EAAG;IAAE,iBAAiB,EAAE,YAAY;EACpC,IAAK;IAAE,iBAAiB,EAAE,cAAc;AAG1C,eAGC;EAFC,EAAG;IAAE,SAAS,EAAE,YAAY;EAC5B,IAAK;IAAE,SAAS,EAAE,cAAc",
|
||||||
"sources": ["wizard.css.scss"],
|
"sources": ["wizard.css.scss"],
|
||||||
"names": [],
|
"names": [],
|
||||||
"file": "wizard.css.css"
|
"file": "wizard.css.css"
|
||||||
|
@ -63,4 +63,45 @@
|
|||||||
background: gray;
|
background: gray;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Loader background */
|
||||||
|
#loader-bg {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0%;
|
||||||
|
top: 0%;
|
||||||
|
z-index: 1;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(255,255,255,0.5);
|
||||||
|
}
|
||||||
|
/* Center the loader */
|
||||||
|
#loader {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
z-index: 1;
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
margin: -75px 0 0 -75px;
|
||||||
|
border: 16px solid #f3f3f3;
|
||||||
|
border-radius: 50%;
|
||||||
|
border-top: 16px solid #3498db;
|
||||||
|
width: 120px;
|
||||||
|
height: 120px;
|
||||||
|
-webkit-animation: spin 2s linear infinite;
|
||||||
|
animation: spin 2s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes spin {
|
||||||
|
0% { -webkit-transform: rotate(0deg); }
|
||||||
|
100% { -webkit-transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
0% { transform: rotate(0deg); }
|
||||||
|
100% { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
{% load i18n %}_
|
{% load i18n %}_
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div id="loader-bg"><div id="loader"></div></div>
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<!--h1 style="display: inline">Feed setup:</h1-->
|
<!--h1 style="display: inline">Feed setup:</h1-->
|
||||||
<h2 style="display: inline" id="setup-tool-string">
|
<h2 style="display: inline" id="setup-tool-string">
|
||||||
@ -17,7 +18,6 @@
|
|||||||
<iframe src="{{ external_page_url }}" frameborder="0" style="width:100%;/*for footer*/; border:solid">
|
<iframe src="{{ external_page_url }}" frameborder="0" style="width:100%;/*for footer*/; border:solid">
|
||||||
|
|
||||||
</iframe>
|
</iframe>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// Based on: http://www.quirksmode.org/js/findpos.html
|
// Based on: http://www.quirksmode.org/js/findpos.html
|
||||||
var getCumulativeOffset = function (obj) {
|
var getCumulativeOffset = function (obj) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user