Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding loading logic

  • Loading branch information...
commit 390af2f63338fc75f63fef7d7f8b7806d10fa5b9 1 parent ce5326d
David authored
View
5 assets/css/subway.css
@@ -48,6 +48,11 @@
cursor: pointer;
}
+#overview form #loading_image{
+ position: fixed;
+ margin-left: 10px;
+}
+
#channels{
margin-top: 25px;
}
View
BIN  assets/images/loading.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
15 assets/js/views/overview.js
@@ -16,6 +16,21 @@ var OverViewView = Backbone.View.extend({
$('#overview').html(func());
}
$('.overview_button').bind('click', jQuery.proxy(this.render, this));
+ $('#connect_button').bind('click', function(){
+ $('.error').removeClass('error');
+ if(!$('#connect_server').val()) {
+ $('#connect_server').closest('.clearfix').addClass('error');
+ $('#connect_server').addClass('error');
+ }
+ if(!$('#connect_nick').val()) {
+ $('#connect_nick').closest('.clearfix').addClass('error');
+ $('#connect_nick').addClass('error');
+ }
+ if($('#connect_nick').val() && $('#connect_server')) {
+ $('form').append(ich.load_image());
+ $('#connect_button').addClass('disabled');
+ }
+ });
return this;
}
});
View
1  views/layout.jade
@@ -11,5 +11,6 @@ html
include templates/overview_home_template
include templates/overview_connection_template
include templates/overview_settings_template
+ include templates/load_image_template
body
block content
View
2  views/templates/load_image_template.jade
@@ -0,0 +1,2 @@
+script(id="load_image", type="text/html")
+ img(id="loading_image", src="/assets/images/loading.gif")
Please sign in to comment.
Something went wrong with that request. Please try again.