*/
$(document).ready(function(){
- $('a.attachment').click(function() {$().jOverlay({url: $('address .url')[0].href+'/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'}); return false; });
- $("a.thumbnail").hover(
- function() {
- var anchor = $(this);
- $("a.thumbnail").children('img').remove();
-
- setTimeout(function() {
- anchor.closest(".entry-title").addClass('ov');
- $.get($('address .url')[0].href+'/attachment/' + (anchor.attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) {
- anchor.append(data);
- });
- }, 250);
-
- setTimeout(function() {
- anchor.children('img').remove();
- anchor.closest(".entry-title").removeClass('ov');
- }, 3000);
- },
- function() {
- $(this).children('img').remove();
- $(this).closest(".entry-title").removeClass('ov');
- }
- );
-
// count character on keyup
function counter(event){
var maxLength = 140;
$("#form_notice").each(addAjaxHidden);
NoticeHover();
NoticeReply();
+ NoticeAttachments();
});
}
return true;
}
+
+function NoticeAttachments() {
+ $.fn.jOverlay.options = {
+ method : 'GET',
+ data : '',
+ url : '',
+ color : '#000',
+ opacity : '0.6',
+ zIndex : 9999,
+ center : true,
+ imgLoading : $('address .url')[0].href+'theme/base/images/illustrations/illu_progress_loading-01.gif',
+ bgClickToClose : true,
+ success : function() {
+ $('#jOverlayContent').append('<button>×</button>');
+ $('#jOverlayContent button').click($.closeOverlay);
+ },
+ timeout : 0
+ };
+
+ $('a.attachment').click(function() {
+ $().jOverlay({url: $('address .url')[0].href+'/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'});
+ return false;
+ });
+ $("body:not(#shownotice) a.thumbnail").hover(
+ function() {
+ var anchor = $(this);
+ $("a.thumbnail").children('img').remove();
+ anchor.closest(".entry-title").addClass('ov');
+
+ setTimeout(function() {
+ $.get($('address .url')[0].href+'/attachment/' + (anchor.attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) {
+ anchor.append(data);
+ });
+ }, 500);
+
+ setTimeout(function() {
+ anchor.children('img').remove();
+ anchor.closest(".entry-title").removeClass('ov');
+ }, 3000);
+ },
+ function() {
+ $("a.thumbnail").children('img').remove();
+ $(this).closest(".entry-title").removeClass('ov');
+ }
+ );
+}
+
function show()
{
- $this->out->elementStart('dl', array('id' =>'attachment'));
+ $this->out->elementStart('dl', array('id' =>'attachments'));
$this->out->element('dt', null, _('Attachments'));
$this->out->elementStart('dd');
- $this->out->elementStart('ul', array('class' => 'attachments'));
+ $this->out->elementStart('ol', array('class' => 'attachments'));
$atts = new File;
$att = $atts->getAttachments($this->notice->id);
}
$this->out->elementEnd('dd');
- $this->out->elementEnd('ul');
+ $this->out->elementEnd('ol');
$this->out->elementEnd('dl');
return count($att);
text-transform:lowercase;
}
-.notice .attachment {
-position:relative;
-}
-.notice .attachment img {
-position:absolute;
-top:18px;
-left:0;
-z-index:99;
-}
-#shownotice .notice .attachment img {
-position:static;
-}
-
-
.notice-options {
position:relative;
font-size:0.95em;
}
+.notice .attachment {
+position:relative;
+padding-left:16px;
+}
+#attachments .attachment {
+padding-left:0;
+}
+.notice .attachment img {
+position:absolute;
+top:18px;
+left:0;
+z-index:99;
+}
+#shownotice .notice .attachment img {
+position:static;
+}
+
+#attachments {
+clear:both;
+float:left;
+width:100%;
+margin-top:18px;
+}
+#attachments dt {
+font-weight:bold;
+font-size:1.3em;
+margin-bottom:4px;
+}
+
+#attachments li {
+margin-bottom:18px;
+list-style-type:decimal;
+float:left;
+clear:both;
+}
+
+#jOverlayContent,
+#jOverlayContent #content {
+width: auto !important;
+}
+#jOverlayContent .external span {
+display:block;
+margin-bottom:11px;
+}
+#jOverlayContent button {
+position:absolute;
+top:0;
+right:0;
+padding:3px 4px;
+font-weight:bold;
+}
+
+
#usergroups #new_group {
float: left;
margin-right: 2em;