Explorar o código

TableAjax add resizable to Map widget at dock position

Piotr Labudda %!s(int64=10) %!d(string=hai) anos
pai
achega
bcd4b5bc5a
Modificáronse 1 ficheiros con 16 adicións e 0 borrados
  1. 16 0
      SE/se-lib/TableAjax.php

+ 16 - 0
SE/se-lib/TableAjax.php

@@ -388,6 +388,8 @@ class TableAjax extends ViewAjax {
 
 .ui-resizable-s { bottom:0; }
 .ui-resizable-e { right:0; }
+.AjaxTableCont-mapEditorContainer .ui-resizable-s { background-color:#ddd; }
+.AjaxTableCont-mapEditorContainer .ui-resizable-s:hover { background-color:#888; }
 	</style>
 
 		<div class="AjaxTableCont">
@@ -2041,6 +2043,20 @@ class TableAjax extends ViewAjax {
 					_mapDockNode.append(mapEditor);					
 				}
 				_mapEditor.TableAjaxMapUpdateSize();
+				mapEditor.parent().resizable({minHeight: 300, minWidth: 300});
+				var resizeLineHeigth = 6;
+				mapEditor.parent().css({marginBottom: resizeLineHeigth+'px'});
+				mapEditor.css({marginBottom: resizeLineHeigth+'px'});
+				mapEditor.parent().find('.ui-resizable-s').css({height:resizeLineHeigth+'px', bottom: '-'+resizeLineHeigth+'px'});
+				mapEditor.parent().on('resizestart', function(event, ui) {
+					ui.element.children(":first").children(":first").css({display:'none'})
+				});
+				mapEditor.parent().on('resizestop', function(event, ui) {
+					var mapWrap = ui.element.children(":first"),
+							map = mapWrap.children(":first");
+					mapWrap.css({height: ui.element.height()});
+					map.css({display:'block', height: ui.element.height()});
+				});
 			}
 
 		};