Skip to content

Callbook#20

Open
GeorgeTsendra wants to merge 7 commits intomasterfrom
callbook
Open

Callbook#20
GeorgeTsendra wants to merge 7 commits intomasterfrom
callbook

Conversation

@GeorgeTsendra
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Member

@OlegLustenko OlegLustenko left a 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

Comment thread Call Book/js/main.js Outdated
</form>
<table class="table table-hover contacts">

${createTh(['Name',"Last name", "Number"])}
Copy link
Copy Markdown
Member

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

Comment thread Call Book/js/main.js Outdated
${createNav("glyphicon glyphicon-search", ``,`true`)}
${createNav("tab-text", `Context`)}
</a>
<a href="keypad.html" class="tab">
Copy link
Copy Markdown
Member

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

Comment thread Call Book/js/main.js Outdated
let buildHtmlTags = () => {
let body = document.body;

body.innerHTML += `<header class="header">
Copy link
Copy Markdown
Member

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

Comment thread 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>
Copy link
Copy Markdown
Member

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

Comment thread Call Book/js/keypad.js Outdated
numberAdd(arr){

let numbArr = arr.map( value =>
`<button class="key" OnClick=" myKeyad.outputNumb(${value}) ">${value}</button>`
Copy link
Copy Markdown
Member

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 ?

Comment thread 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',"\#" ])}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?????

Comment thread Call Book/js/user.js
main.innerHTML += `<header class="header">
<div class="container top-radius">
<div class="user-top-line">
<a href="index.html">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make layout pretty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants