diff --git a/lib/dao/dao.class.php b/lib/dao/dao.class.php index 6cff3c9b85..a8a69b94bb 100644 --- a/lib/dao/dao.class.php +++ b/lib/dao/dao.class.php @@ -52,7 +52,7 @@ class sql extends baseSQL public function groupBy($groupBy) { if($this->inCondition and !$this->conditionIsTrue) return $this; - if(!preg_match('/^\w+[a-zA-Z0-9_`.,\s]+$/', $groupBy)) + if(!preg_match('/^[a-zA-Z0-9_`\.,\s]+$/', $groupBy)) { $groupBy = htmlspecialchars($groupBy); die("Group is bad query, The group is $groupBy"); diff --git a/module/common/model.php b/module/common/model.php index 8f8ea981c0..1c02032543 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -776,11 +776,11 @@ EOD; { if($method != 'edit' and $method != 'copy' and $method != 'delete') { - return html::a($link, " " . "{$title}", $target, "class='btn btn-link $extraClass' $misc", true); + return html::a($link, " " . "{$title}", $target, "class='btn btn-link $extraClass' $misc", true); } else { - return html::a($link, "", $target, "class='btn btn-link $extraClass' title='$title' $misc", false); + return html::a($link, "", $target, "class='btn btn-link $extraClass' title='$title' $misc", false); } } else @@ -836,7 +836,7 @@ EOD; if(isonlybody()) return false; $title = $lang->goback . $lang->backShortcutKey; - echo html::a($backLink, '', '', "id='back' class='btn' title={$title}"); + echo html::a($backLink, '', '', "id='back' class='btn' title={$title}"); if(isset($preAndNext->pre) and $preAndNext->pre) { @@ -856,15 +856,33 @@ EOD; } } - static public function printBack($backLink) + /** + * Print back link + * + * @param string $backLink + * @static + * @access public + * @return void + */ + static public function printBack($backLink, $class = '') { global $lang, $app; if(isonlybody()) return false; + if(empty($class)) $class = 'btn'; $title = $lang->goback . $lang->backShortcutKey; - echo html::a($backLink, '', '', "id='back' class='btn' title={$title}"); + echo html::a($backLink, '', '', "id='back' class='{$class}' title={$title}"); } + /** + * Print pre and next link + * + * @param string $preAndNext + * @param string $linkTemplate + * @static + * @access public + * @return void + */ public static function printPreAndNext($preAndNext = '', $linkTemplate = '') { global $lang, $app; diff --git a/module/release/css/view.css b/module/release/css/view.css index cb46e0d642..3e9f7ed286 100644 --- a/module/release/css/view.css +++ b/module/release/css/view.css @@ -1,14 +1,14 @@ .tabs{position:relative;} -.tabs .nav-tabs{border-bottom:none;} .tabs .nav-tabs>li{margin-bottom:0px;} -.tabs .tab-content{padding:0px; border:0px;} -.tabs .tab-content .tab-pane #querybox{margin:0px; border-left:1px solid #ddd; border-right:1px solid #ddd;} -.tabs .tab-content .tab-pane #querybox form{padding-left:0px;} +.tabs .tab-content .tab-pane #queryBox{margin:0px; border-left:1px solid #ddd; border-right:1px solid #ddd;} +.tabs .tab-content .tab-pane #queryBox form{padding-left:0px;} -.table-actions {padding-left: 5px;} +.checkbox.btn{margin-top:0px} +#unlinkStoryList, #unlinkBugList, #unlinkLeftBugList{border:1px solid #ddd;} + +.table-footer .text{line-height:30px;} -#releaseInfo {border-top: 1px solid #ddd;} #releaseInfo > div {padding-top: 15px;} -#querybox form {margin: 0px !important;} +#queryBox form {margin: 0px !important;} #moreOrLite {right: 0px !important;} diff --git a/module/release/js/view.js b/module/release/js/view.js index 0aba453fe1..bc98ca25c3 100644 --- a/module/release/js/view.js +++ b/module/release/js/view.js @@ -7,7 +7,7 @@ function showLink(releaseID, type, param) { var obj = type == 'story' ? '.tab-pane#stories .linkBox' : (type == 'leftBug' ? '.tab-pane#leftBugs .linkBox' : '.tab-pane#bugs .linkBox'); $(obj).html(data); - $('#' + type + 'List').hide(); + $('#' + type + 'List').closest('form').hide(); var formID = type == 'story' ? '#unlinkedStoriesForm' : (type == 'leftBug' ? '#unlinkedLeftBugsForm' : '#unlinkedBugsForm'); setTimeout(function(){fixedTfootAction(formID)}, 100); diff --git a/module/release/view/linkbug.html.php b/module/release/view/linkbug.html.php index 908e02aeb4..5aec203c78 100644 --- a/module/release/view/linkbug.html.php +++ b/module/release/view/linkbug.html.php @@ -10,66 +10,66 @@ * @link http://www.zentao.net */ ?> -app->getWebRoot() . "js/"; -include '../../common/view/tablesorter.html.php'; -?> -
+ bugs : $release->leftBugs; $formID = $type == 'leftBug' ? 'unlinkedLeftBugsForm' : 'unlinkedBugsForm'; ?>