adding OxLabel

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

View file

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

View file

@ -317,7 +317,7 @@ div.OxInput {
div.OxInput.OxMedium { div.OxInput.OxMedium {
height: 14px; height: 14px;
} }
div.OxInput > .OxLabel { div.OxInput > .OxInputLabel {
float: left; float: left;
padding-left: 8px; padding-left: 8px;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -337,8 +337,17 @@ input.OxInput {
float: left; float: left;
margin: -1px -1px 0 -1px; 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) { if (self.options.label) {
that.$label = new Ox.Element() that.$label = new Ox.Element()
.addClass("OxLabel") .addClass("OxInputLabel")
.width(self.options.labelWidth) .width(self.options.labelWidth)
.html(self.options.label[0]) .html(self.options.label[0])
.appendTo(that); .appendTo(that);
@ -1822,7 +1822,7 @@ requires
.appendTo(that); .appendTo(that);
} }
if (options.autocomplete) { if (self.options.autocomplete) {
that.$input.attr({ that.$input.attr({
autocomplete: "off" 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 Ox.Range

View file

@ -526,7 +526,38 @@
//placeholder: "some\ntext", //placeholder: "some\ntext",
type: "textarea" type: "textarea"
}).width(400).height(100).addClass("margin").appendTo(mainPanel); }).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() { function openDialog() {
var $dialog = new Ox.Dialog({ var $dialog = new Ox.Dialog({