Skip to content

Commit

Permalink
Merge pull request #25 from gtt-project/hotfix/replace-removed-jquery…
Browse files Browse the repository at this point in the history
…-api

Replace removed jQuery api '.size()' to '.length'
  • Loading branch information
sanak authored Aug 23, 2024
2 parents afe1104 + 2bf9360 commit 129bec0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/issue_resource_items/create.js.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var wrapper = $('#<%= @issue_resource_items.first.resource_item.class.name.underscore %>_resource_item_list');
<% @issue_resource_items.each do |item| %>
var i = $('#<%= j dom_id item.resource_item %>');
if(i.size() == 0){
if(i.length == 0){
wrapper.append('<%= j issue_resource_item_form_tag item %>');
}
<% end %>
2 changes: 1 addition & 1 deletion app/views/issue_supply_items/create.js.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% @issue_supply_items.each do |i| %>
var wrap = $("#issue-form #<%= dom_id i.supply_item %>_wrap");
if (wrap.size() > 0) {
if (wrap.length > 0) {
var quantity = wrap.find('input').val();
if (quantity) {
quantity = parseFloat(quantity);
Expand Down

0 comments on commit 129bec0

Please sign in to comment.