PageSourceSearch

https://www.utsjoki.fi/wp-content/plugins/acf-columns/assets/js/acf-column-5.7.js?ver=1.2.1

js utsjoki.fi collected 2026-10-02 10:08:04 UTC 2,222 bytes, 89 lines download raw bytes

1(function($){
2
3
4	var Field = acf.Field.extend({
5		
6		wait: false,
7		type: 'column',
8		
9		initialize: function(){
10
11			that = this.$el;
12
13			that.each(function() {
14				var acf_field_column = $(this),
15					columns = acf_field_column.find('.acf-column[class*="column-layout"]').data('column'),
16					orig_key = acf_field_column.find('.acf-column[class*="column-layout"]').data('id'),
17					key = "acf-" + orig_key.replace("_", "-"),
18					colClass = '',
19					is_collapse_field = '';
20
21				acf_field_column.find('.acf-column').each(function() {
22					var root = $(this).parents('.acf-field-column'),
23						Conditions = '',
24						colData = '';
25					if ( columns == '1_1' ) {
26						acf_field_column.replaceWith('<div class="acf-field acf-field-columngroup column-end-layout"></div>');
27					} else {
28						var acf_fields = $(root).nextUntil('.acf-field-column');
29
30						acf_fields.each(function() {
31							if ( $(this).hasClass('-collapsed-target') ) {
32								is_collapse_field = ' -collapsed-target';
33								return is_collapse_field;
34							}
35						});
36
37						
38						colClass = 'acf-field acf-field-columngroup ' + key + ' column-layout-' + columns;
39
40						if (typeof acf_field_column.data('conditions') !== 'undefined') {	
41							colData = "data-conditions='"+JSON.stringify(acf_field_column.data('conditions'))+"'";
42						}
43
44						$(root)	.nextUntil('.acf-field-column')
45								.removeClass('hidden-by-tab')
46								.wrapAll('<div class="' + colClass + is_collapse_field + '" data-key="' + orig_key + '" ' + colData +'></div>');
47						acf_field_column.remove();
48					}
49				})
50			})
51		},
52		
53	});
54	
55	acf.registerFieldType( Field );
56
57	if ( typeof acf.add_action !== 'undefined' ) {
58		
59		acf.add_action('ready append', function( $el ){
60
61		 	var acf_settings_cols = acf.model.extend({
62		 		
63		 		actions: {
64		 			'open_field':			'render',
65		 			'change_field_type':	'render'
66		 		},
67		 				
68		 		render: function( $el ){
69		 			
70		 			// bail early if not correct field type
71		 			if( $el.attr('data-type') != 'column' ) {
72		 				
73		 				return;
74		 				
75		 			}
76		 		 			
77		 			// clear name
78		 			$el.find('.acf-field[data-name="name"] input').val('').trigger('change');
79		 			
80		 		}		
81		 		
82		 	});
83			
84			
85			
86		});
87	}
88
89})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.