<commit_before>// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt



frappe.ui.form.Share = Class.extend({
	init: function(opts) {
		$.extend(this, opts);
		this.shares = this.parent.find('.shares');
	},
	refresh: function() {
		this.render_sidebar();
	},
	render_sidebar: function() {
		this.shares.empty();
		const shared = this.shared || this.frm.get_docinfo().shared;
		const shared_users = shared.filter(Boolean).map(s => s.user);

		// REDESIGN-TODO: handle "shared with everyone"
		this.shares.append(frappe.avatar_group(shared_users, 5, {'align': 'left', 'overlap': false}));
		if (this.frm.is_new()) {
			this.parent.find(".share-doc-btn").hide();<commit_msg>feat: overlap avatar in form sidebar share<commit_after>// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt



frappe.ui.form.Share = Class.extend({
	init: function(opts) {
		$.extend(this, opts);
		this.shares = this.parent.find('.shares');
	},
	refresh: function() {
		this.render_sidebar();
	},
	render_sidebar: function() {
		this.shares.empty();
		const shared = this.shared || this.frm.get_docinfo().shared;
		const shared_users = shared.filter(Boolean).map(s => s.user);

		// REDESIGN-TODO: handle "shared with everyone"
		this.shares.append(frappe.avatar_group(shared_users, 5, {'align': 'left', 'overlap': true}));
		if (this.frm.is_new()) {
			this.parent.find(".share-doc-btn").hide();
{'fraction_non_alphanumeric': 0.17803547066848568, 'fraction_numerical': 0.0068212824010914054, 'mean_word_length': 4.334545454545455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3424852', 'n_tokens_mistral': 546, 'n_tokens_neox': 507, 'n_words': 105}