-
Notifications
You must be signed in to change notification settings - Fork 0
Callbook #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Callbook #20
Conversation
OlegLustenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move bootstrap to cdn and remove scss from git
Call Book/js/main.js
Outdated
| </form> | ||
| <table class="table table-hover contacts"> | ||
| ${createTh(['Name',"Last name", "Number"])} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move function methods to the class
Call Book/js/main.js
Outdated
| ${createNav("glyphicon glyphicon-search", ``,`true`)} | ||
| ${createNav("tab-text", `Context`)} | ||
| </a> | ||
| <a href="keypad.html" class="tab"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you could make links more reusable.
What if one day you have to set class but the click ? or something more expensive.
I guess it could look that way
<nav class="main-nav">
this.renderLink({ content:'Contacts', className:'active', icon:'search'});
this.renderLink({ content:'Keypad', icon:'th'});
this.renderLink({ content:'Edit contact' });
...
</nav>We could reuse some HTML parts and create a smaller reusable blocks
Call Book/js/main.js
Outdated
| let buildHtmlTags = () => { | ||
| let body = document.body; | ||
|
|
||
| body.innerHTML += `<header class="header"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
document.body.innerHTML not sure I like to use document.body.
You have to create an additional tag at index.html and call it, for example,
<div id="mountNode"></div>And update content only inside such node. updating the whole document.body is too risky
Call Book/user.html
Outdated
|
|
||
|
|
||
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | ||
| <script src="js/bootstrap.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove bootstrap and jquery
Call Book/js/keypad.js
Outdated
| numberAdd(arr){ | ||
|
|
||
| let numbArr = arr.map( value => | ||
| `<button class="key" OnClick=" myKeyad.outputNumb(${value}) ">${value}</button>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure about OnClick handler ?
Call Book/js/keypad.js
Outdated
| <span id="numberInput" class ="numbers"></span> | ||
| <span class="glyphicon glyphicon-circle-arrow-left" aria-hidden="true" OnClick="myKeyad.glyphicon()"></span> | ||
| </div> | ||
| ${this.numberAdd(['1','2','3','4','5','6','7','8','9'," \* " ,'0',"\#" ])} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?????
| main.innerHTML += `<header class="header"> | ||
| <div class="container top-radius"> | ||
| <div class="user-top-line"> | ||
| <a href="index.html"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make layout pretty
No description provided.