ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [03/17] ignite git commit: IGNITE-3375 Removed unneeded directive.
Date Fri, 08 Jul 2016 06:27:49 GMT
IGNITE-3375 Removed unneeded directive.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1f46ff1c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1f46ff1c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1f46ff1c

Branch: refs/heads/ignite-3262
Commit: 1f46ff1cb3096996f6ed5b8b020be37a7fbd37ce
Parents: 4ee5a19
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Mon Jul 4 16:29:27 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Mon Jul 4 16:29:27 2016 +0700

----------------------------------------------------------------------
 modules/web-console/src/main/js/app/app.js      |  2 -
 .../directives/retain-selection.directive.js    | 66 --------------------
 2 files changed, 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1f46ff1c/modules/web-console/src/main/js/app/app.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/app.js b/modules/web-console/src/main/js/app/app.js
index ed83ac5..00ae3eb 100644
--- a/modules/web-console/src/main/js/app/app.js
+++ b/modules/web-console/src/main/js/app/app.js
@@ -60,7 +60,6 @@ import igniteOnClickFocus from './directives/on-click-focus.directive.js';
 import igniteOnEnter from './directives/on-enter.directive.js';
 import igniteOnEnterFocusMove from './directives/on-enter-focus-move.directive.js';
 import igniteOnEscape from './directives/on-escape.directive.js';
-import igniteRetainSelection from './directives/retain-selection.directive.js';
 import igniteUiAceDocker from './directives/ui-ace-docker/ui-ace-docker.directive';
 import igniteUiAceJava from './directives/ui-ace-java/ui-ace-java.directive';
 import igniteUiAcePojos from './directives/ui-ace-pojos/ui-ace-pojos.directive';
@@ -185,7 +184,6 @@ angular
 .directive(...igniteOnEnter)
 .directive(...igniteOnEnterFocusMove)
 .directive(...igniteOnEscape)
-.directive(...igniteRetainSelection)
 .directive(...igniteUiAceDocker)
 .directive(...igniteUiAceJava)
 .directive(...igniteUiAcePojos)

http://git-wip-us.apache.org/repos/asf/ignite/blob/1f46ff1c/modules/web-console/src/main/js/app/directives/retain-selection.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/app/directives/retain-selection.directive.js
b/modules/web-console/src/main/js/app/directives/retain-selection.directive.js
deleted file mode 100644
index a4c2023..0000000
--- a/modules/web-console/src/main/js/app/directives/retain-selection.directive.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-
-// Directive to retain selection. To fix angular-strap typeahead bug with setting cursor
to the end of text.
-export default ['igniteRetainSelection', ['$timeout', ($timeout) => {
-    let promise;
-
-    return function(scope, elem) {
-        elem.on('keydown', (evt) => {
-            const key = evt.which;
-            const ctrlDown = evt.ctrlKey || evt.metaKey;
-            const input = this;
-
-            let start = input.selectionStart;
-
-            if (promise)
-                $timeout.cancel(promise);
-
-            promise = $timeout(() => {
-                let setCursor = false;
-
-                // Handle Backspace[8].
-                if (key === 8 && start > 0) {
-                    start -= 1;
-
-                    setCursor = true;
-                }
-                // Handle Del[46].
-                else if (key === 46)
-                    setCursor = true;
-                // Handle: Caps Lock[20], Tab[9], Shift[16], Ctrl[17], Alt[18], Esc[27],
Enter[13], Arrows[37..40], Home[36], End[35], Ins[45], PgUp[33], PgDown[34], F1..F12[111..124],
Num Lock[], Scroll Lock[145].
-                else if (!(key === 8 || key === 9 || key === 13 || (key > 15 &&
key < 20) || key === 27 ||
-                    (key > 32 && key < 41) || key === 45 || (key > 111 &&
key < 124) || key === 144 || key === 145)) {
-                    // Handle: Ctrl + [A[65], C[67], V[86]].
-                    if (!(ctrlDown && (key === 65 || key === 67 || key === 86)))
{
-                        start += 1;
-
-                        setCursor = true;
-                    }
-                }
-
-                if (setCursor)
-                    input.setSelectionRange(start, start);
-
-                promise = null;
-            });
-        });
-
-        // Removes bound events in the element itself when the scope is destroyed
-        scope.$on('$destroy', () => elem.off('keydown'));
-    };
-}]];


Mime
View raw message