Permalink
Browse files

Merge branch 'release/2.0.2'

  • Loading branch information...
2 parents 97f18c1 + 3fbb601 commit 828e3cf15c98f620694ce7296a8e2ab75f45c8f3 @bobthecow bobthecow committed Sep 19, 2012
View
@@ -1,3 +1,15 @@
+## v2.0.2
+
+ * Fix #29 — Don't throw unexpected unary expression error when parsing negative numbers.
+ * Fix #22 — Handle high badge counts on nav dropdown.
+ * Fix #30 — Weird content clipping when editing really long documents.
+
+
+## v2.0.1
+
+ * Fix #26 — Don't double-encode HTML entities in JSON output.
+
+
## v2.0.0
Brand new features:
View
@@ -1 +1 @@
-2.0.1
+2.0.2
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -15,14 +15,8 @@
display: none;
}
padding: 0;
- height: 400px;
background-color: white;
.clearfix;
- .CodeMirror-scroll {
- // CodeMirror should auto-adjust height inside a document view.
- height: auto;
- overflow: visible;
- }
}
&.focused {
div.well {
View
@@ -43,7 +43,7 @@
.dropdown-menu {
li a {
- padding-right: 45px;
+ padding-right: 4em;
position: relative;
span {
padding: 0 6px;
View
@@ -27,7 +27,8 @@ Genghis.JSON = {
'ObjectExpression': true,
'ArrayExpression': true,
'NewExpression': true,
- 'CallExpression': true
+ 'CallExpression': true,
+ 'UnaryExpression': true
};
var errors = [];
@@ -255,6 +256,7 @@ Genghis.JSON = {
case 'Identifier':
case 'ArrayExpression':
case 'ObjectExpression':
+ case 'UnaryExpression':
break;
// Normally literals get a pass
@@ -62,11 +62,9 @@ Genghis.Views.DocumentView = Genghis.Views.BaseDocument.extend({
var $well = this.$('.well');
var height = Math.max(180, Math.min(600, $well.height() + 40));
- $well.height(height);
var textarea = $('<textarea id="editor-'+this.model.id+'"></textarea>')
.text(this.model.JSONish())
- .appendTo($well)
- .height(height);
+ .appendTo($well);
this.$('.document').hide();
@@ -80,6 +78,8 @@ Genghis.Views.DocumentView = Genghis.Views.BaseDocument.extend({
}
}));
+ this.editor.setSize(null, height);
+
setTimeout(this.editor.focus, 50);
textarea.resize(_.throttle(this.editor.refresh, 100));
@@ -25,5 +25,14 @@ Genghis.Views.NavSection = Backbone.View.extend({
},
renderMenu: function() {
this.$('ul.dropdown-menu').html(this.menuTemplate.render({model: this.model, collection: this.collection}));
+
+ // Handle really wide badges on the menu dropdown
+ this.$('ul.dropdown-menu a span').each(function(i, el) {
+ var $el = $(el);
+ var len = $el.text().length;
+ if (len > 3) {
+ $el.parent().css('padding-right', '' + (len + 0.5) + 'em');
+ }
+ });
}
});

0 comments on commit 828e3cf

Please sign in to comment.