mirror of
https://github.com/internetee/registry.git
synced 2025-05-20 19:29:39 +02:00
Refactor javascript to coffee
This commit is contained in:
parent
65d849cc36
commit
8275123037
4 changed files with 9 additions and 14 deletions
|
@ -36,5 +36,5 @@
|
|||
.col-md-12.text-right
|
||||
= button_tag(t('save'), class: 'btn btn-primary')
|
||||
|
||||
:javascript
|
||||
:coffee
|
||||
Autocomplete.bindAdminRegistrarSearch();
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
.col-md-12.text-right
|
||||
= button_tag(t('save'), class: 'btn btn-primary')
|
||||
|
||||
:javascript
|
||||
$(function() {
|
||||
$('#tabs a:first').tab('show')
|
||||
})
|
||||
:coffee
|
||||
$ ->
|
||||
$("#tabs a:first").tab "show"
|
||||
|
|
|
@ -19,10 +19,8 @@
|
|||
= status_fields.label :description, class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= status_fields.text_field :description, class: 'form-control', autocomplete: 'off'
|
||||
:javascript
|
||||
$("#domain-statuses").nestedAttributes({
|
||||
bindAddTo: $(".add-domain-status"),
|
||||
afterAdd: function(item) {
|
||||
item.find('.errors').html('');
|
||||
}
|
||||
});
|
||||
:coffee
|
||||
$("#domain-statuses").nestedAttributes
|
||||
bindAddTo: $(".add-domain-status")
|
||||
afterAdd: (item) ->
|
||||
item.find(".errors").html ""
|
||||
|
|
|
@ -30,7 +30,5 @@ describe Registrar do
|
|||
@registrar.errors[:email].should == ['is invalid']
|
||||
@registrar.errors[:billing_email].should == ['is invalid']
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue