Merge "Add new language specified script" into tizen_4.0 accepted/tizen_4.0_unified tizen_4.0 tizen_4.0_tv accepted/tizen/4.0/unified/20171107.054724 submit/tizen_4.0/20171106.095042 tizen_4.0.IoT.p2_release
authorSuyeon Hwang <stom.hwang@samsung.com>
Mon, 6 Nov 2017 09:44:21 +0000 (09:44 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 6 Nov 2017 09:44:21 +0000 (09:44 +0000)
js/vc-webview.js

index 8c785df..468eccd 100755 (executable)
@@ -128,6 +128,11 @@ vc_flag_conflict = false,
 vc_flag_hint_exist = false,
 
 /**
+ * vc_flag_make_tooltip is a flag variable. When creating tooltip is set, it is true. Otherwise, it is false.
+ */
+vc_flag_make_tooltip = true,
+
+/**
  * vc_text_indicators is an array that contains text indicator elements
  */
 vc_text_indicators = [],
@@ -309,6 +314,10 @@ function vc_is_visible(elem, scr, isTextLink) {
  */
 function vc_make_hint(elem, child) {
        // vc_print_log(elem);
+       if (false == vc_flag_make_tooltip) {
+               return;
+       }
+
        var rect;
 
        rect = child.getBoundingClientRect();
@@ -717,9 +726,11 @@ function vc_remove_hints() {
 /**
  * vc_hide_hints function hides the hints from the screen. Hints elements still exist
  */
-function vc_hide_hints() {
+function vc_hide_hints(focusedExist) {
        /* Custom pre process to hide hints */
-       vc_custom_pre_hide_hints();
+       if (true != focusedExist) {
+               vc_custom_pre_hide_hints();
+       }
 
        for (var i = 0; i < vc_visible_hints.length; i++) {
                var hint = vc_visible_hints[i];
@@ -1003,7 +1014,7 @@ function vc_do_action(targetElem, numberTag, value) {
                if (vc_flag_conflict) {
                        vc_remove_highlight(numberTag.textContent.trim());
                }
-               vc_hide_hints();
+               vc_hide_hints(true);
        } else {
                position = elem.getClientRects()[0];
                effect.style.left = (position.left - 35) + 'px'
@@ -1179,8 +1190,6 @@ function vc_click(cmd, param) {
 
                return vc_search_text(param);
        }
-
-       return [-1, 0, 0];
 }
 
 /**
@@ -1417,6 +1426,19 @@ function vc_get_conflict_status() {
 }
 
 /**
+ * vc_set_make_tooltip function sets the vc_flag_make_tooltip.
+ *
+ * @param makeTooltip  If it is 1, then set vc_flag_make_tooltip as true. Otherwise false.
+ */
+function vc_set_make_tooltip(makeTooltip) {
+       if (1 == makeTooltip) {
+               vc_flag_make_tooltip = true;
+       } else {
+               vc_flag_make_tooltip = false;
+       }
+}
+
+/**
  * vc_init function initialize some elements and styles to use voice control.
  */
 function vc_init() {
@@ -1643,4 +1665,4 @@ function vc_init() {
        }, false);
 }
 
-vc_init();
\ No newline at end of file
+vc_init();