-
Notifications
You must be signed in to change notification settings - Fork 0
Only phone app branch #16
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
Open
SergeyKostikov
wants to merge
16
commits into
master
Choose a base branch
from
onlyPhoneAppBranch
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b38fa53
new app branch
SergeyKostikov b8d9f15
phone app
SergeyKostikov bf7da3b
phone app
SergeyKostikov 1d48b5c
phone app
SergeyKostikov bea0483
phone app
SergeyKostikov 035842a
redesign phone app`
SergeyKostikov 520b4e1
MVC
SergeyKostikov 6d19213
create base structure on MVC
SergeyKostikov 34b751a
navigation with save state
SergeyKostikov ba90002
new vesion of phone app
SergeyKostikov d61ff2c
add user info script + contacts td event listener
SergeyKostikov 93ff684
edit user + search
SergeyKostikov 3d7bd01
modify search
SergeyKostikov ff8b5bf
search form
SergeyKostikov 809a80d
кнопка редактирования в профиле пользователя и сохранение апдейта юзера
SergeyKostikov e851be6
регистронезависимый поиск
SergeyKostikov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,153 +1,18 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <title>Contacts</title> | ||
| <link href="https://fonts.googleapis.com/css?family=Oxygen" rel="stylesheet"> | ||
| <link href="css/bootstrap.css" rel="stylesheet"> | ||
| <link rel="stylesheet" href="css/main.css"> | ||
| </head> | ||
|
|
||
| <body> | ||
| <header class="header"> | ||
| <div class="container top-radius"> | ||
| <h2>Contacts</h2> | ||
| </div> | ||
| </header> | ||
|
|
||
| <main> | ||
| <div class="container"> | ||
| <form class="form-inline search-form"> | ||
| <div class="form-group"> | ||
| <label class="sr-only" for="search">Search</label> | ||
| <input type="text" class="form-control" id= "search" placeholder="Search"> | ||
| </div> | ||
| </form> | ||
| <table class="table table-hover contacts"> | ||
| <thead> | ||
| <tr> | ||
| <th>Name</th> | ||
| <th>Last name</th> | ||
| <th>Email</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr> | ||
| <td>Иван</td> | ||
| <td>Петров</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Сергей</td> | ||
| <td>Сергеев</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Иван</td> | ||
| <td>Иванов</td> | ||
| <td >[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Александр</td> | ||
| <td>Александров</td> | ||
| <td >[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Алекс</td> | ||
| <td>Смирнов</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Сергей</td> | ||
| <td>Волков</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Мария</td> | ||
| <td>Шарапова</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Александр</td> | ||
| <td>Винник</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Дарий</td> | ||
| <td>Смирнов</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Елена</td> | ||
| <td>Лещенко</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Ольга</td> | ||
| <td>Новикова</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Наталья</td> | ||
| <td>Шемякина</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Анна</td> | ||
| <td>Донцова</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Влад</td> | ||
| <td>Яма</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Кира</td> | ||
| <td>Воробьева</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| <tr> | ||
| <td>Виктор</td> | ||
| <td>Кривенко</td> | ||
| <td>[email protected]</td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </main> | ||
| <footer class="footer"> | ||
| <div class="container bottom-radius"> | ||
| <nav class="main-nav"> | ||
| <a href="index.html" class="tab active"> | ||
| <span class="glyphicon glyphicon-search" aria-hidden="true"></span> | ||
| <span class = "tab-text">Contacts</span> | ||
| </a> | ||
| <a href="keypad.html" class="tab"> | ||
| <span class="glyphicon glyphicon-th" aria-hidden="true"></span> | ||
| <span class = "tab-text">Keypad</span> | ||
| </a> | ||
| <a href="edit-contact.html" class="tab"> | ||
| <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> | ||
| <span class = "tab-text">Edit contact</span> | ||
| </a> | ||
| <a href="user.html" class="tab"> | ||
| <span class="glyphicon glyphicon-user" aria-hidden="true"></span> | ||
| <span class = "tab-text">User</span> | ||
| </a> | ||
| <a href="add-user.html" class="tab"> | ||
| <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||
| <span class = "tab-text">Add user</span> | ||
| </a> | ||
| </nav> | ||
| </div> | ||
| </footer> | ||
|
|
||
|
|
||
|
|
||
|
|
||
| <script src="js/main.js"></script> | ||
| </body> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <title>Contacts</title> | ||
| <link href="https://fonts.googleapis.com/css?family=Oxygen" rel="stylesheet"> | ||
| <link href="css/bootstrap.css" rel="stylesheet"> | ||
| <link rel="stylesheet" href="css/main.css"> | ||
| </head> | ||
| <body> | ||
| <script src="src/js/model.js"></script> | ||
| <script src="src/js/view.js"></script> | ||
| <script src="src/js/controller.js"></script> | ||
| <script src="src/js/app.js"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,18 @@ | ||
| class App(){ | ||
| constructor(model,view,controller){ | ||
| class App{ | ||
| constructor(){ | ||
| this.state = "contacts" | ||
| this.model = new Model(state) | ||
| this.view = new View(state) | ||
| this.controller = new Controller(model,view) | ||
| this.model = new Model(this.state) | ||
| this.view = new View(this.state) | ||
| this.controller = new Controller(this.model,this.view) | ||
| } | ||
| render(){ | ||
| this.view.createStructure() | ||
| } | ||
| } | ||
|
|
||
| let app = new App() | ||
| app.render() | ||
|
|
||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| class Controller{ | ||
| constructor(model, view){ | ||
| this.model = modell | ||
| this.model = model | ||
| this.view = view | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,59 @@ | ||
| class View{ | ||
| constructor(state){ | ||
|
|
||
| this.baseContainer = document.body | ||
| } | ||
| createHeader(){ | ||
| return ` | ||
| <header class="header"> | ||
| <div class="container top-radius"> | ||
| <h2>Contacts</h2> | ||
| </div> | ||
| </header> | ||
| ` | ||
| } | ||
|
|
||
| createContentBlock(){ | ||
| return `<main> | ||
| <div class="container"> | ||
| </div> | ||
| </main> | ||
| ` | ||
| } | ||
|
|
||
| createFooter(){ | ||
| return ` | ||
| <footer class="footer"> | ||
| <div class="container bottom-radius"> | ||
| <nav class="main-nav"> | ||
| <a href="index.html" class="tab active"> | ||
| <span class="glyphicon glyphicon-search" aria-hidden="true"></span> | ||
| <span class = "tab-text">Contacts</span> | ||
| </a> | ||
| <a href="keypad.html" class="tab"> | ||
| <span class="glyphicon glyphicon-th" aria-hidden="true"></span> | ||
| <span class = "tab-text">Keypad</span> | ||
| </a> | ||
| <a href="edit-contact.html" class="tab"> | ||
| <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> | ||
| <span class = "tab-text">Edit contact</span> | ||
| </a> | ||
| <a href="user.html" class="tab"> | ||
| <span class="glyphicon glyphicon-user" aria-hidden="true"></span> | ||
| <span class = "tab-text">User</span> | ||
| </a> | ||
| <a href="add-user.html" class="tab"> | ||
| <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||
| <span class = "tab-text">Add user</span> | ||
| </a> | ||
| </nav> | ||
| </div> | ||
| </footer> | ||
| ` | ||
| } | ||
|
|
||
| createStructure(){ | ||
| this.baseContainer.innerHTML += this.createHeader() | ||
|
||
| this.baseContainer.innerHTML += this.createContentBlock() | ||
| this.baseContainer.innerHTML += this.createFooter() | ||
| } | ||
| render() | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
it's not required to name it View. it could be a "mental abstraction" in your head.
On complex projects, MVC could be hidden, but from the relationships between classes/functions you would feel MVC :)
"it's smell like MVC"