<commit_before>GENTICS_Aloha_base = 'http://aloha-editor.org/aloha-0.9.3/aloha/';
jQuery(document).ready(function() {

    // Load all RDFa entities into VIE
    VIE.RDFaEntities.getInstances();

    // Make all RDFa entities editable
    jQuery('[typeof][about]').each(function() {
        jQuery(this).vieSemanticAloha();
    });

    jQuery('#savebutton').bind('click', function() {
        // Go through all Backbone model instances loaded for the page
        VIE.EntityManager.entities.each(function(objectInstance) {
            if (!VIE.AlohaEditable.refreshFromEditables(objectInstance)) {
                // No changes to this object, skip
                return true;
            }

            // Set the modified properties to the model instance
            objectInstance.save(null, {
                success: function(savedModel, response) {
                    alert(savedModel.id + " was saved, see JS console for details");
                    jQuery.each(modifiedProperties, function(propertyName, propertyValue) {
                        savedModel.editables[propertyName].setUnmodified();
                    });
                    jQuery('#saveButton').addClass('hidden');
                },
                error: function(response) {
                    console.log("Save failed");
                }
            });
        });
    });

    GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,'editableActivated', function(){
        console.log('editableActivated');
        jQuery('#saveButton').removeClass('hidden');
    });

});<commit_msg>Fixed #saveButton to be small letters only. i.e. #savebutton<commit_after>GENTICS_Aloha_base = 'http://aloha-editor.org/aloha-0.9.3/aloha/';
jQuery(document).ready(function() {

    // Load all RDFa entities into VIE
    VIE.RDFaEntities.getInstances();

    // Make all RDFa entities editable
    jQuery('[typeof][about]').each(function() {
        jQuery(this).vieSemanticAloha();
    });

    jQuery('#savebutton').bind('click', function() {
        // Go through all Backbone model instances loaded for the page
        VIE.EntityManager.entities.each(function(objectInstance) {
            if (!VIE.AlohaEditable.refreshFromEditables(objectInstance)) {
                // No changes to this object, skip
                return true;
            }

            // Set the modified properties to the model instance
            objectInstance.save(null, {
                success: function(savedModel, response) {
                    alert(savedModel.id + " was saved, see JS console for details");
                    jQuery.each(modifiedProperties, function(propertyName, propertyValue) {
                        savedModel.editables[propertyName].setUnmodified();
                    });
                    jQuery('#savebutton').hide();
                },
                error: function(response) {
                    console.log("Save failed");
                }
            });
        });
    });

    GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,'editableActivated', function(){
        jQuery('#savebutton').show();
    });

});
{'fraction_non_alphanumeric': 0.12347658755612573, 'fraction_numerical': 0.001924310455420141, 'mean_word_length': 2.0340466926070038, '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': '113147', 'n_tokens_mistral': 834, 'n_tokens_neox': 786, 'n_words': 153}