adding OxLabel

This commit is contained in:
Rolux 2010-02-27 09:46:49 +01:00
parent e4d4529da4
commit b60993d06f
4 changed files with 70 additions and 6 deletions

View File

@ -59,6 +59,7 @@ Forms
.OxThemeClassic .OxButton,
.OxThemeClassic .OxInput,
.OxThemeClassic .OxLabel,
.OxThemeClassic .OxRange,
.OxThemeClassic .OxTrack {
border: 1px solid rgb(176, 176, 176);
@ -112,6 +113,10 @@ Forms
color: rgb(160, 160, 160)
}
.OxThemeClassic .OxLabel {
background: rgb(208, 208, 208);
}
/*
================================================================================
Menus

View File

@ -317,7 +317,7 @@ div.OxInput {
div.OxInput.OxMedium {
height: 14px;
}
div.OxInput > .OxLabel {
div.OxInput > .OxInputLabel {
float: left;
padding-left: 8px;
text-overflow: ellipsis;
@ -337,8 +337,17 @@ input.OxInput {
float: left;
margin: -1px -1px 0 -1px;
}
textarea.OxInput {
/*
--------------------------------------------------------------------------------
OxLabel
--------------------------------------------------------------------------------
*/
.OxLabel {
height: 14px;
border: 1px;
padding: 0 8px 0 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
/*
--------------------------------------------------------------------------------

View File

@ -1761,7 +1761,7 @@ requires
if (self.options.label) {
that.$label = new Ox.Element()
.addClass("OxLabel")
.addClass("OxInputLabel")
.width(self.options.labelWidth)
.html(self.options.label[0])
.appendTo(that);
@ -1822,7 +1822,7 @@ requires
.appendTo(that);
}
if (options.autocomplete) {
if (self.options.autocomplete) {
that.$input.attr({
autocomplete: "off"
});
@ -2030,6 +2030,25 @@ requires
};
/*
----------------------------------------------------------------------------
Ox.Label
----------------------------------------------------------------------------
*/
Ox.Label = function(options, self) {
var self = self || {},
that = new Ox.Element({}, self)
.defaults({
id: "",
title: ""
})
.options(options)
.addClass("OxLabel");
that.html(self.options.title);
return that;
};
/*
----------------------------------------------------------------------------
Ox.Range

View File

@ -526,7 +526,38 @@
//placeholder: "some\ntext",
type: "textarea"
}).width(400).height(100).addClass("margin").appendTo(mainPanel);
$("<br>").attr({clear: "all"}).appendTo(mainPanel.$element);
Ox.Select({
id: "selectLabel",
items: [
{
checked: true,
id: "label1",
title: "Label 1"
},
{
id: "label2",
title: "Label 2"
},
{
id: "label3",
title: "Label 3"
}
]
}).addClass("margin").width(104).appendTo(mainPanel);
Ox.Input().width(200).addClass("margin").appendTo(mainPanel);
$("<br>").attr({clear: "all"}).appendTo(mainPanel.$element);
Ox.Label({
title: "Label"
}).width(100).addClass("margin").appendTo(mainPanel);
Ox.Input().width(200).addClass("margin").appendTo(mainPanel);
$("<br>").attr({clear: "all"}).appendTo(mainPanel.$element);
Ox.Label({
title: "Label"
}).width(100).addClass("margin").appendTo(mainPanel);
Ox.Input({
type: "textarea"
}).width(200).height(100).addClass("margin").appendTo(mainPanel);
//*/
function openDialog() {
var $dialog = new Ox.Dialog({