Skip to content

Commit 5e1500a

Browse files
committed
调整相关文件,添加Sqlite
1 parent 17aae3d commit 5e1500a

18 files changed

+217151
-159
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ __pycache__/
294294
*.vcxproj
295295
*.cmake
296296

297-
CMakelist/**
297+
CMakeFiles/**
298298
*.bak
299299
*.depend
300300
*.stamp
301+
CMakeCache.txt

browser/browser_window.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ void BrowserWindow::OnBrowserCreated(CefRefPtr<CefBrowser> browser) {
3434
REQUIRE_MAIN_THREAD();
3535
DCHECK(!browser_);
3636
browser_ = browser;
37-
int x = 0;
3837
delegate_->OnBrowserCreated(browser);
3938
}
4039

browser/client_handler.cc

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,10 @@ void ClientHandler::OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,
316316
model->AddSeparator();
317317

318318
// Add DevTools items to all context menus.
319-
model->AddItem(CLIENT_ID_SHOW_DEVTOOLS, "&Show DevTools");
320-
model->AddItem(CLIENT_ID_CLOSE_DEVTOOLS, "Close DevTools");
319+
model->AddItem(CLIENT_ID_SHOW_DEVTOOLS, "&Sea 开发工具 ");
320+
model->AddItem(CLIENT_ID_CLOSE_DEVTOOLS, " 关闭开发工具 ");
321321
model->AddSeparator();
322-
model->AddItem(CLIENT_ID_INSPECT_ELEMENT, "Inspect Element");
322+
model->AddItem(CLIENT_ID_INSPECT_ELEMENT, "检查项目 ");
323323

324324
if (HasSSLInformation(browser)) {
325325
model->AddSeparator();
@@ -445,8 +445,7 @@ void ClientHandler::OnDownloadUpdated(
445445
CEF_REQUIRE_UI_THREAD();
446446

447447
if (download_item->IsComplete()) {
448-
test_runner::Alert(browser, "File \"" +
449-
download_item->GetFullPath().ToString() +
448+
test_runner::Alert(browser, "File \"" + download_item->GetFullPath().ToString() +
450449
"\" downloaded successfully.");
451450
}
452451
}
@@ -1055,6 +1054,27 @@ void ClientHandler::NotifyTakeFocus(bool next) {
10551054
delegate_->OnTakeFocus(next);
10561055
}
10571056

1057+
static char* MBSCToCEF(const char* mbcsStr)
1058+
{
1059+
wchar_t* wideStr;
1060+
char* utf8Str;
1061+
int charLen;
1062+
1063+
charLen = MultiByteToWideChar(CP_UTF8, 0, mbcsStr, -1, NULL, 0);
1064+
charLen = strlen(mbcsStr) + 1;
1065+
wideStr = (wchar_t*)malloc(sizeof(wchar_t)*charLen);
1066+
MultiByteToWideChar(CP_ACP, 0, mbcsStr, -1, wideStr, charLen);
1067+
1068+
charLen = WideCharToMultiByte(CP_UTF8, 0, wideStr, -1, NULL, 0, NULL, NULL);
1069+
1070+
utf8Str = (char*)malloc(charLen);
1071+
1072+
WideCharToMultiByte(CP_UTF8, 0, wideStr, -1, utf8Str, charLen, NULL, NULL);
1073+
1074+
free(wideStr);
1075+
return utf8Str;
1076+
1077+
}
10581078
void ClientHandler::BuildTestMenu(CefRefPtr<CefMenuModel> model) {
10591079
if (model->GetCount() > 0)
10601080
model->AddSeparator();

browser/root_window_views.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void RootWindowViews::Init(RootWindow::Delegate* delegate,
4141
DCHECK(!initialized_);
4242

4343
delegate_ = delegate;
44-
with_controls_ = config.with_controls;
44+
with_controls_ = false; //config.with_controls;
4545
with_extension_ = config.with_extension;
4646
initially_hidden_ = config.initially_hidden;
4747
if (initially_hidden_ && !config.source_bounds.IsEmpty()) {

browser/root_window_win.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ void RootWindowWin::Init(RootWindow::Delegate* delegate,
122122
DCHECK(!initialized_);
123123

124124
delegate_ = delegate;
125-
with_controls_ = config.with_controls;
126-
with_osr_ = config.with_osr;
125+
with_controls_ = false; //config.with_controls; Sea::Set if there should be controls;
126+
with_osr_ = false; //config.with_osr;
127127
with_extension_ = config.with_extension;
128128

129129
start_rect_.left = config.bounds.x;

browser/test_runner.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void Prompt(CefRefPtr<CefBrowser> browser,
251251
// 1. Show a prompt() dialog via JavaScript.
252252
// 2. Pass the result to window.cefQuery().
253253
// 3. Handle the result in PromptHandler::OnQuery.
254-
const std::string& code = "window.cefQuery({'request': '" +
254+
const std::string& code = "window.seaAuth({'request': '" +
255255
std::string(kPrompt) + type + ":' + prompt('" +
256256
label + "', '" + default_value + "')});";
257257
browser->GetMainFrame()->ExecuteJavaScript(

btzero_10_flat/index.html

Lines changed: 14 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<html>
33

44
<head>
5-
<title>Flat Admin V.2 - Free Bootstrap Admin Templates</title>
5+
<title>Sea 智能工厂</title>
6+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
67
<meta name="viewport" content="width=device-width, initial-scale=1">
78
<!-- Fonts -->
89
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:300,400' rel='stylesheet' type='text/css'>
@@ -19,113 +20,30 @@
1920
<!-- CSS App -->
2021
<link rel="stylesheet" type="text/css" href="css/style.css">
2122
<link rel="stylesheet" type="text/css" href="css/themes/flat-blue.css">
23+
<script src="js/sea.js"></script>
2224
</head>
2325

2426
<body class="flat-blue">
2527
<div class="app-container">
2628
<div class="row content-container">
27-
<nav class="navbar navbar-default navbar-fixed-top navbar-top">
28-
<div class="container-fluid">
29-
<div class="navbar-header">
30-
<button type="button" class="navbar-expand-toggle">
31-
<i class="fa fa-bars icon"></i>
32-
</button>
33-
<ol class="breadcrumb navbar-breadcrumb">
34-
<li class="active">Dashboard</li>
35-
</ol>
36-
<button type="button" class="navbar-right-expand-toggle pull-right visible-xs">
37-
<i class="fa fa-th icon"></i>
38-
</button>
39-
</div>
40-
<ul class="nav navbar-nav navbar-right">
41-
<button type="button" class="navbar-right-expand-toggle pull-right visible-xs">
42-
<i class="fa fa-times icon"></i>
43-
</button>
44-
<li class="dropdown">
45-
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-comments-o"></i></a>
46-
<ul class="dropdown-menu animated fadeInDown">
47-
<li class="title">
48-
Notification <span class="badge pull-right">0</span>
49-
</li>
50-
<li class="message">
51-
No new notification
52-
</li>
53-
</ul>
54-
</li>
55-
<li class="dropdown danger">
56-
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-star-half-o"></i> 4</a>
57-
<ul class="dropdown-menu danger animated fadeInDown">
58-
<li class="title">
59-
Notification <span class="badge pull-right">4</span>
60-
</li>
61-
<li>
62-
<ul class="list-group notifications">
63-
<a href="#">
64-
<li class="list-group-item">
65-
<span class="badge">1</span> <i class="fa fa-exclamation-circle icon"></i> new registration
66-
</li>
67-
</a>
68-
<a href="#">
69-
<li class="list-group-item">
70-
<span class="badge success">1</span> <i class="fa fa-check icon"></i> new orders
71-
</li>
72-
</a>
73-
<a href="#">
74-
<li class="list-group-item">
75-
<span class="badge danger">2</span> <i class="fa fa-comments icon"></i> customers messages
76-
</li>
77-
</a>
78-
<a href="#">
79-
<li class="list-group-item message">
80-
view all
81-
</li>
82-
</a>
83-
</ul>
84-
</li>
85-
</ul>
86-
</li>
87-
<li class="dropdown profile">
88-
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Emily Hart <span class="caret"></span></a>
89-
<ul class="dropdown-menu animated fadeInDown">
90-
<li class="profile-img">
91-
<img src="img/profile/picjumbo.com_HNCK4153_resize.jpg" class="profile-img">
92-
</li>
93-
<li>
94-
<div class="profile-info">
95-
<h4 class="username">Emily Hart</h4>
96-
97-
<div class="btn-group margin-bottom-2x" role="group">
98-
<button type="button" class="btn btn-default"><i class="fa fa-user"></i> Profile</button>
99-
<button type="button" class="btn btn-default"><i class="fa fa-sign-out"></i> Logout</button>
100-
</div>
101-
</div>
102-
</li>
103-
</ul>
104-
</li>
105-
</ul>
106-
</div>
107-
</nav>
29+
<nav class="navbar navbar-default navbar-fixed-top navbar-top" id="topNavBar"> </nav>
10830
<div class="side-menu sidebar-inverse">
10931
<nav class="navbar navbar-default" role="navigation">
11032
<div class="side-menu-container">
11133
<div class="navbar-header">
11234
<a class="navbar-brand" href="#">
11335
<div class="icon fa fa-paper-plane"></div>
114-
<div class="title">Flat Admin V.2</div>
36+
<div class="title">Sea智能工厂</div>
11537
</a>
11638
<button type="button" class="navbar-expand-toggle pull-right visible-xs">
11739
<i class="fa fa-times icon"></i>
11840
</button>
11941
</div>
12042
<ul class="nav navbar-nav">
121-
<li class="active">
122-
<a href="index.html">
123-
<span class="icon fa fa-tachometer"></span><span class="title">Dashboard</span>
124-
</a>
125-
</li>
126-
<li class="panel panel-default dropdown">
43+
<li class="active"> <a href="index.html"><span class="icon fa fa-tachometer"></span><span class="title">智能中心</span></a> </li>
44+
<li class="panel panel-default dropdown">
12745
<a data-toggle="collapse" href="#dropdown-element">
128-
<span class="icon fa fa-desktop"></span><span class="title">UI Kits</span>
46+
<span class="icon fa fa-desktop"></span><span class="title">节点管理</span>
12947
</a>
13048
<!-- Dropdown level 1 -->
13149
<div id="dropdown-element" class="panel-collapse collapse">
@@ -159,7 +77,7 @@ <h4 class="username">Emily Hart</h4>
15977
</li>
16078
<li class="panel panel-default dropdown">
16179
<a data-toggle="collapse" href="#dropdown-table">
162-
<span class="icon fa fa-table"></span><span class="title">Table</span>
80+
<span class="icon fa fa-table"></span><span class="title">安全控制</span>
16381
</a>
16482
<!-- Dropdown level 1 -->
16583
<div id="dropdown-table" class="panel-collapse collapse">
@@ -175,7 +93,7 @@ <h4 class="username">Emily Hart</h4>
17593
</li>
17694
<li class="panel panel-default dropdown">
17795
<a data-toggle="collapse" href="#dropdown-form">
178-
<span class="icon fa fa-file-text-o"></span><span class="title">Form</span>
96+
<span class="icon fa fa-file-text-o"></span><span class="title">智能逻辑</span>
17997
</a>
18098
<!-- Dropdown level 1 -->
18199
<div id="dropdown-form" class="panel-collapse collapse">
@@ -261,7 +179,7 @@ <h4 class="username">Emily Hart</h4>
261179
<i class="icon fa fa-inbox fa-4x"></i>
262180
<div class="content">
263181
<div class="title">50</div>
264-
<div class="sub-title">New Mails</div>
182+
<div class="sub-title">台设备</div>
265183
</div>
266184
<div class="clear-both"></div>
267185
</div>
@@ -275,7 +193,7 @@ <h4 class="username">Emily Hart</h4>
275193
<i class="icon fa fa-comments fa-4x"></i>
276194
<div class="content">
277195
<div class="title">23</div>
278-
<div class="sub-title">New Message</div>
196+
<div class="sub-title">控制规则</div>
279197
</div>
280198
<div class="clear-both"></div>
281199
</div>
@@ -289,7 +207,7 @@ <h4 class="username">Emily Hart</h4>
289207
<i class="icon fa fa-tags fa-4x"></i>
290208
<div class="content">
291209
<div class="title">280</div>
292-
<div class="sub-title">Product View</div>
210+
<div class="sub-title">告警信息</div>
293211
</div>
294212
<div class="clear-both"></div>
295213
</div>
@@ -303,7 +221,7 @@ <h4 class="username">Emily Hart</h4>
303221
<i class="icon fa fa-share-alt fa-4x"></i>
304222
<div class="content">
305223
<div class="title">16</div>
306-
<div class="sub-title">Share</div>
224+
<div class="sub-title">我的安全提醒</div>
307225
</div>
308226
<div class="clear-both"></div>
309227
</div>

0 commit comments

Comments
 (0)