Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Codestar committed Mar 17, 2016
1 parent 415ba63 commit bfc1105
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 25 deletions.
28 changes: 18 additions & 10 deletions assets/js/cs-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1633,18 +1633,26 @@ This file is generated by `grunt build`, do not edit it by hand.
*/
getControlValue : function(context, control) {

// Handle radio button group
if(control.attr("type") == "radio" && control.size() > 1) {
var value = control.filter(":checked").val();
return value;
}
/**
*
* Codestar Framework
* Added multiple checkbox value control
*
* @since 1.0.0
* @version 1.0.0
*
*/
if( ( control.attr("type") == "radio" || control.attr("type") == "checkbox" ) && control.size() > 1 ) {
return control.filter(":checked").val();
}

// Handle individual checkboxes & radio
if (control.attr("type") == "checkbox" || control.attr("type") == "radio") {
return control.is(":checked");
}
// Handle individual checkboxes & radio
if ( control.attr("type") == "checkbox" || control.attr("type") == "radio" ) {
return control.is(":checked");
}

return control.val();

return control.val();
},

/**
Expand Down
2 changes: 1 addition & 1 deletion assets/js/cs-plugins.min.js

Large diffs are not rendered by default.

28 changes: 18 additions & 10 deletions assets/js/vendor/jquery.interdependencies.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 33 additions & 4 deletions config/framework.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'menu_title' => 'Framework',
'menu_type' => 'add_menu_page',
'menu_slug' => 'cs-framework',
'ajax_save' => true,
'ajax_save' => false,
);

// ===============================================================================================
Expand Down Expand Up @@ -2045,7 +2045,7 @@
array(
'id' => 'dep_6',
'type' => 'image_select',
'title' => 'If check <u>Blue box</u>',
'title' => 'If check <u>Blue box</u> (checkbox)',
'options' => array(
'green' => 'http://codestarframework.com/assets/images/placeholder/100x80-2ecc71.gif',
'red' => 'http://codestarframework.com/assets/images/placeholder/100x80-e74c3c.gif',
Expand All @@ -2066,11 +2066,40 @@
),
// ------------------------------------

// ------------------------------------
array(
'id' => 'dep_6_alt',
'type' => 'image_select',
'title' => 'If check <u>Green box or Blue box</u> (checkbox)',
'options' => array(
'green' => 'http://codestarframework.com/assets/images/placeholder/100x80-2ecc71.gif',
'red' => 'http://codestarframework.com/assets/images/placeholder/100x80-e74c3c.gif',
'yellow' => 'http://codestarframework.com/assets/images/placeholder/100x80-ffbc00.gif',
'blue' => 'http://codestarframework.com/assets/images/placeholder/100x80-3498db.gif',
'gray' => 'http://codestarframework.com/assets/images/placeholder/100x80-555555.gif',
),
'info' => 'Multipel Image select field input="checkbox" model. in checkbox model unselected available.',
'default' => 'gray',
'attributes' => array(
'data-depend-id' => 'dep_6_alt',
),
),

array(
'id' => 'dummy_6_alt',
'type' => 'notice',
'class' => 'success',
'content' => 'Green or Blue box selected!',
'dependency' => array( 'dep_6_alt', 'any', 'green,blue' ),
//'dependency' => array( 'data-depend-id', 'any', 'value,value' ),
),
// ------------------------------------

// ------------------------------------
array(
'id' => 'dep_7',
'type' => 'image_select',
'title' => 'If check <u>Green box</u>',
'title' => 'If check <u>Green box</u> (radio)',
'options' => array(
'green' => 'http://codestarframework.com/assets/images/placeholder/100x80-2ecc71.gif',
'red' => 'http://codestarframework.com/assets/images/placeholder/100x80-e74c3c.gif',
Expand All @@ -2097,7 +2126,7 @@
array(
'id' => 'dep_7_alt',
'type' => 'image_select',
'title' => 'If check <u>Green box or Blue box</u>',
'title' => 'If check <u>Green box or Blue box</u> (radio)',
'options' => array(
'green' => 'http://codestarframework.com/assets/images/placeholder/100x80-2ecc71.gif',
'red' => 'http://codestarframework.com/assets/images/placeholder/100x80-e74c3c.gif',
Expand Down

0 comments on commit bfc1105

Please sign in to comment.