diff --git a/module/story/control.php b/module/story/control.php index 7a08d976e1..eb9b306212 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -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); diff --git a/module/story/css/common.css b/module/story/css/common.css index 03558f31c7..d894447467 100644 --- a/module/story/css/common.css +++ b/module/story/css/common.css @@ -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;} diff --git a/module/story/view/blocksibling.html.php b/module/story/view/blocksibling.html.php index 8a5a452951..000fe2211f 100644 --- a/module/story/view/blocksibling.html.php +++ b/module/story/view/blocksibling.html.php @@ -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 "
  • "; - echo "{$branch} "; - echo ($canViewLinkStory ? html::a($this->createLink('story', 'view', "id=$id", '', true), "$title", '', "class='iframe' data-width='80%'") : "$id $title"); + echo "{$branch} "; + echo ($canViewLinkStory ? html::a($this->createLink('story', 'view', "id=$id", '', true), "$title", '', "class='$class viewlink' data-width='80%'") : "$id $title"); if($canRelieved) echo ""; echo "
  • "; }