Skip to content
Browse files

Adding remove button to environments dialog

  • Loading branch information...
1 parent 7c0ed48 commit 0712c88750faed3fb74d5fadd472639517035adf @winton committed Nov 1, 2010
Showing with 5 additions and 2 deletions.
  1. +1 −0 lib/a_b_front_end/view/dashboard.haml
  2. +4 −2 public/js/dashboard.js
View
1 lib/a_b_front_end/view/dashboard.haml
@@ -48,6 +48,7 @@
%label Domain name
.span-4.last
<input class='domains' name='domains[]' type='text' value='<%= (typeof(domain) != "undefined") ? domain : "" %>' />
+ <img class="remove <% if (typeof(domain) == "undefined") { %>hide<% } %>" src="/image/remove.png">
%textarea.hide#tests_form_template
.dialog.span-7.last
View
6 public/js/dashboard.js
@@ -71,13 +71,15 @@ window.Dashboard = function(sites) {
text_container.remove();
input_container.remove();
- $('.variants', form).keyup();
+ $('.domains, .variants', form).keyup();
if (!control)
- $('.variants[value=]:last').focus();
+ $('.domains, .variants[value=]:last').focus();
}
function domainKeyUp() {
+ if ($(this).val() != '')
+ $(this).next().removeClass('hide');
if ($('.domains[value=]').length < 1) {
$('.dialog .submit').before(
$('#envs_form_domain_template').tmpl()

0 comments on commit 0712c88

Please sign in to comment.
Something went wrong with that request. Please try again.