<commit_before>/* Class: mop.cms.CMS */
mop.modules.CMS = new Class({
	/* Constructor: initialize */
	Extends: mop.modules.Module,
	Interfaces: [ mop.modules.navigation.NavigationDataSource ],
	pageLoadCount: 0,
	objectId: null,
	pageContent: null,
	pageIdToLoad: null,
	scriptsLoaded: null,
	currentPageLoadIndex: null,
	titleText: "",
	titleElement: null,
	editSlugLink: null,
	deletePageLink: null,
	loadedCSS: [],
	loadedJS: [],
    stringIdentifier: "[ object, mop.modules.CMS ]",
    
    /* Section: Getters & Setters */    
    
    getRemoveObjectRequestURL: function( parentId ){
        return "ajax/compound/cms/removeObject/" + parentId;
    },
    
    getRequestPageURL: function( nodeId ){
        return "ajax/html/cms/getPage/" + nodeId;
    },
    
    getRequestTierURL: function( parentId ){
        return "ajax/compound/navigation/getTier/" + parentId;
    },

    getAddObjectRequestURL: function( newObject ){
        return "ajax/data/cms/addObject/" + newObject.id + "/" + newObject.templateId;
    },
    
    getTogglePublishedStatusRequest: function( nodeId ){            
        return "ajax/data/cms/togglePublish/"+ nodeId;
    },

	/* Section: Constructor */
	initialize: function( anElement, options ){
        this.parent( anElement, null, options );
        this.instanceName = this.element.get("id");
		this.objectId = this.getValueFromClassName( "objectId" );
		var scripttags = $$( "script" ).each( function( aScriptTag ){ this.loadedJS.push( aScriptTag ); }, this );
		var scripttags = $$( "link[rel=stylesheet]" ).each( function( aStyleSheetTag ){ this.loadedCSS.push(  aStyleSheetTag ); }, this );
	},

	/* Section: Methods */
    toString: function(){ return this.stringIdentifier },

	build: function(){
		this.pageContent = $("nodeContent");
		this.initModules( this.element );
	},

	populate: function( html ){
		$("nodeContent").unspin();
		this.pageContent.set( 'html', html );
		this.uiElements = this.initUI( this.pageContent );
		this.initModules( this.pageContent );		
		this.titleElement = this.element.getElement( ".pageTitle" );<commit_msg>added mop.util.getBaseURL calls to URL getters in mopcms<commit_after>/* Class: mop.cms.CMS */
mop.modules.CMS = new Class({
	/* Constructor: initialize */
	Extends: mop.modules.Module,
	Interfaces: [ mop.modules.navigation.NavigationDataSource ],
	pageLoadCount: 0,
	objectId: null,
	pageContent: null,
	pageIdToLoad: null,
	scriptsLoaded: null,
	currentPageLoadIndex: null,
	titleText: "",
	titleElement: null,
	editSlugLink: null,
	deletePageLink: null,
	loadedCSS: [],
	loadedJS: [],
    stringIdentifier: "[ object, mop.modules.CMS ]",
    
    /* Section: Getters & Setters */    
    
    getRemoveObjectRequestURL: function( parentId ){
        return mop.util.getBaseURL() + "ajax/compound/cms/removeObject/" + parentId;
    },
    
    getRequestPageURL: function( nodeId ){
        return mop.util.getBaseURL() + "ajax/html/cms/getPage/" + nodeId;
    },
    
    getRequestTierURL: function( parentId ){
        return mop.util.getBaseURL() + "ajax/compound/navigation/getTier/" + parentId;
    },

    getAddObjectRequestURL: function( newObject ){
        return mop.util.getBaseURL() + "ajax/data/cms/addObject/" + newObject.id + "/" + newObject.templateId;
    },
    
    getTogglePublishedStatusRequest: function( nodeId ){            
        return mop.util.getBaseURL() + "ajax/data/cms/togglePublish/"+ nodeId;
    },

	/* Section: Constructor */
	initialize: function( anElement, options ){
        this.parent( anElement, null, options );
        this.instanceName = this.element.get("id");
		this.objectId = this.getValueFromClassName( "objectId" );
		var scripttags = $$( "script" ).each( function( aScriptTag ){ this.loadedJS.push( aScriptTag ); }, this );
		var scripttags = $$( "link[rel=stylesheet]" ).each( function( aStyleSheetTag ){ this.loadedCSS.push(  aStyleSheetTag ); }, this );
	},

	/* Section: Methods */
    toString: function(){ return this.stringIdentifier },

	build: function(){
		this.pageContent = $("nodeContent");
		this.initModules( this.element );
	},

	populate: function( html ){
		$("nodeContent").unspin();
		this.pageContent.set( 'html', html );
		this.uiElements = this.initUI( this.pageContent );
		this.initModules( this.pageContent );		
		this.titleElement = this.element.getElement( ".pageTitle" );
{'fraction_non_alphanumeric': 0.14711957769107184, 'fraction_numerical': 0.0004590314436538903, 'mean_word_length': 3.549060542797495, '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': '2070311', 'n_tokens_mistral': 1419, 'n_tokens_neox': 1361, 'n_words': 272}