|
@@ -873,7 +873,12 @@ class Database
|
|
|
$result = '';
|
|
|
foreach ($button as $k => $v) {
|
|
|
if (is_array($v)) {
|
|
|
- $result .= ' <a class="btn btn-default" href="' . $this->url($v[0], false, $v[1]) . '">' . $k . '</a>';
|
|
|
+ if ($v[0] == 'location') {
|
|
|
+ $result .= ' <a class="btn btn-default" onclick="location.href=\''.Dever::url($v[1]).'\'">' . $k . '</a>';
|
|
|
+ } else {
|
|
|
+ $result .= ' <a class="btn btn-default" href="' . $this->url($v[0], false, $v[1]) . '">' . $k . '</a>';
|
|
|
+ }
|
|
|
+
|
|
|
} elseif (strpos($v, 'modal|') !== false) {
|
|
|
$t = explode('modal|', $v);
|
|
|
$result .= ' <a href="#dever_modal" data-toggle="modal" class="btn btn-default" onclick="$(\'#dever_modal_body\').html(\'' . $t[1] . '\')">' . $k . '</a>';
|
|
@@ -1228,7 +1233,18 @@ class Database
|
|
|
if (isset($v['option'])) {
|
|
|
$v['option'] = $this->option($v['option']);
|
|
|
|
|
|
- if (isset($v['option'][$value])) {
|
|
|
+ if (strstr($value, ',')) {
|
|
|
+ $temp = explode(',', $value);
|
|
|
+ $t = array();
|
|
|
+ foreach ($temp as $vv) {
|
|
|
+ if (isset($v['option'][$vv]) && is_array($v['option'][$vv])) {
|
|
|
+ $t[] = $v['option'][$vv]['name'];
|
|
|
+ } else {
|
|
|
+ $t[] = $vv;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $value = implode("\r\n", $t);
|
|
|
+ } elseif (isset($v['option'][$value])) {
|
|
|
if (is_array($v['option'][$value])) {
|
|
|
$value = $v['option'][$value]['name'];
|
|
|
} else {
|
|
@@ -1298,7 +1314,18 @@ class Database
|
|
|
}
|
|
|
if (isset($v['option'])) {
|
|
|
$v['option'] = $this->option($v['option']);
|
|
|
- if (isset($v['option'][$value])) {
|
|
|
+ if (strstr($value, ',')) {
|
|
|
+ $temp = explode(',', $value);
|
|
|
+ $t = array();
|
|
|
+ foreach ($temp as $vv) {
|
|
|
+ if (isset($v['option'][$vv]) && is_array($v['option'][$vv])) {
|
|
|
+ $t[] = $v['option'][$vv]['name'];
|
|
|
+ } else {
|
|
|
+ $t[] = $vv;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $value = implode("\r\n", $t);
|
|
|
+ } elseif (isset($v['option'][$value])) {
|
|
|
if (is_array($v['option'][$value])) {
|
|
|
$value = $v['option'][$value]['name'];
|
|
|
} else {
|