Skip to content

Commit

Permalink
Merge pull request #6 from jcssamoylov/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jcssamoylov committed Jul 23, 2015
2 parents ce31da8 + 0665089 commit 0fa6a03
Show file tree
Hide file tree
Showing 15 changed files with 453 additions and 71 deletions.
16 changes: 10 additions & 6 deletions assets/just_custom_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,12 @@ function initImportExportCheckboxes(){
jQuery('input[data-field="' + data_id + '"]').attr({'disabled':!data_checked});
}
else if( jQuery( this ).hasClass('jcf-choose_fieldset') ){
jQuery( this ).parent().parent().find('input[type="checkbox"]').attr({'checked':!data_checked});
jQuery('input[data-fieldset="' + data_val + '"]').attr({'disabled':!data_checked});
jQuery( this ).parent().parent().parent().find('input[type="checkbox"]').attr({'checked':!data_checked});
jQuery('input[data-fieldset="' + data_val + '"]').attr({'disabled':data_checked});
}
else if( jQuery( this ).hasClass('jcf-select_content_type') ){
jQuery( this ).parent().parent().find('input[type="checkbox"]').attr({'checked':!data_checked});
jQuery( this ).parent().parent().find('input[type="hidden"]').attr({'disabled':!data_checked});
jQuery( this ).parent().parent().parent().find('input[type="checkbox"]').attr({'checked':!data_checked});
jQuery( this ).parent().parent().parent().find('input[type="hidden"]').attr({'disabled':data_checked});
}
});
}
Expand Down Expand Up @@ -395,7 +395,7 @@ function modalWindow(content){
*/
function initSettings(){
var jcf_read_settings_active = jQuery('#jcform_settings').find('input[name="jcf_read_settings"]:checked').attr('id');
jQuery('#jcform_settings input[name="jcf_read_settings"]').change(function(){
jQuery('#jcform_settings input[name="jcf_read_settings"]').live('change', function(){
var data = {
'action' : 'jcf_check_file',
'jcf_multisite_setting' : jQuery('#jcform_settings').find('input[name="jcf_multisite_setting"]:checked').val(),
Expand Down Expand Up @@ -427,7 +427,11 @@ function initSettings(){
}
else{
jQuery('input[type="radio"]#jcf_read_file_global, label[for="jcf_read_file_global"]').hide();
jQuery('input[type="radio"]#jcf_read_file').attr({'checked':!jQuery('input[type="radio"]#jcf_read_file_global').is(':checked')});
if(jcf_read_settings_active == 'jcf_read_file_global'){
jQuery('#jcform_settings').find('input[name="jcf_read_settings"]#jcf_read_file').attr({'checked':'checked'});
}else{
jQuery('#jcform_settings').find('input[name="jcf_read_settings"]#'+jcf_read_settings_active).attr({'checked':'checked'});
}
}
});
}
76 changes: 71 additions & 5 deletions assets/styles.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ul.dotted-list{
list-style:circle;
padding:0 0 0 30px;
padding:0;
}
ul.dotted-list li{
list-style:none;
padding:0 0 0 5px;
padding:0;
}
.jcf-bold{
font-weight:bold;
Expand Down Expand Up @@ -110,8 +110,6 @@ form.jcform_add_field .ajax-feedback{
#jcf_fieldsets .sortable_placeholder td{
background:#FFFFF0;
}


.jcf-export-list li{
padding-left: 20px;
}
Expand Down Expand Up @@ -213,7 +211,7 @@ form.jcform_add_field .ajax-feedback{
.jcf_modalWindow #jcf_save_import_fields_content,
.jcf_modalWindow #jcf_save_export_fields_content{
position: absolute;
top: 120px;
top: 100px;
left: 0;
right: 0;
bottom: 80px;
Expand Down Expand Up @@ -262,8 +260,76 @@ form.jcform_add_field .ajax-feedback{
.jcf_export-content-type{
margin-bottom: 50px;
}
.jcf_tile{
display: block;
width: 25%;
height: auto;
padding: 20px;
margin: 3px;
text-decoration: none;
background: #fff;
font-size: 18px;
color: #a0a5aa;
border: 3px solid #f2f2f2;
box-shadow: 0 0 1px #a0a5aa;
float: left;
}
.jcf_tile .jcf_tile_icon:before{
content: "\f109";
}
.jcf_tile.post .jcf_tile_icon:before{
content: "\f109";
}
.jcf_tile.page .jcf_tile_icon:before{
content: "\f105";
}
.jcf_tile.attachment .jcf_tile_icon:before{
content: "\f104";
}
.jcf_tile .jcf_tile_icon:before{
display: inline-block;
width: 20px;
height: 20px;
font-size: 20px;
line-height: 1;
font-family: dashicons;
text-decoration: inherit;
font-weight: 400;
font-style: normal;
vertical-align: top;
text-align: center;
}
.jcf_tile .jcf_tile_icon{
width: 36px;
height: 34px;
display: block;
text-align: center;
float: left;
}
.jcf_tile:hover{
color: #0073aa;
border: 3px solid #0073aa;
}
.jcf_tile .jcf_tile_info{
display: block;
font-size: 10px;
font-weight: normal;
}
.jcf_tile .jcf_tile_title{
display: block;
height: 40px;
}
#jcform_settings input{
display: block;
float:left;
margin: 0 10px 0 0;
}
.jcf_checkbox_block{
display: inline-block;
width: 33px;
margin-right: 10px;
text-align: center;
}
.jcf_tab-content input[type="file"]{
margin-bottom: 0;
}
Binary file added components/table/icon-delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added components/table/icon-move.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions components/table/table.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.jcf_edit_field.field_table table.sortable .drag-handle{
cursor: move;
background:url(icon-move.png) no-repeat 0 0;
float:left;
width:16px;
height:16px;
overflow:hidden;
text-indent:-9999px;
margin:5px 3px;
}

.jcf_edit_field.field_table table.sortable .jcf_delete_row{
cursor: pointer;
background:url(icon-delete.png) no-repeat 0 0;
float:left;
width:16px;
height:16px;
overflow:hidden;
text-indent:-9999px;
margin:5px 3px;
}

.jcf_edit_field.field_table table.sortable .hide{
display:none;
}
.jcf_option_column{
width: 60px;
}
24 changes: 24 additions & 0 deletions components/table/table.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var add_row_btn = '.jcf_add_row';
var delete_row_btn = '.jcf_delete_row';
jQuery(document).ready(function() {

jQuery( add_row_btn ).click(function() {
var container = jQuery( this ).parent().parent().find('table');
var jcf_table_row_max_index = container .find('tr').size();
jcf_table_row_max_index--;
var new_row = container.find('tr.hide').html();
new_row = new_row.replace(/\[00\]/g, '[' + jcf_table_row_max_index + ']')
.replace(/\-00\-/g, '-' + jcf_table_row_max_index + '-');
new_row = '<tr>' + new_row + '</tr>';
container.find('tr.hide').before(new_row);
return false;
});

jQuery( delete_row_btn ).live('click', function() {
jQuery( this ).parent().parent().remove();
})

jQuery( 'table.sortable' ).each(function() {
jQuery( this ).find( 'tbody' ).sortable({ containment: jQuery( this ), scroll: false, items: 'tr[class!=table-header]' });
});
});
Loading

0 comments on commit 0fa6a03

Please # to comment.