diff options
| author | Aaron Parecki <aaron@parecki.com> | 2015-05-11 17:42:06 +0200 | 
|---|---|---|
| committer | Aaron Parecki <aaron@parecki.com> | 2015-05-11 17:42:06 +0200 | 
| commit | cb93a9925be700e5e1b0314f6cf66b19e7da5a34 (patch) | |
| tree | 7d2cda6a0e4575a658104cdb298cfd9cd77f97d7 /views/editor.php | |
| parent | 475175da5fd90162930acc123712a529f809f961 (diff) | |
adds a simple publish status UI to show errors
Diffstat (limited to 'views/editor.php')
| -rw-r--r-- | views/editor.php | 32 | 
1 files changed, 31 insertions, 1 deletions
| diff --git a/views/editor.php b/views/editor.php index eeb3c53..2383af5 100644 --- a/views/editor.php +++ b/views/editor.php @@ -47,7 +47,7 @@      <span class="item text"><span id="draft-status">Draft</span></span>    </div>    <div class="toolbar-right"> -    <button class="btn" id="publish_btn"><span>Publish</span> <i class="fa fa-caret-down"></i></button> +    <button class="btn" id="publish_btn">Publish <i class="fa fa-caret-down"></i></button>      <button class="btn" id="new_btn">New</button>    </div>    <div class="clear"></div> @@ -55,6 +55,36 @@  <div class="publish-dropdown hidden">    <div class="arrow"></div> +  <div class="dropdown-content action-publish"> + +    <div style="float:right"><button class="btn btn-medium" id="publish-confirm">Publish Now</button></div> +    <div style="clear:right;"></div> + +    <div class="helptext" id="publish-help"> +      <div>Clicking "Publish Now" will send a request to your Micropub endpoint.</div><br> +      <div>The request will include two fields, "name" and "content", where the content will be the full HTML for this post.</div> +    </div> + +    <div class="helptext hidden" id="publish-in-progress"> +      Posting... <!-- TODO replace this with a CSS animated spinner --> +    </div> + +    <div class="helptext hidden" id="publish-success"> +      <div>It worked! The post is on your site!</div><br> +      <div><a href="" id="publish-success-url">View your post</a></div> +    </div> + +    <div class="helptext hidden" id="publish-error"> +      <div>Something went wrong! Below is the response from your Micropub endpoint.</div><br> +      <pre id="publish-error-debug"></pre> +    </div> + +  </div> +  <div class="dropdown-content action-signin hidden"> +    <div class="helptext">You need to sign in before you can publish! Don't worry, your draft will still be here when you finish signing in.</div> +    <input type="url" class="form-field-small" placeholder="yourdomain.com" id="signin-domain"> +    <button class="btn btn-small" id="signin-btn">Sign In</button> +  </div>  </div>  <div class="container"> | 
