<commit_before>/*jslint white: true */
(function($) {
	$(document).ready(function() {
		// Find the select box, named differently on the update and add forms
		var sel = $('#Form_ItemEditForm_LinkType');

		// hide either the internal or external link editing box depending on which link type the link is
		// (internal or external)
		if(sel.val() == 'Internal') {
			$('#Form_ItemEditForm_URL_Holder').hide();
		} else {
			$('#Form_ItemEditForm_InternalPageID_Holder').hide();
		}

		// toggle boxes on drop down change
		sel.change(function(e) {
			if(sel.val() == 'Internal') {
				$('#Form_ItemEditForm_URL_Holder').hide();
				$('#Form_ItemEditForm_InternalPageID_Holder').show();
			} else {
				$('#Form_ItemEditForm_URL_Holder').show();
				$('#Form_ItemEditForm_InternalPageID_Holder').hide();
			}
		});
	});
})(jQuery);<commit_msg>FIX: Use entwine so that a new link has the correct settigns in the GUI<commit_after>/*jslint white: true */
(function($) {
    $.entwine(function($) {
        $('#Form_ItemEditForm_LinkType').entwine({
            onmatch: function(e) {
                if(this.val() == 'Internal') {
					$('#Form_ItemEditForm_URL_Holder').hide();
				} else {
					$('#Form_ItemEditForm_InternalPageID_Holder').hide();
				}
                this._super();
            },
            onchange: function(e) {
            	if(this.val() == 'Internal') {
					$('#Form_ItemEditForm_URL_Holder').hide();
					$('#Form_ItemEditForm_InternalPageID_Holder').show();
				} else {
					$('#Form_ItemEditForm_URL_Holder').show();
					$('#Form_ItemEditForm_InternalPageID_Holder').hide();
				}
            }
        });
    });
})(jQuery);
{'fraction_non_alphanumeric': 0.1712907117008444, 'fraction_numerical': 0.0, 'mean_word_length': 3.2757731958762886, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3911732', 'n_tokens_mistral': 584, 'n_tokens_neox': 518, 'n_words': 97}