Permalink
Browse files

Merge branch 'master' of github.com:drunkcod/CardWall

  • Loading branch information...
2 parents 13b6616 + b552ee0 commit 8cd0b50b05e3073c05ee3633812511bc83719c30 @drunkcod drunkcod committed May 16, 2011
View
@@ -89,9 +89,22 @@
<Compile Include="WebConfirugraionSectionHandler.cs" />
</ItemGroup>
<ItemGroup>
+ <Content Include="Content\FamFamFam\bullet_orange.png" />
+ <Content Include="Content\FamFamFam\bullet_star.png" />
+ <Content Include="Content\FamFamFam\flag_blue.png" />
+ <Content Include="Content\FamFamFam\flag_pink.png" />
+ <Content Include="Content\FamFamFam\flag_red.png" />
+ <Content Include="Content\FamFamFam\money.png" />
+ <Content Include="Content\FamFamFam\tick.png" />
+ <Content Include="Content\FamFamFam\user_female.png" />
<Content Include="Content\PivotalTracker\bug.png" />
<Content Include="Content\PivotalTracker\chore.png" />
<Content Include="Content\PivotalTracker\feature.png" />
+ <Content Include="Content\Print\bug.png" />
+ <Content Include="Content\Print\chore.png" />
+ <Content Include="Content\Print\feature.png" />
+ <Content Include="Content\Scripts\jquery-1.5.2.min.js" />
+ <Content Include="Content\Scripts\jquery.tmpl.min.js" />
<Content Include="Content\Style.css" />
<Content Include="TeamNorthBurndown.txt" />
<Content Include="TeamIncrediblesBurndown.txt" />
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectView>ShowAllFiles</ProjectView>
+ </PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
View
@@ -0,0 +1,20 @@
+* { font-family: Verdana }
+body { margin: 0px; padding: 0px; }
+a { float:left; clear: both; padding: 1px 5px 1px 25px; height: 20px; margin: 2px; background-repeat:no-repeat; background-position: left center; cursor: pointer; opacity: 0.5; filter:alpha(opacity=50); }
+a[rel='bug']{ background-image: url('images/bug_icon.png');}
+a[rel='chore']{ background-image: url('images/chore_icon.png');}
+a[rel='feature']{ background-image: url('images/feature_icon.png');}
+a[rel='release']{ background-image: url('images/release_icon.png');}
+.selected { opacity: 1.0; filter:alpha(opacity=100); }
+button.print { float:left; clear: both; }
+#for-printing { display: none; background-color: white; position: absolute; width: 297mm; }
+.card { float: left; padding: 5mm; width:12.5cm; min-height: 8.3cm; border: 2mm solid black; position: relative; margin: 2mm 0 0 2mm; }
+.card { overflow: hidden; }
+.card.break { clear: both; }
+.card.page-break { page-break-after: always; }
+.card h1 { font-size: 6mm; background-color: white; opacity: 0.8; filter:alpha(opacity=80); text-align: center; position: absolute; }
+.card .id { position: absolute; bottom: 5mm; right: 5mm; font-size: 5mm; }
+.card .estimate { position: absolute; bottom: 5mm; left: 5mm; font-size: 1cm; }
+.card img { position: absolute; height:100%; margin: -2.5mm; margin-left: 15mm;}
+.card .id { color: silver; }
+.card .estimate { color: silver; }
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,6 +1,7 @@
body {
background-color: #eee;
font-family: Verdana, Sans-Serif;
+ margin: 0px; padding: 0px;
}
#content {
@@ -9,7 +10,7 @@
margin-right: auto;
}
-.card {
+#content .card {
border: 1px solid black;
border-radius: 15px;
-moz-border-radius: 15px;
@@ -23,40 +24,41 @@
top: 0px;
margin: 10px;
z-index: 0;
+ cursor: pointer;
}
-.card h1 {
+#content .card h1 {
overflow: hidden;
}
-.size1 {
+#content .size1 {
-o-transform: scale(0.8);
}
-.size2 {
+#content .size2 {
-o-transform: scale(0.9);
}
-.size4 {
+#content .size4 {
-o-transform: scale(1);
}
-.card-footer {
+#content .card-footer {
font-size: smaller;
color: rgba(0, 0, 0, 0.7);
position: absolute;
bottom: 1em;
}
-.card-avatar {
+#content .card-avatar {
position: absolute;
bottom: 10px;
right: 10px;
}
-.card-summary {
+#content .card-summary {
}
-.card-badges {
+#content .card-badges {
position: absolute;
top: 10px;
right: 10px;
@@ -65,19 +67,19 @@
list-style-type: none;
}
-.card-badges li {
+#content .card-badges li {
display: inline;
}
-.card-tasks {
+#content .card-tasks {
font-size: smaller;
position: relative;
top: 110px;
left: 40px;
z-index: 1;
}
-.task-list {
+#content .task-list {
border: 1px solid black;
border-radius: 15px;
-moz-border-radius: 15px;
@@ -89,79 +91,97 @@
background-color: white;
}
-.card-tasks:hover {
+#content .card-tasks:hover {
font-weight: bolder;
}
-.card-tasks img {
+#content .card-tasks img {
vertical-align: middle;
padding-right: 3px;
}
-.card-tasks ul {
+#content .card-tasks ul {
margin: 0;
padding: 0;
list-style-type: none;
}
-.card-tasks li {
+#content .card-tasks li {
font-size: 10px;
font-weight: normal;
}
-.card-project-name {
+#content .card-project-name {
position: absolute;
top: 10px;
left: 10px;
font-size: 10px;
color: rgba(0, 0, 0, 0.33);
}
-div.hidden {
+#content div.hidden {
opacity: 0.0;
}
-*:hover > div.hidden {
+#content *:hover > div.hidden {
opacity: 1.0;
}
-.feature {
+#content .feature {
background-color: #FFF5A8;
}
-.bug {
+#content .bug {
background-color: #FFA8AA;
}
-.chore {
+#content .chore {
background-color: #D4D4D4;
}
-.release {
+#content .release {
background-color: #40A0FF;
}
-.card-title {
+#content .card-title {
font-size: 11pt;
color: rgba(0, 0, 0, 0.95);
}
-.card-labels {
+#content .card-labels {
font-size: 8pt;
}
-.lane {
+#content .lane {
width: 260px;
border-top: 2px solid rgba(0, 0, 0, 0.33);
}
-.lane + .lane {
+#content .lane + .lane {
border-left: 4px dashed rgba(0, 0, 0, 0.33);
}
-.lane-header {
+#content .lane-header {
font-size: 14pt;
font-weight: bold;
text-align: center;
background-color: #DDD;
}
+
+#content .card.selected { background-image: url('print/selected.png'); background-repeat: no-repeat; background-position: center; }
+
+#actions { display: none; position: fixed; top:0px; background-color: #6495ed; padding: 10px; border-right: 2px solid #5D8AA8; border-bottom: 2px solid #5D8AA8; }
+#actions ul { padding: 0px; list-style: none; margin: 0px;}
+#actions li { display: inline; }
+
+#print-view { display: none; background-color: white; position: absolute; width: 297mm; }
+#print-view .card { float: left; padding: 5mm; width:12.5cm; min-height: 8.3cm; border: 2mm solid black; position: relative; margin: 2mm 0 0 2mm; }
+#print-view .card { overflow: hidden; }
+#print-view .card.break { clear: both; }
+#print-view .card.page-break { page-break-after: always; }
+#print-view .card h1 { font-size: 6mm; background-color: white; opacity: 0.8; filter:alpha(opacity=80); text-align: center; position: absolute; }
+#print-view .card .id { position: absolute; bottom: 5mm; right: 5mm; font-size: 5mm; }
+#print-view .card .size { position: absolute; bottom: 5mm; left: 5mm; font-size: 1cm; }
+#print-view .card img { position: absolute; height:100%; margin: -2.5mm; margin-left: 15mm;}
+#print-view .card .id { color: silver; }
+#print-view .card .size { color: silver; }
View
@@ -25,6 +25,7 @@ public class CardView
public string ProjectName;
public int? Size;
public DateTime Started;
+ public int Id;
public void AddBadge(CardBadge item) { badges.Add(item); }
public void AddTask(CardTask item){ tasks.Add(item); }
@@ -27,7 +27,8 @@ class CardViewFactory
Owner = GetOwner(story),
AvatarUrl = GetAvatarUrl(story),
Url = story.Url,
- ProjectName = GetProjectName(story)
+ ProjectName = GetProjectName(story),
+ Id = story.Id
};
CardBadge badge;
@@ -5,6 +5,8 @@
<head runat="server">
<title>Iteration Overview</title>
<link rel="stylesheet" type="text/css" href="<%=Url.Content("~/Content/Style.css")%>" />
+ <script src="<%=Url.Content("~/Content/Scripts/jquery-1.5.2.min.js")%>" type="text/javascript"></script>
+ <script src="<%=Url.Content("~/Content/Scripts/jquery.tmpl.min.js")%>" type="text/javascript"></script>
</head>
<body>
<table id="content" cellpadding=0 cellspacing=0 border=0>
@@ -23,5 +25,48 @@
<%} %>
</tr>
</table>
+
+ <div id="actions">
+ <ul>
+ <li><button class="print">Print selected</button></li>
+ </ul>
+ </div>
+ <div id="print-view"></div>
+ <script id="print-view-template" type="text/x-jquery-tmpl">
+ {{each(idx, card) cards}}
+ <div class="card ${breakClass(idx)}">
+ <img src="<%=Url.Content("~/Content/Print")%>/${type}.png"/>
+ <h1>${title}</h1>
+ <div class="size">${size}</div>
+ <div class="id">${id}</div>
+ </div>
+ {{/each}}
+ </script>
+
+ <script type="text/javascript">
+ var breakClass = function (index){
+ switch (index % 4) { case 0: case 2: return 'break'; case 3: return 'page-break'; default: return ''; } };
+
+ $('#content .card').click(function(event){
+ $(this).toggleClass('selected');
+ $('#content .card.selected').length ? $('#actions').slideDown() : $('#actions').slideUp();
+ });
+
+ $('#actions .print').click(function(event){
+ var cards = $.map($('#content .card.selected'), function(card){
+ var elm = $(card);
+ return {
+ id:elm.attr('id'),
+ title:$('h1 a', elm).text(),
+ size:elm.attr('data-size'),
+ type:elm.attr('data-type')
+ };
+ });
+ $('#actions').hide();
+ $('#content').fadeOut();
+ $('#print-view-template').tmpl({cards:cards}).appendTo($('#print-view').empty().fadeIn());
+ $('body').css('background-color', '#fff');
+ });
+ </script>
</body>
</html>
@@ -7,7 +7,7 @@
</div>
</div>
<%} %>
-<div class="<%=Model.Type%> card<%if(Model.Size.HasValue){%> size<%=Model.Size%><%} %>">
+<div class="<%=Model.Type%> card<%if(Model.Size.HasValue){%> size<%=Model.Size%><%} %>" id="<%=Model.Id%>" data-type="<%=Model.Type%>" data-size="<%=Model.Size%>">
<h1><a href="<%=Model.Url%>" class="card-title" target="_blank"><%=Model.Title %></a></h1>
<div class="card-project-name"><%=Model.ProjectName %></div>
<div class='card-summary'><%=Model.Summary %></div>

0 comments on commit 8cd0b50

Please sign in to comment.