diff --git a/module/bug/control.php b/module/bug/control.php
index d141e48530..8c226d887e 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -221,7 +221,7 @@ class bug extends control
}
$actionID = $this->action->create('bug', $bugID, 'Opened');
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
$location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&type=byModule¶m={$this->post->module}");
$response['locate'] = isset($_SESSION['bugList']) ? $this->session->bugList : $location;
@@ -361,7 +361,7 @@ class bug extends control
if(!empty($_POST))
{
$actions = $this->bug->batchCreate($productID, $branch);
- foreach($actions as $bugID => $actionID) $this->sendmail($bugID, $actionID);
+ foreach($actions as $bugID => $actionID) $this->bug->sendmail($bugID, $actionID);
die(js::locate($this->session->bugList, 'parent'));
}
@@ -502,7 +502,7 @@ class bug extends control
if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
$actionID = $this->action->create('bug', $bugID, $action, $fileAction . $this->post->comment);
$this->action->logHistory($actionID, $changes);
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
}
$bug = $this->bug->getById($bugID);
@@ -597,7 +597,7 @@ class bug extends control
$actionID = $this->action->create('bug', $bugID, 'Edited');
$this->action->logHistory($actionID, $changes);
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
$bug = $this->bug->getById($bugID);
if($bug->toTask != 0)
@@ -701,7 +701,7 @@ class bug extends control
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->action->create('bug', $bugID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->action->logHistory($actionID, $changes);
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
if(isonlybody()) die(js::closeModal('parent.parent'));
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
@@ -737,7 +737,7 @@ class bug extends control
$this->loadModel('action');
$actionID = $this->action->create('bug', $bugID, 'Edited');
$this->action->logHistory($actionID, $changes);
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
}
}
die(js::locate($this->session->bugList, 'parent'));
@@ -763,7 +763,7 @@ class bug extends control
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->action->create('bug', $bugID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->action->logHistory($actionID, $changes);
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
}
}
if($type == 'product') die(js::locate($this->createLink('bug', 'browse', "productID=$projectID")));
@@ -785,7 +785,7 @@ class bug extends control
$this->bug->confirm($bugID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->action->create('bug', $bugID, 'bugConfirmed', $this->post->comment);
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
if(isonlybody()) die(js::closeModal('parent.parent'));
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
@@ -818,7 +818,7 @@ class bug extends control
foreach($bugIDList as $bugID)
{
$actionID = $this->action->create('bug', $bugID, 'bugConfirmed');
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
}
die(js::locate($this->session->bugList, 'parent'));
}
@@ -840,7 +840,7 @@ class bug extends control
$fileAction = !empty($files) ? $this->lang->addFiles . join(',', $files) . "\n" : '';
$actionID = $this->action->create('bug', $bugID, 'Resolved', $fileAction . $this->post->comment, $this->post->resolution . ($this->post->duplicateBug ? ':' . (int)$this->post->duplicateBug : ''));
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
$bug = $this->bug->getById($bugID);
if($bug->toTask != 0)
@@ -896,7 +896,7 @@ class bug extends control
foreach($bugIDList as $bugID)
{
$actionID = $this->action->create('bug', $bugID, 'Resolved', '', $resolution);
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
}
die(js::locate($this->session->bugList, 'parent'));
}
@@ -916,7 +916,7 @@ class bug extends control
if(dao::isError()) die(js::error(dao::getError()));
$files = $this->loadModel('file')->saveUpload('bug', $bugID);
$actionID = $this->action->create('bug', $bugID, 'Activated', $this->post->comment);
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
if(isonlybody()) die(js::closeModal('parent.parent'));
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
@@ -951,7 +951,7 @@ class bug extends control
$this->bug->close($bugID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->action->create('bug', $bugID, 'Closed', $this->post->comment);
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
if(isonlybody()) die(js::closeModal('parent.parent'));
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
@@ -1083,7 +1083,7 @@ class bug extends control
$this->bug->close($bugID);
$actionID = $this->action->create('bug', $bugID, 'Closed');
- $this->sendmail($bugID, $actionID);
+ $this->bug->sendmail($bugID, $actionID);
}
if(isset($skipBugs)) echo js::alert(sprintf($this->lang->bug->skipClose, join(',', $skipBugs)));
@@ -1263,64 +1263,6 @@ class bug extends control
$this->display();
}
- /**
- * Send email.
- *
- * @param int $bugID
- * @param int $actionID
- * @access public
- * @return void
- */
- public function sendmail($bugID, $actionID)
- {
- /* Reset $this->output. */
- $this->clear();
-
- /* Set toList and ccList. */
- $bug = $this->bug->getByID($bugID);
- $productName = $this->products[$bug->product];
- $toList = $bug->assignedTo;
- $ccList = trim($bug->mailto, ',');
- if($toList == '')
- {
- if($ccList == '') return;
- if(strpos($ccList, ',') === false)
- {
- $toList = $ccList;
- $ccList = '';
- }
- else
- {
- $commaPos = strpos($ccList, ',');
- $toList = substr($ccList, 0, $commaPos);
- $ccList = substr($ccList, $commaPos + 1);
- }
- }
- elseif(strtolower($toList) == 'closed')
- {
- $toList = $bug->resolvedBy;
- }
-
- /* Get action info. */
- $actions = $this->action->getList('bug', $bugID);
- $action = zget($actions, $actionID, null);
- $history = $this->action->getHistory($actionID);
- $action->history = isset($history[$actionID]) ? $history[$actionID] : array();
- if(strtolower($action->action) == 'opened') $action->comment = $bug->steps;
-
- /* Create the mail content. */
- if($action->action == 'opened') $action->comment = '';
- $this->view->bug = $bug;
- $this->view->action = $action;
- $this->view->users = $this->user->getPairs('noletter');
-
- $mailContent = $this->parse($this->moduleName, 'sendmail');
-
- /* Send it. */
- $this->loadModel('mail')->send($toList, 'BUG #'. $bug->id . ' ' . $bug->title . ' - ' . $productName, $mailContent, $ccList);
- if($this->mail->isError()) trigger_error(join("\n", $this->mail->getError()));
- }
-
/**
* Get data to export
*
@@ -1333,6 +1275,7 @@ class bug extends control
{
if($_POST)
{
+ $this->loadModel('file');
$bugLang = $this->lang->bug;
$bugConfig = $this->config->bug;
@@ -1469,7 +1412,7 @@ class bug extends control
{
foreach($relatedFiles[$bug->id] as $file)
{
- $fileURL = 'http://' . $this->server->http_host . $this->config->webRoot . "data/upload/{$this->app->company->id}/" . $file->pathname;
+ $fileURL = common::getSysURL() . $this->file->webPath . $file->pathname;
$bug->files .= html::a($fileURL, $file->title, '_blank') . '
';
}
}
diff --git a/module/bug/css/browse.css b/module/bug/css/browse.css
index f0bd370a0f..ad9760e3e5 100644
--- a/module/bug/css/browse.css
+++ b/module/bug/css/browse.css
@@ -13,3 +13,6 @@
.dropdown-list > li > a {display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.53846154; color: #141414; white-space: nowrap;}
.dropdown-list > li > a:hover,
.dropdown-list > li > a:focus {color: #1a4f85;text-decoration: none;background-color: #ddd;}
+
+#treebox{position:fixed;margin-left:20px;}
+.outer.hide-side #treebox{margin-left:0px;}
diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js
index b939022371..73f248ac03 100644
--- a/module/bug/js/browse.js
+++ b/module/bug/js/browse.js
@@ -19,4 +19,10 @@ $(document).ready(function()
});
setTimeout(function(){fixedTfootAction('#bugForm')}, 100);
setTimeout(function(){fixedTheadOfList('#bugList')}, 100);
+
+ var treeMaxHeight = document.documentElement.clientHeight - $('#header').height() - $('#featurebar').height() - $('#footer').height() - $('#treebox .side-body .panel-heading').height() - 120;
+ if($('#treebox').height() > $('#bugList').height()) treeMaxHeight -= 20;
+ $('#treebox .side-body .panel-body').children().each(function(){if(!$(this).hasClass('tree')) treeMaxHeight -= $(this).height()});
+ $('#treebox .tree').css({'max-height':treeMaxHeight, 'overflow-y': 'auto', 'overflow-x':'hidden'})
+ if(moduleID > 0)$('#treebox .tree').scrollTop($('#treebox .tree #module' + moduleID).offset().top - $('#treebox .tree li[data-id="1"]').offset().top);
});
diff --git a/module/bug/model.php b/module/bug/model.php
index f36e3d8ec3..80e39b2e9a 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -2163,4 +2163,69 @@ class bugModel extends model
echo '';
}
}
+
+ /**
+ * Send mail
+ *
+ * @param int $bugID
+ * @param int $actionID
+ * @access public
+ * @return void
+ */
+ public function sendmail($bugID, $actionID)
+ {
+ $this->loadModel('mail');
+ $bug = $this->getByID($bugID);
+ $productName = $this->loadModel('product')->getById($bug->product)->name;
+ $users = $this->loadModel('user')->getPairs('noletter');
+
+ /* Get action info. */
+ $action = $this->loadModel('action')->getById($actionID);
+ $history = $this->action->getHistory($actionID);
+ $action->history = isset($history[$actionID]) ? $history[$actionID] : array();
+
+ /* Get mail content. */
+ $modulePath = $this->app->getModulePath();
+ $oldcwd = getcwd();
+ $viewFile = $modulePath . 'view/sendmail.html.php';
+ chdir($modulePath . 'view');
+ if(file_exists($modulePath . 'ext/view/sendmail.html.php'))
+ {
+ $viewFile = $modulePath . 'ext/view/sendmail.html.php';
+ chdir($modulePath . 'ext/view');
+ }
+ ob_start();
+ include $viewFile;
+ foreach(glob($modulePath . 'ext/view/sendmail.*.html.hook.php') as $hookFile) include $hookFile;
+ $mailContent = ob_get_contents();
+ ob_end_clean();
+ chdir($oldcwd);
+
+ /* Set toList and ccList. */
+ $toList = $bug->assignedTo;
+ $ccList = trim($bug->mailto, ',');
+ if(empty($toList))
+ {
+ if(empty($ccList)) return;
+ if(strpos($ccList, ',') === false)
+ {
+ $toList = $ccList;
+ $ccList = '';
+ }
+ else
+ {
+ $commaPos = strpos($ccList, ',');
+ $toList = substr($ccList, 0, $commaPos);
+ $ccList = substr($ccList, $commaPos + 1);
+ }
+ }
+ elseif(strtolower($toList) == 'closed')
+ {
+ $toList = $bug->resolvedBy;
+ }
+
+ /* Send it. */
+ $this->mail->send($toList, 'BUG #'. $bug->id . ' ' . $bug->title . ' - ' . $productName, $mailContent, $ccList);
+ if($this->mail->isError()) trigger_error(join("\n", $this->mail->getError()));
+ }
}
diff --git a/module/bug/view/sendmail.html.php b/module/bug/view/sendmail.html.php
index 2d79351921..bd70d8ee20 100644
--- a/module/bug/view/sendmail.html.php
+++ b/module/bug/view/sendmail.html.php
@@ -11,12 +11,12 @@
*/
?>
id . ' ' . $bug->title;?>
-
+app->getModuleRoot() . 'common/view/mail.header.html.php';?>
- | createLink('bug', 'view', "bugID=$bug->id"), $mailTitle, '', "style='color: #333'");?> |
+ config->mail, 'domain', common::getSysURL()) . helper::createLink('bug', 'view', "bugID=$bug->id"), $mailTitle, '', "style='color: #333; text-decoration: underline;'");?> |
|
@@ -24,9 +24,9 @@
|
|
-
+app->getModuleRoot() . 'common/view/mail.footer.html.php';?>
diff --git a/module/common/model.php b/module/common/model.php
index e39f783485..daf473c4cb 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -870,6 +870,7 @@ class commonModel extends model
if(strtolower($key) == 'assigneddate') continue;
if(strtolower($key) == 'editedby') continue;
if(strtolower($key) == 'editeddate') continue;
+ if(strtolower($key) == 'uid') continue;
if($magicQuote) $value = stripslashes($value);
if($value != stripslashes($old->$key))
diff --git a/module/common/view/mail.footer.html.php b/module/common/view/mail.footer.html.php
index f4db14c5b2..0ba89cb8d1 100644
--- a/module/common/view/mail.footer.html.php
+++ b/module/common/view/mail.footer.html.php
@@ -1,20 +1,33 @@
+app->getModuleRoot() . 'ext/view/' . basename(__FILE__);
+if(file_exists($extViewFile))
+{
+ include $extViewFile;
+ return;
+}
+?>
+ comment)):?>
+
+ |
+
+ |
+
+
|
- getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
actor])) $action->actor = $users[$action->actor];?>
extra])) $action->extra = $users[$action->extra];?>
● action->printAction($action);?>
|
- comment) or !empty($action->history)):?>
+ history)):?>
|
action->printChanges($action->objectType, $action->history);?>
- comment)): ?>
- comment;?>
-
-
|
diff --git a/module/common/view/mail.header.html.php b/module/common/view/mail.header.html.php
index a9375b5b32..98a77851b6 100644
--- a/module/common/view/mail.header.html.php
+++ b/module/common/view/mail.header.html.php
@@ -16,7 +16,7 @@ if($onlybody) $_GET['onlybody'] = 'no';
- | company->name ?> |
+ app->company->name ?> |
diff --git a/module/mail/control.php b/module/mail/control.php
index 7d8a5b82d2..2df6cb4464 100755
--- a/module/mail/control.php
+++ b/module/mail/control.php
@@ -68,6 +68,7 @@ class mail extends control
echo "";
$mailConfig = $this->mail->autoDetect($this->post->fromAddress);
$mailConfig->fromAddress = $this->post->fromAddress;
+ $mailConfig->domain = common::getSysURL();
$this->session->set('mailConfig', $mailConfig);
die(js::locate(inlink('edit'), 'parent'));
@@ -106,12 +107,15 @@ class mail extends control
$this->locate(inlink('detect'));
}
+ $mailConfig->domain = isset($this->config->mail->domain) ? $this->config->mail->domain : common::getSysURL();
+
$this->view->title = $this->lang->mail->common . $this->lang->colon . $this->lang->mail->edit;
$this->view->position[] = html::a(inlink('index'), $this->lang->mail->common);
$this->view->position[] = $this->lang->mail->edit;
$this->view->mailExist = $this->mail->mailExist();
$this->view->mailConfig = $mailConfig;
+ $this->view->openssl = extension_loaded('openssl');
$this->display();
}
@@ -133,6 +137,7 @@ class mail extends control
$mailConfig->async = $this->post->async;
$mailConfig->fromAddress = trim($this->post->fromAddress);
$mailConfig->fromName = trim($this->post->fromName);
+ $mailConfig->domain = trim($this->post->domain);
$mailConfig->smtp->host = trim($this->post->host);
$mailConfig->smtp->port = trim($this->post->port);
$mailConfig->smtp->auth = $this->post->auth;
@@ -195,6 +200,7 @@ class mail extends control
$mailConfig->async = $this->post->async;
$mailConfig->fromAddress = '';
$mailConfig->fromName = '';
+ $mailConfig->domain = trim($this->post->domain);
$mailConfig->sendcloud->accessKey = trim($this->post->accessKey);
$mailConfig->sendcloud->secretKey = trim($this->post->secretKey);
@@ -207,13 +213,14 @@ class mail extends control
die(js::reload('parent'));
}
- $mailConfig = '';
+ $mailConfig = new stdclass();
if($this->config->mail->turnon)
{
$mailConfig = $this->config->mail->sendcloud;
$mailConfig->fromAddress = $this->config->mail->fromAddress;
$mailConfig->fromName = $this->config->mail->fromName;
$mailConfig->turnon = $this->config->mail->turnon;
+ $mailConfig->domain = isset($this->config->mail->domain) ? $this->config->mail->domain : common::getSysURL();
$mailConfig->async = isset($this->config->mail->async) ? $this->config->mail->async : 0;
}
diff --git a/module/mail/lang/en.php b/module/mail/lang/en.php
index 3ca09b5210..40665b2d60 100755
--- a/module/mail/lang/en.php
+++ b/module/mail/lang/en.php
@@ -16,6 +16,7 @@ $lang->mail->turnon = 'Turn On';
$lang->mail->async = 'Asynchronous';
$lang->mail->fromAddress = 'Email Address';
$lang->mail->fromName = 'Sender';
+$lang->mail->domain = 'Domain';
$lang->mail->host = 'SMTP Server';
$lang->mail->port = 'SMTP Port';
$lang->mail->auth = 'Verification Required';
@@ -74,6 +75,7 @@ $lang->mail->sendmailTips = 'Note: Email author will not receive this email.';
$lang->mail->needConfigure = 'Email configuration is not found. Please cinfigure the Email first.';
$lang->mail->nofsocket = 'fsocket related function has been deactivated. Mails cannot send out. Please modify allow_url_fopen in php.ini to turn on Onopenssl, and restart Apache.';
$lang->mail->noOpenssl = 'Please turn on Onopenssl, and restart Apache.';
+$lang->mail->disableSecure = 'No openssl, disable ssl and tls.';
$lang->mail->sendCloudFail = 'Failed. Reason:';
$lang->mail->sendCloudHelp = <<1、Notice SendCloud是SendCloud的Team通知服务。具体可以到notice.sendcloud.net查看
diff --git a/module/mail/lang/zh-cn.php b/module/mail/lang/zh-cn.php
index 00b08f6769..ea81b4c20d 100755
--- a/module/mail/lang/zh-cn.php
+++ b/module/mail/lang/zh-cn.php
@@ -16,6 +16,7 @@ $lang->mail->turnon = '是否打开';
$lang->mail->async = '异步发送';
$lang->mail->fromAddress = '发信邮箱';
$lang->mail->fromName = '发信人';
+$lang->mail->domain = '发信域名';
$lang->mail->host = 'smtp服务器';
$lang->mail->port = 'smtp端口号';
$lang->mail->auth = '是否需要验证';
@@ -74,6 +75,7 @@ $lang->mail->sendmailTips = '提示:系统不会为当前操作者发信。'
$lang->mail->needConfigure = '无法找到邮件配置信息,请先配置邮件发送参数。';
$lang->mail->nofsocket = 'fsocket相关函数被禁用,不能发信!请在php.ini中修改allow_url_fopen为On,打开openssl扩展。 保存并重新启动apache。';
$lang->mail->noOpenssl = 'ssl和tls加密,请打开openssl扩展。 保存并重新启动apache。';
+$lang->mail->disableSecure = '没有openssl扩展,禁用ssl和tls加密';
$lang->mail->sendCloudFail = '操作失败,原因:';
$lang->mail->sendCloudHelp = <<1、Notice SendCloud是SendCloud的团队通知服务。具体可以到notice.sendcloud.net查看
diff --git a/module/mail/model.php b/module/mail/model.php
index 4220bad0e3..be6f0292b0 100644
--- a/module/mail/model.php
+++ b/module/mail/model.php
@@ -290,7 +290,7 @@ class mailModel extends model
$this->clear();
/* Replace full webPath image for mail. */
- if(strpos($body, 'src="data/upload')) $body = preg_replace('/
- mail->addressWhiteList?> |
+ mail->addressWhiteList?> |
| mail->fromName; ?> |
-
+ |
fromName, "class='form-control'");?>
|
+
+ | mail->domain; ?> |
+ domain, "class='form-control'");?> |
+
| mail->host; ?> |
- host, "class='form-control'");?> |
+ host, "class='form-control'");?> |
| mail->port; ?> |
- port, "class='form-control'");?> |
+ port, "class='form-control'");?> |
+ mail->secure; ?> |
+
+ mail->secureList['ssl']);
+ unset($lang->mail->secureList['tls']);
+ $mailConfig->secure = '';
+ }
+ echo html::radio('secure', $lang->mail->secureList, $mailConfig->secure);
+ if(!$openssl) echo " " . $lang->mail->disableSecure . '';
+ ?>
+ |
| mail->auth; ?> |
- mail->authList, $mailConfig->auth, 'onchange=setAuth(this.value)'); ?> |
+ mail->authList, $mailConfig->auth, 'onchange=setAuth(this.value)'); ?> |
| mail->username; ?> |
- username, "class='form-control' autocomplete='off'") ?> |
+ username, "class='form-control' autocomplete='off'") ?> |
| mail->password; ?> |
- password, "class='form-control' autocomplete='off' placeholder='{$lang->mail->placeholder->password}'") ?> |
-
-
- | mail->secure; ?> |
- mail->secureList, $mailConfig->secure); ?> |
+ password, "class='form-control' autocomplete='off' placeholder='{$lang->mail->placeholder->password}'") ?> |
| mail->debug; ?> |
diff --git a/module/mail/view/sendcloud.html.php b/module/mail/view/sendcloud.html.php
index 605f94d5cb..0f952a4062 100755
--- a/module/mail/view/sendcloud.html.php
+++ b/module/mail/view/sendcloud.html.php
@@ -32,6 +32,10 @@ include '../../common/view/header.html.php';
+
+ | mail->domain?> |
+ mail, 'domain', common::getSysURL()), "class='form-control'")?> |
+
mail->accessKey; ?> |
diff --git a/module/product/css/browse.css b/module/product/css/browse.css
index 7e6f398628..24cf2f530a 100644
--- a/module/product/css/browse.css
+++ b/module/product/css/browse.css
@@ -6,6 +6,8 @@
.dropdown-list > li > a {display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.53846154; color: #141414; white-space: nowrap;}
.dropdown-list > li > a:hover,
.dropdown-list > li > a:focus {color: #1a4f85;text-decoration: none;background-color: #ddd;}
+#treebox{position:fixed;margin-left:20px;}
+.outer.hide-side #treebox{margin-left:0px;}
.pl-5px{padding-left:5px;}
a.removeModule{color:#ddd}
diff --git a/module/product/js/browse.js b/module/product/js/browse.js
index aed4662921..5aadb90943 100644
--- a/module/product/js/browse.js
+++ b/module/product/js/browse.js
@@ -23,4 +23,10 @@ $(function()
$('.popoverStage').mouseout(function(){$(this).popover('hide')});
setTimeout(function(){fixedTfootAction('#productStoryForm')}, 100);
setTimeout(function(){fixedTheadOfList('#storyList')}, 100);
+
+ var treeMaxHeight = document.documentElement.clientHeight - $('#header').height() - $('#featurebar').height() - $('#footer').height() - $('#treebox .side-body .panel-heading').height() - 120;
+ if($('#treebox').height() > $('#storyList').height()) treeMaxHeight -= 20;
+ $('#treebox .side-body .panel-body').children().each(function(){if(!$(this).hasClass('tree')) treeMaxHeight -= $(this).height()});
+ $('#treebox .tree').css({'max-height':treeMaxHeight, 'overflow-y': 'auto', 'overflow-x':'hidden'})
+ if(moduleID > 0)$('#treebox .tree').scrollTop($('#treebox .tree #module' + moduleID).offset().top - $('#treebox .tree li[data-id="1"]').offset().top);
})
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index 7178591b19..4870a8f197 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -286,6 +286,7 @@
| |