Browse Source

Merge branch 'add-artist-button' of tricidious/Gazelle into master

spaghetti 7 years ago
parent
commit
0edb9a6e77
3 changed files with 7 additions and 7 deletions
  1. 2
    2
      static/functions/browse.js
  2. 2
    2
      static/functions/requests.js
  3. 3
    3
      static/functions/upload.js

+ 2
- 2
static/functions/browse.js View File

313
     var a = $('a[data-cover]')[0]
313
     var a = $('a[data-cover]')[0]
314
     if (a) preload(a.attributes['data-cover'].value)
314
     if (a) preload(a.attributes['data-cover'].value)
315
   }
315
   }
316
-  $('.add_artist_button').each(function(i, el) {el.addEventListener('click', AddArtistField)})
317
-  $('.remove_artist_button').each(function(i, el) {el.addEventListener('click', RemoveArtistField)})
316
+  $(document).on('click', '.add_artist_button', AddArtistField);
317
+  $(document).on('click', '.remove_artist_button', RemoveArtistField);
318
 })
318
 })

+ 2
- 2
static/functions/requests.js View File

239
       ({'jav':JavAutofill})[el.attributes['autofill'].value]()
239
       ({'jav':JavAutofill})[el.attributes['autofill'].value]()
240
     })
240
     })
241
   })
241
   })
242
-  $('.add_artist_button').each(function(i, el) {el.addEventListener('click', AddArtistField)})
243
-  $('.remove_artist_button').each(function(i, el) {el.addEventListener('click', RemoveArtistField)})
242
+  $(document).on('click', '.add_artist_button', AddArtistField);
243
+  $(document).on('click', '.remove_artist_button', RemoveArtistField);
244
 })
244
 })

+ 3
- 3
static/functions/upload.js View File

526
 }
526
 }
527
 
527
 
528
 $(function() {
528
 $(function() {
529
-  initAutofill()
530
-  $('.add_artist_button').each(function(i, el) {el.addEventListener('click', AddArtistField)})
531
-  $('.remove_artist_button').each(function(i, el) {el.addEventListener('click', RemoveArtistField)})
529
+  initAutofill();
530
+  $(document).on('click', '.add_artist_button', AddArtistField);
531
+  $(document).on('click', '.remove_artist_button', RemoveArtistField);
532
 })
532
 })

Loading…
Cancel
Save