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>
4747 <!-- <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> -->
4848 < 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 >
4949 </ 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 >
5056 <!-- </div> -->
5157 </ div >
5258 < div class ="container ">
Original file line number Diff line number Diff line change @@ -153,6 +153,21 @@ function update_buttons() {
153153 // }
154154}
155155
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+
156171// Delete selection
157172$ ( '#delete-notes-button' ) . click ( ( ) => {
158173 record_event ( {
Original file line number Diff line number Diff line change 1414 border-color : # 00c84a ;
1515}
1616
17+ div .input-group {
18+ width : 80% !important ;
19+ }
20+
1721/* #content>* {
1822 display: inline-block !important;
1923} */
You can’t perform that action at this time.
0 commit comments