Added menu and dialog icons.

master
Pacman Ghost 4 years ago
parent 922479ff57
commit fc23bc20e9
  1. BIN
      web/public/images/icons/article-grey.png
  2. BIN
      web/public/images/icons/article.png
  3. BIN
      web/public/images/icons/delete.png
  4. BIN
      web/public/images/icons/edit.png
  5. BIN
      web/public/images/icons/publication.png
  6. BIN
      web/public/images/icons/publisher.png
  7. BIN
      web/public/images/icons/technique.png
  8. BIN
      web/public/images/icons/tips.png
  9. 3
      web/src/App.css
  10. 30
      web/src/App.js
  11. 12
      web/src/ArticleSearchResult.js
  12. 6
      web/src/ArticleSearchResult2.js
  13. 2
      web/src/ModalForm.css
  14. 12
      web/src/PublicationSearchResult.js
  15. 6
      web/src/PublicationSearchResult2.js
  16. 12
      web/src/PublisherSearchResult.js
  17. 6
      web/src/PublisherSearchResult2.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

@ -11,9 +11,10 @@
cursor: pointer ; cursor: pointer ;
} }
[data-reach-menu-list] { padding: 5px ; } [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-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] .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 ; } .MuiDialogTitle-root { padding: 10px 16px 6px 16px !important ; }
.MuiDialogContent-root>div { margin-bottom: 1em ; } .MuiDialogContent-root>div { margin-bottom: 1em ; }

@ -78,19 +78,25 @@ export class App extends React.Component
const menu = ( <Menu id="app"> const menu = ( <Menu id="app">
<MenuButton /> <MenuButton />
<MenuList> <MenuList>
<MenuItem id="menu-show-publishers" onSelect={this._showPublishers.bind(this)}> Show publishers </MenuItem> <MenuItem id="menu-show-publishers" onSelect={ () => this._showPublishers() } >
<MenuItem id="menu-search-technique" onSelect={this._showTechniqueArticles.bind(this)}> Show technique </MenuItem> <img src="/images/icons/publisher.png" alt="Show publishers." /> Show publishers
<MenuItem id="menu-search-tips" onSelect={this._showTipsArticles.bind(this)}> Show tips </MenuItem> </MenuItem>
<MenuItem id="menu-search-technique" onSelect={ () => this._showTechniqueArticles() } >
<img src="/images/icons/technique.png" alt="Show technique articles." /> Show technique
</MenuItem>
<MenuItem id="menu-search-tips" onSelect={ () => this._showTipsArticles() } >
<img src="/images/icons/tips.png" alt="Show tip articles." /> Show tips
</MenuItem>
<div className="divider" /> <div className="divider" />
<MenuItem id="menu-new-publisher" <MenuItem id="menu-new-publisher" onSelect={ () => PublisherSearchResult.onNewPublisher( this._onNewPublisher.bind(this) ) } >
onSelect = { () => PublisherSearchResult.onNewPublisher( this._onNewPublisher.bind(this) ) } <img src="/images/icons/publisher.png" alt="New publisher." /> New publisher
>New publisher</MenuItem> </MenuItem>
<MenuItem id="menu-new-publication" <MenuItem id="menu-new-publication" onSelect={ () => PublicationSearchResult.onNewPublication( this._onNewPublication.bind(this) ) } >
onSelect = { () => PublicationSearchResult.onNewPublication( this._onNewPublication.bind(this) ) } <img src="/images/icons/publication.png" alt="New publication." /> New publication
>New publication</MenuItem> </MenuItem>
<MenuItem id="menu-new-article" <MenuItem id="menu-new-article" onSelect={ () => ArticleSearchResult.onNewArticle( this._onNewArticle.bind(this) ) } >
onSelect = { () => ArticleSearchResult.onNewArticle( this._onNewArticle.bind(this) ) } <img src="/images/icons/article.png" alt="New article." /> New article
>New article</MenuItem> </MenuItem>
</MenuList> </MenuList>
</Menu> ) ; </Menu> ) ;
// generate the main content // generate the main content

@ -103,12 +103,12 @@ export class ArticleSearchResult extends React.Component
const menu = ( <Menu> const menu = ( <Menu>
<MenuButton className="sr-menu" /> <MenuButton className="sr-menu" />
<MenuList> <MenuList>
<MenuItem className="edit" <MenuItem className="edit" onSelect={ () => this.onEditArticle() } >
onSelect = { this.onEditArticle.bind( this ) } <img src="/images/icons/edit.png" alt="Edit." /> Edit
>Edit</MenuItem> </MenuItem>
<MenuItem className="delete" <MenuItem className="delete" onSelect={ () => this.onDeleteArticle() } >
onSelect = { this.onDeleteArticle.bind( this ) } <img src="/images/icons/delete.png" alt="Delete." /> Delete
>Delete</MenuItem> </MenuItem>
</MenuList> </MenuList>
</Menu> ) ; </Menu> ) ;

