Added support for multiple spaces in a row

also added button height fix for standard buttons without a caption
This commit is contained in:
Jonathan Frederic 2013-11-14 23:23:00 +00:00
parent ce53644d54
commit 59e7a04723
2 changed files with 6 additions and 5 deletions

View File

@ -38,10 +38,11 @@ define(["notebook/js/widget"], function(){
// Frontent -> Frontend Sync
update : function(){
var description = this.model.get('description');
description.replace(' ', ' ')
if (description.length == 0) {
this.$el.html(' '); // Preserve button height
this.$el.html(' '); // Preserve button height
} else {
this.$el.html(description);
this.$el.html(this.model.get('description'));
}
return IPython.WidgetView.prototype.update.call(this);

View File

@ -60,8 +60,8 @@ define(["notebook/js/widget"], function(){
update : function(){
var selected_item_text = this.model.get('value');
selected_item_text.replace(' ', '');
if (selected_item_text == '') {
selected_item_text.replace(' ', ' ');
if (selected_item_text.length == 0) {
this.$droplabel.html(' ');
} else {
this.$droplabel.html(this.model.get('value'));