fnp
/
fnpeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
79d1f9a
)
editor: openSelect view - maxHeight/maxWidth options
author
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 25 Mar 2014 13:51:16 +0000
(14:51 +0100)
committer
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 25 Mar 2014 13:51:16 +0000
(14:51 +0100)
src/editor/modules/metadataEditor/metadataEditor.less
patch
|
blob
|
history
src/editor/views/openSelect/openSelect.js
patch
|
blob
|
history
src/editor/views/openSelect/openSelect.less
patch
|
blob
|
history
diff --git
a/src/editor/modules/metadataEditor/metadataEditor.less
b/src/editor/modules/metadataEditor/metadataEditor.less
index
e214e71
..
caed061
100644
(file)
--- a/
src/editor/modules/metadataEditor/metadataEditor.less
+++ b/
src/editor/modules/metadataEditor/metadataEditor.less
@@
-40,4
+40,8
@@
padding:3px;
line-height:10px;
}
padding:3px;
line-height:10px;
}
+
+ .drop-menu {
+ overflow: auto;
+ }
}
\ No newline at end of file
}
\ No newline at end of file
diff --git
a/src/editor/views/openSelect/openSelect.js
b/src/editor/views/openSelect/openSelect.js
index
718a4a0
..
ef5b94a
100644
(file)
--- a/
src/editor/views/openSelect/openSelect.js
+++ b/
src/editor/views/openSelect/openSelect.js
@@
-24,6
+24,12
@@
var OpenSelect = Backbone.View.extend({
this.input = $(this.options.inputTemplate);
this.$('.input-wrapper').append(this.input);
}
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');
},
toggleHandler: function(toggle) {
this.$('.toggle').css('visibility', toggle ? 'inherit' : 'hidden');
diff --git
a/src/editor/views/openSelect/openSelect.less
b/src/editor/views/openSelect/openSelect.less
index
4031ce5
..
6209696
100644
(file)
--- a/
src/editor/views/openSelect/openSelect.less
+++ b/
src/editor/views/openSelect/openSelect.less
@@
-18,4
+18,8
@@
width: calc(~"100% - 1em");
margin-top: -@lineHeight;
}
width: calc(~"100% - 1em");
margin-top: -@lineHeight;
}
+
+ .dropdown-menu {
+ overflow: auto;
+ }
}
\ No newline at end of file
}
\ No newline at end of file