Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool tips and save status snack bar #1009

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,47 @@


<script src="bower_components/modernizr/modernizr.js"></script>
<style>
#snackbar {
visibility: hidden;
min-width: 250px;
margin-left: -125px;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
padding: 16px;
position: fixed;
z-index: 1;
left: 50%;
bottom: 30px;
}

#snackbar.show {
visibility: visible;
-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
animation: fadein 0.5s, fadeout 0.5s 2.5s;
}
@-webkit-keyframes fadein {
from {bottom: 0; opacity: 0;}
to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
from {bottom: 0; opacity: 0;}
to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
from {bottom: 30px; opacity: 1;}
to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
from {bottom: 30px; opacity: 1;}
to {bottom: 0; opacity: 0;}
}
</style>
</head>
<body class="-noscroll">

Expand Down Expand Up @@ -62,5 +103,9 @@

<!-- {{cordova}} -->
<script data-main="scripts/main" src="bower_components/requirejs/require.js"></script>

<!-- The actual snackbar -->
<div id="snackbar">The note has been saved successfully.</div>

</body>
</html>
3 changes: 2 additions & 1 deletion app/scripts/apps/navbar/show/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
<span id="header--sync--icon" class="icon-arrows"></span>
</button>
<% } %>
<button id="header--add" class="header--add btn btn-danger">
<button id="header--add" class="header--add btn btn-danger"
data-toggle="tooltip" data-placement="bottom" title="Create new note">
<span class="icon-doc-new"></span>
</button>
</div>
Expand Down
4 changes: 4 additions & 0 deletions app/scripts/apps/notes/form/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ define([
Radio.request('global', 'set:title', title);
}

var x = document.getElementById("snackbar");
x.className = "show";
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);

return Radio.request('notes', 'save', self.view.model, data, self.view.options.saveTags);
})
.fail(function(e) {
Expand Down
33 changes: 22 additions & 11 deletions app/scripts/modules/codemirror/templates/editor.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,56 @@
<div class="editor--bar dropdown text-center">
<div class="btn-group editor--btns">
<span data-action="bold" data-state="strong" class="btn btn--wysiwyg">
<span data-action="bold" data-state="strong" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Bold (ctrl+B)">
<i class="icon-bold"></i>
</span>
<span data-action="italic" data-state="em" class="btn btn--wysiwyg">
<span data-action="italic" data-state="em" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Italic (ctrl+I)">
<i class="icon-italic"></i>
</span>
<span data-action="heading" data-state="header" class="btn btn--wysiwyg">
<span data-action="heading" data-state="header" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Font Size">
<i class="icon-font"></i>
</span>
</div>

<div class="btn-group editor--btns">
<span data-action="link" data-state="link" class="btn btn--wysiwyg">
<span data-action="link" data-state="link" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Hyperlink">
<i class="icon-globe"></i>
</span>
<span data-action="attachment" class="btn btn--wysiwyg">
<span data-action="attachment" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Attach a file">
<i class="icon-picture"></i>
</span>
<span data-action="code" data-state="comment" class="btn btn--wysiwyg">
<span data-action="code" data-state="comment" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Add a code snippet">
<i class="icon-code"></i>
</span>
</div>

<div class="btn-group editor--btns">
<span data-action="numberedList" data-state="ordered-list" class="btn btn--wysiwyg">
<span data-action="numberedList" data-state="ordered-list" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Numbered list (ctrl+O)">
<i class="icon-list-numbered"></i>
</span>
<span data-action="list" data-state="unordered-list" class="btn btn--wysiwyg">
<span data-action="list" data-state="unordered-list" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Bulleted list (ctrl+U)">
<i class="icon-list-bullet"></i>
</span>
<span data-action="hr" data-state="hr" class="btn btn--wysiwyg">
<span data-action="hr" data-state="hr" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Add a horizontal line">
<i class="icon-minus"></i>
</span>
</div>

<div class="btn-group editor--btns">
<span data-action="undo" class="btn btn--wysiwyg">
<span data-action="undo" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Undo">
<i class="icon-reply"></i>
</span>
<span data-action="redo" class="btn btn--wysiwyg">
<span data-action="redo" class="btn btn--wysiwyg"
data-toggle="tooltip" data-placement="bottom" title="Redo">
<i class="icon-share"></i>
</span>
</div>
Expand Down
10 changes: 10 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0; url=https://anuttharadesilva.github.io/laverna/app/index.html">
<title>Document</title>
</head>
<body>

</body>
</html>