website: style fixes

This commit is contained in:
Rushabh Mehta
2013-03-12 12:29:10 +05:30
parent c9977ae7d9
commit 0642083399
2 changed files with 9 additions and 4 deletions

View File

@@ -43,19 +43,24 @@
</div></p> </div></p>
<script> <script>
$("#footer-subscribe-button").click(function() { $("#footer-subscribe-button").click(function() {
$("#footer-subscribe-email").attr('disabled', true);
$("#footer-subscribe-button").html("Sending...")
.attr("disabled", true);
if($("#footer-subscribe-email").val()) { if($("#footer-subscribe-email").val()) {
erpnext.send_message({ erpnext.send_message({
subject:"Subscribe me", subject:"Subscribe me",
sender: $("#footer-subscribe-email").val(), sender: $("#footer-subscribe-email").val(),
message: "Subscribe to newsletter (via website footer).", message: "Subscribe to newsletter (via website footer).",
callback: function(r) { callback: function(r) {
console.log(r)
if(!r.exc) { if(!r.exc) {
$("#footer-subscribe-email").val("").attr('disabled', true);
$("#footer-subscribe-button").html("Thank You :)") $("#footer-subscribe-button").html("Thank You :)")
.addClass("btn-success").attr("disabled", true); .addClass("btn-success").attr("disabled", true);
} else { } else {
$("#footer-subscribe-button").html("Error :( Not a valid id?").addClass("btn-danger"); $("#footer-subscribe-button").html("Error :( Not a valid id?")
.addClass("btn-danger").attr("disabled", false);
$("#footer-subscribe-email").val("").attr('disabled', false);
} }
} }
}); });

View File

@@ -39,7 +39,7 @@
<hr> <hr>
{% if obj.doclist.get({"doctype":"Item Website Specification"}) %} {% if obj.doclist.get({"doctype":"Item Website Specification"}) %}
<h3>Specifications</h3> <h3>Specifications</h3>
<table class="table table-striped table-bordered" style="width: 100%"> <table class="table table-bordered" style="width: 100%">
{% for d in obj.doclist.get( {% for d in obj.doclist.get(
{"doctype":"Item Website Specification"}) %} {"doctype":"Item Website Specification"}) %}
<tr> <tr>