mirror of
https://github.com/pinry/pinry.git
synced 2025-11-14 09:05:41 +01:00
Added Original URL and Pin URL to lightbox of items.
This commit is contained in:
@@ -30,6 +30,8 @@ urlpatterns = patterns('',
|
|||||||
name='tag-pins'),
|
name='tag-pins'),
|
||||||
url(r'^pins/user/(?P<user>(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'),
|
url(r'^pins/user/(?P<user>(\w|-)+)/$', TemplateView.as_view(template_name='core/pins.html'),
|
||||||
name='user-pins'),
|
name='user-pins'),
|
||||||
|
url(r'^(?P<pin>\d+)/$', TemplateView.as_view(template_name='core/pins.html'),
|
||||||
|
name='recent-pins'),
|
||||||
url(r'^$', TemplateView.as_view(template_name='core/pins.html'),
|
url(r'^$', TemplateView.as_view(template_name='core/pins.html'),
|
||||||
name='recent-pins'),
|
name='recent-pins'),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -56,3 +56,7 @@
|
|||||||
color: #999;
|
color: #999;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lightbox-data .extra {
|
||||||
|
padding: 8px 6px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ textarea {
|
|||||||
border-top-right-radius: 3px;
|
border-top-right-radius: 3px;
|
||||||
cursor: -webkit-zoom-in;
|
cursor: -webkit-zoom-in;
|
||||||
cursor: -moz-zoom-in;
|
cursor: -moz-zoom-in;
|
||||||
display: none;
|
display: block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 240px;
|
width: 240px;
|
||||||
|
|||||||
@@ -77,6 +77,15 @@ $(window).load(function() {
|
|||||||
// Start Global Init Function
|
// Start Global Init Function
|
||||||
window.lightbox = function() {
|
window.lightbox = function() {
|
||||||
var links = $('body').find('.lightbox');
|
var links = $('body').find('.lightbox');
|
||||||
|
if (pinFilter) {
|
||||||
|
var promise = getPinData(pinFilter);
|
||||||
|
promise.success(function(pin) {
|
||||||
|
createBox(pin);
|
||||||
|
});
|
||||||
|
promise.error(function() {
|
||||||
|
message('Problem problem fetching pin data.', 'alert alert-error');
|
||||||
|
});
|
||||||
|
}
|
||||||
return links.each(function() {
|
return links.each(function() {
|
||||||
$(this).off('click');
|
$(this).off('click');
|
||||||
$(this).click(function(e) {
|
$(this).click(function(e) {
|
||||||
@@ -91,5 +100,6 @@ $(window).load(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// End Global Init Function
|
// End Global Init Function
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
username: "{{ user.username }}",
|
username: "{{ user.username }}",
|
||||||
gravatar: "{{ user.gravatar }}"
|
gravatar: "{{ user.gravatar }}"
|
||||||
},
|
},
|
||||||
|
pinFilter = "{{ request.resolver_match.kwargs.pin }}",
|
||||||
tagFilter = "{{ request.resolver_match.kwargs.tag }}",
|
tagFilter = "{{ request.resolver_match.kwargs.tag }}",
|
||||||
userFilter = "{{ request.resolver_match.kwargs.user }}";
|
userFilter = "{{ request.resolver_match.kwargs.user }}";
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -23,6 +23,10 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text extra pull-right">
|
||||||
|
<a href="{{url}}" class="btn btn-small">Original URL</a>
|
||||||
|
<a href="/{{id}}/" class="btn btn-small">Pin URL</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user