@ -264,8 +264,12 @@ export class ArticleSearchResult2
} ; } ;
// show the form // show the form
const title = ( <div style={{display:"flex"}}>
<img src="/images/icons/article-grey.png" alt="Dialog icon." />
{isNew ? "New article" : "Edit article"}
</div> ) ;
gAppRef.showModalForm( "article-form", gAppRef.showModalForm( "article-form",
isNew ? "New article" : "Edit article", "#d3edfc", title, "#d3edfc",
content, buttons content, buttons
) ; ) ;
} }

@ -1,6 +1,8 @@
.modal-form .MuiDialog-paper { width: 80% ; max-width: 50em !important ; height: 80% ; } .modal-form .MuiDialog-paper { width: 80% ; max-width: 50em !important ; height: 80% ; }
.modal-form .MuiPaper-rounded { border-top-right-radius: 15px ; } .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 { display: flex ; align-items: center ; margin-bottom: 0.25em ; }
.modal-form .row label { margin-top: 3px ; } .modal-form .row label { margin-top: 3px ; }
.modal-form .row input , .row textarea , .row .react-select { flex-grow: 1 ; } .modal-form .row input , .row textarea , .row .react-select { flex-grow: 1 ; }

@ -66,12 +66,12 @@ export class PublicationSearchResult extends React.Component
const menu = ( <Menu> const menu = ( <Menu>
<MenuButton className="sr-menu" /> <MenuButton className="sr-menu" />
<MenuList> <MenuList>
<MenuItem className="edit" <MenuItem className="edit" onSelect={ () => this.onEditPublication() } >
onSelect = { this.onEditPublication.bind( this ) } <img src="/images/icons/edit.png" alt="Edit." /> Edit
>Edit</MenuItem> </MenuItem>
<MenuItem className="delete" <MenuItem className="delete" onSelect={ () => this.onDeletePublication() } >
onSelect = { this.onDeletePublication.bind( this ) } <img src="/images/icons/delete.png" alt="Delete." /> Delete
>Delete</MenuItem> </MenuItem>
</MenuList> </MenuList>
</Menu> ) ; </Menu> ) ;

@ -279,8 +279,12 @@ export class PublicationSearchResult2
// show the form // show the form
const isNew = Object.keys( vals ).length === 0 ; const isNew = Object.keys( vals ).length === 0 ;
const title = ( <div style={{display:"flex"}}>
<img src="/images/icons/publication.png" alt="Dialog icon." />
{isNew ? "New publication" : "Edit publication"}
</div> ) ;
gAppRef.showModalForm( "publication-form", gAppRef.showModalForm( "publication-form",
isNew ? "New publication" : "Edit publication", "#e5cea0", title, "#e5cea0",
doRender, buttons doRender, buttons
) ; ) ;
} }

@ -47,12 +47,12 @@ export class PublisherSearchResult extends React.Component
const menu = ( <Menu> const menu = ( <Menu>
<MenuButton className="sr-menu" /> <MenuButton className="sr-menu" />
<MenuList> <MenuList>
<MenuItem className="edit" <MenuItem className="edit" onSelect={ () => this.onEditPublisher() } >
onSelect = { this.onEditPublisher.bind( this ) } <img src="/images/icons/edit.png" alt="Edit." /> Edit
>Edit</MenuItem> </MenuItem>
<MenuItem className="delete" <MenuItem className="delete" onSelect={ () => this.onDeletePublisher() } >
onSelect = { this.onDeletePublisher.bind( this ) } <img src="/images/icons/delete.png" alt="Delete." /> Delete
>Delete</MenuItem> </MenuItem>
</MenuList> </MenuList>
</Menu> ) ; </Menu> ) ;

@ -136,8 +136,12 @@ export class PublisherSearchResult2
// show the form // show the form
const isNew = Object.keys( vals ).length === 0 ; const isNew = Object.keys( vals ).length === 0 ;
const title = ( <div style={{display:"flex"}}>
<img src="/images/icons/publisher.png" alt="Dialog icon." />
{isNew ? "New publisher" : "Edit publisher"}
</div> ) ;
gAppRef.showModalForm( "publisher-form", gAppRef.showModalForm( "publisher-form",
isNew ? "New publisher" : "Edit publisher", "#eabe51", title, "#eabe51",
content, buttons content, buttons
) ; ) ;
} }

Loading…
Cancel
Save