Skip to content

Commit

Permalink
added bootstrap 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Norman Rzepka committed Aug 14, 2013
1 parent 737b70a commit bdbb13f
Show file tree
Hide file tree
Showing 21 changed files with 887 additions and 57 deletions.
17 changes: 17 additions & 0 deletions app/assets/javascripts/config.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
unless require?
requirejs = (config) -> window.require = config
else
requirejs = require


requirejs

baseUrl : "/assets/javascripts"

paths :
"jquery" : "bower_components/jquery/jquery.min"
"moment" : "bower_components/momentjs/min/moment.min"

shim :
"moment" :
exports : "moment"
14 changes: 1 addition & 13 deletions app/assets/javascripts/main.coffee
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
require.config

baseUrl : "/assets/javascripts"

paths :
"jquery" : "bower_components/jquery/jquery.min"
"moment" : "bower_components/momentjs/min/moment.min"

shim :
"moment" :
exports : "moment"

require [
define [
"routing"
], ->

4 changes: 2 additions & 2 deletions app/assets/javascripts/report.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ define ["moment"], ->
setupUI : ->

#timespan switching
$("#date_back").on "click", =>
$(".month_picker .month_back").on "click", =>
@currentDate.subtract("months", 1)
@loadData()
$("#date_forward").on "click", =>
$(".month_picker .month_forward").on "click", =>
@currentDate.add("months", 1)
@loadData()

Expand Down
4 changes: 1 addition & 3 deletions app/assets/javascripts/routing.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ define ["jquery"], ($) ->
require ["team_time_report"], (TeamTimeReport) ->
new TeamTimeReport()
"^/repos/[a-zA-Z]*/[a-zA-Z]*/issues/[0-9]*/create": ->
require ["time_entry"], ->


require ["time_entry"], ->

url = window.location.pathname

Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/team_time_report.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define ["report"], (Report) ->

loadData : ->

$("#date").text("#{@currentDate.format('MMMM YYYY')}")
$(".month_picker .month_title").text(@currentDate.format('MMMM YYYY'))
@lastDay = @currentDate.endOf("month").date()

year = @currentDate.format("YYYY")
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/user_time_report.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ define ["report"], (Report) ->

loadData : ->

$("#date").text("#{@currentDate.format('MMMM YYYY')}")
$(".month_picker .month_title").text(@currentDate.format('MMMM YYYY'))
@lastDay = @currentDate.endOf("month").date()

#DO AJAX CALL
Expand Down
11 changes: 11 additions & 0 deletions app/assets/stylesheets/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,15 @@
margin-left: 20px;
margin-right: 20px;
width: auto;
}

#user {
display: inline;
margin: 5px;
}

.month_picker {
.month_title {
width: 160px;
}
}
24 changes: 13 additions & 11 deletions app/views/admin/repositoryAdmin.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,27 @@
@main("Repository Administration") {
<div class="container">
<h3>Add a new repository</h3>
@helper.form(controllers.admin.routes.RepositoryAdministration.add, 'class -> "form-horizontal") {
<div class="control-group">
<label class="control-label" for="inputRepo">Repository</label>
<div class="controls">
<select name="repository">
@helper.form(controllers.admin.routes.RepositoryAdministration.add, 'class -> "form-horizontal", 'role -> "form") {
<div class="form-group">
<label class="col-lg-2 control-label" for="inputRepo">Repository</label>
<div class="col-lg-10">
<select name="repository" class="form-control">
@availableRepositories.map { repository =>
<option value="@repository"> @repository </option>
}
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputAccess">Access-Token</label>
<div class="controls">
<input type="text" id="inputAccess" name="accessToken" required>
<div class="form-group">
<label class="col-lg-2 control-label" for="inputAccess">Access-Token</label>
<div class="col-lg-10">
<input class="form-control" type="text" id="inputAccess" name="accessToken" required>
</div>
</div>
<div class="form-actions">
<input type="submit" value="Add" class="btn btn-primary">
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<input type="submit" value="Add" class="btn btn-primary">
</div>
</div>


Expand Down
10 changes: 5 additions & 5 deletions app/views/home.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<div class="container wide">
<div>
<h2 id="user"></h2>
<span class="btn-group">
<button class="btn" id="date_back"><i class=" icon-chevron-left"></i></button>
<button class="btn" id="date"></button>
<button class="btn" id="date_forward"><i class=" icon-chevron-right"></i></button>
</span>
<div class="btn-group month_picker">
<button class="btn btn-default month_back"><i class=" icon-chevron-left"></i></button>
<button class="btn btn-default month_title"></button>
<button class="btn btn-default month_forward"><i class=" icon-chevron-right"></i></button>
</div>
</div>
<div>
<table id="timetable" class="table table-hover table-bordered">
Expand Down
25 changes: 17 additions & 8 deletions app/views/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,32 @@
<title>@title</title>
<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")">
<link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("stylesheets/bootstrap.min.css")">
<link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("stylesheets/font-awesome.min.css")">
<link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">
<script src="@routes.Assets.at("javascripts/bower_components/requirejs/require.js")" type="text/javascript"></script>
<script src="@routes.Assets.at("javascripts/main.js")" type="text/javascript"></script>
<script src="@routes.Assets.at("javascripts/config.js")" type="text/javascript"></script>
<script src="@routes.Assets.at("javascripts/bower_components/requirejs/require.js")" data-main="main" type="text/javascript"></script>
</head>
<body>
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="@controllers.routes.Application.home">Time-Tracker</a>
<ul class="nav">
<header class="navbar" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="@controllers.routes.Application.home">Time-Tracker</a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="@controllers.routes.Application.home">Home</a></li>
<li><a href="@controllers.routes.Application.team">Team</a></li>
<li><a href="@controllers.admin.routes.RepositoryAdministration.list">Admin</a></li>
</ul>
</div>
</div>
</div>
</header>
<div id="main-container">
@content
</div>
Expand Down
10 changes: 5 additions & 5 deletions app/views/team.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<div class="container wide">
<div>
<h2 id="user">Team Overview</h2>
<span class="btn-group">
<button class="btn" id="date_back"><i class=" icon-chevron-left"></i></button>
<button class="btn" id="date"></button>
<button class="btn" id="date_forward"><i class=" icon-chevron-right"></i></button>
</span>
<div class="btn-group month_picker">
<button class="btn btn-default month_back"><i class=" icon-chevron-left"></i></button>
<button class="btn btn-default month_title"></button>
<button class="btn btn-default month_forward"><i class=" icon-chevron-right"></i></button>
</div>
</div>
<div>
<table id="timetable" class="table table-hover table-striped table-bordered">
Expand Down
Binary file added public/font/FontAwesome.otf
Binary file not shown.
Binary file added public/font/fontawesome-webfont.eot
Binary file not shown.
Loading

0 comments on commit bdbb13f

Please sign in to comment.