diff --git a/web/public/images/icons/article-grey.png b/web/public/images/icons/article-grey.png new file mode 100644 index 0000000..9706f82 Binary files /dev/null and b/web/public/images/icons/article-grey.png differ diff --git a/web/public/images/icons/article.png b/web/public/images/icons/article.png new file mode 100644 index 0000000..878a5df Binary files /dev/null and b/web/public/images/icons/article.png differ diff --git a/web/public/images/icons/delete.png b/web/public/images/icons/delete.png new file mode 100644 index 0000000..965dd61 Binary files /dev/null and b/web/public/images/icons/delete.png differ diff --git a/web/public/images/icons/edit.png b/web/public/images/icons/edit.png new file mode 100644 index 0000000..ffded07 Binary files /dev/null and b/web/public/images/icons/edit.png differ diff --git a/web/public/images/icons/publication.png b/web/public/images/icons/publication.png new file mode 100644 index 0000000..ac0372e Binary files /dev/null and b/web/public/images/icons/publication.png differ diff --git a/web/public/images/icons/publisher.png b/web/public/images/icons/publisher.png new file mode 100644 index 0000000..18dbff7 Binary files /dev/null and b/web/public/images/icons/publisher.png differ diff --git a/web/public/images/icons/technique.png b/web/public/images/icons/technique.png new file mode 100644 index 0000000..eccc423 Binary files /dev/null and b/web/public/images/icons/technique.png differ diff --git a/web/public/images/icons/tips.png b/web/public/images/icons/tips.png new file mode 100755 index 0000000..5cdb1cd Binary files /dev/null and b/web/public/images/icons/tips.png differ diff --git a/web/src/App.css b/web/src/App.css index 34b9816..4697aa5 100644 --- a/web/src/App.css +++ b/web/src/App.css @@ -11,9 +11,10 @@ cursor: pointer ; } [data-reach-menu-list] { padding: 5px ; } -[data-reach-menu-item] { padding: 5px ; } +[data-reach-menu-item] { display: flex ; height: 1.25em ; padding: 5px ; } [data-reach-menu-item][data-selected] { background: #90caf9 ; color: black ; } [data-reach-menu-list] .divider { height: 0 ; margin: 2px 0 ; border-top: 1px solid #aaa ; } +[data-reach-menu-list] img { height: 100% ; margin-top: -0.1em ; margin-right: 0.5em ; } .MuiDialogTitle-root { padding: 10px 16px 6px 16px !important ; } .MuiDialogContent-root>div { margin-bottom: 1em ; } diff --git a/web/src/App.js b/web/src/App.js index 436c2c0..90661f2 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -78,19 +78,25 @@ export class App extends React.Component const menu = ( - Show publishers - Show technique - Show tips + this._showPublishers() } > + Show publishers. Show publishers + + this._showTechniqueArticles() } > + Show technique articles. Show technique + + this._showTipsArticles() } > + Show tip articles. Show tips +
- PublisherSearchResult.onNewPublisher( this._onNewPublisher.bind(this) ) } - >New publisher - PublicationSearchResult.onNewPublication( this._onNewPublication.bind(this) ) } - >New publication - ArticleSearchResult.onNewArticle( this._onNewArticle.bind(this) ) } - >New article + PublisherSearchResult.onNewPublisher( this._onNewPublisher.bind(this) ) } > + New publisher. New publisher + + PublicationSearchResult.onNewPublication( this._onNewPublication.bind(this) ) } > + New publication. New publication + + ArticleSearchResult.onNewArticle( this._onNewArticle.bind(this) ) } > + New article. New article +
) ; // generate the main content diff --git a/web/src/ArticleSearchResult.js b/web/src/ArticleSearchResult.js index 5073057..d23d88e 100644 --- a/web/src/ArticleSearchResult.js +++ b/web/src/ArticleSearchResult.js @@ -103,12 +103,12 @@ export class ArticleSearchResult extends React.Component const menu = ( - Edit - Delete + this.onEditArticle() } > + Edit. Edit + + this.onDeleteArticle() } > + Delete. Delete + ) ; diff --git a/web/src/ArticleSearchResult2.js b/web/src/ArticleSearchResult2.js index 6778dc6..71e3a99 100644 --- a/web/src/ArticleSearchResult2.js +++ b/web/src/ArticleSearchResult2.js @@ -264,8 +264,12 @@ export class ArticleSearchResult2 } ; // show the form + const title = (
+ Dialog icon. + {isNew ? "New article" : "Edit article"} +
) ; gAppRef.showModalForm( "article-form", - isNew ? "New article" : "Edit article", "#d3edfc", + title, "#d3edfc", content, buttons ) ; } diff --git a/web/src/ModalForm.css b/web/src/ModalForm.css index fd64011..3507e82 100644 --- a/web/src/ModalForm.css +++ b/web/src/ModalForm.css @@ -1,6 +1,8 @@ .modal-form .MuiDialog-paper { width: 80% ; max-width: 50em !important ; height: 80% ; } .modal-form .MuiPaper-rounded { border-top-right-radius: 15px ; } +.modal-form .MuiDialogTitle-root img { height: 1.25em ; margin-right: 0.5em ; } + .modal-form .row { display: flex ; align-items: center ; margin-bottom: 0.25em ; } .modal-form .row label { margin-top: 3px ; } .modal-form .row input , .row textarea , .row .react-select { flex-grow: 1 ; } diff --git a/web/src/PublicationSearchResult.js b/web/src/PublicationSearchResult.js index 084f0ce..3f37d1c 100644 --- a/web/src/PublicationSearchResult.js +++ b/web/src/PublicationSearchResult.js @@ -66,12 +66,12 @@ export class PublicationSearchResult extends React.Component const menu = ( - Edit - Delete + this.onEditPublication() } > + Edit. Edit + + this.onDeletePublication() } > + Delete. Delete + ) ; diff --git a/web/src/PublicationSearchResult2.js b/web/src/PublicationSearchResult2.js index 3086ee2..c6a7969 100644 --- a/web/src/PublicationSearchResult2.js +++ b/web/src/PublicationSearchResult2.js @@ -279,8 +279,12 @@ export class PublicationSearchResult2 // show the form const isNew = Object.keys( vals ).length === 0 ; + const title = (
+ Dialog icon. + {isNew ? "New publication" : "Edit publication"} +
) ; gAppRef.showModalForm( "publication-form", - isNew ? "New publication" : "Edit publication", "#e5cea0", + title, "#e5cea0", doRender, buttons ) ; } diff --git a/web/src/PublisherSearchResult.js b/web/src/PublisherSearchResult.js index a2f2ee9..970cfcb 100644 --- a/web/src/PublisherSearchResult.js +++ b/web/src/PublisherSearchResult.js @@ -47,12 +47,12 @@ export class PublisherSearchResult extends React.Component const menu = ( - Edit - Delete + this.onEditPublisher() } > + Edit. Edit + + this.onDeletePublisher() } > + Delete. Delete + ) ; diff --git a/web/src/PublisherSearchResult2.js b/web/src/PublisherSearchResult2.js index 61b0078..1b94ef8 100644 --- a/web/src/PublisherSearchResult2.js +++ b/web/src/PublisherSearchResult2.js @@ -136,8 +136,12 @@ export class PublisherSearchResult2 // show the form const isNew = Object.keys( vals ).length === 0 ; + const title = (
+ Dialog icon. + {isNew ? "New publisher" : "Edit publisher"} +
) ; gAppRef.showModalForm( "publisher-form", - isNew ? "New publisher" : "Edit publisher", "#eabe51", + title, "#eabe51", content, buttons ) ; }