autocomplete, continued
This commit is contained in:
parent
2860ccd20b
commit
923ef50be2
|
@ -430,11 +430,14 @@ Menus
|
|||
padding-top: 2px;
|
||||
font-size: 9px;
|
||||
}
|
||||
.OxMainMenu .OxTitle.OxSelected {
|
||||
.OxMainMenu > .OxTitle.OxSelected {
|
||||
background: rgb(48, 48, 48);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgb(80, 80, 80)), color-stop(1, rgb(48, 48, 48)));
|
||||
}
|
||||
|
||||
.OxMainMenu > .OxExtras {
|
||||
float: right;
|
||||
padding: 4px 12px 0 0;
|
||||
}
|
||||
|
||||
|
||||
.OxMenu {
|
||||
|
|
|
@ -1720,6 +1720,7 @@ requires
|
|||
self.placeholder = data.value; // fixme: could be "title" as well
|
||||
if (that.$input.is(".OxPlaceholder")) {
|
||||
that.$input.val(self.placeholder);
|
||||
//that.$input.focus();
|
||||
} else {
|
||||
that.$input.focus();
|
||||
call();
|
||||
|
@ -2165,8 +2166,7 @@ requires
|
|||
that.titles = [];
|
||||
that.layer = $("<div>").addClass("OxLayer");
|
||||
|
||||
$.each(options.menus, function(position, menu) {
|
||||
var event =
|
||||
$.each(self.options.menus, function(position, menu) {
|
||||
that.titles[position] = $("<div>")
|
||||
.addClass("OxTitle")
|
||||
.html(menu.title)
|
||||
|
@ -2180,6 +2180,15 @@ requires
|
|||
that.bindEvent("hide_" + that.menus[position].options("id"), onHideMenu);
|
||||
});
|
||||
|
||||
if (self.options.extras.length) {
|
||||
that.extras = $("<div>")
|
||||
.addClass("OxExtras")
|
||||
.appendTo(that.$element);
|
||||
$.each(self.options.extras, function(position, extra) {
|
||||
extra.appendTo(that.extras);
|
||||
});
|
||||
}
|
||||
|
||||
function click(event) {
|
||||
var $target = $(event.target),
|
||||
position = typeof $target.data("position") != "undefined" ?
|
||||
|
|
|
@ -60,6 +60,41 @@
|
|||
})*/;
|
||||
|
||||
var mainMenu = new Ox.MainMenu({
|
||||
extras: [
|
||||
new Ox.Input({
|
||||
autocomplete: {
|
||||
"Find: Director": [
|
||||
"Luis Buñuel",
|
||||
"Adam Curtis",
|
||||
"Guy Debord",
|
||||
"Rainer Werner Fassbinder",
|
||||
"Jean-Luc Godard",
|
||||
"Todd Haynes",
|
||||
"Alfred Hitchcock",
|
||||
"David Lynch",
|
||||
"Jonas Mekas",
|
||||
"Martin Scorsese"
|
||||
],
|
||||
"Find: Title": [
|
||||
"A bout de souffle",
|
||||
"Casino",
|
||||
"Diaries, Notes and Sketches",
|
||||
"L'age d'or",
|
||||
"Far From Heaven",
|
||||
"In girum imus nocte et consumimur igni",
|
||||
"It Felt Like a Kiss",
|
||||
"Mulholland Dr.",
|
||||
"Querelle",
|
||||
"Vertigo"
|
||||
]
|
||||
},
|
||||
clear: true,
|
||||
highlight: true,
|
||||
id: "find",
|
||||
placeholder: ["Find: Director", "Find: Title"],
|
||||
selected: 1
|
||||
}).width(256)
|
||||
],
|
||||
menus: [
|
||||
{
|
||||
id: "oxjs",
|
||||
|
|
Loading…
Reference in New Issue
Block a user