Compare commits

..

No commits in common. "bbaa084ae0f1ddfe0080974907373e32f8b556d2" and "58f83c72c28eb4deec0b880aa12add5e7e700d70" have entirely different histories.

16 changed files with 78 additions and 321 deletions

View File

@ -38,7 +38,6 @@
"symfony/string": "6.4.*",
"symfony/translation": "6.4.*",
"symfony/twig-bundle": "6.4.*",
"symfony/uid": "6.4.*",
"symfony/ux-turbo": "^2.16",
"symfony/validator": "6.4.*",
"symfony/web-link": "6.4.*",

View File

@ -1,44 +0,0 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240429202122 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__notes AS SELECT id, speaker_id, series_id, title, text, date, passage FROM notes');
$this->addSql('DROP TABLE notes');
$this->addSql('CREATE TABLE notes (id INTEGER NOT NULL, speaker_id INTEGER NOT NULL, series_id INTEGER DEFAULT NULL, title VARCHAR(255) NOT NULL, text CLOB NOT NULL, date DATE NOT NULL, passage VARCHAR(255) DEFAULT NULL, refs CLOB DEFAULT NULL --(DC2Type:array)
, PRIMARY KEY(id), CONSTRAINT FK_11BA68CD04A0F27 FOREIGN KEY (speaker_id) REFERENCES speaker (id) ON UPDATE NO ACTION ON DELETE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_11BA68C5278319C FOREIGN KEY (series_id) REFERENCES series (id) ON UPDATE NO ACTION ON DELETE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO notes (id, speaker_id, series_id, title, text, date, passage) SELECT id, speaker_id, series_id, title, text, date, passage FROM __temp__notes');
$this->addSql('DROP TABLE __temp__notes');
$this->addSql('CREATE INDEX IDX_11BA68C5278319C ON notes (series_id)');
$this->addSql('CREATE INDEX IDX_11BA68CD04A0F27 ON notes (speaker_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__notes AS SELECT id, speaker_id, series_id, title, text, date, passage FROM notes');
$this->addSql('DROP TABLE notes');
$this->addSql('CREATE TABLE notes (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, speaker_id INTEGER NOT NULL, series_id INTEGER DEFAULT NULL, title VARCHAR(255) NOT NULL, text CLOB NOT NULL, date DATE NOT NULL, passage VARCHAR(255) DEFAULT NULL, CONSTRAINT FK_11BA68CD04A0F27 FOREIGN KEY (speaker_id) REFERENCES speaker (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_11BA68C5278319C FOREIGN KEY (series_id) REFERENCES series (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO notes (id, speaker_id, series_id, title, text, date, passage) SELECT id, speaker_id, series_id, title, text, date, passage FROM __temp__notes');
$this->addSql('DROP TABLE __temp__notes');
$this->addSql('CREATE INDEX IDX_11BA68CD04A0F27 ON notes (speaker_id)');
$this->addSql('CREATE INDEX IDX_11BA68C5278319C ON notes (series_id)');
}
}

View File

