diff --git a/css/style.css b/css/style.css index 0c0293b..3cbb937 100644 --- a/css/style.css +++ b/css/style.css @@ -3,7 +3,7 @@ * Basic */ -.cutomjs { +.customjs { position: relative; overflow: hidden; padding: 12px 24px; @@ -14,6 +14,15 @@ font-family: Arial, Helvetica, sans-serif; } +.customjs.customjs--error { + width: 400px; + height: 75px; +} + +.customjs.customjs--error form { + display: none; +} + a, a:hover, .blue-text, @@ -158,8 +167,8 @@ a:hover { } .controls__save input { - font-size: 18px; margin-right: 10px; + font-size: 18px; } .controls__remove-draft { diff --git a/lib/popup.js b/lib/popup.js index 7ac884f..32292d0 100644 --- a/lib/popup.js +++ b/lib/popup.js @@ -3,6 +3,7 @@ var popup = { key: 'popup', el: { + popup: $('#customjs'), popupForm: $('#popup-form'), hostSelect: $('#host'), hostGoToLink: $('#goto-host'), @@ -16,7 +17,8 @@ sourceEditor: $('#ace-editor'), saveBtn: $('#save'), resetBtn: $('#reset'), - draftRemoveLink: $('#draft-remove') + draftRemoveLink: $('#draft-remove'), + error: $('#error') }, title: { host: { @@ -367,7 +369,8 @@ return false; }, error: function() { - alert('err'); + popup.el.popup.addClass('customjs--error'); + popup.el.error.removeClass('is-hidden'); } }; diff --git a/popup.html b/popup.html index 14bf6bf..9b3c8b9 100644 --- a/popup.html +++ b/popup.html @@ -13,7 +13,7 @@ -
+
+