<commit_before>$.jBlocks("defineBlockClass","Persona","IFrame",{
	init: function() {
		this._super.apply(this,arguments);
		$.extend(this.options,{
			src: "/jblocks/login/persona",
			onLogin: function() {},
			onLogout: function() {},
		});
	},
	onCreate: function() {
		this._super();
		var $this=this;
		/*
		$(document).bind("jblocks.logincreate",function() {
			$this.maximize({back:false});
		});
		$(document).bind("jblocks.logincancel",function() {
			$this.unMaximize();
		});
		*/

	},
});

$.jBlocks("defineBlockClass","PersonaBox","JBlock",{
	init: function() {
		this._super.apply(this,arguments);
		$.extend(this.layout,{
			expandHeight:0,
			expandWidth: 0.1,
		});
		this.highlight();
	},
	onCreate: function() {
		this._super();
		var $this=this;
		
		this.userBox=this.selfJBlocks.addNewBlock("Text",{
			w: 1,
			h: 1,
			expandHeight: 0,
			visible: false, 
		},{
			verticalAlign: true,
			blockContentClass: "jblocks-logged-as",
		});

		this.selfJBlocks.addNewBlock("Persona",{
			w: 1,
			h: 2,
			pref: "left bottom",
		},{});
		
		$(document).bind("jblocks.logincreate",function() {
			//alert("logincreate");
			$this.options.w=function(vp) { return vp.w; };
			$this.options.h=function(vp) { return vp.h; };
			$this.focus();
			$this.jBlocks.checkLayout();			
		});
		$(document).bind("jblocks.logincancel",function() {
			delete $this.options.w;
			delete $this.options.h;
			$this.jBlocks.checkLayout();			
		});

		$(document).bind("jblocks.login",function(event,user) {
			$this.unhighlight();
			$this.userBox.textVal($this.t("logged-as",{"@name":user.name}));
			$this.userBox.layout.visible=true;
			$this.options.onLogin.call($this,user);
			$this.selfJBlocks.checkLayout();
			$this.jBlocks.checkLayout();
		});
		$(document).bind("jblocks.logout",function(event) {
			$this.highlight();
			$this.userBox.layout.visible=false;
			$this.options.onLogout.call($this);
			$this.selfJBlocks.checkLayout();
			$this.jBlocks.checkLayout();
		});
	},
	highlight: function() {
		$.extend(this.layout,{
			priority: 1200,
			w: 4,
			h: 2,
			pref: "top right",
		});
	},
	unhighlight: function() {
		$.extend(this.layout,{
			priority: 0,
			w: 4,
			h: 3,
			pref: "bottom right",
		});
	},
});
<commit_msg>Increased login/logout block width<commit_after>$.jBlocks("defineBlockClass","Persona","IFrame",{
	init: function() {
		this._super.apply(this,arguments);
		$.extend(this.options,{
			src: "/jblocks/login/persona",
			onLogin: function() {},
			onLogout: function() {},
		});
	},
	onCreate: function() {
		this._super();
		var $this=this;
		/*
		$(document).bind("jblocks.logincreate",function() {
			$this.maximize({back:false});
		});
		$(document).bind("jblocks.logincancel",function() {
			$this.unMaximize();
		});
		*/

	},
});

$.jBlocks("defineBlockClass","PersonaBox","JBlock",{
	init: function() {
		this._super.apply(this,arguments);
		$.extend(this.layout,{
			expandHeight:0,
			expandWidth: 0.1,
		});
		this.highlight();
	},
	onCreate: function() {
		this._super();
		var $this=this;
		
		this.userBox=this.selfJBlocks.addNewBlock("Text",{
			w: 1,
			h: 1,
			expandHeight: 0,
			visible: false, 
		},{
			verticalAlign: true,
			blockContentClass: "jblocks-logged-as",
		});

		this.selfJBlocks.addNewBlock("Persona",{
			w: 1,
			h: 2,
			pref: "left bottom",
		},{});
		
		$(document).bind("jblocks.logincreate",function() {
			//alert("logincreate");
			$this.options.w=function(vp) { return vp.w; };
			$this.options.h=function(vp) { return vp.h; };
			$this.focus();
			$this.jBlocks.checkLayout();			
		});
		$(document).bind("jblocks.logincancel",function() {
			delete $this.options.w;
			delete $this.options.h;
			$this.jBlocks.checkLayout();			
		});

		$(document).bind("jblocks.login",function(event,user) {
			$this.unhighlight();
			$this.userBox.textVal($this.t("logged-as",{"@name":user.name}));
			$this.userBox.layout.visible=true;
			$this.options.onLogin.call($this,user);
			$this.selfJBlocks.checkLayout();
			$this.jBlocks.checkLayout();
		});
		$(document).bind("jblocks.logout",function(event) {
			$this.highlight();
			$this.userBox.layout.visible=false;
			$this.options.onLogout.call($this);
			$this.selfJBlocks.checkLayout();
			$this.jBlocks.checkLayout();
		});
	},
	highlight: function() {
		$.extend(this.layout,{
			priority: 1200,
			w: 6,
			h: 2,
			pref: "top right",
		});
	},
	unhighlight: function() {
		$.extend(this.layout,{
			priority: 0,
			w: 6,
			h: 3,
			pref: "bottom right",
		});
	},
});

{'fraction_non_alphanumeric': 0.2130637636080871, 'fraction_numerical': 0.007553876916240835, 'mean_word_length': 3.8356605800214822, 'pattern_counts': {'":': 2, '<': 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': '3717682', 'n_tokens_mistral': 1977, 'n_tokens_neox': 1657, 'n_words': 219}