File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ <h3>PowerNote</h3>
47
47
<!-- <button id="deselect-notes-button" type="button" class="btn btn-primary btn-block" data-toggle="tooltip" data-placement="right" title="Redo the last undone action">Redo</button> -->
48
48
< button id ="number-notes-button " type ="button " class ="btn btn-primary btn-block " data-toggle ="tooltip " data-placement ="right " title ="Convert selected notes into a numbered list "> Number</ button >
49
49
</ div >
50
+ < div class ="input-group mb-3 ">
51
+ < div class ="input-group-prepend ">
52
+ < span class ="input-group-text " id ="basic-addon3 "> Add</ span >
53
+ </ div >
54
+ < input id ="add-note-field " class ="form-control " aria-describedby ="basic-addon3 " type ="text " data-toggle ="tooltip " data-placement ="right " title ="Quick add a new note " placeholder ="New "> </ input >
55
+ </ div >
50
56
<!-- </div> -->
51
57
</ div >
52
58
< div class ="container ">
Original file line number Diff line number Diff line change @@ -153,6 +153,21 @@ function update_buttons() {
153
153
// }
154
154
}
155
155
156
+ function add_note ( content ) {
157
+ notes . push ( content ) ;
158
+ }
159
+
160
+ $ ( '#add-note-field' ) . keyup ( function ( event ) {
161
+ if ( event . keyCode === 13 ) {
162
+ var note_text = $ ( '#add-note-field' ) . val ( ) ;
163
+ console . log ( note_text )
164
+ add_note ( note_text ) ;
165
+ $ ( '#notes-panel' ) . append ( load_note ( note_text ) ) ;
166
+ sync ( ) ;
167
+ $ ( '#add-note-field' ) . val ( '' ) ;
168
+ }
169
+ } ) ;
170
+
156
171
// Delete selection
157
172
$ ( '#delete-notes-button' ) . click ( ( ) => {
158
173
record_event ( {
Original file line number Diff line number Diff line change 14
14
border-color : # 00c84a ;
15
15
}
16
16
17
+ div .input-group {
18
+ width : 80% !important ;
19
+ }
20
+
17
21
/* #content>* {
18
22
display: inline-block !important;
19
23
} */
You can’t perform that action at this time.
0 commit comments