Parcourir la source

U TableAjax title style

Piotr Labudda il y a 7 ans
Parent
commit
fb42d4dfcf
3 fichiers modifiés avec 17 ajouts et 8 suppressions
  1. 10 6
      SE/se-lib/TableAjax.php
  2. 5 0
      SE/se-lib/TableAjax.php.style.css
  3. 2 2
      SE/se-lib/ViewAjax.php

+ 10 - 6
SE/se-lib/TableAjax.php

@@ -286,14 +286,18 @@ class TableAjax extends ViewAjax {
 			$baseUrl = Router::getRoute('ViewTableAjax')->getLink();
 		}
 		echo UI::h('div', [ 'class' => "AjaxTableCont" ], [
-			UI::h('ul', [ 'class' => "breadcrumb" ], [
-				UI::h('li', [], [
-					UI::h('a', [ 'href' => "#", 'onclick' => "return tableAjaxBackToTable();" ], $this->getLabelHtml() ),
+			UI::h('div', [ 'class' => "AjaxTable--header" ], [ // breadcrumb
+				UI::h('div', [ 'class' => "pull-left", 'style' => "margin-right:12px" ], [
+					UI::h('a', [
+						'href' => "#",
+						'onclick' => "return tableAjaxBackToTable();",
+						'class' => "AjaxTable--title",
+					], $this->getLabelHtml(100) ),
 				]),
 
 				($hasPermCreate)
-				?	UI::h('li', [], [
-						UI::h('a', [ 'title' => "Dodaj nowy rekord", 'class' => "", 'href' => "#CREATE" ], [
+				?	UI::h('div', [ 'class' => "btn-group pull-left" ], [
+						UI::h('a', [ 'title' => "Dodaj nowy rekord", 'class' => "btn btn-xs btn-default", 'href' => "#CREATE" ], [
 							UI::h('span', [ 'class' => "glyphicon glyphicon-plus" ]),
 							" Dodaj nowy rekord",
 						]),
@@ -506,7 +510,7 @@ class TableAjax extends ViewAjax {
 			'HAS_ADDITIONAL_LAYERS' => $this->hasAdditionalLayers() ? 1 : 0,
 			'URL_ADD_USER_TABLE_FILTER_AJAX' => Request::getPathUri() . "index.php?_route=ViewTableAjax&_task=addUserTableFilterAjax",
 			'URL_RM_USER_TABLE_FILTER_AJAX' => Request::getPathUri() . "index.php?_route=ViewTableAjax&_task=rmUserTableFilterAjax",
-			'LABEL_HTML' => $this->getLabelHtml(),
+			'LABEL_HTML' => $this->getLabelHtml(100),
 			'SPECIAL_FILTER_FUNCTIONS' => (!empty($specialFilters)) ? $specialFilters : false,
 			'ROW_FUNCTIONS' => $rowFunctions,
 			'TABLE_FUNCTIONS' => array_merge(

+ 5 - 0
SE/se-lib/TableAjax.php.style.css

@@ -125,3 +125,8 @@
 .ui-resizable-e { right:0; }
 .AjaxTableCont-mapEditorContainer .ui-resizable-s { background-color:#ddd; }
 .AjaxTableCont-mapEditorContainer .ui-resizable-s:hover { background-color:#888; }
+
+.AjaxTableCont .breadcrumb { margin:0; padding:12px; border-top:1px solid #ddd; }
+.AjaxTableCont .AjaxTable--header { margin:0; padding:12px; border-top:1px solid #ddd; background-color:#f5f5f5; overflow:hidden; }
+.AjaxTableCont .AjaxTable--title { font-size:16px; color:#000; font-weight:bold; }
+	.AjaxTableCont .AjaxTable--title em { display:block; font-size:x-small; font-weight:normal; color:#bbb; }

+ 2 - 2
SE/se-lib/ViewAjax.php

@@ -27,9 +27,9 @@ class ViewAjax {
 		return "{$this->_tbl}";
 	}
 
-	public function getLabelHtml() {
+	public function getLabelHtml($maxLength = 20) {
 		if (!empty($this->_label)) {
-			return V::strShortUtf8($this->_label, 20) . " <em>({$this->_tbl})</em>";
+			return V::strShortUtf8($this->_label, $maxLength) . " <em>({$this->_tbl})</em>";
 		}
 		return "{$this->_tbl}";
 	}