improved pool interface

This commit is contained in:
albert
2011-03-04 18:50:38 -05:00
parent e431452a11
commit a281bf03ed
11 changed files with 105 additions and 18 deletions

View File

@@ -1423,10 +1423,26 @@ $(document).ready(function() {
Danbooru.Pool.initialize_add_to_pool_link = function() {
$("#add-to-pool-dialog").dialog({autoOpen: false});
$("#c-pools-posts #a-new input[type=text]").autocomplete({
source: function(req, resp) {
$.getJSON(
"/pools.json?search[name_contains]=" + req.term,
function(data) {
resp(data.map(function(x) {return x.pool.name;}));
}
);
},
minLength: 4,
});
$("a#pool").click(function() {
$("#add-to-pool-dialog").dialog("open");
return false;
});
$("ul#recent-pools li").click(function() {
$("#pool_name").val($(this).html());
});
}
Danbooru.Pool.initialize_simple_edit = function() {

View File

@@ -9,10 +9,26 @@
Danbooru.Pool.initialize_add_to_pool_link = function() {
$("#add-to-pool-dialog").dialog({autoOpen: false});
$("#c-pools-posts #a-new input[type=text]").autocomplete({
source: function(req, resp) {
$.getJSON(
"/pools.json?search[name_contains]=" + req.term,
function(data) {
resp(data.map(function(x) {return x.pool.name;}));
}
);
},
minLength: 4,
});
$("a#pool").click(function() {
$("#add-to-pool-dialog").dialog("open");
return false;
});
$("ul#recent-pools li").click(function() {
$("#pool_name").val($(this).html());
});
}
Danbooru.Pool.initialize_simple_edit = function() {

View File

@@ -217,6 +217,16 @@ form.simple_form div.input {
div.dtext p {
margin-bottom: 1em; }
/*** Pools Posts ***/
div#c-pools-posts div#a-new form {
margin-bottom: 1em; }
div#c-pools-posts div#a-new h1 {
font-size: 1.2em;
font-weight: bold; }
div#c-pools-posts div#a-new li {
margin-left: 1em;
cursor: pointer; }
/*** Pools ***/
div#c-pools div#a-edit p {
margin-bottom: 1em;

View File

@@ -309,6 +309,28 @@ div.dtext {
}
/*** Pools Posts ***/
div#c-pools-posts {
div#a-new {
form {
margin-bottom: 1em;
}
h1 {
font-size: 1.2em;
font-weight: bold;
}
li {
margin-left: 1em;
cursor: pointer;
}
}
}
/*** Pools ***/
div#c-pools {