|
|
@@ -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">
|
|
|
@@ -1908,6 +1910,7 @@ class TableAjax extends ViewAjax {
|
|
|
priv.mapEditorHide();
|
|
|
priv.options.mapEditorContainer = 'window';
|
|
|
priv.mapEditorShow();
|
|
|
+ priv.resizableMapDockNode('destroy');
|
|
|
}
|
|
|
},
|
|
|
onSaveFeature: function(selectedRecordId, selectedFeatureExtent) {
|
|
|
@@ -2000,15 +2003,30 @@ class TableAjax extends ViewAjax {
|
|
|
_mapEditorWrap.append(mapEditor);
|
|
|
}
|
|
|
|
|
|
+ _mapEditorWrap.css({padding:'5px'});
|
|
|
_mapEditorDialog = _mapEditorWrap.dialog({
|
|
|
width: 540,
|
|
|
minWidth: 400,
|
|
|
minHeight: 400,
|
|
|
- resizeStop: function(){
|
|
|
- _mapEditor.TableAjaxMapUpdateSize(); //to prevent drag-zoom error
|
|
|
+ open: function(e, ui) {
|
|
|
+ var n = jQuery(this),
|
|
|
+ mapWrap = n.children(":first"),
|
|
|
+ map = mapWrap.children(":first");
|
|
|
+ map.css({width: n.width() - 5, height: n.height() - 5});
|
|
|
+ _mapEditor.TableAjaxMapUpdateSize();
|
|
|
},
|
|
|
- dragStop: function(){
|
|
|
- _mapEditor.TableAjaxMapUpdateSize(); //to prevent drag-zoom error
|
|
|
+ resizeStart: function(e, ui) {
|
|
|
+ jQuery(this).children(":first").children(":first").css({display:'none'});
|
|
|
+ },
|
|
|
+ resizeStop: function(e, ui){
|
|
|
+ var n = jQuery(this),
|
|
|
+ map = n.children(":first").children(":first");
|
|
|
+ n.css({width: n.parent().width()});
|
|
|
+ map.css({display: 'block', height: n.height(), width: n.width()});
|
|
|
+ _mapEditor.TableAjaxMapUpdateSize();
|
|
|
+ },
|
|
|
+ dragStop: function(e, ui){
|
|
|
+ _mapEditor.TableAjaxMapUpdateSize();// to prevent drag-zoom error
|
|
|
}
|
|
|
});
|
|
|
_mapEditorWrap.bind('dialogclose', function(e) {
|
|
|
@@ -2027,22 +2045,45 @@ class TableAjax extends ViewAjax {
|
|
|
}
|
|
|
}
|
|
|
else if ('dock' == priv.options.mapEditorContainer) {
|
|
|
+ priv.resizableMapDockNode('prepare');
|
|
|
+ _mapEditor.TableAjaxMapUpdateSize();
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ priv.resizableMapDockNode = function(task) {
|
|
|
+ if ('prepare' == task) {
|
|
|
var mapEditor = _mapEditorWrap.children('.mapEditor-map');
|
|
|
if (mapEditor && mapEditor.length) {// map is inside _mapEditorWrap (window)
|
|
|
- _mapDockNode = jQuery('<div class="AjaxTableCont-mapEditorContainer"></div>');
|
|
|
+ var mapDockNode = jQuery('<div class="AjaxTableCont-mapEditorContainer"></div>');
|
|
|
var tblCont = jQuery(_cont).parent('.AjaxTableCont');
|
|
|
tblCont.children('.AjaxTableCont-mapEditorContainer').remove();
|
|
|
var breadcrumb = tblCont.children('.breadcrumb');
|
|
|
if (!breadcrumb || !breadcrumb.length) {
|
|
|
- tblCont.prepend(_mapDockNode);
|
|
|
+ tblCont.prepend(mapDockNode);
|
|
|
} else {
|
|
|
- _mapDockNode.insertAfter(breadcrumb);
|
|
|
+ mapDockNode.insertAfter(breadcrumb);
|
|
|
}
|
|
|
- _mapDockNode.append(mapEditor);
|
|
|
+ mapDockNode.append(mapEditor);
|
|
|
}
|
|
|
- _mapEditor.TableAjaxMapUpdateSize();
|
|
|
+ var mapDockResizable = mapEditor.parent();
|
|
|
+ mapDockResizable.resizable({handles: 's', minHeight: 300, minWidth: 300});
|
|
|
+ var resizeLineHeigth = 6;
|
|
|
+ mapDockResizable.children(":first").css({height: 'auto'});
|
|
|
+ mapDockResizable.css({marginBottom: resizeLineHeigth+'px'});
|
|
|
+ mapEditor.css({marginBottom: resizeLineHeigth+'px'});
|
|
|
+ mapEditor.children(":first").css({width: mapEditor.width()});
|
|
|
+ mapDockResizable.find('.ui-resizable-s').css({height:resizeLineHeigth+'px', bottom: '-'+resizeLineHeigth+'px'});
|
|
|
+ mapDockResizable.on('resizestart', function(event, ui) {
|
|
|
+ ui.element.children(":first").children(":first").css({display:'none'})
|
|
|
+ });
|
|
|
+ mapDockResizable.on('resizestop', function(event, ui) {
|
|
|
+ ui.element.children(":first").children(":first").css({display:'block', height: ui.element.height()});
|
|
|
+ });
|
|
|
+ } else if ('destroy' == task) {
|
|
|
+ var mapDockResizable = jQuery(_cont).parent('.AjaxTableCont').children('.AjaxTableCont-mapEditorContainer');
|
|
|
+ mapDockResizable.resizable('destroy');
|
|
|
+ mapDockResizable.remove();
|
|
|
}
|
|
|
-
|
|
|
};
|
|
|
|
|
|
priv.mapEditorChanged = function(e) {
|
|
|
@@ -2275,9 +2316,12 @@ class TableAjax extends ViewAjax {
|
|
|
_inlineEditBox.show();
|
|
|
_inlineEditBox.on('shown.bs.modal', function(e) {
|
|
|
var dialogBox = jQuery(this).find('.modal-dialog'),
|
|
|
- modalBody = dialogBox.find('.modal-body');
|
|
|
+ modalBody = dialogBox.find('.modal-body'),
|
|
|
+ offset = dialogBox.offset();
|
|
|
+ dialogBox.css({position: 'absolute', margin:0, top: offset.top, left: offset.left});
|
|
|
modalBody.css({overflow: 'scroll'});
|
|
|
dialogBox.resizable({minHeight: 300, minWidth: 300, alsoResize: modalBody});
|
|
|
+ dialogBox.draggable();
|
|
|
});
|
|
|
_inlineEditBox.find('input[name=ID]').val(e.data.id);
|
|
|
_inlineEditBox.find('input[name=col]').val(e.data.col);
|