* Fix bug #29177,29172.
This commit is contained in:
@@ -2758,9 +2758,6 @@ class story extends control
|
||||
|
||||
$siblings = str_replace(",$siblingID", '', $story->siblings);
|
||||
|
||||
/* If siblings == ,$siblingID, update siblings empty.*/
|
||||
if(count(explode(',', $siblings)) == 3) $siblings = '';
|
||||
|
||||
/* batchUnset siblingID from siblings.*/
|
||||
$replaceSql = "UPDATE " . TABLE_STORY . " SET siblings = REPLACE(siblings,',$siblingID,', ',') WHERE `product` = $story->product";
|
||||
$this->dbh->exec($replaceSql);
|
||||
|
||||
@@ -27,5 +27,6 @@
|
||||
.popover-icon {float:left;}
|
||||
.popover .content {margin-left:25px;overflow: overlay;}
|
||||
.hide {display:none !important;}
|
||||
.sibling > a.iframe{padding:6px;white-space: nowrap;overflow: hidden;display: inline-flex;max-width: 80%;}
|
||||
.sibling > a.viewlink {padding:6px;white-space: nowrap;overflow: hidden;display: inline-flex;max-width: 70%;}
|
||||
.sibling > span {max-width: 60px;white-space: nowrap;overflow: hidden;}
|
||||
.tooltip-inner {max-width: 500px;}
|
||||
|
||||
@@ -8,6 +8,7 @@ js::set('cancel', $lang->cancel);
|
||||
$canViewLinkStory = common::hasPriv('story', 'view');
|
||||
$canRelieved = common::hasPriv('story', 'relieved');
|
||||
array_unshift($siblings, $story);
|
||||
$class = isonlybody() ? 'showinonlybody' : 'iframe';
|
||||
|
||||
foreach($siblings as $sibling)
|
||||
{
|
||||
@@ -15,8 +16,8 @@ foreach($siblings as $sibling)
|
||||
$title = $id . ' '. $sibling->title;
|
||||
$branch = $story->branch == $sibling->branch ? $lang->story->currentBranch : $branches[$sibling->branch];
|
||||
echo "<li title='$title' class='sibling'>";
|
||||
echo "<span class='label label-outline label-badge'>{$branch}</span> ";
|
||||
echo ($canViewLinkStory ? html::a($this->createLink('story', 'view', "id=$id", '', true), "$title", '', "class='iframe' data-width='80%'") : "$id $title");
|
||||
echo "<span class='label label-outline label-badge' title='$branch'>{$branch}</span> ";
|
||||
echo ($canViewLinkStory ? html::a($this->createLink('story', 'view', "id=$id", '', true), "$title", '', "class='$class viewlink' data-width='80%'") : "$id $title");
|
||||
if($canRelieved) echo "<a class='unlink hide' data-id='$id' data-toggle='popover'><i class='icon icon-unlink btn-info'></i></a>";
|
||||
echo "</li>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user