-
Notifications
You must be signed in to change notification settings - Fork 15
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
Organization Team init #5
Open
tsybulskyserg
wants to merge
1
commit into
openconf:master
Choose a base branch
from
tsybulskyserg:master
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 all commits
Commits
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 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 |
---|---|---|
|
@@ -26,3 +26,5 @@ server/*.js | |
!app/assets/*/* | ||
|
||
|
||
app/.idea/* | ||
app/packages/demo/.idea/* |
This file contains 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 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 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,10 +0,0 @@ | ||
body { | ||
padding-top: 2px; | ||
padding-bottom: 40px; } | ||
|
||
.table-users tbody td { | ||
line-height: 36px; } | ||
.table-users tfoot td.pagination-wrap { | ||
background-color: #f8f8f8; } | ||
.table-users tfoot td.pagination-wrap .pagination { | ||
margin: 0px; } | ||
This file contains 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"logo": "http://placehold.it/60x60", | ||
"companyName": "Lohika", | ||
"phone": "853-500-3367", | ||
"email": "[email protected]", | ||
"address": "37969, Alaska, Broome Streets", | ||
"about": "Nulla sit tincidunt volutpat enim illum, autem ex iriure hendrerit iriure, volutpat eum vulputate diam. Luptatum, diam ad laoreet dolor commodo, ullamcorper dolore minim commodo ut, elit consequat iusto. Facilisi consequat, esse in vel iusto illum, eros dolor commodo consequat eum, vel dolore. Exerci euismod nisl, delenit ad blandit suscipit dolor, consectetuer dolore ad dolore." | ||
}, | ||
{ | ||
"id": 2, | ||
"logo": "http://placehold.it/60x60", | ||
"companyName": "Ciklum", | ||
"phone": "841-471-3410", | ||
"email": "[email protected]", | ||
"address": "28272, AmarilloAnaheim, Orchard Street", | ||
"about": "Iusto et feugiat dolore dignissim minim, nulla dignissim molestie dolore dignissim, enim autem vulputate in. Vero, delenit vero commodo sit sed, qui blandit duis consequat vel, velit in et. Suscipit in, nonummy nonummy vulputate facilisis nonummy, at wisi ex duis qui, augue nisl. Velit consequat laoreet, zzril vel consectetuer magna duis, autem laoreet exerci amet nulla, sed. Ea ut dolor ut, wisi accumsan nulla et zzril, tation tation te facilisi zzril, autem sit amet at dolore, ad lobortis elit eros dolore, esse ex nostrud aliquip. Vel, accumsan at in odio diam." | ||
} | ||
] |
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
define (require, exports, module) -> | ||
model = require '../models/model' | ||
exports.Collection = Backbone.Collection.extend( | ||
url: -> | ||
'/org' | ||
|
||
model: model.Model | ||
) | ||
return |
This file contains 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
define (require, exports, module)-> | ||
orgsView = require './views/organizations' | ||
orgView = require './views/organization' | ||
BaseController = require 'shared/base_controller' | ||
|
||
exports.Controller = class Controller extends BaseController | ||
routes: | ||
'org-team': 'getOrgsTeam' | ||
'org-team/:id': 'getOrgTeam' | ||
|
||
getOrgsTeam: -> | ||
@orgsView = new orgsView.View | ||
@orgsView.collection.fetch | ||
success: (collection, resp, options) => | ||
console.dir(collection) | ||
$('#demo-box').html @orgsView.render().el | ||
return @ | ||
|
||
getOrgTeam: (id)-> | ||
@orgView = new orgView.View() | ||
@orgView.model.set {id: id} | ||
@orgView.model.fetch | ||
success: (model, resp, options) => | ||
$('#demo-box').html @orgView.render().el | ||
return @ | ||
|
||
return |
This file contains 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
define (require, exports, module) -> | ||
exports.Model = Backbone.Model.extend( | ||
url: -> | ||
"/org/#{@id}" | ||
|
||
defaults: | ||
logo: "http://placehold.it/32x32", | ||
companyName: "Test company name", | ||
phone: "", | ||
email: "", | ||
address: "", | ||
about: "" | ||
) | ||
return |
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
expect = chai.expect | ||
|
||
describe 'Test', -> | ||
dep = null | ||
|
||
beforeEach (done) -> | ||
require [], (_dep) -> | ||
dep = _dep | ||
done() | ||
|
||
it 'should be test', (done) -> | ||
done() |
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
expect = chai.expect | ||
|
||
describe 'Test', -> | ||
dep = null | ||
|
||
beforeEach (done) -> | ||
require [], (_dep) -> | ||
dep = _dep | ||
done() | ||
|
||
it 'should be test', (done) -> | ||
done() |
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
expect = chai.expect | ||
|
||
describe 'Test', -> | ||
dep = null | ||
|
||
beforeEach (done) -> | ||
require [], (_dep) -> | ||
dep = _dep | ||
done() | ||
|
||
it 'should be test', (done) -> | ||
done() |
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
expect = chai.expect | ||
|
||
describe 'Test', -> | ||
dep = null | ||
|
||
beforeEach (done) -> | ||
require [], (_dep) -> | ||
dep = _dep | ||
done() | ||
|
||
it 'should be test', (done) -> | ||
done() |
This file contains 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<div class="container"> | ||
<h2><%= org.companyName%></h2> | ||
<div class="row"> | ||
<div class="span12"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="span1"> | ||
<img src='<%= org.logo%>' alt='<%= org.companyName%>'/> | ||
</div> | ||
<div class="span11"> | ||
<ul class='item'> | ||
<li>Phone: <%= org.phone%></a></li> | ||
<li>Email: <%= org.email%></a></li> | ||
<li>Address: <%= org.address%></a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="span12"> | ||
<%= org.about%> | ||
</div> | ||
</div> | ||
</div> |
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="container"> | ||
<h2>Organizations</h2> | ||
<div class="row"> | ||
<div class="span12"> | ||
<ul class='list-item'> | ||
<% _.each(listOrg, function(org) { %> | ||
<li><a href='/#org-team/<%= org.id%>'><%= org.companyName%></a></li> | ||
<% }); %> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> |
This file contains 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
define (require, exports, module)-> | ||
tpl = require 'text!../templates/organization.html' | ||
model = require '../models/model' | ||
|
||
exports.View = Backbone.View.extend( | ||
template: _.template tpl | ||
model: new model.Model | ||
|
||
initialize: -> | ||
|
||
render: ()-> | ||
@$el.html @template({org: @model.toJSON()}) | ||
return @ | ||
|
||
) | ||
return |
This file contains 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
define (require, exports, module)-> | ||
tpl = require 'text!../templates/organizations.html' | ||
collection = require '../collections/collection' | ||
|
||
exports.View = Backbone.View.extend( | ||
template: _.template tpl | ||
collection: new collection.Collection | ||
|
||
initialize: -> | ||
|
||
render: -> | ||
@$el.html @template(listOrg: @collection.toJSON()) | ||
return @ | ||
) | ||
return |
This file contains 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 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 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
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.
why did you remove part of demo package?
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.
oo sorry.. i think, it is my phpstorm.. it happened when I was doing the small refactoring