editor: openSelect view - maxHeight/maxWidth options
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 25 Mar 2014 13:51:16 +0000 (14:51 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 25 Mar 2014 13:51:16 +0000 (14:51 +0100)
src/editor/modules/metadataEditor/metadataEditor.less
src/editor/views/openSelect/openSelect.js
src/editor/views/openSelect/openSelect.less

index e214e71..caed061 100644 (file)
@@ -40,4 +40,8 @@
         padding:3px;
         line-height:10px;
     }
+
+    .drop-menu {
+        overflow: auto;
+    }
 }
\ No newline at end of file
index 718a4a0..ef5b94a 100644 (file)
@@ -24,6 +24,12 @@ var OpenSelect = Backbone.View.extend({
             this.input = $(this.options.inputTemplate);
             this.$('.input-wrapper').append(this.input);
         }
+        if(this.options.maxHeight) {
+            this.menu.css('max-height', this.options.maxHeight);
+        }
+        if(this.options.maxWidth) {
+            this.menu.css('max-width', this.options.maxWidth);
+        }
     },
     toggleHandler: function(toggle) {
         this.$('.toggle').css('visibility', toggle ? 'inherit' : 'hidden');
index 4031ce5..6209696 100644 (file)
@@ -18,4 +18,8 @@
         width: calc(~"100% - 1em");
         margin-top: -@lineHeight;
     }
+
+    .dropdown-menu {
+        overflow: auto;
+    }
 }
\ No newline at end of file