aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-10-26 14:02:17 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-10-26 14:02:17 +0200
commit951c73d825a024aee6729d645afd97c7fa53c760 (patch)
treea0b44d0d13332490c69c9ce443dda54348f133be
parentdc212de9606422be6e912a0bb7f3569192942938 (diff)
downloadvolse-hubzilla-951c73d825a024aee6729d645afd97c7fa53c760.tar.gz
volse-hubzilla-951c73d825a024aee6729d645afd97c7fa53c760.tar.bz2
volse-hubzilla-951c73d825a024aee6729d645afd97c7fa53c760.zip
style autocomplete popup in themes
-rw-r--r--js/fk.autocomplete.js18
-rw-r--r--view/theme/dispy/style.css21
-rw-r--r--view/theme/duepuntozero/style.css21
-rw-r--r--view/theme/loozah/style.css32
-rw-r--r--view/theme/quattro/quattro.less23
-rw-r--r--view/theme/quattro/style.css24
-rw-r--r--view/theme/testbubble/style.css40
7 files changed, 166 insertions, 13 deletions
diff --git a/js/fk.autocomplete.js b/js/fk.autocomplete.js
index bf96e6937..e58ed18cd 100644
--- a/js/fk.autocomplete.js
+++ b/js/fk.autocomplete.js
@@ -18,19 +18,21 @@ function ACPopup(elm,backend_url){
w = $(elm).width();
h = $(elm).height();
style.top=style.top+h;
- style['max-height'] = '150px';
style.width = w;
+ style.position = 'absolute';
+/* style['max-height'] = '150px';
style.border = '1px solid red';
style.background = '#cccccc';
- style.position = 'absolute';
+
style.overflow = 'auto';
style['z-index'] = '100000';
+*/
style.display = 'none';
this.cont = $("<div class='acpopup'></div>");
this.cont.css(style);
- $(elm).after(this.cont);
+ $("body").append(this.cont);
}
ACPopup.prototype.close = function(){
$(this.cont).remove();
@@ -40,7 +42,7 @@ ACPopup.prototype.search = function(text){
var that = this;
this.searchText=text;
if (this.kp_timer) clearTimeout(this.kp_timer);
- this.kp_timer = setTimeout( function(){that._search();}, 1000);
+ this.kp_timer = setTimeout( function(){that._search();}, 500);
}
ACPopup.prototype._search = function(){
console.log("_search");
@@ -104,8 +106,8 @@ ACPopup.prototype.onkey = function(event){
}
if (event.keyCode == '38' || event.keyCode == '40' ) {
- this.cont.children().css({background:'#cccccc'}).removeClass('selected');
- $(this.cont.children()[this.idsel]).css({background:'#ccccff'}).addClass('selected');
+ this.cont.children().removeClass('selected');
+ $(this.cont.children()[this.idsel]).addClass('selected');
}
if (event.keyCode == '27') { //ESC
@@ -147,9 +149,11 @@ function ContactAutocomplete(element,backend_url){
* jQuery plugin 'contact_autocomplete'
*/
(function( $ ){
+ var map=new Array();
$.fn.contact_autocomplete = function(backend_url) {
this.each(function(){
- new ContactAutocomplete(this, backend_url);
+ if (this in map) return;
+ map[this] = new ContactAutocomplete(this, backend_url);
});
};
})( jQuery );
diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css
index 3c92a877b..0d8b54698 100644
--- a/view/theme/dispy/style.css
+++ b/view/theme/dispy/style.css
@@ -1250,3 +1250,24 @@ footer { display: block; margin: 50px 20%; clear: both; }
/** /acl **/
+/* autocomplete popup */
+.acpopup {
+ max-height:150px;
+ background-color:#555753;
+ color: #FFFFFF;
+ overflow:auto;
+ z-index:100000;
+ border:1px solid #cccccc;
+}
+.acpopupitem {
+ background-color:#555753; padding: 4px;
+ clear:left;
+}
+.acpopupitem img {
+ float: left;
+ margin-right: 4px;
+}
+
+.acpopupitem.selected {
+ color: #2e3436; background-color: #eeeeec;
+}
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index b870f6bd5..d595c7495 100644
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -2833,3 +2833,24 @@ a.mail-list-link {
.type-text { background-position: -60px 0px; }
.type-unkn { background-position: -80px 0px; }
+
+/* autocomplete popup */
+.acpopup {
+ max-height:150px;
+ background-color:#ffffff;
+ overflow:auto;
+ z-index:100000;
+ border:1px solid #cccccc;
+}
+.acpopupitem {
+ background-color:#ffffff; padding: 4px;
+ clear:left;
+}
+.acpopupitem img {
+ float: left;
+ margin-right: 4px;
+}
+
+.acpopupitem.selected {
+ color: #FFFFFF; background: #3465A4;
+}
diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css
index 447072390..42b99b08c 100644
--- a/view/theme/loozah/style.css
+++ b/view/theme/loozah/style.css
@@ -2745,9 +2745,31 @@ a.mail-list-link {
margin-top: 10px;
}
-.type-video { background-position: 0px; 0px; }
-.type-image { background-position: -20px; 0px; }
-.type-audio { background-position: -40px; 0px; }
-.type-text { background-position: -60px; 0px; }
-.type-unkn { background-position: -80px; 0px; }
+.type-video { background-position: 0px 0px; }
+.type-image { background-position: -20px 0px; }
+.type-audio { background-position: -40px 0px; }
+.type-text { background-position: -60px 0px; }
+.type-unkn { background-position: -80px 0px; }
+
+/* autocomplete popup */
+.acpopup {
+ max-height:150px;
+ background-color:#ffffff;
+ overflow:auto;
+ z-index:100000;
+ border:1px solid #cccccc;
+}
+.acpopupitem {
+ background-color:#ffffff; padding: 4px;
+ clear:left;
+}
+.acpopupitem img {
+ float: left;
+ margin-right: 4px;
+}
+
+.acpopupitem.selected {
+ color: #FFFFFF; background: #3465A4;
+}
+
diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less
index 1fbeb7ae2..ea699d5c6 100644
--- a/view/theme/quattro/quattro.less
+++ b/view/theme/quattro/quattro.less
@@ -192,6 +192,29 @@ ul.menu-popup {
}
+/* autocomplete popup */
+.acpopup {
+ max-height:150px;
+ background-color:@MenuBg;
+ color: @Menu;
+ border:1px solid #MenuBorder;
+ overflow:auto;
+ z-index:100000;
+ .shadow();
+}
+.acpopupitem {
+ color: @MenuItem; padding: 4px;
+ clear:left;
+ img {
+ float: left;
+ margin-right: 4px;
+ }
+ &.selected{
+ background-color: @MenuItemHoverBg;
+ }
+}
+
+
#nav-notifications-menu {
width: 400px;
img { float: left; margin-right: 5px; }
diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css
index 585214233..95c3d087e 100644
--- a/view/theme/quattro/style.css
+++ b/view/theme/quattro/style.css
@@ -388,6 +388,30 @@ ul.menu-popup .empty {
text-align: center;
color: #9eabb0;
}
+/* autocomplete popup */
+.acpopup {
+ max-height: 150px;
+ background-color: #ffffff;
+ color: #2d2d2d;
+ border: 1px solid #MenuBorder;
+ overflow: auto;
+ z-index: 100000;
+ -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+ -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+ box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+}
+.acpopupitem {
+ color: #2d2d2d;
+ padding: 4px;
+ clear: left;
+}
+.acpopupitem img {
+ float: left;
+ margin-right: 4px;
+}
+.acpopupitem.selected {
+ background-color: #bdcdd4;
+}
#nav-notifications-menu {
width: 400px;
}
diff --git a/view/theme/testbubble/style.css b/view/theme/testbubble/style.css
index b7c20ab17..9c04ec4ba 100644
--- a/view/theme/testbubble/style.css
+++ b/view/theme/testbubble/style.css
@@ -823,7 +823,7 @@ profile-jot-banner-wrapper {
/* ======== */
.tabs {
- width: 500px;
+ min-width: 500px;
list-style: none;
padding: 10px;
margin: 0px 0px 10px 0px;
@@ -3086,3 +3086,41 @@ ul.menu-popup {
#jGrowl {
z-index: 20000;
}
+
+/* autocomplete popup */
+.acpopup {
+ max-height:150px;
+ overflow:auto;
+ z-index:100000;
+
+ color: #2e3436;
+ border-top: 0px;
+ background: #eeeeee;
+ border-right: 1px solid #dddddd;
+ border-left: 1px solid #dddddd;
+ border-bottom: 1px solid #dddddd;
+ -webkit-border-radius: 0px 5px 5px 5px;
+ -moz-border-radius: 0px 5px 5px 5px;
+ border-radius: 0px 5px 5px 5px;
+ -moz-box-shadow: 3px 3px 4px #959494;
+ -webkit-box-shadow: 3px 3px 4px #959494;
+ box-shadow: 3px 3px 4px #959494;
+
+}
+.acpopupitem {
+ color: #2e3436; padding: 4px;
+ clear:left;
+}
+.acpopupitem img {
+ float: left;
+ margin-right: 4px;
+}
+
+.acpopupitem.selected {
+ color: #efefef;
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) );
+ background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808');
+ background-color:#b20202;
+ order-bottom: none;
+}