add shadow/transparency to autocompletion. removed a hide()/show() from publisher hide and show functions.

This commit is contained in:
Raphael Sofaer 2011-02-10 11:09:14 -08:00
parent a307519e94
commit 7a6d1d3378
3 changed files with 12 additions and 14 deletions

View file

@ -7,12 +7,10 @@
var Publisher = { var Publisher = {
close: function(){ close: function(){
Publisher.form().addClass('closed'); Publisher.form().addClass('closed');
Publisher.form().find(".options_and_submit").hide();
Publisher.form().find("textarea").css('min-height', ''); Publisher.form().find("textarea").css('min-height', '');
}, },
open: function(){ open: function(){
Publisher.form().removeClass('closed'); Publisher.form().removeClass('closed');
Publisher.form().find(".options_and_submit").show();
Publisher.form().find("textarea").css('min-height', '42px'); Publisher.form().find("textarea").css('min-height', '42px');
}, },
cachedForm : false, cachedForm : false,

View file

@ -1,14 +1,19 @@
.ac_results .ac_results
:border 1px solid #999 :border 1px solid #999
:background-color white :background-color transparent
:overflow hidden :overflow hidden
:z-index 99999 :z-index 99999
:width 247px !important :min-width 247px !important
:width 100%
:-webkit-border-radius 3px :-webkit-border-radius 3px
:-moz-border-radius 3px :-moz-border-radius 3px
:border-radius 3px :border-radius 3px
:-webkit-box-shadow 0 1px 3px #999
:-moz-box-shadow 0 1px 3px #999
:box-shadow 0 1px 3px #999
.ac_results ul .ac_results ul
:width 100% :width 100%
:list-style-position outside :list-style-position outside
@ -40,6 +45,11 @@
.ac_odd .ac_odd
:background-color #fafafa :background-color #fafafa
:background-color rgba(250,250,250,0.95)
.ac_even
:background-color #fff
:background-color rgba(255,255,255,0.95)
.ac_over .ac_over
:background-color #3F8FBA :background-color #3F8FBA

View file

@ -30,11 +30,6 @@ describe("Publisher", function() {
Publisher.open(); Publisher.open();
expect(Publisher.form().hasClass('closed')).toBeFalsy(); expect(Publisher.form().hasClass('closed')).toBeFalsy();
}); });
it("shows the options_and_submit div", function() {
expect(Publisher.form().find(".options_and_submit:visible").length).toBe(0);
Publisher.open();
expect(Publisher.form().find(".options_and_submit:visible").length).toBe(1);
});
}); });
describe("close", function() { describe("close", function() {
beforeEach(function() { beforeEach(function() {
@ -46,11 +41,6 @@ describe("Publisher", function() {
Publisher.close(); Publisher.close();
expect(Publisher.form().hasClass('closed')).toBeTruthy(); expect(Publisher.form().hasClass('closed')).toBeTruthy();
}); });
it("hides the options_and_submit div", function() {
expect(Publisher.form().find(".options_and_submit:visible").length).toBe(1);
Publisher.close();
expect(Publisher.form().find(".options_and_submit:visible").length).toBe(0);
});
}); });
describe("input", function(){ describe("input", function(){
beforeEach(function(){ beforeEach(function(){