Skip to content

Commit

Permalink
Под фотографией указаывется текущий размер и ссылки на стандартное пр…
Browse files Browse the repository at this point in the history
…евью и оригинал с размерами #30
  • Loading branch information
klimashkin committed Jul 26, 2013
1 parent e7a233d commit ed58d38
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
14 changes: 14 additions & 0 deletions public/style/photo/photo.less
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,24 @@
//position: relative;
display: inline-block;
margin-top: 2px;
height: 19px;
line-height: 19px;
text-align: right;

.toolsTxt {
margin: 0 1px;
vertical-align: text-top;
font-size: 13px;
cursor: default;
}
.sizeThis, .sizeStandard, .sizeOrigin {
display: inline-block;
white-space: nowrap;
}

.photoHeight {
display: inline-block;
margin: 0 0 0 7px;
width: 14px;
height: 15px;
}
Expand Down
10 changes: 9 additions & 1 deletion views/module/photo/photo.jade
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@
// /ko
br
.photoTools(data-bind="style: {width: ws() + 'px'}")
span.toolsTxt
//ko if: ws() !== p.ws() && hs() !== p.hs()
span.sizeThis(data-bind="text: 'Текуший размер: ' + ws() + '×' + hs()")
span  | 
// /ko
a.sizeStandard(target="_blank", data-bind="attr:{href: '/_p/d/' + p.file()}, text: 'Стандарт: ' + p.ws() + '×' + p.hs()")
span  | 
a.sizeOrigin(target="_blank", data-bind="attr:{href: '/_p/a/' + p.file()}, text: 'Оригинал: ' + p.w() + '×' + p.h()")
//ko if: hscalePossible()
.photoHeight.state(data-state="hscaleTumbler", data-bind="tooltip: {title: 'Подгонять по высоте видимой области', trigger: 'click hover'}, css: {on: hscalePossible() && hscaleTumbler()}, click: stateChange")
.photoHeight.state(data-state="hscaleTumbler", data-bind="tooltip: {title: 'Подгонять по высоте видимой области', trigger: 'click hover'}, css: {on: hscaleTumbler()}, click: stateChange")
i.icon-resize-vertical.icon-white
// /ko
//ko template: {name: edit() ? 'photoEdit' : 'photoView', afterRender: tplAfterRender}
Expand Down

0 comments on commit ed58d38

Please sign in to comment.