IGNITE-8553 Web Console: Fixed column resize on double click.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/556f460a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/556f460a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/556f460a Branch: refs/heads/ignite-5789-1 Commit: 556f460a21442503d66a1275656714a2a49d482c Parents: a44c54c Author: Dmitriy Shabalin <dmitri...@gmail.com> Authored: Tue May 22 16:27:28 2018 +0700 Committer: Alexey Kuznetsov <akuznet...@apache.org> Committed: Tue May 22 16:27:28 2018 +0700 ---------------------------------------------------------------------- modules/web-console/frontend/app/app.js | 2 ++ .../ui-grid-column-resizer/directive.js | 29 ++++++++++++++++++++ .../components/ui-grid-column-resizer/index.js | 24 ++++++++++++++++ 3 files changed, 55 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/556f460a/modules/web-console/frontend/app/app.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/app.js b/modules/web-console/frontend/app/app.js index 60b4ebc..38872c7 100644 --- a/modules/web-console/frontend/app/app.js +++ b/modules/web-console/frontend/app/app.js @@ -128,6 +128,7 @@ import bsSelectMenu from './components/bs-select-menu'; import protectFromBsSelectRender from './components/protect-from-bs-select-render'; import uiGridHovering from './components/ui-grid-hovering'; import uiGridFilters from './components/ui-grid-filters'; +import uiGridColumnResizer from './components/ui-grid-column-resizer'; import listEditable from './components/list-editable'; import breadcrumbs from './components/breadcrumbs'; import panelCollapsible from './components/panel-collapsible'; @@ -222,6 +223,7 @@ angular.module('ignite-console', [ bsSelectMenu.name, uiGridHovering.name, uiGridFilters.name, + uiGridColumnResizer.name, protectFromBsSelectRender.name, AngularStrapTooltip.name, AngularStrapSelect.name, http://git-wip-us.apache.org/repos/asf/ignite/blob/556f460a/modules/web-console/frontend/app/components/ui-grid-column-resizer/directive.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/ui-grid-column-resizer/directive.js b/modules/web-console/frontend/app/components/ui-grid-column-resizer/directive.js new file mode 100644 index 0000000..6ba2a78 --- /dev/null +++ b/modules/web-console/frontend/app/components/ui-grid-column-resizer/directive.js @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default function() { + return { + priority: -200, + restrict: 'A', + require: '?^uiGrid', + link($scope, $element) { + $element.on('dblclick', function($event) { + $event.stopImmediatePropagation(); + }); + } + }; +} http://git-wip-us.apache.org/repos/asf/ignite/blob/556f460a/modules/web-console/frontend/app/components/ui-grid-column-resizer/index.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/ui-grid-column-resizer/index.js b/modules/web-console/frontend/app/components/ui-grid-column-resizer/index.js new file mode 100644 index 0000000..9edf1ef --- /dev/null +++ b/modules/web-console/frontend/app/components/ui-grid-column-resizer/index.js @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import angular from 'angular'; + +import uiGridColumnResizer from './directive'; + +export default angular + .module('ignite-console.ui-grid-column-resizer', []) + .directive('uiGridColumnResizer', uiGridColumnResizer);