Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/edit_post.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function jcf_do_action(action, _this) {
}

//console.log({tags: selected_tags, categories: selected_cats, page_tpl: selected_page_template});
}
};

/**
* Check if rule settings match the real situation on screen
Expand Down Expand Up @@ -294,7 +294,7 @@ function jcf_do_action(action, _this) {
var taxonomy = $(this).attr('id').replace('tax-input-', '');
var tags = tags.split(',');
selected[taxonomy] = tags;
})
});
return selected;
}

Expand All @@ -319,7 +319,7 @@ function jcf_do_action(action, _this) {
selected[taxonomy] = [];

selected[taxonomy].push(term);
})
});
return selected;
}

Expand Down
30 changes: 15 additions & 15 deletions assets/just_custom_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jQuery(document).ready(function () {
initAddFieldsetBox();
initFieldsetsEdit();
initAjaxBoxClose();
initFieldsetFields();
initFieldset_fields();
}
initImport();
initExport();
Expand Down Expand Up @@ -74,7 +74,7 @@ function initFieldsetsEdit() {
jcf_hide_ajax_container();
});
}
})
});

// change
jQuery('#jcf_fieldsets a.jcf_fieldset_change').click(function(e) {
Expand All @@ -89,7 +89,7 @@ function initFieldsetsEdit() {
jcf_ajax(data, 'html', null, function( response ) {
jcf_show_ajax_container(response);
});
})
});

// init delete button on change popup
jQuery('#jcf_ajax_content .jcf_edit_fieldset a.field-control-remove').live('click', function() {
Expand Down Expand Up @@ -198,7 +198,7 @@ function initFieldsetsEdit() {
msg_invalid_input = jcf_textdomain.err_fieldset_visibility_invalid_page;
}
alert( msg_invalid_input );
return;

});

// add form for new visibility rule
Expand All @@ -208,7 +208,7 @@ function initFieldsetsEdit() {
var data = {
'action': 'jcf_add_visibility_rules_form',
'scenario': 'create'
}
};
jcf_ajax(data, 'html', null, function( response ) {
jQuery('div#visibility').append(response);
jQuery('.add_rule_btn').hide();
Expand All @@ -224,7 +224,7 @@ function initFieldsetsEdit() {
'action': 'jcf_delete_visibility_rule',
'rule_id': rule_id,
'fieldset_id': f_id
}
};
jcf_ajax(data, 'html', null, function( response ) {
jQuery('div.rules').remove();
jQuery('div#visibility').append(response);
Expand All @@ -242,7 +242,7 @@ function initFieldsetsEdit() {
'rule_id': rule_id,
'fieldset_id': f_id,
'scenario': 'update'
}
};
jcf_ajax(data, 'html', null, function( response ) {
jQuery('fieldset#fieldset_visibility_rules').remove();
jQuery('div#visibility').append(response);
Expand Down Expand Up @@ -327,7 +327,7 @@ function initFieldsetsEdit() {
/**
* init fieldset fields grid and add form
*/
function initFieldsetFields() {
function initFieldset_fields() {

// init add form
jQuery('#jcf_fieldsets form.jcform_add_field').submit(function( e ) {
Expand All @@ -337,13 +337,13 @@ function initFieldsetFields() {

jQuery(this).find('input,select').each(function( i, input ) {
data[ jQuery(input).attr('name') ] = jQuery(input).val();
})
});

var loader = jQuery(this).find('img.ajax-feedback');

jcf_ajax(data, 'html', loader, function( response ) {
jcf_show_ajax_container(response);
})
});

return false;
});
Expand Down Expand Up @@ -425,7 +425,7 @@ function initFieldsetFields() {
}
// close add box at the end
jcf_hide_ajax_container();
})
});

return false;
});
Expand All @@ -449,7 +449,7 @@ function initFieldsetFields() {
});
}
return false;
})
});

// edit button
jQuery('#jcf_fieldsets tbody span.edit a, #jcf_fieldsets tbody strong > a').live('click', function() {
Expand All @@ -467,7 +467,7 @@ function initFieldsetFields() {
});

return false;
})
});

// delete button in edit form
jQuery('#jcform_edit_field a.field-control-remove').live('click', function( e ) {
Expand Down Expand Up @@ -542,7 +542,7 @@ function initExport() {

var data = {
'action': 'jcf_export_fields_form'
}
};
jcf_ajax(data, 'html', null, function( response ) {
modalWindow(response);
});
Expand Down Expand Up @@ -778,7 +778,7 @@ function jcf_form_serialize_object( obj ) {
}
else if ( jQuery(input).attr('type') == 'checkbox' ) {
if ( typeof data[ jQuery(input).attr('name') ] === 'undefined' ) {
data[ jQuery(input).attr('name') ] = new Array();
data[ jQuery(input).attr('name') ] = [];
}
if ( jQuery(input).is(':checked') ) {
data[ jQuery(input).attr('name') ].push(jQuery(this).val());
Expand Down
Loading