Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'release/2.0.2'

  • Loading branch information...
commit 828e3cf15c98f620694ce7296a8e2ab75f45c8f3 2 parents 97f18c1 + 3fbb601
Justin Hileman bobthecow authored
12 CHANGELOG.markdown
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:
2  VERSION
View
@@ -1 +1 @@
-2.0.1
+2.0.2
20 genghis.php
View
10 additions, 10 deletions not shown
16 genghis.rb
View
8 additions, 8 deletions not shown
6 src/css/editor.less
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 {
2  src/css/overrides.less
View
@@ -43,7 +43,7 @@
.dropdown-menu {
li a {
- padding-right: 45px;
+ padding-right: 4em;
position: relative;
span {
padding: 0 6px;
4 src/js/genghis/json.js
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
6 src/js/genghis/views/document_view.js
View
@@ -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));
9 src/js/genghis/views/nav_section.js
View
@@ -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');
+ }
+ });
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.