mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Fix typography logic in cowyo.js
This commit is contained in:
parent
a58f4ca346
commit
8c5c025dd1
File diff suppressed because one or more lines are too long
@ -7,7 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestListFiles(t *testing.T) {
|
func TestListFiles(t *testing.T) {
|
||||||
pathToData = "testdata"
|
pathToData := "testdata"
|
||||||
os.MkdirAll(pathToData, 0755)
|
os.MkdirAll(pathToData, 0755)
|
||||||
defer os.RemoveAll(pathToData)
|
defer os.RemoveAll(pathToData)
|
||||||
s := Site{PathToData: pathToData}
|
s := Site{PathToData: pathToData}
|
||||||
@ -34,7 +34,7 @@ func TestListFiles(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGeneral(t *testing.T) {
|
func TestGeneral(t *testing.T) {
|
||||||
pathToData = "testdata"
|
pathToData := "testdata"
|
||||||
os.MkdirAll(pathToData, 0755)
|
os.MkdirAll(pathToData, 0755)
|
||||||
defer os.RemoveAll(pathToData)
|
defer os.RemoveAll(pathToData)
|
||||||
s := Site{PathToData: pathToData}
|
s := Site{PathToData: pathToData}
|
||||||
|
@ -270,7 +270,13 @@ $(window).load(function() {
|
|||||||
|
|
||||||
$("#lockPage").click(function(e) {
|
$("#lockPage").click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var passphrase = prompt("Please enter a passphrase to lock", "");
|
|
||||||
|
var passphrase;
|
||||||
|
if ($('#lockPage').text() == "Lock")
|
||||||
|
passphrase = prompt("Please enter a passphrase to lock", "");
|
||||||
|
else
|
||||||
|
passphrase = prompt("Please enter a passphrase to unlock", "");
|
||||||
|
|
||||||
if (passphrase != null) {
|
if (passphrase != null) {
|
||||||
if ($('#lockPage').text() == "Lock") {
|
if ($('#lockPage').text() == "Lock") {
|
||||||
$('#saveEditButton').removeClass();
|
$('#saveEditButton').removeClass();
|
||||||
|
Loading…
Reference in New Issue
Block a user