Permalink
Browse files

Adding some CSS love

  • Loading branch information...
1 parent b9ff1fe commit 17b244f5224528427d3a2770c1238ce4e3693bf7 @joachimhs committed Feb 5, 2012
Showing with 28 additions and 1 deletion.
  1. +8 −1 src/main/webapp/app/main.js
  2. +20 −0 src/main/webapp/css/master.css
@@ -17,7 +17,14 @@ EME.SelectedPhotoController = Em.Object.create({
EME.ThumbnailPhotoView = Em.View.extend({
click: function(evt) {
EME.PhotoListController.set('selected', this.get('content'));
- }
+ },
+
+ classNameBindings: "isSelected",
+
+ isSelected: function() {
+ console.log(EME.PhotoListController.get('selected') == this.get('content'));
+ return EME.PhotoListController.get('selected') == this.get('content');
+ }.property('EME.PhotoListController.selected')
});
EME.SelectedPhotoView = Em.View.extend({
@@ -18,8 +18,28 @@
height: 75px;
float: left;
margin-right: 10px;
+ cursor:pointer;
}
+div.is-selected {
+ border: 2px solid #000;
+ width: 100px;
+ height: 100px;
+}
+div.is-selected:after {
+ content: '';
+ display:block;
+ position: relative;
+ width:0;
+ height:0;
+ bottom:126px;
+ left: 40px;
+ border-color: transparent transparent black transparent; /*border color should be same as div div background color*/
+ border-style: solid;
+ border-width: 10px;
+}
+
+
.thumbnailViewList {
position: absolute;
bottom: 10px;

0 comments on commit 17b244f

Please sign in to comment.