Skip to content
Merged
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
73 changes: 58 additions & 15 deletions css/tweaks.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,59 @@ ul.links {
list-style: none outside none;
}

html.js input.form-autocomplete {
/* Default throbber needs some help for when FontAwsome isn't on. */
html.js input[autocomplete] {
background-repeat: no-repeat;
}

/* Handle the FontAwesome throbber */
html.js input[autocomplete].fa-on,
html.js input.throbbing.fa-on {
background: transparent;
}

.form-control-feedback {
width: 13px;
height: 13px;
color: #bbb;
top: 60%;
right: 10px;
}

/* Same as adding FontAwesome fa-spin but faster */
input.throbbing + .form-control-feedback {
-webkit-animation: throbber-spin 1s infinite linear;
animation: throbber-spin 1s infinite linear;
}

/* Set a darker color when spinning */
input.throbbing + .form-control-feedback:before {
color: rgba(95, 95, 95, 1);
}

/* Copied from FontAwesome fa-spin */
@-webkit-keyframes throbber-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}

@keyframes throbber-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}

form .form-actions .btn {
margin-right: 10px;
}
Expand Down Expand Up @@ -279,19 +328,13 @@ ul.panels-ipe-linkbar {
margin-left: 10px;
}

/* Bootstrap 3.2.0 Checkboxes Fix*/
table .radio input[type="radio"],
table .radio-inline input[type="radio"],
table .checkbox input[type="checkbox"],
table .checkbox-inline input[type="checkbox"],
table .checkbox,table .radio{
.features-export-component .radio input[type="radio"],
.features-export-component .radio-inline input[type="radio"],
.features-export-component .checkbox input[type="checkbox"],
.features-export-component .checkbox-inline input[type="checkbox"],
.features-export-list .radio input[type="radio"],
.features-export-list .radio-inline input[type="radio"],
.features-export-list .checkbox input[type="checkbox"],
.features-export-list .checkbox-inline input[type="checkbox"] {
margin-left: 0px;
position:static;
}


/* Module Filter Display*/
#module-filter-left ul li.active{
margin-right:0px;
width:100%;
}
58 changes: 57 additions & 1 deletion includes/fapi.inc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function kalatheme_process_element(&$element, &$form_state) {
function kalatheme_process_input(&$element, &$form_state) {
$types = array(
'textfield',
'textarea',
'password',
'password_confirm',
'select',
Expand All @@ -71,9 +72,59 @@ function kalatheme_process_input(&$element, &$form_state) {
if (!empty($element['#type']) && (in_array($element['#type'], $types))) {
$element['#attributes']['class'][] = 'form-control';
}

return $element;
}

/**
* Implements theme_textfield().
*/
function kalatheme_textfield($variables) {
$element = $variables['element'];
$element['#attributes']['type'] = 'text';
element_set_attributes($element, array(
'id',
'name',
'value',
'size',
'maxlength',
));

$input_classes = array('form-text');

// Add a class to indicate if FontAwesome theme setting is turned on. Don't
// worry this doesn't clash with any existing fa- classes.
$fa_on = theme_get_setting('fontawesome');
if ($fa_on) {
$input_classes[] = 'fa-on';
}

_form_set_class($element, $input_classes);

$output = '<input' . drupal_attributes($element['#attributes']) . ' />';

$extra = '';
if (isset($element['#autocomplete_path']) && drupal_valid_path($element['#autocomplete_path'])) {
drupal_add_library('system', 'drupal.autocomplete');
$element ['#attributes']['class'][] = 'form-autocomplete';

$attributes = array();
$attributes ['type'] = 'hidden';
$attributes ['id'] = $element ['#attributes']['id'] . '-autocomplete';
$attributes ['value'] = url($element ['#autocomplete_path'], array('absolute' => TRUE));
$attributes ['disabled'] = 'disabled';
$attributes ['class'][] = 'autocomplete';
$extra = '<input' . drupal_attributes($attributes) . ' />';

// Add form control feedback if FontAwesome is available.
if ($fa_on) {
$icon = '<span class="fa fa-circle-o-notch form-control-feedback" aria-hidden="true"></span>';
$output = $output . $icon;
}
}

return $output . $extra;
}

/**
* Implements theme_form_element().
Expand Down Expand Up @@ -121,6 +172,11 @@ function kalatheme_form_element($variables) {
}
else {
$attributes['class'][] = 'form-group';

//
if (isset($element['#autocomplete_path']) && drupal_valid_path($element['#autocomplete_path'])) {
$attributes['class'][] = 'has-feedback';
}
}
}

Expand Down Expand Up @@ -248,7 +304,7 @@ function kalatheme_textarea($variables) {
if(isset($element['#rows'])){
$element['#attributes']['rows'] = $element['#rows'];
}
_form_set_class($element, array('form-textarea','form-control'));
_form_set_class($element, array('form-textarea'));

$wrapper_attributes = array(
'class' => array('form-textarea-wrapper'),
Expand Down