@ -1,45 +0,0 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240429204731 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__notes AS SELECT id, speaker_id, series_id, title, text, date, passage, refs FROM notes');
$this->addSql('DROP TABLE notes');
$this->addSql('CREATE TABLE notes (id VARCHAR(64) NOT NULL, speaker_id INTEGER NOT NULL, series_id INTEGER DEFAULT NULL, title VARCHAR(255) NOT NULL, text CLOB NOT NULL, date DATE NOT NULL, passage VARCHAR(255) DEFAULT NULL, refs CLOB DEFAULT NULL --(DC2Type:json)
, CONSTRAINT FK_11BA68CD04A0F27 FOREIGN KEY (speaker_id) REFERENCES speaker (id) ON UPDATE NO ACTION ON DELETE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_11BA68C5278319C FOREIGN KEY (series_id) REFERENCES series (id) ON UPDATE NO ACTION ON DELETE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO notes (id, speaker_id, series_id, title, text, date, passage, refs) SELECT id, speaker_id, series_id, title, text, date, passage, refs FROM __temp__notes');
$this->addSql('DROP TABLE __temp__notes');
$this->addSql('CREATE INDEX IDX_11BA68CD04A0F27 ON notes (speaker_id)');
$this->addSql('CREATE INDEX IDX_11BA68C5278319C ON notes (series_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__notes AS SELECT id, speaker_id, series_id, title, text, date, passage, refs FROM notes');
$this->addSql('DROP TABLE notes');
$this->addSql('CREATE TABLE notes (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, speaker_id INTEGER NOT NULL, series_id INTEGER DEFAULT NULL, title VARCHAR(255) NOT NULL, text CLOB NOT NULL, date DATE NOT NULL, passage VARCHAR(255) DEFAULT NULL, refs CLOB DEFAULT NULL --(DC2Type:array)
, CONSTRAINT FK_11BA68CD04A0F27 FOREIGN KEY (speaker_id) REFERENCES speaker (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_11BA68C5278319C FOREIGN KEY (series_id) REFERENCES series (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO notes (id, speaker_id, series_id, title, text, date, passage, refs) SELECT id, speaker_id, series_id, title, text, date, passage, refs FROM __temp__notes');
$this->addSql('DROP TABLE __temp__notes');
$this->addSql('CREATE INDEX IDX_11BA68CD04A0F27 ON notes (speaker_id)');
$this->addSql('CREATE INDEX IDX_11BA68C5278319C ON notes (series_id)');
}
}

View File

@ -1,57 +0,0 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240429224611 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__notes AS SELECT speaker_id, series_id, id, title, text, date, passage, refs FROM notes');
$this->addSql('DROP TABLE notes');
$this->addSql('CREATE TABLE notes (id VARCHAR(64) NOT NULL, speaker_id INTEGER NOT NULL, series_id INTEGER DEFAULT NULL, title VARCHAR(255) NOT NULL, text CLOB NOT NULL, date DATE NOT NULL, passage VARCHAR(255) DEFAULT NULL, refs CLOB DEFAULT NULL --(DC2Type:json)
, PRIMARY KEY(id), CONSTRAINT FK_11BA68CD04A0F27 FOREIGN KEY (speaker_id) REFERENCES speaker (id) ON UPDATE NO ACTION ON DELETE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_11BA68C5278319C FOREIGN KEY (series_id) REFERENCES series (id) ON UPDATE NO ACTION ON DELETE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO notes (speaker_id, series_id, id, title, text, date, passage, refs) SELECT speaker_id, series_id, id, title, text, date, passage, refs FROM __temp__notes');
$this->addSql('DROP TABLE __temp__notes');
$this->addSql('CREATE INDEX IDX_11BA68C5278319C ON notes (series_id)');
$this->addSql('CREATE INDEX IDX_11BA68CD04A0F27 ON notes (speaker_id)');
$this->addSql('CREATE TEMPORARY TABLE __temp__reference AS SELECT id, type, name, label, ndx, content FROM reference');
$this->addSql('DROP TABLE reference');
$this->addSql('CREATE TABLE reference (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, type VARCHAR(64) NOT NULL, name VARCHAR(255) NOT NULL, label VARCHAR(10) NOT NULL, ndx INTEGER DEFAULT NULL, content CLOB NOT NULL, id_list CLOB DEFAULT NULL --(DC2Type:array)
)');
$this->addSql('INSERT INTO reference (id, type, name, label, ndx, content) SELECT id, type, name, label, ndx, content FROM __temp__reference');
$this->addSql('DROP TABLE __temp__reference');
$this->addSql('CREATE UNIQUE INDEX UNIQ_AEA34913EA750E8 ON reference (label)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__notes AS SELECT id, speaker_id, series_id, title, text, date, passage, refs FROM notes');
$this->addSql('DROP TABLE notes');
$this->addSql('CREATE TABLE notes (speaker_id INTEGER NOT NULL, series_id INTEGER DEFAULT NULL, id VARCHAR(64) NOT NULL, title VARCHAR(255) NOT NULL, text CLOB NOT NULL, date DATE NOT NULL, passage VARCHAR(255) DEFAULT NULL, refs CLOB DEFAULT NULL --(DC2Type:json)
, CONSTRAINT FK_11BA68CD04A0F27 FOREIGN KEY (speaker_id) REFERENCES speaker (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_11BA68C5278319C FOREIGN KEY (series_id) REFERENCES series (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO notes (id, speaker_id, series_id, title, text, date, passage, refs) SELECT id, speaker_id, series_id, title, text, date, passage, refs FROM __temp__notes');
$this->addSql('DROP TABLE __temp__notes');
$this->addSql('CREATE INDEX IDX_11BA68CD04A0F27 ON notes (speaker_id)');
$this->addSql('CREATE INDEX IDX_11BA68C5278319C ON notes (series_id)');
$this->addSql('CREATE TEMPORARY TABLE __temp__reference AS SELECT id, type, name, label, ndx, content FROM reference');
$this->addSql('DROP TABLE reference');
$this->addSql('CREATE TABLE reference (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, type VARCHAR(64) NOT NULL, name VARCHAR(255) NOT NULL, label VARCHAR(10) NOT NULL, ndx INTEGER DEFAULT NULL, content CLOB NOT NULL)');
$this->addSql('INSERT INTO reference (id, type, name, label, ndx, content) SELECT id, type, name, label, ndx, content FROM __temp__reference');
$this->addSql('DROP TABLE __temp__reference');
}
}

View File

@ -126,7 +126,7 @@ ul.menu-open {
border: none;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
padding: 5px 20px;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
@ -164,7 +164,6 @@ ul.menu-open {
textarea#notes {
width: 100%;
height: 100%;
font-size: 14pt;
}
#notePreview {
@ -183,10 +182,6 @@ textarea#notes {
flex-direction: row-reverse !important;
}
#note-header-left h2.dirty {
color: darkorange;
}
div#refQuery {
display: none;
position: absolute;

View File

@ -1 +1 @@
{"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AAAA,kCAAA;AACA;EACI,SAAA;ACCJ;;ADEA;EACI,aAAA;EACA,mBAAA;EACA,eAAA;EACA,6BAAA;EACA,oBAAA;EACA,yBAAA;EACA,iBAAA;EACA,iCAAA;EACA,cAAA;ACCJ;;ADEA;EACI,YAAA;EACA,WAAA;ACCJ;;ADEA,6BAAA;AAEA;EACI,aAAA;EACA,8BAAA;EACA,mBAAA;EACA,wBAAA;EACA,uBAAA;EACA,eAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,wCAAA;ACAJ;;ADGA;EACI,YAAA;ACAJ;;ADGA;;EAEI,YAAA;ACAJ;;ADIA;EACI,yBAAA;EACA,yBAAA;EACA,aAAA;EACA,YAAA;EACA,gBAAA;EACA,qBAAA;EACA,eAAA;ACDJ;;ADIA;EACI,WAAA;ACDJ;;ADIA;EACI,aAAA;EACA,2BAAA;EACA,mBAAA;EACA,aAAA;EACA,WAAA;EACA,eAAA;EACA,kBAAA;ACDJ;;ADIA;EACI,SAAA;EACA,UAAA;ACDJ;;ADIA;EACI,gBAAA;EACA,qBAAA;ACDJ;;ADIA;EACI,UAAA;ACDJ;;ADIA;EACI,kBAAA;EACA,WAAA;EACA,YAAA;EACA,uBAAA;EACA,kBAAA;EACA,wCAAA;ACDJ;;ADIA;EACI,YAAA;ACDJ;;ADIA;EACI,aAAA;EACA,YAAA;ACDJ;;ADIA;EACI,aAAA;EACA,YAAA;ACDJ;;ADIA;EACI,aAAA;ACDJ;;ADIA;EACI,aAAA;ACDJ;;ADIA;EACI,kBAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,eAAA;EACA,yBAAA;EACA,UAAA;EACA,WAAA;EACA,UAAA;EACA,YAAA;EACA,kBAAA;EACA,wCAAA;EACA,iBAAA;EACA,kBAAA;EACA,qBAAA;EACA,qBAAA;EACA,eAAA;EACA,eAAA;EAGA,6BAAA;ACDJ;ADGI;EACI,yBAAA;EACA,iBAAA;ACDR;ADII;EACI,eAAA;EACA,eAAA;ACFR;;ADMA;EACI,eAAA;EACA,eAAA;EACA,sCAAA;ACHJ;;ADMA;EACI,4BAAA;ACHJ;;ADMA;EACI,cAAA;ACHJ;;ADMA;EACI,UAAA;ACHJ;;ADMA;EACI,WAAA;EACA,YAAA;EACA,eAAA;ACHJ;;ADMA;EACI,aAAA;EACA,kBAAA;ACHJ;;ADMA;;EAEI,oBAAA;EACA,mBAAA;EACA,UAAA;ACHJ;;ADMA;EACI,sCAAA;ACHJ;;ADMA;EACI,iBAAA;ACHJ;;ADMA;EACI,aAAA;EACA,kBAAA;EACA,YAAA;EACA,oCAAA;ACHJ;;ADMA;EACI,YAAA;EACA,kBAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,WAAA;EACA,yBAAA;EACA,YAAA;EACA,YAAA;EACA,eAAA;ACHJ","file":"style.css"}
{"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AAAA,kCAAA;AACA;EACI,SAAA;ACCJ;;ADEA;EACI,aAAA;EACA,mBAAA;EACA,eAAA;EACA,6BAAA;EACA,oBAAA;EACA,yBAAA;EACA,iBAAA;EACA,iCAAA;EACA,cAAA;ACCJ;;ADEA;EACI,YAAA;EACA,WAAA;ACCJ;;ADEA,6BAAA;AAEA;EACI,aAAA;EACA,8BAAA;EACA,mBAAA;EACA,wBAAA;EACA,uBAAA;EACA,eAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,wCAAA;ACAJ;;ADGA;EACI,YAAA;ACAJ;;ADGA;;EAEI,YAAA;ACAJ;;ADIA;EACI,yBAAA;EACA,yBAAA;EACA,aAAA;EACA,YAAA;EACA,gBAAA;EACA,qBAAA;EACA,eAAA;ACDJ;;ADIA;EACI,WAAA;ACDJ;;ADIA;EACI,aAAA;EACA,2BAAA;EACA,mBAAA;EACA,aAAA;EACA,WAAA;EACA,eAAA;EACA,kBAAA;ACDJ;;ADIA;EACI,SAAA;EACA,UAAA;ACDJ;;ADIA;EACI,gBAAA;EACA,qBAAA;ACDJ;;ADIA;EACI,UAAA;ACDJ;;ADIA;EACI,kBAAA;EACA,WAAA;EACA,YAAA;EACA,uBAAA;EACA,kBAAA;EACA,wCAAA;ACDJ;;ADIA;EACI,YAAA;ACDJ;;ADIA;EACI,aAAA;EACA,YAAA;ACDJ;;ADIA;EACI,aAAA;EACA,YAAA;ACDJ;;ADIA;EACI,aAAA;ACDJ;;ADIA;EACI,aAAA;ACDJ;;ADIA;EACI,kBAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,eAAA;EACA,yBAAA;EACA,UAAA;EACA,WAAA;EACA,UAAA;EACA,YAAA;EACA,kBAAA;EACA,wCAAA;EACA,kBAAA;EACA,kBAAA;EACA,qBAAA;EACA,qBAAA;EACA,eAAA;EACA,eAAA;EAGA,6BAAA;ACDJ;ADGI;EACI,yBAAA;EACA,iBAAA;ACDR;ADII;EACI,eAAA;EACA,eAAA;ACFR;;ADMA;EACI,eAAA;EACA,eAAA;EACA,sCAAA;ACHJ;;ADMA;EACI,4BAAA;ACHJ;;ADMA;EACI,cAAA;ACHJ;;ADMA;EACI,UAAA;ACHJ;;ADMA;EACI,WAAA;EACA,YAAA;ACHJ;;ADMA;EACI,aAAA;EACA,kBAAA;ACHJ;;ADMA;;EAEI,oBAAA;EACA,mBAAA;EACA,UAAA;ACHJ;;ADMA;EACI,sCAAA;ACHJ;;ADMA;EACI,aAAA;EACA,kBAAA;EACA,YAAA;EACA,oCAAA;ACHJ;;ADMA;EACI,YAAA;EACA,kBAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,WAAA;EACA,yBAAA;EACA,YAAA;EACA,YAAA;EACA,eAAA;ACHJ","file":"style.css"}

View File

@ -1 +1 @@
body{margin:0}.container{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-evenly;align-items:stretch;align-content:flex-start;max-width:1020px;margin:0 auto}.top-tab{height:50px;width:100%}.hamburger{display:flex;justify-content:space-between;align-items:center;margin:15px 0 15px 15px;border:#000 solid 1px;cursor:pointer;border-radius:5px;width:20px;height:20px;padding:5px;box-shadow:0 2px 5px rgba(0,0,0,.3)}.fa-check{color:green}.fa-bars:before,.fa-navicon:before{padding:3px}ul.menu-open{display:block !important;background-color:#f9c74d;padding:10px;z-index:100;list-style:none;list-style-type:none;position:fixed}.ref-tab{width:60px}.tab button{display:flex;justify-content:flex-start;align-items:center;height:100px;width:100%;cursor:pointer;text-align:center}.ref-tab ul{margin:0;padding:0}.ref-tab ul li{list-style:none;list-style-type:none}.ref{width:35%}.ref>div#ref{overflow-y:scroll;width:100%;height:100%;border:#000 solid 1px;border-radius:3px;box-shadow:0 2px 5px rgba(0,0,0,.3)}#passage{width:100px}#newSpeaker{display:none;width:110px}#newSeries{display:none;width:110px}#noteSearch{display:none}#fields-container{display:none}#show-hide-btn{position:absolute;top:10px;right:20px;font-size:16px;cursor:pointer;background-color:#4caf50;color:#fff;border:none;border-radius:5px;box-shadow:0 2px 5px rgba(0,0,0,.6);padding:5px 20px;text-align:center;text-decoration:none;display:inline-block;font-size:16px;margin:4px 2px;transition:all .3s ease-out}#show-hide-btn:hover{background-color:#3e8e41}#show-hide-btn::before{font-size:16px;cursor:pointer}#show-hide-btn::before{font-size:16px;cursor:pointer;transition:transform .5s ease-in-out}#show-hide-btn:hover::before{transform:translateY(-10px)}#fields-container.show{display:block}.notes{width:55%}textarea#notes{width:100%;height:100%;font-size:14pt}#notePreview{display:none;overflow-x:scroll}#note-header-left,#note-header-right{display:inline-flex;flex-direction:row;width:49%}#note-header-right{flex-direction:row-reverse !important}#note-header-left h2.dirty{color:#ff8c00}div#refQuery{display:none;position:absolute;z-index:100;background-color:rgba(0,0,0,.5)}div#refQuery #search{border:none;border-radius:5px;padding:10px 20px;font-size:16px;line-height:1.5;color:#333;background-color:#f4f4f4;width:150px;height:25px;cursor:pointer}/*# sourceMappingURL=style.min.css.map */
body{margin:0}.container{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-evenly;align-items:stretch;align-content:flex-start;max-width:1020px;margin:0 auto}.top-tab{height:50px;width:100%}.hamburger{display:flex;justify-content:space-between;align-items:center;margin:15px 0 15px 15px;border:#000 solid 1px;cursor:pointer;border-radius:5px;width:20px;height:20px;padding:5px;box-shadow:0 2px 5px rgba(0,0,0,.3)}.fa-check{color:green}.fa-bars:before,.fa-navicon:before{padding:3px}ul.menu-open{display:block !important;background-color:#f9c74d;padding:10px;z-index:100;list-style:none;list-style-type:none;position:fixed}.ref-tab{width:60px}.tab button{display:flex;justify-content:flex-start;align-items:center;height:100px;width:100%;cursor:pointer;text-align:center}.ref-tab ul{margin:0;padding:0}.ref-tab ul li{list-style:none;list-style-type:none}.ref{width:35%}.ref>div#ref{overflow-y:scroll;width:100%;height:100%;border:#000 solid 1px;border-radius:3px;box-shadow:0 2px 5px rgba(0,0,0,.3)}#passage{width:100px}#newSpeaker{display:none;width:110px}#newSeries{display:none;width:110px}#noteSearch{display:none}#fields-container{display:none}#show-hide-btn{position:absolute;top:10px;right:20px;font-size:16px;cursor:pointer;background-color:#4caf50;color:#fff;border:none;border-radius:5px;box-shadow:0 2px 5px rgba(0,0,0,.6);padding:15px 32px;text-align:center;text-decoration:none;display:inline-block;font-size:16px;margin:4px 2px;transition:all .3s ease-out}#show-hide-btn:hover{background-color:#3e8e41}#show-hide-btn::before{font-size:16px;cursor:pointer}#show-hide-btn::before{font-size:16px;cursor:pointer;transition:transform .5s ease-in-out}#show-hide-btn:hover::before{transform:translateY(-10px)}#fields-container.show{display:block}.notes{width:55%}textarea#notes{width:100%;height:100%}#notePreview{display:none;overflow-x:scroll}#note-header-left,#note-header-right{display:inline-flex;flex-direction:row;width:49%}#note-header-right{flex-direction:row-reverse !important}div#refQuery{display:none;position:absolute;z-index:100;background-color:rgba(0,0,0,.5)}div#refQuery #search{border:none;border-radius:5px;padding:10px 20px;font-size:16px;line-height:1.5;color:#333;background-color:#f4f4f4;width:150px;height:25px;cursor:pointer}/*# sourceMappingURL=style.min.css.map */

View File

@ -1 +1 @@
{"version":3,"sources":["style.scss"],"names":[],"mappings":"AACA,KACI,QAAA,CAGJ,WACI,YAAA,CACA,kBAAA,CACA,cAAA,CACA,4BAAA,CACA,mBAAA,CACA,wBAAA,CACA,gBAAA,CAEA,aAAA,CAGJ,SACI,WAAA,CACA,UAAA,CAKJ,WACI,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,uBAAA,CACA,qBAAA,CACA,cAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CACA,mCAAA,CAGJ,UACI,WAAA,CAGJ,mCAEI,WAAA,CAIJ,aACI,wBAAA,CACA,wBAAA,CACA,YAAA,CACA,WAAA,CACA,eAAA,CACA,oBAAA,CACA,cAAA,CAGJ,SACI,UAAA,CAGJ,YACI,YAAA,CACA,0BAAA,CACA,kBAAA,CACA,YAAA,CACA,UAAA,CACA,cAAA,CACA,iBAAA,CAGJ,YACI,QAAA,CACA,SAAA,CAGJ,eACI,eAAA,CACA,oBAAA,CAGJ,KACI,SAAA,CAGJ,aACI,iBAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CACA,iBAAA,CACA,mCAAA,CAGJ,SACI,WAAA,CAGJ,YACI,YAAA,CACA,WAAA,CAGJ,WACI,YAAA,CACA,WAAA,CAGJ,YACI,YAAA,CAGJ,kBACI,YAAA,CAGJ,eACI,iBAAA,CACA,QAAA,CACA,UAAA,CACA,cAAA,CACA,cAAA,CACA,wBAAA,CAEA,UAAA,CAEA,WAAA,CACA,iBAAA,CACA,mCAAA,CACA,gBAAA,CACA,iBAAA,CACA,oBAAA,CACA,oBAAA,CACA,cAAA,CACA,cAAA,CAGA,2BAAA,CAEA,qBACI,wBAAA,CAIJ,uBACI,cAAA,CACA,cAAA,CAIR,uBACI,cAAA,CACA,cAAA,CACA,oCAAA,CAGJ,6BACI,2BAAA,CAGJ,uBACI,aAAA,CAGJ,OACI,SAAA,CAGJ,eACI,UAAA,CACA,WAAA,CACA,cAAA,CAGJ,aACI,YAAA,CACA,iBAAA,CAGJ,qCAEI,mBAAA,CACA,kBAAA,CACA,SAAA,CAGJ,mBACI,qCAAA,CAGJ,2BACI,aAAA,CAGJ,aACI,YAAA,CACA,iBAAA,CACA,WAAA,CACA,+BAAA,CAGJ,qBACI,WAAA,CACA,iBAAA,CACA,iBAAA,CACA,cAAA,CACA,eAAA,CACA,UAAA,CACA,wBAAA,CACA,WAAA,CACA,WAAA,CACA,cAAA","file":"style.min.css"}
{"version":3,"sources":["style.scss"],"names":[],"mappings":"AACA,KACI,QAAA,CAGJ,WACI,YAAA,CACA,kBAAA,CACA,cAAA,CACA,4BAAA,CACA,mBAAA,CACA,wBAAA,CACA,gBAAA,CAEA,aAAA,CAGJ,SACI,WAAA,CACA,UAAA,CAKJ,WACI,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,uBAAA,CACA,qBAAA,CACA,cAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CACA,mCAAA,CAGJ,UACI,WAAA,CAGJ,mCAEI,WAAA,CAIJ,aACI,wBAAA,CACA,wBAAA,CACA,YAAA,CACA,WAAA,CACA,eAAA,CACA,oBAAA,CACA,cAAA,CAGJ,SACI,UAAA,CAGJ,YACI,YAAA,CACA,0BAAA,CACA,kBAAA,CACA,YAAA,CACA,UAAA,CACA,cAAA,CACA,iBAAA,CAGJ,YACI,QAAA,CACA,SAAA,CAGJ,eACI,eAAA,CACA,oBAAA,CAGJ,KACI,SAAA,CAGJ,aACI,iBAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CACA,iBAAA,CACA,mCAAA,CAGJ,SACI,WAAA,CAGJ,YACI,YAAA,CACA,WAAA,CAGJ,WACI,YAAA,CACA,WAAA,CAGJ,YACI,YAAA,CAGJ,kBACI,YAAA,CAGJ,eACI,iBAAA,CACA,QAAA,CACA,UAAA,CACA,cAAA,CACA,cAAA,CACA,wBAAA,CAEA,UAAA,CAEA,WAAA,CACA,iBAAA,CACA,mCAAA,CACA,iBAAA,CACA,iBAAA,CACA,oBAAA,CACA,oBAAA,CACA,cAAA,CACA,cAAA,CAGA,2BAAA,CAEA,qBACI,wBAAA,CAIJ,uBACI,cAAA,CACA,cAAA,CAIR,uBACI,cAAA,CACA,cAAA,CACA,oCAAA,CAGJ,6BACI,2BAAA,CAGJ,uBACI,aAAA,CAGJ,OACI,SAAA,CAGJ,eACI,UAAA,CACA,WAAA,CAGJ,aACI,YAAA,CACA,iBAAA,CAGJ,qCAEI,mBAAA,CACA,kBAAA,CACA,SAAA,CAGJ,mBACI,qCAAA,CAGJ,aACI,YAAA,CACA,iBAAA,CACA,WAAA,CACA,+BAAA,CAGJ,qBACI,WAAA,CACA,iBAAA,CACA,iBAAA,CACA,cAAA,CACA,eAAA,CACA,UAAA,CACA,wBAAA,CACA,WAAA,CACA,WAAA,CACA,cAAA","file":"style.min.css"}

View File

@ -128,7 +128,7 @@ ul.menu-open {
border: none;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
padding: 5px 20px;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
@ -170,7 +170,6 @@ ul.menu-open {
textarea#notes {
width: 100%;
height: 100%;
font-size: 14pt;
}
#notePreview {
@ -189,10 +188,6 @@ textarea#notes {
flex-direction: row-reverse !important;
}
#note-header-left h2.dirty {
color: darkorange;
}
div#refQuery {
display: none;
position: absolute;

View File

@ -1,11 +1,9 @@
// Get the link element
const link = document.querySelector('.hamburger');
var converter = null;
var md = null;
var markdownit = null;
var references = {};
let saved = false;
let textDirty = false;
let saveTimeout = 10000;
// Add an event listener to the link
if (link) {
@ -15,22 +13,11 @@ if (link) {
});
}
document.addEventListener('keyup', function (event) {
if (event.key == "F3") {
openRef();
}
});
document.querySelector('#notes').addEventListener('keyup', function (event) {
textDirty = true;
document.querySelector('#note-header-left h2').classList.add('dirty');
});
function setHeight() {
converter = new showdown.Converter();
//converter.setFlavor();
md = new markdownit({
markdownit = new markdownit({
html: true,
linkify: true,
breaks: true
@ -58,30 +45,12 @@ function setHeight() {
dt = new Date();
date.value = dt.getFullYear() + '-' + ((dt.getMonth() < 9) ? '0' + (dt.getMonth() + 1) : (dt.getMonth() + 1)) + '-' + dt.getDate();
setTimeout(saveNote, saveTimeout);
setTimeout(saveNote, 10000);
}
function newNote() {
notes = document.querySelector('#notes');
notes.text = '';
notes.value = '';
references = {};
saved = true;
textDirty = false;
document.querySelector('#note-header-left h2').classList.remove('dirty');
dt = new Date();
document.querySelector('#noteDate').value = dt.getFullYear() + '-' + ((dt.getMonth() < 9) ? '0' + (dt.getMonth() + 1) : (dt.getMonth() + 1)) + '-' + dt.getDate();
document.querySelector('#noteTitle').value = '';
document.querySelector('#speaker').value = 0;
document.querySelector('#series').value = 0;
document.querySelector('#template').value = 0;
document.querySelector('#passage').value = '';
document.querySelector('#noteId').value = uuidv4();
document.querySelector('#noteSearch').style.display = 'none';
document.querySelector('#ref-list').innerHTML = '';
document.querySelector('#ref').innerHTML = '';
notes = document.querySelector('.notes');
notes.textContent = '';
}
/**
@ -95,8 +64,8 @@ function saveNote(event) {
event.preventDefault();
}
if (!textDirty || !validateNote()) {
setTimeout(saveNote, saveTimeout);
if (!validateNote()) {
setTimeout(saveNote, 5000);
return;
}
@ -107,8 +76,7 @@ function saveNote(event) {
speaker: document.querySelector('#speaker').value,
series: document.querySelector('#series').value,
passage: document.querySelector('#passage').value,
note: document.querySelector('#notes').value,
refs: references
note: document.querySelector('#notes').value
};
fetch('/index.php/save-note', {
method: 'POST',
@ -122,12 +90,10 @@ function saveNote(event) {
if (data.msg == 'saved' && !saved) {
showSave();
saved = true;
textDirty = false;
document.querySelector('#note-header-left h2').classList.remove('dirty');
}
})
.catch(error => console.log(error));
setTimeout(saveNote, saveTimeout);
setTimeout(saveNote, 10000);
}
function validateNote() {
@ -139,7 +105,7 @@ function validateNote() {
const id = document.querySelector('#noteId');
const psg = document.querySelector('#passage');
if (!isUuidV4Valid(id.value)) { return false; }
if (!parseInt(id.value)) { return false; }
if (!title.value.length) { return false; }
if (!date.value) { return false; }
if (!parseInt(speaker.value)) { return false; }
@ -150,11 +116,6 @@ function validateNote() {
return true;
}
function isUuidV4Valid(uuid) {
const regex = /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[8|9|a|b][a-f0-9]{3}-[a-f0-9]{12}$/i;
return regex.test(uuid);
}
/**
* Displays a checkmark animation on the screen.
*
@ -306,7 +267,7 @@ function queryRef() {
body: JSON.stringify({
'type': type.value,
'book': book.value,
'reference': input.value,
'reference': input.value
})
})
.then(response => response.text())
@ -316,7 +277,17 @@ function queryRef() {
const list = document.querySelector('#ref-list');
var newList = document.createElement('li');
newList.className = 'tab';
button = makeButton(results.title);
var button = document.createElement('button');
button.innerText = results.title;
button.onclick = function () {
document.querySelector('#ref').innerHTML = converter.makeHtml(references[button.innerText]);
}
button.ondblclick = function () {
document.querySelector('#ref').innerHTML = '';
delete references[results.title];
var list = button.parentElement;
list.remove();
}
newList.appendChild(button);
list.appendChild(newList);
@ -326,38 +297,13 @@ function queryRef() {
references[results.title] = results.text;
input.value = '';
document.querySelector('#referenceType').value = '';
document.querySelector('#referenceBook').value = '';
document.querySelector('#referenceType').value = 0;
document.querySelector('#referenceBook').value = 0;
openRef();
if (document.querySelector('ul.hamburger-list').classList.contains('menu-open')) {
link.click();
}
saved = false;
textDirty = true;
saveNote();
});
}
function makeButton(title) {
var btn = document.createElement('button');
btn.innerText = title;
btn.addEventListener('click', function () {
document.querySelector('#ref').innerHTML = converter.makeHtml(references[title]);
});
btn.addEventListener('dblclick', function () {
document.querySelector('#ref').innerHTML = '';
delete references[title];
var list = this.parentElement;
list.remove();
saved = false;
textDirty = true;
saveNote();
});
return btn;
}
function retrieveTemplate(orig, dest) {
const temp = document.querySelector('#' + orig);
if (temp.value == '0') {
@ -518,14 +464,8 @@ function previewNote() {
var notePreview = document.querySelector('#notePreview');
var previewButton = document.querySelector('#previewBtn');
const title = document.querySelector('#noteTitle');
const speaker = document.querySelector('#speaker');
const passage = document.querySelector('#passage');
const markdownPreview = "# " + title.value + " - " +
speaker.options[speaker.selectedIndex].text + " - " + passage.value + "\n\n" + noteText.value;
notePreview.innerHTML = md.render(markdownPreview);
//notePreview.innerHTML = converter.makeHtml(noteText.value);
notePreview.innerHTML = markdownit.render(noteText.value);
if (previewButton.value == 'Preview') {
previewButton.value = 'Hide Preview';
@ -542,7 +482,7 @@ function previewNote() {
function findLinks() {
var links = document.querySelector('#notePreview').querySelectorAll('a');
//alert(links.length);
alert(links.length);
}
function showSearchNote(event) {
@ -579,33 +519,5 @@ function searchNote() {
document.querySelector('#noteSearch').style.display = 'none';
link.click();
if (result.references) {
references = result.references;
}
const list = document.querySelector('#ref-list');
var newList = null;
for (var x in references) {
var newList = document.createElement('li');
newList.className = 'tab';
var button = makeButton(x);
newList.appendChild(button);
list.appendChild(newList);
}
});
}
/**
* Generates a random UUIDv4 string.
*
* @return {string} The generated UUIDv4 string.
*/
function uuidv4() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
.replace(/[xy]/g, function (c) {
const r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}

View File

@ -4,6 +4,7 @@ namespace App\Controller;
use App\Entity\Bible;
use DateTime;
use DateTimeZone;
use App\Entity\Series;
use App\Entity\Speaker;
@ -149,7 +150,7 @@ class AjaxController extends AbstractController
$ref = new Reference();
$ref->setType($data->type);
if(is_numeric($data->book)) {
if((int) $data->book) {
$ref->setNdx($data->book);
}
@ -166,10 +167,7 @@ class AjaxController extends AbstractController
'creed' => ReferenceController::retrieveCreed($data->book)
};
$res->setContent(json_encode([
'text' => $ret->getContent(),
'title' => "{$ret->getLabel()}",
]));
$res->setContent(json_encode(['text' => $ret->getContent(), 'title' => "{$ret->getLabel()}"]));
return $res;
}
@ -244,18 +242,15 @@ class AjaxController extends AbstractController
$note->setId($data->id);
}
$refs = json_decode(json_encode($data->refs), true);
$note->setTitle($data->title);
$note->setDate(new DateTime($data->date));
$series = $emi->getRepository(Series::class)->find($data->series);
$speaker = $emi->getRepository(Speaker::class)->find($data->speaker);
$note->setTitle($data->title)
->setDate(new DateTime($data->date))
->setSeries($series)
->setSpeaker($speaker)
->setText($data->note)
->setPassage($data->passage)
->setRefs($refs);
$note->setSeries($series);
$note->setSpeaker($speaker);
$note->setText($data->note);
$note->setPassage($data->passage);
$emi->persist($note);
$emi->flush();

View File

@ -11,7 +11,6 @@ use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Uid\Uuid;
class DefaultController extends AbstractController
{
@ -21,14 +20,14 @@ class DefaultController extends AbstractController
$speakers = $emi->getRepository(Speaker::class)->findAll();
$series = $emi->getRepository(Series::class)->findAll();
$templates = $emi->getRepository(Template::class)->findAll();
$uuid = Uuid::v4();
$note = $emi->getRepository(Notes::class)->findLastNote();
return $this->render('default/index.html.twig', [
'controller_name' => 'DefaultController',
'speakers' => $speakers,
'series' => $series,
'templates' => $templates,
'id' => $uuid,
'noteId' => ($note->getId() + 1)
]);
}

View File

@ -11,8 +11,8 @@ use Doctrine\ORM\Mapping as ORM;
class Notes implements JsonSerializable
{
#[ORM\Id()]
#[ORM\Column(type: Types::STRING, length: 64)]
private ?string $id = null;
#[ORM\Column(type: Types::INTEGER)]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $title = null;
@ -33,15 +33,12 @@ class Notes implements JsonSerializable
#[ORM\Column(length: 255, nullable: true)]
private ?string $passage = null;
#[ORM\Column(type: Types::JSON, nullable: true)]
private ?array $refs = null;
/**
* Retrieves the ID of the object.
*
* @return string|null The ID of the object, or null if it is not set.
* @return int|null The ID of the object, or null if it is not set.
*/
public function getId(): ?string
public function getId(): ?int
{
return $this->id;
}
@ -49,10 +46,10 @@ class Notes implements JsonSerializable
/**
* Sets the ID of the object.
*
* @param string $id The ID to set.
* @param int $id The ID to set.
* @return static
*/
public function setId(string $id): static
public function setId(int $id): static
{
$this->id = $id;
@ -142,18 +139,6 @@ class Notes implements JsonSerializable
return $this;
}
public function getRefs(): ?array
{
return $this->refs;
}
public function setRefs(?array $refs): static
{
$this->refs = $refs;
return $this;
}
public function jsonSerialize(): array
{
return [
@ -163,7 +148,6 @@ class Notes implements JsonSerializable
'series' => $this->series,
'text' => $this->text,
'passage' => $this->passage,
'references' => $this->refs,
'date' => $this->date->format('Y-m-d'),
];
}

View File

@ -2,7 +2,6 @@
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use JsonSerializable;
use App\Repository\ReferenceRepository;
@ -22,7 +21,7 @@ class Reference implements JsonSerializable
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column(length: 10, unique: true)]
#[ORM\Column(length: 10)]
private ?string $label = null;
#[ORM\Column(nullable: true)]

View File

@ -20,4 +20,29 @@ class ReferenceRepository extends ServiceEntityRepository
{
parent::__construct($registry, Reference::class);
}
// /**
// * @return Reference[] Returns an array of Reference objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('r')
// ->andWhere('r.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('r.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Reference
// {
// return $this->createQueryBuilder('r')
// ->andWhere('r.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -19,7 +19,7 @@
<section class="top-tab">
<i class="fa fa-bars hamburger" aria-hidden="true"></i>
<ul class="hamburger-list" style="display: none">
<li><a href="#" onclick='newNote()'>New Note</a></li>
<li><a href="#">New Note</a></li>
<li><a href="#" onclick='showSearchNote(event)'>Open Note</a></li>
<li><a href="#" onclick="saveNote();link.click();">Save Note</a></li>
<li><a href='#' onclick='discardNote()'>Discard Note</a></li>
@ -56,7 +56,7 @@
</div>
<div id='fields-container'>
<input type="hidden" id="noteId" value="{{ id }}" />
<input type="hidden" id="noteId" value="{{ noteId }}" />
<input type="text" id="noteTitle" placeholder="Title..." />
<input type='date' id='noteDate' />
<input type='text' id='newSpeaker' placeholder='Name...' onkeyup='saveSpeaker(event)' />