notepad

Check-in [10d20b52c3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Need to ref "value" field of input element.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:10d20b52c329f7c39ad83b23b531f7042146fc3b503e4cf30f492bb40b6f5bea
User & Date: vandys 2018-10-12 13:01:55
Context
2018-10-12
13:10
Update install instructions check-in: ce0efa1827 user: vandys tags: master, trunk
13:01
Need to ref "value" field of input element. check-in: 10d20b52c3 user: vandys tags: master, trunk
13:01
Argh, need to provide the key. check-in: df124d1636 user: vandys tags: master, trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to js/main.js.

    72     72       mainmenu.style.display = "block";
    73     73       mainmenu.style.opacity = 1.0;
    74     74   }
    75     75   
    76     76   // They've chosen from our list of items
    77     77   function item_click(key) {
    78     78       cur_item = JSON.parse(localStorage[key]);
    79         -    entryTitle.textContent = cur_item.title;
           79  +    entryTitle.value = cur_item.title;
    80     80       entryTitle.readOnly = true;
    81     81       entryContent.value = cur_item.content;
    82     82       to_item();
    83     83   }
    84     84   
    85     85   // Sort notes by their alphabetic title ordering
    86     86   // (Maybe could order by tm/recentness instead?)
................................................................................
   144    144       }
   145    145       return tm;
   146    146   }
   147    147   
   148    148   // The current item should Go Away
   149    149   function edit_delete() {
   150    150       // Defend against fat finger
   151         -    if (!confirm("Delete " + entryTitle.textContent + "?")) {
          151  +    if (!confirm("Delete " + entryTitle.value + "?")) {
   152    152   	return;
   153    153       }
   154    154   
   155    155       // Storage gone, replace entry with time of deletion and null
   156    156       //  title (as a way to flag a deleted entry)
   157    157       const tm = timestamp();
   158    158       const resp = {"key": cur_item.key,