diff --git a/assets/css/app.less b/assets/css/app.less index 24ed8a2..d1c9f1d 100644 --- a/assets/css/app.less +++ b/assets/css/app.less @@ -21,9 +21,7 @@ body { } .command { - border-width: 2px 0 0 0; - border-style: solid; - border-color: gray; + border-top: 2px solid @gray; form { margin: 0; .prompt { diff --git a/assets/js/view_models/client.coffee b/assets/js/view_models/client.coffee index aac9034..78a8782 100644 --- a/assets/js/view_models/client.coffee +++ b/assets/js/view_models/client.coffee @@ -87,7 +87,7 @@ class ClientView setSizes: -> inputWidthDiff = @input.outerWidth() - @input.width() @input.width($('.ui-layout-center').width() - inputWidthDiff - $('.prompt').outerWidth()) - @screen.height($('.ui-layout-center').height() - @input.outerHeight()) + @screen.height($('.ui-layout-center').height() - @input.outerHeight() - 2) # if an ace editor is present, call it's resize function # and set sizes for all the form elements to make them look prettier diff --git a/lib/context.coffee b/lib/context.coffee index 624872c..f9cdde7 100644 --- a/lib/context.coffee +++ b/lib/context.coffee @@ -50,6 +50,11 @@ class Context x serialize: (x) => + try + JSON.stringify x + catch error + throw new Error 'Unserializable property' + switch typeof x when 'object' if x == null diff --git a/lib/object.coffee b/lib/object.coffee index 3e7bd78..d23fc95 100644 --- a/lib/object.coffee +++ b/lib/object.coffee @@ -72,6 +72,8 @@ exports.RoomJsObject = class true else object = @db.findById id + if object.inheritsFrom @id + throw new Error 'Cannot create circular inheritance' if not object? throw new Error "Invalid object" @parent_id = id