Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:vanillaforums/Garden

  • Loading branch information...
commit b56710048648a5cc5ff428d9b9fac7c865b59766 2 parents 93c3750 + ff65266
@kaecyra kaecyra authored
View
5 applications/dashboard/controllers/class.modulecontroller.php
@@ -14,7 +14,10 @@ class ModuleController extends Gdn_Controller {
/**
* Creates and renders an instance of a module.
*/
- public function Index($Module, $AppFolder = '') {
+ public function Index($Module, $AppFolder = '', $DeliveryType = '') {
+ if (!$DeliveryType)
+ $this->DeliveryType(DELIVERY_TYPE_VIEW);
+
$ModuleClassExists = class_exists($Module);
if ($ModuleClassExists) {
View
20 applications/dashboard/design/admin.css
@@ -398,6 +398,16 @@ a.Button {
color: transparent !important;
text-shadow: none !important;
}
+.InProgress {
+ color: transparent !Important;
+ background: url('images/progress_sm.gif') center center no-repeat !important;
+ border-color: transparent !important;
+ -moz-box-shadow: none !important;
+ -webkit-box-shadow: none !important;
+ box-shadow: none !important;
+ color: transparent !important;
+ text-shadow: none !important;
+}
/* Note: Warning, Alert & Info are simple boxes that can be used to wrap message
strings & imply importance. */
@@ -2304,4 +2314,14 @@ span.InformSprite.Dice { background-position: -442px -586px; }
height: 42px;
width: 341px;
background: url('images/welcome-message.png') top left no-repeat transparent;
+}
+.Info ul,
+.Info ol {
+ margin: 1em 0 1em 3em;
+}
+.Info ol li {
+ list-style: decimal !important;
+}
+.Info ul li {
+ list-style: disc !important;
}
View
1  applications/dashboard/design/style.css
@@ -713,7 +713,6 @@ div.Discussion:hover .OptionsTitle:hover,
top: 100%;
right: -10px;
display: none;
- z-index: 100;
text-align: left;
}
.OptionsMenu .Flyout {
View
3  applications/vanilla/js/discussion.js
@@ -369,7 +369,8 @@ jQuery(document).ready(function($) {
else
$('.DataList .AdminCheck :checkbox').removeAttr('checked');
});
- $('.AdminCheck :checkbox').click(function() {
+ $('.AdminCheck :checkbox').click(function(e) {
+ e.stopPropagation();
// retrieve all checked ids
var checkIDs = $('.DataList .AdminCheck :checkbox');
var aCheckIDs = new Array();
View
2  applications/vanilla/settings/structure.php
@@ -409,7 +409,7 @@
if (!$DateInsertedExists) {
$SQL->Update('TagDiscussion td')
->Join('Discussion d', 'td.DiscussionID = d.DiscussionID')
- ->Set('td.DateInserted', 'd.DateInserted')
+ ->Set('td.DateInserted', 'd.DateInserted', FALSE, FALSE)
->Put();
}
View
89 applications/vanilla/views/discussion/helper_functions.php
@@ -13,6 +13,10 @@ function CssClass($Object, $CurrentOffset = 0) {
$CssClass = 'Item Item'.$Type;
$CssClass .= (GetValue('InsertUserID', $Object) == Gdn::Session()->UserID) ? ' Mine' : '';
+ if ($_CssClss = GetValue('_CssClass', $Object)) {
+ $CssClass .= ' '.$_CssClss;
+ }
+
if ($Type == 'Comment')
$CssClass .= ($CurrentOffset % 2) ? ' Alt' : '';
@@ -88,48 +92,51 @@ function WriteComment($Comment, $Sender, $Session, $CurrentOffset) {
$Sender->FireEvent('BeforeCommentDisplay'); ?>
<li class="<?php echo $CssClass; ?>" id="<?php echo 'Comment_'.$Comment->CommentID; ?>">
<div class="Comment">
- <div class="Meta">
- <?php $Sender->FireEvent('BeforeCommentMeta'); ?>
- <span class="Author">
- <?php
- echo UserPhoto($Author);
- echo UserAnchor($Author);
- ?>
- </span>
- <span class="MItem DateCreated">
- <?php echo Anchor(Gdn_Format::Date($Comment->DateInserted, 'html'), $Permalink, 'Permalink', array('name' => 'Item_'.($CurrentOffset), 'rel' => 'nofollow')); ?>
- </span>
+ <?php $Sender->FireEvent('BeforeCommentMeta'); ?>
+ <span class="Author">
<?php
- // Include source if one was set
- if ($Source = GetValue('Source', $Comment))
- echo Wrap(sprintf(T('via %s'), T($Source.' Source', $Source)), 'span', array('class' => 'MItem Source'));
-
- // Add your own options or data as spans with 'MItem' class
- $Sender->FireEvent('InsideCommentMeta');
-
- ?>
- <div class="Options">
- <?php WriteCommentOptions($Comment); ?>
- </div>
- <div class="CommentInfo">
+ echo UserPhoto($Author);
+ echo UserAnchor($Author, 'Username');
+ ?>
+ </span>
+
+ <div class="Item-BodyWrap">
+ <div class="Meta">
+ <span class="MItem DateCreated">
+ <?php echo Anchor(Gdn_Format::Date($Comment->DateInserted, 'html'), $Permalink, 'Permalink', array('name' => 'Item_'.($CurrentOffset), 'rel' => 'nofollow')); ?>
+ </span>
<?php
- $Sender->FireEvent('CommentInfo');
-
- // Include IP Address if we have permission
- if ($Session->CheckPermission('Garden.Moderation.Manage'))
- echo Wrap(IPAnchor($Comment->InsertIPAddress), 'span', array('class' => 'MItem IPAddress'));
+ // Include source if one was set
+ if ($Source = GetValue('Source', $Comment))
+ echo Wrap(sprintf(T('via %s'), T($Source.' Source', $Source)), 'span', array('class' => 'MItem Source'));
+
+ // Add your own options or data as spans with 'MItem' class
+ $Sender->FireEvent('InsideCommentMeta');
+
?>
+ <div class="Options">
+ <?php WriteCommentOptions($Comment); ?>
+ </div>
+ <div class="CommentInfo">
+ <?php
+ $Sender->FireEvent('CommentInfo');
+
+ // Include IP Address if we have permission
+ if ($Session->CheckPermission('Garden.Moderation.Manage'))
+ echo Wrap(IPAnchor($Comment->InsertIPAddress), 'span', array('class' => 'MItem IPAddress'));
+ ?>
+ </div>
+ <?php $Sender->FireEvent('AfterCommentMeta'); ?>
</div>
- <?php $Sender->FireEvent('AfterCommentMeta'); ?>
- </div>
- <div class="Item-Body">
- <div class="Message">
- <?php
- echo FormatBody($Comment);
- ?>
+ <div class="Item-Body">
+ <div class="Message">
+ <?php
+ echo FormatBody($Comment);
+ ?>
+ </div>
+ <?php $Sender->FireEvent('AfterCommentBody'); ?>
+ <?php WriteReactions($Comment); ?>
</div>
- <?php $Sender->FireEvent('AfterCommentBody'); ?>
- <?php WriteReactions($Comment); ?>
</div>
</div>
</li>
@@ -145,6 +152,14 @@ function WriteReactions($Row, $Type = 'Comment') {
endif;
+if (!function_exists('WriteReactions')):
+
+function WriteReactions($Row, $Type = 'Comment') {
+ // noop
+}
+
+endif;
+
/**
* Get options for the current discussion.
*
View
2  applications/vanilla/views/discussion/index.php
@@ -4,7 +4,7 @@
include $this->FetchViewLocation('helper_functions', 'discussion');
// Wrap the discussion related content in a div.
-echo '<div class="MessageList Discussion '.CssClass($this->Data('Discussion')).'">';
+echo '<div class="MessageList Discussion">';
// Write the page title.
echo '<!-- Page Title -->
View
1  js/global.js
@@ -587,6 +587,7 @@ jQuery(document).ready(function($) {
// Activate ToggleFlyout menus
var lastOpen = null;
$(document).delegate('.ToggleFlyout', 'click', function(e) {
+
var $flyout = $('.Flyout', this);
var isHandle = false;
View
4 library/core/functions.render.php
@@ -226,7 +226,7 @@ function IPAnchor($IP, $CssClass = '') {
function Plural($Number, $Singular, $Plural) {
// Make sure to fix comma-formatted numbers
$WorkingNumber = str_replace(',', '', $Number);
- return sprintf(T($WorkingNumber == 1 ? $Singular : $Plural), $Number);
+ return sprintf(T(abs($WorkingNumber) == 1 ? $Singular : $Plural), $Number);
}
}
@@ -296,7 +296,7 @@ function UserPhoto($User, $Options = array()) {
$User = (object)$User;
$LinkClass = GetValue('LinkClass', $Options, 'ProfileLink');
- $ImgClass = GetValue('ImageClass', $Options, 'ProfilePhotoMedium');
+ $ImgClass = GetValue('ImageClass', $Options, 'ProfilePhoto ProfilePhotoMedium');
$LinkClass = $LinkClass == '' ? '' : ' class="'.$LinkClass.'"';
Please sign in to comment.
Something went wrong with that request. Please try again.