Small optimizations
This commit is contained in:
parent
94e4c22fcf
commit
8b0d20dec7
1 changed files with 7 additions and 8 deletions
|
|
@ -2,16 +2,15 @@
|
|||
* licensed under the Affero General Public License version 3 or later. See
|
||||
* the COPYRIGHT file.
|
||||
*/
|
||||
|
||||
|
||||
$(document).ready( function() {
|
||||
$(document).ready(function() {
|
||||
$('div#image_picker div.small_photo').click( function() {
|
||||
$('#image_url_field').val($(this).attr('id'));
|
||||
var $this = $(this);
|
||||
document.getElementById("image_url_field").value = this.id;
|
||||
|
||||
$('div#image_picker div.small_photo').removeClass('selected');
|
||||
$("div#image_picker div.small_photo input[type='checkbox']").attr("checked", false);
|
||||
$('div#image_picker div.small_photo.selected').removeClass('selected')
|
||||
.children("input[type='checkbox']").attr("checked", false);
|
||||
|
||||
$(this).addClass('selected');
|
||||
$(this).children("input[type='checkbox']").attr("checked", true);
|
||||
$this.addClass('selected')
|
||||
.children("input[type='checkbox']").attr("checked", true);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue