changxin commited on
Commit
67788e5
1 Parent(s): 5d41d3c

Update wps-test/js/ribbon.js

Browse files
Files changed (1) hide show
  1. wps-test/js/ribbon.js +12 -0
wps-test/js/ribbon.js CHANGED
@@ -36,6 +36,7 @@ function OnAction(control) {
36
  wps.ribbonUI.InvalidateControl("btnShowcx")
37
  wps.ribbonUI.InvalidateControl("btnShowcx2")
38
  wps.ribbonUI.InvalidateControl("btnShowcx3")
 
39
  break
40
  }
41
  case "btnShowcx":
@@ -47,6 +48,9 @@ function OnAction(control) {
47
  case "btnShowcx3":
48
  wps.ShowDialog(GetUrlPath() + "/ui/chartjs2.html", "调用网页对话框", 400 * window.devicePixelRatio, 400 * window.devicePixelRatio, false)
49
  break
 
 
 
50
  default:
51
  break
52
  }
@@ -66,6 +70,8 @@ function GetImage(control) {
66
  return "images/M.svg"
67
  case "btnShowcx3":
68
  return "images/M.svg"
 
 
69
  default:
70
  ;
71
  }
@@ -99,6 +105,12 @@ function OnGetEnabled(control) {
99
  return bFlag
100
  break
101
  }
 
 
 
 
 
 
102
  default:
103
  break
104
  }
 
36
  wps.ribbonUI.InvalidateControl("btnShowcx")
37
  wps.ribbonUI.InvalidateControl("btnShowcx2")
38
  wps.ribbonUI.InvalidateControl("btnShowcx3")
39
+ wps.ribbonUI.InvalidateControl("chatgpt")
40
  break
41
  }
42
  case "btnShowcx":
 
48
  case "btnShowcx3":
49
  wps.ShowDialog(GetUrlPath() + "/ui/chartjs2.html", "调用网页对话框", 400 * window.devicePixelRatio, 400 * window.devicePixelRatio, false)
50
  break
51
+ case "chatgpt":
52
+ wps.ShowDialog(GetUrlPath() + "/ui/chatgpt.html", "调用网页对话框", 800 * window.devicePixelRatio, 800 * window.devicePixelRatio, false)
53
+ break
54
  default:
55
  break
56
  }
 
70
  return "images/M.svg"
71
  case "btnShowcx3":
72
  return "images/M.svg"
73
+ case "chatgpt":
74
+ return "images/M.svg"
75
  default:
76
  ;
77
  }
 
105
  return bFlag
106
  break
107
  }
108
+ case "chatgpt":
109
+ {
110
+ let bFlag = wps.PluginStorage.getItem("EnableFlag")
111
+ return bFlag
112
+ break
113
+ }
114
  default:
115
  break
116
  }