visibility: hidden;
position: absolute;
}
+
+.loading {
+ background-color:white;
+ color:black;
+ position:fixed;
+ top:160px;
+ left:50%;
+ width:30%;
+ margin: 0 0 0 -15%;
+ padding:25px 50px;
+ box-shadow: 4px 4px 5px #888;
+ border:1pt solid #30196D;
+ display:none;
+ z-index:100;
+}
else messages.debug ("debug_query: " + msg + " query= " + query);
}
+// http://stackoverflow.com/questions/7837456/comparing-two-arrays-in-javascript
+// attach the .equals method to Array's prototype to call it on any array
+Array.prototype.equals = function (array) {
+ // if the other array is a falsy value, return
+ if (!array)
+ return false;
+
+ // compare lengths - can save a lot of time
+ if (this.length != array.length)
+ return false;
+
+ for (var i = 0, l=this.length; i < l; i++) {
+ // Check if we have nested arrays
+ if (this[i] instanceof Array && array[i] instanceof Array) {
+ // recurse into the nested arrays
+ if (!this[i].equals(array[i]))
+ return false;
+ }
+ else if (this[i] != array[i]) {
+ // Warning - two different object instances will never be equal: {x:20} != {x:20}
+ return false;
+ }
+ }
+ return true;
+}
+
// http://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/
Object.toType = (function toType(global) {
return function(obj) {
{
var query_ext = this.find_analyzed_query_ext(query_uuid);
query_ext.filters = $.grep(query_ext.filters, function(x) {
- return x != filter;
+ return !(x.equals(filter));
});
this.apply_filters(query_uuid);
// use spin() to get our default spin settings (called presets)
// use spin(true) to get spin's builtin defaults
// you can also call spin_presets() yourself and tweak what you need to, like topmenuvalidation does
- spin: function (presets) {
- var presets = ( presets === undefined ) ? spin_presets() : presets;
- try { this.$element.spin(presets); }
- catch (err) { messages.debug("Cannot turn on spin " + err); }
+ spin: function (message) {
+ if (!message) {
+ message = 'Please be patient, this can take a few seconds.';
+ }
+ $('div.loading').fadeIn('fast');
+ $('div.loading').find('.message').text(message);
+
},
unspin: function() {
- try { this.$element.spin(false); }
- catch (err) { messages.debug("Cannot turn off spin " + err); }
+ $('div.loading').fadeOut('fast');
+
},
/* TEMPLATE */
a, a:active, a:focus {
outline: 0;
text-decoration:none;
+ color:#201E62;
}
h1 {
margin-right:10px;
}
h2 {
+ margin:0 0 15px 0;
font-size:14pt;
color:#333333;
}
h3 {
+ margin:0 0 5px 0;
font-size:13pt;
color:#201E62;
}
+h4 {
+ margin:0 0 5px 0;
+ font-size:12pt;
+ color:#333333;
+}
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], select, option {
min-width:260px;
padding:6px;
color:gray;
font-size:10pt;
}
+.tab-pane {
+ padding-top:15px;
+}
/* buttons */
button.btn, input.btn {
padding:6px 10px;
{% block base_content %}
{% endblock %}
{% endblock container %}
+<div class="loading">
+ <div class="row">
+ <div class="col-xs-11">Loading...</div>
+ <div class="col-xs-1"><img src="{{ STATIC_URL }}/img/loading.gif" /></div>
+ </div>
+ <div class="row">
+ <div class="col-xs-12 message"></div>
+ </div>
+</div>
</body>
</html>