-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more field types to the dashboard page
Started work on the float labels
- Loading branch information
Showing
8 changed files
with
15,204 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
arctic/static/arctic/src/assets/js/components/float_label.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
$(document).ready(function() { | ||
$('.float-label input, .float-label textarea').blur(function() { | ||
// Check if float label input is not empty, if so then add some CSS | ||
if (($(this).val().length > 0) || ($(this).text() > 0)) { | ||
$(this).removeClass('empty'); | ||
alert('not empty'); | ||
} | ||
else { | ||
$(this).addClass('empty'); | ||
alert('empty'); | ||
} | ||
}); | ||
|
||
// Check if float label input has items, if so then add some CSS | ||
if ($('.float-label .selectize-input').find('.item').length > 0) { | ||
$('.selectize-input').parent().next('label').css({ | ||
top: '.3rem', | ||
fontSize: '75%' | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters