apply theming to inputs using data-theme. background image is set to none, but color is used, along with ui-shadow-inset

This commit is contained in:
scottjehl 2010-10-11 17:26:51 -04:00
parent fff6b989b2
commit 855961ee2d
2 changed files with 5 additions and 5 deletions

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
*/
label.ui-input-text { font-size: 16px; line-height: 1.4; display: block; font-weight: normal; margin: 0 0 .3em; }
input.ui-input-text, textarea.ui-input-text { padding: .4em; line-height: 1.4; font-size: 16px; display: block; width: 95%; }
input.ui-input-text, textarea.ui-input-text { background-image: none; padding: .4em; line-height: 1.4; font-size: 16px; display: block; width: 95%; }
textarea.ui-input-text { height: 50px; -webkit-transition: height 200ms linear; -moz-transition: height 200ms linear; -o-transition: height 200ms linear; transition: height 200ms linear; }
.ui-input-search { margin: 5px; padding: 0 30px; background-position: 8px 50%; background-repeat: no-repeat; position: relative; }
.ui-input-search input.ui-input-text { border: none; width: 98%; padding: .4em 0; margin: 0; display: block; background: transparent none; outline: 0 !important; }

View file

@ -10,13 +10,13 @@ jQuery.fn.customTextInput = function(options){
var input = $(this);
var o = $.extend({
search: input.is('[type="search"],[data-type="search"]')
//defaultTheme: "a"
search: input.is('[type="search"],[data-type="search"]'),
theme: input.data("theme") || "c"
}, options);
$('label[for='+input.attr('id')+']').addClass('ui-input-text');
input.addClass('ui-input-text');
input.addClass('ui-input-text ui-shadow-inset ui-body-'+ o.theme);
var focusedEl = input;
@ -46,7 +46,7 @@ jQuery.fn.customTextInput = function(options){
input.keyup(toggleClear);
}
else{
input.addClass('ui-corner-all ui-body-c');
input.addClass('ui-corner-all');
}
input